X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fmainwin.cpp;h=fc53283b02fef73527cfeb0b80cd6cd48b99c462;hb=4df8d4afa450d4686bc4321b399bcb244f04d220;hp=a3048b22291a0a9d3e1fc9b5fe108604c508dfaa;hpb=5b686746c880e5cda6d5de3e08180ea4332ff222;p=quassel.git diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index a3048b22..fc53283b 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 * @@ -108,6 +108,10 @@ #include "indicatornotificationbackend.h" #endif +#ifdef HAVE_NOTIFICATION_CENTER + #include "osxnotificationbackend.h" +#endif + #include "settingspages/aliasessettingspage.h" #include "settingspages/appearancesettingspage.h" #include "settingspages/backlogsettingspage.h" @@ -218,6 +222,10 @@ void MainWin::init() QtUi::registerNotificationBackend(new IndicatorNotificationBackend(this)); #endif +#ifdef HAVE_NOTIFICATION_CENTER + QtUi::registerNotificationBackend(new OSXNotificationBackend(this)); +#endif + // we assume that at this point, all configurable actions are defined! QtUi::loadShortcuts(); @@ -298,7 +306,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();