[X2Go-Commits] x2goclient.git - build-baikal (branch) updated: 4.0.1.0-19-g11af425

X2Go dev team git-admin at x2go.org
Wed Sep 11 12:08:01 CEST 2013


The branch, build-baikal has been updated
       via  11af425a29087773df39806844bff9744cc99182 (commit)
      from  93f567688f51387af006ab18863ce776a222da0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    2 ++
 onmainwindow.cpp |   52 +++++++++++++++++++++++++++++++++++++++++++++++++---
 onmainwindow.h   |    3 +++
 3 files changed, 54 insertions(+), 3 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index cbd012d..1a2a82a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -20,6 +20,8 @@ x2goclient (4.0.1.1-0~x2go1) UNRELEASED; urgency=low
   * New upstream version (4.0.1.1):
     - Fix detection of maximum screen area available for a session. (Fixes:
       #165).
+    - Use the session icon as tray icon, pop up notification bubble that informs
+      about current session actions. (Fixes: #177).
 
   [ Otto Kjell ]
   * New upstream version (4.0.1.1):
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 435324a..9909dff 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -1430,6 +1430,7 @@ void ONMainWindow::hideEvent(QHideEvent* event)
     QMainWindow::hideEvent(event);
     if (event->spontaneous() && trayMinToTray)
         hide();
+
 }
 
 
@@ -3673,7 +3674,7 @@ void ONMainWindow::startNewSession()
                                           ( QVariant )
                                           defaultFullscreen ).toBool();
 
-        //if multidisplay = true or maxdim = true we set maximun display area available for the seleccted monitor
+        //if multidisplay = true or maxdim = true we set maximun display area available for the selected monitor
         if (st->setting()->value(sid + "/multidisp", (QVariant) false).toBool() || st->setting()->value(sid + "/maxdim", (QVariant) false).toBool()) {
             int selectedScreen = st->setting()->value(sid + "/display", (QVariant) -1).toInt();
             height=QApplication::desktop()->availableGeometry(selectedScreen).height();
@@ -3930,8 +3931,10 @@ void ONMainWindow::startNewSession()
     sshConnection->executeCommand ( cmd, this, SLOT ( slotRetResumeSess ( bool,
                                     QString,int ) ) );
     passForm->hide();
-}
 
+    //change the trayicon picture
+    setTrayIconToSessionIcon(tr("Creating new session..."));
+}
 
 
 void ONMainWindow::resumeSession ( const x2goSession& s )
@@ -4167,8 +4170,46 @@ void ONMainWindow::resumeSession ( const x2goSession& s )
                                     int ) ));
     resumingSession=s;
     passForm->hide();
+
+    //change the trayicon picture
+    setTrayIconToSessionIcon(tr("Restoring session..."));
+
 }
 
+/**
+ * @brief ONMainWindow::setTrayIconToSessionIcon
+ * @param info: message to be displayed in tray icon message
+ *
+ * set the tray session icon picture as tray icon picture and show a tray icon information message about something is doing
+ * this message avoid the users think nothing is happend for some seconds while x2go session window is showed
+ *
+ */
+void ONMainWindow::setTrayIconToSessionIcon(QString info) {
+
+    //set session icon to tray icon
+    if (trayIcon && lastSession) {
+
+        X2goSettings* st;
+
+        if (!brokerMode)
+            st=new X2goSettings( "sessions" );
+        else
+            st= new X2goSettings(config.iniFile,QSettings::IniFormat);
+
+        QString sid;
+        if ( !embedMode )
+            sid=lastSession->id();
+        else
+            sid="embedded";
+
+        QString imagePath = st->setting()->value(sid + "/icon", (QVariant) QString(":icons/128x128/x2go.png")).toString();
+        trayIcon->setIcon(QIcon (imagePath));
+
+        //send a information notification about the connection is done
+        trayIcon->showMessage(tr("X2Go"), tr ("Established connection\n") + info, QSystemTrayIcon::Information, 15000);
+    }
+
+}
 
 void ONMainWindow::selectSession ( QStringList& sessions )
 {
@@ -5281,6 +5322,11 @@ void ONMainWindow::slotProxyError ( QProcess::ProcessError )
 
 void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus )
 {
+
+    //set tray icon to default
+    trayIcon->setIcon(QIcon ( ":icons/128x128/x2go.png") );
+
+
     if ( embedMode )
     {
         if ( proxyWinEmbedded )
@@ -9529,7 +9575,6 @@ void ONMainWindow::resizeProxyWinOnDisplay(int disp)
     QTimer::singleShot(500, this, SLOT(slotSetProxyWinFullscreen()));
 }
 
-
 QRect ONMainWindow::proxyWinGeometry()
 {
 #ifdef Q_OS_WIN
@@ -9702,6 +9747,7 @@ void ONMainWindow::slotFindProxyWin()
             else
                 slotAttachProxyWindow();
         }
+
 #ifdef Q_OS_WIN
         x2goDebug<<"Maximize proxy win: "<<maximizeProxyWin;
 
diff --git a/onmainwindow.h b/onmainwindow.h
index b736755..86f04ec 100644
--- a/onmainwindow.h
+++ b/onmainwindow.h
@@ -44,6 +44,7 @@
 #include "sshmasterconnection.h"
 
 
+
 #ifdef Q_OS_WIN
 #include <windows.h>
 #endif
@@ -524,6 +525,7 @@ public:
     }
 #endif
 
+
 private:
     QString m_x2goconfig;
     QStringList _internApplicationsNames;
@@ -894,6 +896,7 @@ private:
     void removeAppsFromTray();
     void plugAppsInTray();
     QMenu* initTrayAppMenu(QString text, QPixmap icon);
+    void setTrayIconToSessionIcon(QString info);
 
 
 protected:


hooks/post-receive
-- 
x2goclient.git (X2Go Client)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goclient.git" (X2Go Client).




More information about the x2go-commits mailing list