This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit a3f3211c3667067f0efa59f1539849aa8c0d1d56 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Jan 25 12:28:35 2018 +0100 {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: reformat, whitespace fixes, split out close button slot in a separate function. --- debian/changelog | 2 ++ man/man1/x2goclient.1 | 4 ++-- src/onmainwindow.cpp | 26 +++++++++++++++++--------- src/onmainwindow.h | 1 + 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/debian/changelog b/debian/changelog index 30e2e0a..3c65dd0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -56,6 +56,8 @@ x2goclient (4.1.1.1-0x2go1) UNRELEASED; urgency=medium x2goresume-session on session resume. - src/sessionbutton.cpp: make button non-sensitive in bottom right part if it's editable. Fixes: #1214. + - {src/{help.cpp,onmainwindow.{cpp,h}},man/man1/x2goclient.1}: reformat, + whitespace fixes, split out close button slot in a separate function. [ Oleksandr Shneyder ] * New upstream version (4.1.1.1): diff --git a/man/man1/x2goclient.1 b/man/man1/x2goclient.1 index 1106b2b..36eec15 100644 --- a/man/man1/x2goclient.1 +++ b/man/man1/x2goclient.1 @@ -193,8 +193,8 @@ Show a "Shutdown" button in the top left corner of X2Go Client. When pressed, X2 $HOME/.halt. An external script has to watch for this file and trigger a thinclient shutdown once it appears. .TP \*(T<\fB\-\-closebt\fR\*(T> -Show a "Close" button in the top left corner of X2Go Client when logged in broker/thinclient mode. -When pressed, X2Go Client will be closed and automaticaly restarted if in thinclient mode. +Show a "Close" button in the top left corner of X2Go Client when logged in broker/thinclient mode. +When pressed, X2Go Client will be closed and automatically restarted if in thinclient mode. .SH PORTABLE OPTIONS X2Go Client can be installed on a USB-Flashdrive as a portable applications. If installed that way, the following diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 0dead8c..69ce587 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -526,21 +526,21 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) if (showCloseBtn) { - QPushButton* bClose=new QPushButton(bgFrame); - QPixmap p(":/img/png/close-button.png"); - bClose->setIcon(p); - bClose->setFocusPolicy(Qt::NoFocus); - bClose->setFixedSize(32,32); + QPushButton *bClose = new QPushButton (bgFrame); + QPixmap p (":/img/png/close-button.png"); + bClose->setIcon (p); + bClose->setFocusPolicy (Qt::NoFocus); + bClose->setFixedSize (32,32); if (showHaltBtn) { - bClose->move(40,10); + bClose->move (40,10); } else { - bClose->move(10,10); + bClose->move (10,10); } - bClose->show(); - connect(bClose,SIGNAL(clicked()),this, SLOT(close())); + bClose->show (); + connect (bClose, SIGNAL (clicked ()), this, SLOT (slotCloseButton ())); } if (brokerMode) @@ -595,6 +595,14 @@ void ONMainWindow::slotShutdownThinClient() file.close(); } +void ONMainWindow::slotCloseButton () { + /* + * Needs a lot more logic here to suspend a session if one + * is running and log out of the broker. + */ + close (); +} + void ONMainWindow::slotSyncX() { diff --git a/src/onmainwindow.h b/src/onmainwindow.h index c3ce44a..6585fe1 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -1058,6 +1058,7 @@ private slots: void slotChangeKbdLayout(const QString& layout); void slotSyncX(); void slotShutdownThinClient(); + void slotCloseButton (); void slotReadApplications(bool result, QString output, int pid ); public slots: -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git