KJobViewer: make sure the printer lists is correctly updated when printers are added or removed. This relates to bug 1362.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/82/head
Michele Calgaro 5 years ago
parent 66d5e21568
commit 69c2d469b8
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -272,6 +272,7 @@ TQPtrList<KMPrinter>* KMManager::printerList(bool reload)
if (defprinter)
setSoftDefault(defprinter);
}
emit printerListUpdated();
}
return &m_fprinters;

@ -143,6 +143,7 @@ public:
signals:
void updatePossible(bool);
void printerListUpdated();
protected:
// the real printer listing job is done here

@ -104,6 +104,8 @@ KMJobViewer::KMJobViewer(TQWidget *parent, const char *name)
conf->setGroup( "Jobs" );
resize( conf->readSizeEntry( "Size", &defSize ) );
}
connect(KMFactory::self()->manager(), TQT_SIGNAL(printerListUpdated()),TQT_SLOT(slotPrinterListUpdated()));
}
KMJobViewer::~KMJobViewer()
@ -532,6 +534,11 @@ void KMJobViewer::slotRightClicked(TQListViewItem*,const TQPoint& p,int)
if (m_pop) m_pop->popup(p);
}
void KMJobViewer::slotPrinterListUpdated()
{
loadPrinters();
}
void KMJobViewer::loadPrinters()
{
m_printers.clear();

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

Loading…
Cancel
Save