diff --git a/kdeprint/management/kmjobviewer.cpp b/kdeprint/management/kmjobviewer.cpp index 4ae3ef46f..8d723e734 100644 --- a/kdeprint/management/kmjobviewer.cpp +++ b/kdeprint/management/kmjobviewer.cpp @@ -332,6 +332,11 @@ void KMJobViewer::initActions() // create status bar KStatusBar *statusbar = statusBar(); m_stickybox = new TQCheckBox( i18n( "Keep window permanent" ), statusbar ); + + KConfig *conf = KMFactory::self()->printConfig(); + conf->setGroup("Jobs"); + m_stickybox->setChecked(conf->readBoolEntry("KeepWindow",true)); + connect(m_stickybox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotKeepWindowChange(bool))); statusbar->addWidget( m_stickybox, 1, false ); statusbar->insertItem(" " + i18n("Max.: %1").arg(i18n("Unlimited"))+ " ", 0, 0, true); statusbar->setItemFixed(0); @@ -365,6 +370,13 @@ void KMJobViewer::buildPrinterMenu(TQPopupMenu *menu, bool use_all, bool use_spe } } +void KMJobViewer::slotKeepWindowChange( bool val ) +{ + KConfig *conf = KMFactory::self()->printConfig(); + conf->setGroup("Jobs"); + conf->writeEntry("KeepWindow",val); +} + void KMJobViewer::slotShowMoveMenu() { TQPopupMenu *menu = static_cast(actionCollection()->action("job_move"))->popupMenu(); diff --git a/kdeprint/management/kmjobviewer.h b/kdeprint/management/kmjobviewer.h index a8ac7d0af..ae7fb4f89 100644 --- a/kdeprint/management/kmjobviewer.h +++ b/kdeprint/management/kmjobviewer.h @@ -86,6 +86,7 @@ protected slots: void slotUserChanged(); void slotConfigure(); void slotDropped( TQDropEvent*, TQListViewItem* ); + void slotKeepWindowChange(bool); protected: void init();