Summary: | Requesting quit from tray icon displays docking message | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | N.Cat <trisk-bug> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ugarro |
Priority: | NOR | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
N.Cat
2005-04-10 11:16:42 UTC
*** Bug 104097 has been marked as a duplicate of this bug. *** SVN commit 414502 by osterfeld: Don't display "running in systray" message when exiting from systray BUG: 103596 M +2 -2 trunk/KDE/kdepim/akregator/src/Makefile.am M +23 -9 trunk/KDE/kdepim/akregator/src/akregator.cpp M +6 -1 trunk/KDE/kdepim/akregator/src/akregator.h M +10 -15 trunk/KDE/kdepim/akregator/src/akregator_part.cpp M +4 -8 trunk/KDE/kdepim/akregator/src/akregator_part.h M +17 -3 trunk/KDE/kdepim/akregator/src/trayicon.cpp M +5 -0 trunk/KDE/kdepim/akregator/src/trayicon.h SVN commit 414506 by osterfeld: backport 103596 (Don't show "running in systray" box when quitting from systray) CCBUG: 103596 M +1 -0 branches/KDE/3.4/kdepim/akregator/ChangeLog M +1 -2 branches/KDE/3.4/kdepim/akregator/src/Makefile.am M +10 -2 branches/KDE/3.4/kdepim/akregator/src/akregator.cpp M +4 -0 branches/KDE/3.4/kdepim/akregator/src/akregator.h M +5 -0 branches/KDE/3.4/kdepim/akregator/src/akregator_part.cpp M +2 -0 branches/KDE/3.4/kdepim/akregator/src/akregator_part.h --- branches/KDE/3.4/kdepim/akregator/ChangeLog #414505:414506 @@ -9,6 +9,7 @@ - Changed prev/next unread article actions to cycle through all unread articles -fo Bug fixes: + - Don't show "running in systray" message box when quitting from systray (#105396) -fo - make BrowserRun delete itself when the Viewer gets destroyed (#101413) -tpr - tolerate leading and trailing whitespace in the Add Feed Dialog (#101988) -fo - fixed confusion of "disable archiving" and expiry by age (#101907) -fo --- branches/KDE/3.4/kdepim/akregator/src/Makefile.am #414505:414506 @@ -39,7 +39,7 @@ # this is a lib shared by both the KPart and the main application lib_LTLIBRARIES = libakregatorprivate.la -libakregatorprivate_la_SOURCES = akregatorconfig.kcfgc aboutdata.cpp +libakregatorprivate_la_SOURCES = akregatorconfig.kcfgc aboutdata.cpp trayicon.cpp libakregatorprivate_la_LDFLAGS = $(all_libraries) -avoid-version -no-undefined libakregatorprivate_la_LIBADD = $(top_builddir)/akregator/src/librss/librsslocal.la $(LIB_KHTML) @@ -95,7 +95,6 @@ settings_general.ui \ settings_archive.ui \ settings_browser.ui \ - trayicon.cpp \ feediconmanager.skel \ akregator_partiface.skel \ akregator_part.cpp \ --- branches/KDE/3.4/kdepim/akregator/src/akregator.cpp #414505:414506 @@ -26,12 +26,14 @@ #include "akregator.h" #include "akregator_part.h" #include "akregatorconfig.h" +#include "trayicon.h" //settings #include <dcopclient.h> #include <kaction.h> +#include <kapplication.h> #include <kconfig.h> #include <kdebug.h> #include <kedittoolbar.h> @@ -116,7 +118,7 @@ setCentralWidget(m_part->widget()); connect(m_part, SIGNAL(setWindowCaption (const QString &)), this, SLOT(setCaption (const QString &))); - + connect(m_part->trayIcon(), SIGNAL(quitSelected()), this, SLOT(slotQuit())); // and integrate the part's GUI with the shell's connectActionCollection(m_part->actionCollection()); createGUI(m_part); @@ -212,6 +214,12 @@ } +void MainWindow::slotQuit() +{ + if (m_part->trayIcon()) + m_part->trayIcon()->hide(); + kapp->quit(); +} void MainWindow::applyNewToolbarConfig() { @@ -245,7 +253,7 @@ bool MainWindow::queryClose() { - if ( kapp->sessionSaving() || !m_part->isTrayIconEnabled() ) + if ( kapp->sessionSaving() || m_part->trayIcon() == 0 || m_part->trayIcon()->isHidden() ) return true; else { --- branches/KDE/3.4/kdepim/akregator/src/akregator.h #414505:414506 @@ -120,6 +120,10 @@ */ virtual bool queryClose(); +protected slots: + + void slotQuit(); + private: void setupActions(); void connectActionCollection(KActionCollection *coll); --- branches/KDE/3.4/kdepim/akregator/src/akregator_part.cpp #414505:414506 @@ -541,6 +541,11 @@ return Settings::showTrayIcon(); } +TrayIcon* Part::trayIcon() +{ + return m_trayIcon; +} + QPixmap Part::takeTrayIconScreenshot() const { return m_trayIcon->takeScreenshot(); --- branches/KDE/3.4/kdepim/akregator/src/akregator_part.h #414505:414506 @@ -142,6 +142,8 @@ @return Screenshot of the trayicon */ virtual QPixmap takeTrayIconScreenshot() const; + virtual TrayIcon* trayIcon(); + /** merges a nested part's GUI into the gui of this part @return true iff merging was successful, i.e. the GUI factory was not NULL */ virtual bool mergePart(KParts::Part*); |