[X2go-Commits] x2goclient.git - master (branch) updated: 3.99.2.1-9-ga2d95c0

X2Go dev team git-admin at x2go.org
Wed Aug 8 11:35:14 CEST 2012


The branch, master has been updated
       via  a2d95c0c106923162bb510c88806b7384786b97d (commit)
      from  3335fca16afaa0792207228115e31630894dee71 (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 -----------------------------------------------------------------
commit a2d95c0c106923162bb510c88806b7384786b97d
Author: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
Date:   Wed Aug 8 11:34:37 2012 +0200

    Cleaning code: double click on running session. Instead of using function "sleep" starting resume-session after suspend-session is returned

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    6 ++++--
 onmainwindow.cpp |   27 ++++++++++++++++++---------
 onmainwindow.h   |    1 +
 3 files changed, 23 insertions(+), 11 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 443d9d2..31fa55d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-x2goclient (3.99.2.2-0~x2go1) UNRELEASED; urgency=low
+x2goclient (3.99.2.2-0~x2go2) UNRELEASED; urgency=low
 
   [ Mike Gabriel ]
   * New upstream version (3.99.2.2):
@@ -18,8 +18,10 @@ x2goclient (3.99.2.2-0~x2go1) UNRELEASED; urgency=low
 
   [ Oleksandr Shneyder ]
   * Fixing X2Go Plugin
+  * Cleaning code: double click on running session. Instead of using function "sleep"
+    starting resume-session after suspend-session is returned
 
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Fri, 08 Jun 2012 23:17:02 +0200
+ -- Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>  Wed, 08 Aug 2012 11:32:08 +0200
 
 x2goclient (3.99.2.1-0~x2go1) unstable; urgency=low
 
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 965cbf8..1bded10 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -101,6 +101,7 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent )
     noSessionEdit=false;
     lastSession=0l;
     changeBrokerPass=false;
+    resumeAfterSuspending=false;
 
     appSeparator=0;
 
@@ -3956,15 +3957,19 @@ void ONMainWindow::slotResumeSess()
 {
     x2goSession s=getSelectedSession();
     QDesktopWidget wd;
-    if ( isColorDepthOk ( wd.depth(),s.colorDepth ) ) {
-        if ( s.status=="R" ) {
-            suspendSession ( s.sessionId );
-            x2goDebug << "sleeping for two seconds between suspending and resuming";
-            int sleeptime = 2;
-            while ((sleeptime = sleep (sleeptime))) {};
+    if ( isColorDepthOk ( wd.depth(),s.colorDepth ) )
+    {
+        if ( s.status=="R" && ! resumeAfterSuspending)
+        {
+            resumeAfterSuspending=true;
+            slotSuspendSess();
+            return;
         }
+        resumeAfterSuspending=false;
         resumeSession ( s );
-    } else {
+    }
+    else
+    {
         QString depth=QString::number ( s.colorDepth );
         int res;
         if ( s.colorDepth==24 || s.colorDepth==32 )
@@ -4131,6 +4136,10 @@ void ONMainWindow::slotRetSuspSess ( bool result, QString output,
     }
     if ( selectSessionDlg->isVisible() )
         selectSessionDlg->setEnabled ( true );
+    if (resumeAfterSuspending)
+    {
+        slotResumeSess();
+    }
 }
 
 
@@ -8950,8 +8959,8 @@ void ONMainWindow::startSshd()
 
 void ONMainWindow::setProxyWinTitle()
 {
-  if(embedMode)
-    return;
+    if (embedMode)
+        return;
 
     QString title;
 
diff --git a/onmainwindow.h b/onmainwindow.h
index 66b21e8..2d75273 100644
--- a/onmainwindow.h
+++ b/onmainwindow.h
@@ -520,6 +520,7 @@ private:
     bool noSessionEdit;
     bool cleanAllFiles;
     bool PGPInited;
+    bool resumeAfterSuspending;
     struct SshProxy sshProxy;
     QString sshPort;
     QString clientSshPort;


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