X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=9019e24c60a53392e96472923dfde90df7cde87f;hp=cc667caa5416edaf0baf3b18cd0ad55fa3fa2721;hb=fd97519376748925efe765d138ad5af637d809bd;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index cc667caa..9019e24c 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2013 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,8 +15,9 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ + #include "mainwin.h" #include @@ -93,6 +94,9 @@ # ifdef HAVE_PHONON # include "phononnotificationbackend.h" # endif +# ifdef HAVE_LIBSNORE +# include "snorenotificationbackend.h" +# endif # include "systraynotificationbackend.h" # include "taskbarnotificationbackend.h" #else /* HAVE_KDE */ @@ -107,6 +111,14 @@ #include "indicatornotificationbackend.h" #endif +#ifdef HAVE_NOTIFICATION_CENTER + #include "osxnotificationbackend.h" +#endif + +#ifdef HAVE_DBUS + #include "dockmanagernotificationbackend.h" +#endif + #include "settingspages/aliasessettingspage.h" #include "settingspages/appearancesettingspage.h" #include "settingspages/backlogsettingspage.h" @@ -203,7 +215,9 @@ void MainWin::init() # ifdef HAVE_PHONON QtUi::registerNotificationBackend(new PhononNotificationBackend(this)); # endif -# ifndef QT_NO_SYSTEMTRAYICON +# ifdef HAVE_LIBSNORE + QtUi::registerNotificationBackend(new SnoreNotificationBackend(this)); +# elif !defined(QT_NO_SYSTEMTRAYICON) QtUi::registerNotificationBackend(new SystrayNotificationBackend(this)); # endif @@ -217,6 +231,14 @@ void MainWin::init() QtUi::registerNotificationBackend(new IndicatorNotificationBackend(this)); #endif +#ifdef HAVE_NOTIFICATION_CENTER + QtUi::registerNotificationBackend(new OSXNotificationBackend(this)); +#endif + +#ifdef HAVE_DBUS + QtUi::registerNotificationBackend(new DockManagerNotificationBackend(this)); +#endif + // we assume that at this point, all configurable actions are defined! QtUi::loadShortcuts(); @@ -297,7 +319,9 @@ void MainWin::restoreStateFromSettings(UiSettings &s) move(_normalPos); #endif - if (s.value("MainWinHidden").toBool() && QtUi::haveSystemTray()) + if ((Quassel::isOptionSet("hidewindow") + || s.value("MainWinHidden").toBool()) + && _systemTray->isSystemTrayAvailable()) QtUi::hideMainWidget(); else if (s.value("MainWinMinimized").toBool()) showMinimized(); @@ -633,7 +657,7 @@ void MainWin::removeBufferView(int bufferViewConfigId) void MainWin::bufferViewToggled(bool enabled) { - if (!enabled && !isVisible()) { + if (!enabled && !isMinimized()) { // hiding the mainwindow triggers a toggle of the bufferview (which pretty much sucks big time) // since this isn't our fault and we can't do anything about it, we suppress the resulting calls return;