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>
(cherry picked from commit 69c2d469b8)
v3.5.13-sru
Michele Calgaro 5 years ago committed by Slávek Banko
parent df6c901347
commit b34eba6147
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

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

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

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

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

Loading…
Cancel
Save