summaryrefslogtreecommitdiffstats
path: root/tdeprint
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-01-31 18:36:58 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-01-31 18:36:58 +0900
commit9dc23edee3aa192f99ac56161a341d38374aaacf (patch)
tree8cf9f247a6fd49d48697d247212bdcf20552960c /tdeprint
parentaa98dbfe80580169f3df12489a77e8b904a1d9b9 (diff)
downloadtdelibs-9dc23edee3aa192f99ac56161a341d38374aaacf.tar.gz
tdelibs-9dc23edee3aa192f99ac56161a341d38374aaacf.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>
Diffstat (limited to 'tdeprint')
-rw-r--r--tdeprint/management/kmjobviewer.cpp12
-rw-r--r--tdeprint/management/kmjobviewer.h1
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();