X2Go dev team | 2 Jul 13:48 2013

x2goclient.git - master (branch) updated: 4.0.1.0-37-g7996b7b

The branch, master has been updated
       via  7996b7bf565ba8dd982909db914f984c441d1943 (commit)
      from  e69690eb76cba79754aa8f5e5d285d6562b59b9e (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 7996b7bf565ba8dd982909db914f984c441d1943
Author: Oleksandr Shneyder <o.shneyder@...>
Date:   Tue Jul 2 13:17:49 2013 +0200

    Support for published applications in X2Go Plugin

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

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

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index c3ea41c..7ab91a9 100644
--- a/debian/changelog
+++ b/debian/changelog
 <at>  <at>  -5,6 +5,7  <at>  <at>  x2goclient (4.0.1.1-0~x2go1) UNRELEASED; urgency=low
     - Use "127.0.0.1" instead of localhost to avoid wrong IPv6 hostname
       resolution. (Fixes: #151).
     - Wait for x2gocmdexitmessage to return before closing in hidden mode.
+    - Support for published applications in X2Go Plugin 

   [ Mike Gabriel ]
   * New upstream version (4.0.1.1):
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index b707d84..fc735ab 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
 <at>  <at>  -105,6 +105,7  <at>  <at>  ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent )
     config.brokerNoAuth=false;
     config.brokerAutologin=false;
     config.brokerAutologoff=false;
+    config.published=false;
     cmdAutologin=false;

 
 <at>  <at>  -561,6 +562,9  <at>  <at>  void ONMainWindow::initWidgetsEmbed()
     act_shareFolder=new QAction ( QIcon ( ":icons/32x32/file-open.png" ),
                                   tr ( "Share folder..." ),this );

+    act_showApps=new QAction ( QIcon ( ":icons/32x32/apps.png" ),
+                               tr ( "Applications..." ),this );
+
     act_suspend=new QAction ( QIcon ( ":icons/32x32/suspend.png" ),
                               tr ( "Suspend" ),this );

 <at>  <at>  -582,6 +586,9  <at>  <at>  void ONMainWindow::initWidgetsEmbed()
     connect ( act_shareFolder,SIGNAL ( triggered ( bool ) ),this,
               SLOT ( slotExportDirectory() ) );

+    connect ( act_showApps,SIGNAL ( triggered ( bool ) ),this,
+              SLOT ( slotAppDialog() ) );
+
     connect ( act_suspend,SIGNAL ( triggered ( bool ) ),this,
               SLOT ( slotSuspendSessFromSt() ) );

 <at>  <at>  -659,6 +666,8  <at>  <at>  void ONMainWindow::initWidgetsEmbed()
         act_shareFolder->setVisible ( false );
     }

+    act_showApps->setVisible(false);
+

     if ( !managedMode )
     {
 <at>  <at>  -3727,6 +3736,7  <at>  <at>  void ONMainWindow::startNewSession()
             rootless= config.rootless;
             host=config.server;
             startEmbedded=false;
+            resumingSession.published=config.published;
             if ( st->setting()->value ( sid+"/startembed",
                                         ( QVariant ) true ).toBool() )
             {
 <at>  <at>  -5986,6 +5996,7  <at>  <at>  void ONMainWindow::runCommand()
     {
         command=config.command;
         rootless=config.rootless;
+        resumingSession.published=config.published;
     }
     if ( rootless )
         sessionType="R";
 <at>  <at>  -6272,6 +6283,14  <at>  <at>  void ONMainWindow::slotReadApplications(bool result, QString output,
             runApplication(autostartApp);
         }
     }
+    else
+    {
+        if(embedMode)
+        {
+            act_showApps->setVisible(true);
+            slotAppDialog();
+        }
+    }
 }

 
 <at>  <at>  -7548,11 +7567,11  <at>  <at>  void ONMainWindow::slotExtTimer()

         x2goDebug<<"Wrong permissions on "<<readLoginsFrom <<":";
         x2goDebug<< ( int ) ( QFile::permissions (
-                                   readLoginsFrom+"/." ) )
-                  <<"must be"<< ( int ) ( QFile::ReadUser|QFile::WriteUser
-                                          |QFile::ExeUser|QFile::ReadOwner|
-                                          QFile::WriteOwner|
-                                          QFile::ExeOwner ) <<endl;
+                                  readLoginsFrom+"/." ) )
+                 <<"must be"<< ( int ) ( QFile::ReadUser|QFile::WriteUser
+                                         |QFile::ExeUser|QFile::ReadOwner|
+                                         QFile::WriteOwner|
+                                         QFile::ExeOwner ) <<endl;

         if ( extLogin )
             extTimer->stop();
 <at>  <at>  -7624,13 +7643,13  <at>  <at>  void ONMainWindow::slotExportTimer()
     {

         x2goDebug<<"Wrong permissions on "<<
-                  readExportsFrom <<":"<<endl;
+                 readExportsFrom <<":"<<endl;
         x2goDebug<< ( int ) ( QFile::permissions (
-                                   readExportsFrom+"/." ) )
-                  <<"must be"<< ( int ) ( QFile::ReadUser|QFile::WriteUser
-                                          |QFile::ExeUser|QFile::ReadOwner|
-                                          QFile::WriteOwner|
-                                          QFile::ExeOwner ) <<endl;
+                                  readExportsFrom+"/." ) )
+                 <<"must be"<< ( int ) ( QFile::ReadUser|QFile::WriteUser
+                                         |QFile::ExeUser|QFile::ReadOwner|
+                                         QFile::WriteOwner|
+                                         QFile::ExeOwner ) <<endl;
         exportTimer->stop();
         return;
     }
 <at>  <at>  -9602,10 +9621,10  <at>  <at>  void ONMainWindow::resizeProxyWinOnDisplay(int disp)
     QRect geom=QApplication::desktop()->screenGeometry(disp-1);

     QString geoStr =
