diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2020-01-31 18:36:58 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 21:09:22 +0100 |
commit | 5dad8abdc3c35e68ffcefe9053d74113969a424b (patch) | |
tree | 328d07f40c7328407d0504465f6f018fb36d1498 /kdeprint/management/kmjobviewer.cpp | |
parent | 05dbf5c0b1a80c03fd332cf9cd81e9247c1d7063 (diff) | |
download | tdelibs-5dad8abdc3c35e68ffcefe9053d74113969a424b.tar.gz tdelibs-5dad8abdc3c35e68ffcefe9053d74113969a424b.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 'kdeprint/management/kmjobviewer.cpp')
-rw-r--r-- | kdeprint/management/kmjobviewer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<KActionMenu*>(actionCollection()->action("job_move"))->popupMenu(); |