[X2Go-Commits] [x2goclient] 03/04: src/onmainwindow.{cpp, h}: add notice explaining how to resume running sessions.

git-admin at x2go.org git-admin at x2go.org
Sat Nov 27 00:17:13 CET 2021


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

x2go pushed a commit to branch master
in repository x2goclient.

commit 54149afe804c30dd807526dbe18b537defb05a07
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Nov 27 00:04:49 2021 +0100

    src/onmainwindow.{cpp,h}: add notice explaining how to resume running sessions.
    
    Change requested by Max-Planck-Institut für Kolloid- und
    Grenzflächenforschung Potsdam.
---
 debian/changelog     |  3 +++
 src/onmainwindow.cpp | 13 ++++++++++++-
 src/onmainwindow.h   |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 95ff248..c44e163 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -92,6 +92,9 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium
       Grenzflächenforschung Potsdam.
     - src/onmainwindow.cpp: consolidate Resume button enabling state in
       ONMainWindow::initSelectSessDlg ().
+    - src/onmainwindow.{cpp,h}: add notice explaining how to resume running
+      sessions. Change requested by Max-Planck-Institut für Kolloid- und
+      Grenzflächenforschung Potsdam.
   * debian/control:
     + Move to debian/control.in.
   * debian/control.in:
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index 817c1fc..18b0edd 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -5215,17 +5215,20 @@ void ONMainWindow::slotActivated ( const QModelIndex& index )
         {
             bSusp->setEnabled ( true );
             sOk->setEnabled ( false );
+            running_label->show ();
         }
         else
         {
             bSusp->setEnabled ( false );
             sOk->setEnabled ( true );
+            running_label->hide ();
         }
         bTerm->setEnabled ( true );
         if ( status==QString::null )
         {
             sOk->setEnabled ( false );
             bTerm->setEnabled ( false );
+            running_label->hide ();
         }
     }
     else
@@ -5482,7 +5485,7 @@ void ONMainWindow::slotRetSuspSess ( bool result, QString output,
                       Qt::DisplayRole );
             bSusp->setEnabled ( false );
             sOk->setEnabled ( true );
-
+            running_label->hide ();
         }
     }
     if ( selectSessionDlg->isVisible() )
@@ -12820,6 +12823,10 @@ void ONMainWindow::initSelectSessDlg()
     selectSessionDlg->setFont ( fnt );
     selectSessionLabel=new QLabel ( tr ( "Select session:" ),
                                     selectSessionDlg );
+    running_label = new QLabel (tr ("<b>Note:</b> the currently selected session "
+                                     "is already running.<br />To forcefully "
+                                     "resume it, suspend it first."),
+                                 selectSessionDlg);
     sOk=new QPushButton ( tr ( "Resume" ),selectSessionDlg );
     setWidgetStyle ( sOk );
     sCancel=new QPushButton ( tr ( "Cancel" ),selectSessionDlg );
@@ -12947,6 +12954,7 @@ void ONMainWindow::initSelectSessDlg()
     bTerm->setEnabled ( false );
     bShadow->setEnabled ( false );
     selectSessionLabel->hide();
+    running_label->hide ();
     bCancel->setPalette ( pal );
     bCancel->hide();
 
@@ -12969,6 +12977,9 @@ void ONMainWindow::initSelectSessDlg()
     layout->addWidget ( selectSessionLabel );
     layout->addLayout ( filterLay );
     layout->addLayout ( tvlay );
+    layout->addStretch ();
+    layout->addWidget (running_label);
+    layout->addStretch ();
     layout->addLayout ( blay );
 
     filterLay->addWidget ( desktopFilter );
diff --git a/src/onmainwindow.h b/src/onmainwindow.h
index bf47328..f53c229 100644
--- a/src/onmainwindow.h
+++ b/src/onmainwindow.h
@@ -682,6 +682,7 @@ private:
 
 
     QLabel* selectSessionLabel;
+    QLabel* running_label;
     SessTreeView* sessTv;
 
     QLineEdit* desktopFilter;

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git


More information about the x2go-commits mailing list