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 9dc23edee3)
v3.5.13-sru
Michele Calgaro 4 years ago committed by Slávek Banko
parent 05dbf5c0b1
commit 5dad8abdc3
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

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

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

Loading…
Cancel
Save