diff --git a/man/man1/x2goclient.1 b/man/man1/x2goclient.1
index 5738047..f4d2c22 100644
--- a/man/man1/x2goclient.1
+++ b/man/man1/x2goclient.1
@@ -191,6 +191,10 @@
\*(T<\fB\-\-haltbt\fR\*(T>
Show a "Shutdown" button in the top left corner of X2Go Client. When pressed, X2Go Client will create the file
$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.
.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/res/img/png/close-button.png b/res/img/png/close-button.png
new file mode 100644
index 0000000..f5b990f
--- /dev/null
+++ b/res/img/png/close-button.png
Binary files differ
diff --git a/res/resources.qrc b/res/resources.qrc
index 478bb55..eaddf61 100644
--- a/res/resources.qrc
+++ b/res/resources.qrc
@@ -16,6 +16,7 @@
img/png/sess_ico.png
img/png/ico_440x180.png
img/png/power-button.png
+ img/png/close-button.png
img/icons/128x128/x2go.png
img/icons/128x128/folder.png
img/icons/128x128/x2gosession.png
diff --git a/src/help.cpp b/src/help.cpp
index 0e54df6..6feef1e 100644
--- a/src/help.cpp
+++ b/src/help.cpp
@@ -125,6 +125,7 @@
ADD_OPT ("--ldap-printing", QT_TRANSLATE_NOOP ("Help", "Allows client side printing in LDAP mode."));
ADD_OPT ("--thinclient", QT_TRANSLATE_NOOP ("Help", "Enables thinclient mode. Starts without a window manager."));
ADD_OPT ("--haltbt", QT_TRANSLATE_NOOP ("Help", "Enables shutdown button."));
+ ADD_OPT ("--closebt", QT_TRANSLATE_NOOP ("Help", "Enables close button."));
ADD_OPT ("--add-to-known-hosts", QT_TRANSLATE_NOOP ("Help", "Adds RSA key fingerprint to \".ssh/known_hosts\" if authenticity of the server can't be determined."));
ADD_OPT ("--ldap=", QT_TRANSLATE_NOOP ("Help", "Starts with LDAP support. Example: --ldap=ldapserver:389:o=organization,c=de"));
ADD_OPT ("--ldap1=", QT_TRANSLATE_NOOP ("Help", "Defines the first LDAP failover server."));
diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp
index e1da2c8..369c38c 100644
--- a/src/onmainwindow.cpp
+++ b/src/onmainwindow.cpp
@@ -78,6 +78,7 @@
thinMode=false;
closeDisconnect=false;
showHaltBtn=false;
+ showCloseBtn=false;
defaultUseSound=true;
defaultSetKbd=true;
extStarted=false;
@@ -523,6 +524,25 @@
connect(bHalt,SIGNAL(clicked()),this, SLOT(slotShutdownThinClient()));
}
+ 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);
+ if (showHaltBtn)
+ {
+ bClose->move(40,10);
+ }
+ else
+ {
+ bClose->move(10,10);
+ }
+ bClose->show();
+ connect(bClose,SIGNAL(clicked()),this, SLOT(close()));
+ }
+
if (brokerMode)
{
broker=new HttpBrokerClient ( this, &config );
@@ -7405,6 +7425,11 @@
showHaltBtn=true;
return true;
}
+ if (param == "--closebt")
+ {
+ showCloseBtn=true;
+ return true;
+ }
if ( param=="--hide" )
{
startHidden=true;
diff --git a/src/onmainwindow.h b/src/onmainwindow.h
index 5d3d728..116b16c 100644
--- a/src/onmainwindow.h
+++ b/src/onmainwindow.h
@@ -796,6 +796,7 @@
bool useLdap;
bool showToolBar;
bool showHaltBtn;
+ bool showCloseBtn;
bool newSession;
bool runStartApp;
bool ldapOnly;