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>
pull/71/head
Michele Calgaro 4 years ago
parent aa98dbfe80
commit 9dc23edee3
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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();

@ -86,6 +86,7 @@ protected slots:
void slotUserChanged();
void slotConfigure();
void slotDropped( TQDropEvent*, TQListViewItem* );
void slotKeepWindowChange(bool);
protected:
void init();

Loading…
Cancel
Save