summaryrefslogtreecommitdiffstats
path: root/tdeprint/management
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-05-02 23:48:19 +0900
committerMichele Calgaro <[email protected]>2020-05-12 11:58:52 +0900
commit154fda159c78daf8a9f2e7d5daa5e02cb276674a (patch)
tree7a1cd57b80999a6cb9d05741d43cfc7aef397d69 /tdeprint/management
parente1e204ab672d8c5f5e184d0b2d628b487414f682 (diff)
downloadtdelibs-154fda159c78daf8a9f2e7d5daa5e02cb276674a.tar.gz
tdelibs-154fda159c78daf8a9f2e7d5daa5e02cb276674a.zip
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 <[email protected]> (cherry picked from commit 69c2d469b80d8cf7b99a62ebd7c2f4bd8281712b)
Diffstat (limited to 'tdeprint/management')
-rw-r--r--tdeprint/management/kmjobviewer.cpp7
-rw-r--r--tdeprint/management/kmjobviewer.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/tdeprint/management/kmjobviewer.cpp b/tdeprint/management/kmjobviewer.cpp
index 43f027fe1..70a6c6e85 100644
--- a/tdeprint/management/kmjobviewer.cpp
+++ b/tdeprint/management/kmjobviewer.cpp
@@ -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();
diff --git a/tdeprint/management/kmjobviewer.h b/tdeprint/management/kmjobviewer.h
index 5bfda8467..f9e6ffb80 100644
--- a/tdeprint/management/kmjobviewer.h
+++ b/tdeprint/management/kmjobviewer.h
@@ -87,6 +87,7 @@ protected slots:
void slotConfigure();
void slotDropped( TQDropEvent*, TQListViewItem* );
void slotKeepWindowChange(bool);
+ void slotPrinterListUpdated();
protected:
void init();