-            "(x: " + QString("%1").arg(geom.x()) +
-            ", y: "+ QString("%1").arg(geom.y()) +
-            ", w: "+ QString("%1").arg(geom.width()) +
-            ", h: "+ QString("%1").arg(geom.height());
+        "(x: " + QString("%1").arg(geom.x()) +
+        ", y: "+ QString("%1").arg(geom.y()) +
+        ", w: "+ QString("%1").arg(geom.width()) +
+        ", h: "+ QString("%1").arg(geom.height());
     x2goDebug<<"Resizing proxy window to fit Display: " + QString("%1").arg(disp) + " " + geoStr;

 #ifdef Q_OS_LINUX
 <at>  <at>  -9658,10 +9677,10  <at>  <at>  void ONMainWindow::slotConfigXinerama()
     lastDisplayGeometry=newGeometry;

     QString geoStr =
-            "(x: " + QString("%1").arg(lastDisplayGeometry.x()) +
-            ", y: "+ QString("%1").arg(lastDisplayGeometry.y()) +
-            ", w: "+ QString("%1").arg(lastDisplayGeometry.width()) +
-            ", h: "+ QString("%1").arg(lastDisplayGeometry.height());
+        "(x: " + QString("%1").arg(lastDisplayGeometry.x()) +
+        ", y: "+ QString("%1").arg(lastDisplayGeometry.y()) +
+        ", w: "+ QString("%1").arg(lastDisplayGeometry.width()) +
+        ", h: "+ QString("%1").arg(lastDisplayGeometry.height());
     x2goDebug<<"New proxy geometry: " + geoStr;

     QDesktopWidget* root=QApplication::desktop();
 <at>  <at>  -9889,6 +9908,8  <at>  <at>  void ONMainWindow::slotEmbedWindow()
 void ONMainWindow::setEmbedSessionActionsEnabled ( bool enable )
 {
     act_shareFolder->setEnabled ( enable );
+    if(!enable)
+       act_showApps->setVisible(enable);
     act_suspend->setEnabled ( enable );
     act_terminate->setEnabled ( enable );
     act_embedContol->setEnabled ( enable );
 <at>  <at>  -10018,6 +10039,14  <at>  <at>  void ONMainWindow::processCfgLine ( QString line )
             config.rootless=false;
         return;
     }
+    if ( lst[0]=="published" )
+    {
+        if ( lst[1]=="true" )
+            config.published=true;
+        else
+            config.published=false;
+        return;
+    }
     if ( lst[0]=="checkexitstatus" )
     {
         if ( lst[1]=="true" )
 <at>  <at>  -10919,6 +10948,7  <at>  <at>  void ONMainWindow::initEmbedToolBar()
     stb->addSeparator();
     stb->setToolButtonStyle ( Qt::ToolButtonTextUnderIcon );
     stb->addAction ( act_shareFolder );
+    stb->addAction ( act_showApps );
     stb->addAction ( act_reconnect );
     stb->addAction ( act_suspend );
     stb->addAction ( act_terminate );
diff --git a/onmainwindow.h b/onmainwindow.h
index 61e730f..70504d2 100644
--- a/onmainwindow.h
+++ b/onmainwindow.h
 <at>  <at>  -198,6 +198,7  <at>  <at>  struct ConfigFile
     //
     bool useSnd;
     bool useFs;
+    bool published;
     int conSpeed;
     QString compMet;
     int imageQ;
 <at>  <at>  -679,6 +680,7  <at>  <at>  private:
     QAction *act_abclient;
     QAction *act_support;
     QAction *act_shareFolder;
+    QAction *act_showApps;
     QAction *act_suspend;
     QAction *act_terminate;
     QAction *act_reconnect;

hooks/post-receive

Gmane