The branch, master has been updated via 43113094153d30ac676912cad7cf06ddb59c6cad (commit) from 0cf7b36b26b81dd2bbb650474ee8af71f82e2ff1 (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 43113094153d30ac676912cad7cf06ddb59c6cad Author: Oleksandr Shneyder <oleksandr.shneyder@treuchtlingen.de> Date: Fri Feb 24 11:36:19 2012 +0100 improved support for use in TCE command line argument --thinclient - running without window manager command line argument --haltbt - button to shutdown the thin client ----------------------------------------------------------------------- Summary of changes: debian/changelog | 3 ++ onmainwindow.cpp | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ onmainwindow.h | 5 +++- onmainwindow_part3.cpp | 13 ++++++++++ png/power-button.png | Bin 0 -> 742 bytes resources.rcc | 1 + 6 files changed, 81 insertions(+), 1 deletions(-) create mode 100644 png/power-button.png The diff of changes is: diff --git a/debian/changelog b/debian/changelog index b5cacc8..2412314 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ x2goclient (3.99.1.1-0~x2go1) UNRELEASED; urgency=low - not including <netinet/in.h> on Q_OS_WIN platform. - not updating Xinerama configuration in "fullscreen" mode. - command line argument "--xinerama": use Xinerama by default. + - improved support for use in TCE + command line argument --thinclient - running without window manager + command line argument --haltbt - button to shutdown the thin client [ Mike Gabriel ] * New upstream version (3.99.1.1): diff --git a/onmainwindow.cpp b/onmainwindow.cpp index 87f9b94..344c993 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -57,6 +57,8 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) extLogin=false; startMaximized=false; startHidden=false; + thinMode=false; + showHaltBtn=false; defaultUseSound=true; defaultSetKbd=true; defaultSetDPI=false; @@ -393,6 +395,28 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) SLOT ( slotResize ( const QSize ) ) ); slotResize ( fr->size() ); + + +#ifdef Q_OS_LINUX + if (thinMode) + { + QTimer *timer = new QTimer(this); + connect(timer, SIGNAL(timeout()), this, SLOT(slotSyncX())); + timer->start(200); + } +#endif + if (showHaltBtn) + { + QPushButton* bHalt=new QPushButton(bgFrame); + QPixmap p(":/png/power-button.png"); + bHalt->setIcon(p); + bHalt->setFocusPolicy(Qt::NoFocus); + bHalt->setFixedSize(32,32); + bHalt->move(10,10); + bHalt->show(); + connect(bHalt,SIGNAL(clicked()),this, SLOT(slotShutdownThinClient())); + } + if (brokerMode) { broker=new HttpBrokerClient ( this, &config ); @@ -419,6 +443,12 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) connect( xineramaTimer, SIGNAL(timeout()), this, SLOT(slotConfigXinerama())); x2goDebug<<"ONMainWindows constructor finished, home Directory is:"<<homeDir<<endl; + if (thinMode) + { + showMaximized(); + activateWindow(); + raise(); + } } @@ -430,8 +460,38 @@ ONMainWindow::~ONMainWindow() x2goDebug<<"end of ONMainWindow destructor"; } +void ONMainWindow::slotShutdownThinClient() +{ + QFile file(QDir::homePath()+"/.halt"); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) + return; + + QTextStream out(&file); + out << "\n"; + file.close(); +} +void ONMainWindow::slotSyncX() +{ + if (proxyWinId) + { + if (!isHidden()) + hide(); +#ifdef Q_OS_LINUX + XSync(QX11Info::display(),false); +#endif + } + else + { + if (isHidden()) + { + showMaximized(); + activateWindow(); + raise(); + } + } +} void ONMainWindow::installTranslator() diff --git a/onmainwindow.h b/onmainwindow.h index 5aa76f6..1f2f08f 100644 --- a/onmainwindow.h +++ b/onmainwindow.h @@ -476,6 +476,7 @@ private: bool changeBrokerPass; bool connTest; bool embedMode; + bool thinMode; QString statusString; int defaultLink; int defaultQuality; @@ -628,6 +629,7 @@ private: bool proxyWinEmbedded; bool useLdap; bool showToolBar; + bool showHaltBtn; bool newSession; bool ldapOnly; bool isScDaemonOk; @@ -822,7 +824,6 @@ private slots: void slotChangeBrokerPass(); void slotTestConnection(); void slotCheckPortableDir(); - void readUsers(); void slotSelectedFromList ( UserButton* user ); void slotUnameEntered(); @@ -837,6 +838,8 @@ private slots: void slotSshConnectionOk(); void slotServSshConnectionOk(QString server); void slotChangeKbdLayout(const QString& layout); + void slotSyncX(); + void slotShutdownThinClient(); public slots: void slotConfig(); diff --git a/onmainwindow_part3.cpp b/onmainwindow_part3.cpp index 69a0493..fb6a3ba 100644 --- a/onmainwindow_part3.cpp +++ b/onmainwindow_part3.cpp @@ -252,6 +252,17 @@ bool ONMainWindow::parseParameter ( QString param ) defaultXinerama=true; return true; } + if (param == "--thinclient") + { + thinMode=true; + startMaximized=true; + return true; + } + if (param == "--haltbt") + { + showHaltBtn=true; + return true; + } if ( param=="--hide" ) { startHidden=true; @@ -701,6 +712,8 @@ void ONMainWindow::showHelp() "--pgp-card\t\t\t use openPGP card authentication\n" "--xinerama\t\t\t use Xinerama by default\n" "--ldap-printing\t\t\t allow client side printing in LDAP mode\n" + "--thinclient\t\t\t run without window manager\n" + "--haltbt\t\t\t show shutdown button\n" "--add-to-known-hosts\t\t add RSA key fingerprint to " ".ssh/known_hosts\n" "\t\t\t\t if authenticity of server can't be established\n\n" diff --git a/png/power-button.png b/png/power-button.png new file mode 100644 index 0000000..03b1d1b Binary files /dev/null and b/png/power-button.png differ diff --git a/resources.rcc b/resources.rcc index e3b6a5e..0b2996e 100644 --- a/resources.rcc +++ b/resources.rcc @@ -12,6 +12,7 @@ <file>png/ico_mini.png</file> <file>png/sess_ico.png</file> <file>png/ico_440x180.png</file> + <file>png/power-button.png</file> <file>icons/128x128/x2go.png</file> <file>icons/128x128/x2gosession.png</file> <file>icons/128x128/create_file.png</file> 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).