diff options
Diffstat (limited to 'src/toplevel.cpp')
| -rw-r--r-- | src/toplevel.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/toplevel.cpp b/src/toplevel.cpp index ae2cd4d..beb0006 100644 --- a/src/toplevel.cpp +++ b/src/toplevel.cpp @@ -59,7 +59,7 @@ #include "toplevel.h" #include "toplevel.moc" -TopLevel::TopLevel() : KSystemTray(), ticketWatch(0), m_refreshTimer(0), notifyExpiryMinutes(0) +TopLevel::TopLevel() : KSystemTray(), ticketWatch(0), m_refreshTimer(0), m_requestUpdateTimer(0), notifyExpiryMinutes(0) { setBackgroundMode(X11ParentRelative); // what for? @@ -145,6 +145,15 @@ void TopLevel::setupTimers() { connect(m_refreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateTicketList())); m_refreshTimer->start(10*1000, false); } + + if (!m_requestUpdateTimer) { + m_requestUpdateTimer = new TQTimer(this); + connect(m_requestUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateTicketList())); + } +} + +void TopLevel::requestTicketListUpdate() { + m_requestUpdateTimer->start(0, TRUE); } void TopLevel::updateTicketList() { @@ -154,9 +163,9 @@ void TopLevel::updateTicketList() { if (!ticketWatch) { ticketWatch = new KDirWatch(); - connect(ticketWatch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(updateTicketList())); - connect(ticketWatch, TQT_SIGNAL(created(const TQString&)), this, TQT_SLOT(updateTicketList())); - connect(ticketWatch, TQT_SIGNAL(deleted(const TQString&)), this, TQT_SLOT(updateTicketList())); + connect(ticketWatch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(requestTicketListUpdate())); + connect(ticketWatch, TQT_SIGNAL(created(const TQString&)), this, TQT_SLOT(requestTicketListUpdate())); + connect(ticketWatch, TQT_SIGNAL(deleted(const TQString&)), this, TQT_SLOT(requestTicketListUpdate())); ticketWatch->addFile(m_ticketFile); ticketWatch->startScan(); } |
