[Pkg-running-devel] [openambit] 65/131: Added tray icon messages when syncing in minimized mode

Christian Perrier bubulle at moszumanska.debian.org
Thu Jul 17 20:19:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository openambit.

commit 0b1c71e8a1d42d35be81c3a5d09859129dd4b3dd
Author: Emil Ljungdahl <emil at kratern.se>
Date:   Wed Jan 22 22:02:01 2014 +0100

    Added tray icon messages when syncing in minimized mode
---
 src/openambit/mainwindow.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/openambit/mainwindow.cpp b/src/openambit/mainwindow.cpp
index 05eba3e..be69ebc 100644
--- a/src/openambit/mainwindow.cpp
+++ b/src/openambit/mainwindow.cpp
@@ -290,12 +290,18 @@ void MainWindow::syncFinished(bool success)
         currentLogMessageRow->setMessage(tr("Syncronization complete"));
         currentLogMessageRow->setStatus(LogMessageRow::StatusSuccess);
         ui->verticalLayoutLogMessages->addLayout(currentLogMessageRow);
+        if (isMinimized()) {
+            trayIcon->showMessage(tr("openambit"), tr("Syncronisation finished"));
+        }
     }
     else {
         currentLogMessageRow = new LogMessageRow(0);
         currentLogMessageRow->setMessage(tr("Syncronization failed"));
         currentLogMessageRow->setStatus(LogMessageRow::StatusFailed);
         ui->verticalLayoutLogMessages->addLayout(currentLogMessageRow);
+        if (isMinimized()) {
+            trayIcon->showMessage(tr("openambit"), tr("Syncronisation failed"), QSystemTrayIcon::Critical);
+        }
     }
     ui->checkBoxResyncAll->setChecked(false);
     ui->checkBoxResyncAll->setEnabled(true);
@@ -416,6 +422,9 @@ void MainWindow::startSync()
     settings.endGroup();
 
     trayIcon->setIcon(QIcon(":/icon_syncing"));
+    if (isMinimized()) {
+        trayIcon->showMessage(tr("openambit"), tr("Syncronisation started"));
+    }
 
     emit MainWindow::syncNow(ui->checkBoxResyncAll->isChecked(), syncTime, syncOrbit, syncMovescount);
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git



More information about the Pkg-running-devel mailing list