This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch revtunnel in repository x2goclient. commit 5791109f7f8f4ea6260c8b195420f2ca4be23d3c Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Thu Jan 23 17:52:41 2014 +0100 set mod map from client to server on Mac, hide keyboard settings on Mac --- debian/changelog | 1 + onmainwindow.cpp | 28 ++++++++++++++++++++++++++++ onmainwindow.h | 6 ++++++ settingswidget.cpp | 1 + 4 files changed, 36 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5a2ac3b..bffb4be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ x2goclient (4.0.1.3-0x2go1) UNRELEASED; urgency=low - Update Russian translation file. - Rewrite SSH Classes to support libssh fix - Increase timeout in ssh_select + - set mod map from client to server on Mac, hide keyboard settings on Mac [ Orion Poplawski ] * New upstream version (4.0.1.3): diff --git a/onmainwindow.cpp b/onmainwindow.cpp index ae3eefa..fa8c51e 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -5468,6 +5468,24 @@ void ONMainWindow::slotSndTunnelFailed ( bool result, QString output, } +#ifdef Q_OS_DARWIN +void ONMainWindow::slotSetModMap() +{ + if(!nxproxy) + { + return; + } + if(kbMap.length()<=0) + { + x2goDebug<<"get keyboard map"; + QProcess pr(this); + pr.start("xmodmap -pke"); + pr.waitForFinished(); + kbMap=pr.readAllStandardOutput(); + } + sshConnection->executeCommand("export DISPLAY=:"+resumingSession.display+"; echo \\\""+kbMap+"\\\" | xmodmap -"); +} +#endif void ONMainWindow::slotProxyError ( QProcess::ProcessError ) { @@ -5479,6 +5497,10 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus ) { #ifdef Q_OS_DARWIN + disconnect(modMapTimer, SIGNAL(timeout()), this, SLOT(slotSetModMap())); + delete modMapTimer; + modMapTimer=0; + kbMap=QString::null; //fixes bug, when mainwindow inputs not accepting focus under mac setFocus(); #endif @@ -5722,6 +5744,12 @@ void ONMainWindow::slotProxyStderr() } } sbSusp->setToolTip ( tr ( "Suspend" ) ); +#ifdef Q_OS_DARWIN + modMapTimer=new QTimer(this); + connect(modMapTimer, SIGNAL(timeout()), this, SLOT (slotSetModMap())); + modMapTimer->start(30000); + slotSetModMap(); +#endif if ( newSession ) { runCommand(); diff --git a/onmainwindow.h b/onmainwindow.h index d18fef1..5e0f6bc 100644 --- a/onmainwindow.h +++ b/onmainwindow.h @@ -1064,6 +1064,12 @@ private slots: void slotReconnectSession(); void slotStartBroker(); void slotStartNewBrokerSession (); +#ifdef Q_OS_DARWIN + void slotSetModMap(); +private: + QTimer* modMapTimer; + QString kbMap; +#endif private: void resizeProxyWinOnDisplay(int display); diff --git a/settingswidget.cpp b/settingswidget.cpp index 5ffdd01..4add99c 100644 --- a/settingswidget.cpp +++ b/settingswidget.cpp @@ -236,6 +236,7 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw, arts->hide(); pulse->hide(); esd->setChecked ( true ); + kgb->hide(); #endif #ifndef Q_WS_HILDON setLay->addWidget ( dgb ); -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git