diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-31 18:36:58 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-31 20:43:59 +0900 |
commit | 41cceb16c46d9d9b9328bb27f939a1c8de7bda1f (patch) | |
tree | f506aa6639ba87b1c1a7464a79bc22f0a1111c67 /tdeprint/management | |
parent | 41e0f335b5e2ab65cf47191a5b1c32adee2c24c3 (diff) | |
download | tdelibs-41cceb16c46d9d9b9328bb27f939a1c8de7bda1f.tar.gz tdelibs-41cceb16c46d9d9b9328bb27f939a1c8de7bda1f.zip |
KJobviewer: keep "permanent window" option across sessions.
Taken from https://bugs.trinitydesktop.org/show_bug.cgi?id=1362 proposed
patch.
Signed-off-by: Roman Savochenko <roman@roman.home>
(cherry picked from commit 9dc23edee3aa192f99ac56161a341d38374aaacf)
Diffstat (limited to 'tdeprint/management')
-rw-r--r-- | tdeprint/management/kmjobviewer.cpp | 12 | ||||
-rw-r--r-- | tdeprint/management/kmjobviewer.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp index b0f95069e..7e149ed48 100644 --- a/tdeprint/management/kmjobviewer.cpp +++ b/tdeprint/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 ); + + TDEConfig *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 ) +{ + TDEConfig *conf = KMFactory::self()->printConfig(); + conf->setGroup("Jobs"); + conf->writeEntry("KeepWindow",val); +} + void KMJobViewer::slotShowMoveMenu() { TQPopupMenu *menu = static_cast<TDEActionMenu*>(actionCollection()->action("job_move"))->popupMenu(); diff --git a/tdeprint/management/kmjobviewer.h b/tdeprint/management/kmjobviewer.h index 7a4530f3c..5bfda8467 100644 --- a/tdeprint/management/kmjobviewer.h +++ b/tdeprint/management/kmjobviewer.h @@ -86,6 +86,7 @@ protected slots: void slotUserChanged(); void slotConfigure(); void slotDropped( TQDropEvent*, TQListViewItem* ); + void slotKeepWindowChange(bool); protected: void init(); |