+void SystemTray::init()
+{
+ ActionCollection *coll = QtUi::actionCollection("General");
+ _minimizeRestoreAction = new Action(tr("&Minimize"), this, this, SLOT(minimizeRestore()));
+
+#ifdef HAVE_KDE4
+ KMenu *kmenu;
+ _trayMenu = kmenu = new KMenu();
+ kmenu->addTitle(_activeIcon, "Quassel IRC");
+#else
+ _trayMenu = new QMenu(associatedWidget());
+#endif
+
+ _trayMenu->setTitle("Quassel IRC");
+
+#ifndef HAVE_KDE4
+ _trayMenu->setAttribute(Qt::WA_Hover);
+#endif
+
+ _trayMenu->addAction(coll->action("ConnectCore"));
+ _trayMenu->addAction(coll->action("DisconnectCore"));
+ _trayMenu->addAction(coll->action("CoreInfo"));
+ _trayMenu->addSeparator();
+ _trayMenu->addAction(_minimizeRestoreAction);
+ _trayMenu->addAction(coll->action("Quit"));
+
+ connect(_trayMenu, SIGNAL(aboutToShow()), SLOT(trayMenuAboutToShow()));
+
+ NotificationSettings notificationSettings;
+ notificationSettings.initAndNotify("Systray/Animate", this, SLOT(enableAnimationChanged(QVariant)), true);
+}