#else /* HAVE_KDE */
# include "knotificationbackend.h"
#endif /* HAVE_KDE */
+#include "systrayanimationnotificationbackend.h"
#ifdef HAVE_LIBSNORE
setWindowTitle("Quassel IRC");
setWindowIconText("Quassel IRC");
+ // Set the default icon for all windows
+ QApplication::setWindowIcon(QIcon::fromTheme("quassel"));
updateIcon();
}
#endif /* HAVE_KDE */
+#ifndef QT_NO_SYSTEMTRAYICON
+ QtUi::registerNotificationBackend(new SystrayAnimationNotificationBackend(this));
+#endif
#ifdef HAVE_LIBSNORE
QtUi::registerNotificationBackend(new SnoreNotificationBackend(this));
#elif !defined(QT_NO_SYSTEMTRAYICON) && !defined(HAVE_KDE)
// restore locked state of docks
QtUi::actionCollection("General")->action("LockLayout")->setChecked(s.value("LockLayout", false).toBool());
- CoreConnection *conn = Client::coreConnection();
- if (!conn->connectToCore()) {
- // No autoconnect selected (or no accounts)
- showCoreConnectionDlg();
- }
+ QTimer::singleShot(0, this, SLOT(doAutoConnect()));
}
else
icon = QIcon::fromTheme("inactive-quassel", QIcon(":/icons/inactive-quassel.png"));
setWindowIcon(icon);
- qApp->setWindowIcon(icon);
}
coll->addAction("ConfigureQuassel", configureQuasselAct);
// Help
- QAction *aboutQuasselAct = new Action(QIcon(":/icons/quassel.png"), tr("&About Quassel"), coll,
+ QAction *aboutQuasselAct = new Action(QIcon::fromTheme("quassel"), tr("&About Quassel"), coll,
this, SLOT(showAboutDlg()));
aboutQuasselAct->setMenuRole(QAction::AboutRole);
coll->addAction("AboutQuassel", aboutQuasselAct);
#else
_systemTray = new SystemTray(this); // dummy
#endif
- _systemTray->init();
}
}
+void MainWin::doAutoConnect()
+{
+ if (!Client::coreConnection()->connectToCore()) {
+ // No autoconnect selected (or no accounts)
+ showCoreConnectionDlg();
+ }
+}
+
+
void MainWin::connectedToCore()
{
Q_CHECK_PTR(Client::bufferViewManager());