projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mark string untranslatable
[quassel.git]
/
src
/
qtui
/
mainwin.cpp
diff --git
a/src/qtui/mainwin.cpp
b/src/qtui/mainwin.cpp
index
a3048b2
..
5460a34
100644
(file)
--- a/
src/qtui/mainwin.cpp
+++ b/
src/qtui/mainwin.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
2
by the Quassel Project *
+ * Copyright (C) 2005-201
3
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-94,6
+94,9
@@
# ifdef HAVE_PHONON
# include "phononnotificationbackend.h"
# endif
# ifdef HAVE_PHONON
# include "phononnotificationbackend.h"
# endif
+# ifdef HAVE_LIBSNORE
+# include "snorenotificationbackend.h"
+# endif
# include "systraynotificationbackend.h"
# include "taskbarnotificationbackend.h"
#else /* HAVE_KDE */
# include "systraynotificationbackend.h"
# include "taskbarnotificationbackend.h"
#else /* HAVE_KDE */
@@
-108,6
+111,14
@@
#include "indicatornotificationbackend.h"
#endif
#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"
#include "settingspages/aliasessettingspage.h"
#include "settingspages/appearancesettingspage.h"
#include "settingspages/backlogsettingspage.h"
@@
-204,7
+215,9
@@
void MainWin::init()
# ifdef HAVE_PHONON
QtUi::registerNotificationBackend(new PhononNotificationBackend(this));
# endif
# 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
QtUi::registerNotificationBackend(new SystrayNotificationBackend(this));
# endif
@@
-218,6
+231,14
@@
void MainWin::init()
QtUi::registerNotificationBackend(new IndicatorNotificationBackend(this));
#endif
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();
// we assume that at this point, all configurable actions are defined!
QtUi::loadShortcuts();
@@
-298,7
+319,9
@@
void MainWin::restoreStateFromSettings(UiSettings &s)
move(_normalPos);
#endif
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();
QtUi::hideMainWidget();
else if (s.value("MainWinMinimized").toBool())
showMinimized();