- _trayMenu->addAction(coll->action("ConnectCore"));
- _trayMenu->addAction(coll->action("DisconnectCore"));
- _trayMenu->addAction(coll->action("CoreInfo"));
-#ifndef HAVE_KDE
- _trayMenu->addSeparator();
- _trayMenu->addAction(coll->action("Quit"));
-#endif /* HAVE_KDE */
+ _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);
+}
+
+
+void SystemTray::trayMenuAboutToShow()
+{
+ if (GraphicalUi::isMainWidgetVisible())
+ _minimizeRestoreAction->setText(tr("&Minimize"));
+ else
+ _minimizeRestoreAction->setText(tr("&Restore"));