-void LegacySystemTray::showMessage(const QString &title, const QString &message, SystemTray::MessageIcon icon, int millisecondsTimeoutHint) {
- _trayIcon->showMessage(title, message, (QSystemTrayIcon::MessageIcon)icon, millisecondsTimeoutHint);
+void LegacySystemTray::on_messageClicked() {
+ emit messageClicked(_lastMessageId);
+}
+
+void LegacySystemTray::showMessage(const QString &title, const QString &message, SystemTray::MessageIcon icon, int msTimeout, uint id) {
+ // fancy stuff later: show messages in order
+ // for now, we just show the last message
+ _lastMessageId = id;
+ _trayIcon->showMessage(title, message, (QSystemTrayIcon::MessageIcon)icon, msTimeout);
+}
+
+void LegacySystemTray::closeMessage(uint notificationId) {
+ Q_UNUSED(notificationId)
+
+ // there really seems to be no sane way to close the bubble... :(
+#ifdef Q_WS_X11
+ showMessage("", "", NoIcon, 1);
+#endif