The branch, master has been updated via e4a9dc4118a99050a9f0a9a1d459c3ebd33ac77f (commit) via c52f0ad4025111590c8160325feee8c652934d80 (commit) from 2016373e77172c9bea8990319244363b82df9f17 (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 e4a9dc4118a99050a9f0a9a1d459c3ebd33ac77f Author: Oleksandr Shneyder <oleksandr.shneyder@treuchtlingen.de> Date: Thu Mar 29 11:55:22 2012 +0200 - X2Go-Top category and exporting PULSE_CLIENTCONFIG when running published applications. commit c52f0ad4025111590c8160325feee8c652934d80 Author: Oleksandr Shneyder <oleksandr.shneyder@treuchtlingen.de> Date: Wed Mar 28 12:31:28 2012 +0200 Setting TCP_NODELAY for sockets on reverse tunnel and ssh session. ----------------------------------------------------------------------- Summary of changes: appdialog.cpp | 7 +++++-- debian/changelog | 4 ++++ onmainwindow.cpp | 33 +++++++++++++++++++++++++-------- onmainwindow.h | 3 ++- onmainwindow_part3.cpp | 7 ++++++- sshmasterconnection.cpp | 23 +++++++++++++++++++++++ 6 files changed, 65 insertions(+), 12 deletions(-) The diff of changes is: diff --git a/appdialog.cpp b/appdialog.cpp index 9971ea3..ebab99d 100644 --- a/appdialog.cpp +++ b/appdialog.cpp @@ -150,7 +150,7 @@ void AppDialog::loadApps() util=initTopItem(tr("Utility"), QPixmap(":/icons/22x22/applications-utilities.png")); parent=util; break; - default: + case Application::OTHER: if (!other) other=initTopItem(tr("Other"), QPixmap(":/icons/22x22/applications-other.png")); parent=other; @@ -158,7 +158,10 @@ void AppDialog::loadApps() } QTreeWidgetItem* it; - it=new QTreeWidgetItem(parent); + if (app.category==Application::TOP) + it=new QTreeWidgetItem(treeWidget); + else + it=new QTreeWidgetItem(parent); it->setText(0, app.name); it->setToolTip(0,app.comment); it->setIcon(0,app.icon); diff --git a/debian/changelog b/debian/changelog index ebc326b..3e5df04 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,6 +13,10 @@ x2goclient (3.99.2.0-0~x2go1) UNRELEASED; urgency=low - Support for SVG icons for published applications - Set "nofocus" policy for tool buttons. - Some improvements when using pgp card. + - Setting TCP_NODELAY for sockets on reverse tunnel and ssh session. + - Support for category X2Go-Top to display published applications on top + of application menu. + - Exporting PULSE_CLIENTCONFIG when running published applications. -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 07 Mar 2012 21:02:15 +0100 diff --git a/onmainwindow.cpp b/onmainwindow.cpp index 3f2a860..4ba3231 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -1031,15 +1031,13 @@ void ONMainWindow::trayIconInit() QPixmap(":/icons/22x22/applications-other.png")); appSeparator=trayIconActiveConnectionMenu->addSeparator(); - for (int i=0;i<=Application::OTHER;++i) - { - connect (appMenu[i], SIGNAL(triggered(QAction*)), this, SLOT(slotAppMenuTriggered(QAction*))); - } - trayIconActiveConnectionMenu->addAction(tr ("Share folder..." ),this, SLOT(slotExportDirectory())); trayIconActiveConnectionMenu->addAction(tr("Suspend"),this, SLOT(slotSuspendSessFromSt())); trayIconActiveConnectionMenu->addAction(tr("Terminate"),this, SLOT(slotTermSessFromSt())); + connect (trayIconActiveConnectionMenu, SIGNAL(triggered(QAction*)), this, + SLOT(slotAppMenuTriggered(QAction*))); + if (sessionStatusDlg && sessionStatusDlg->isVisible()) { @@ -1082,7 +1080,9 @@ QMenu* ONMainWindow::initTrayAppMenu(QString text, QPixmap icon) void ONMainWindow::slotAppMenuTriggered(QAction* action) { - runApplication(action->data().toString()); + x2goDebug<<"slotAppMenuTriggered :"<<action->data().toString()<<endl; + if(action->data().toString() != "") + runApplication(action->data().toString()); } void ONMainWindow::plugAppsInTray() @@ -1092,12 +1092,23 @@ void ONMainWindow::plugAppsInTray() removeAppsFromTray(); x2goDebug<<"plugging apps\n"; bool empty=true; + topActions.clear(); foreach(Application app, applications) { - QAction* act=appMenu[app.category]->addAction(app.icon,app.name); + QAction* act; + if(app.category==Application::TOP) + { + act=new QAction(app.icon,app.name,trayIconActiveConnectionMenu); + trayIconActiveConnectionMenu->insertAction(appSeparator, act); + topActions.append(act); + } + else + { + act=appMenu[app.category]->addAction(app.icon,app.name); + appMenu[app.category]->menuAction()->setVisible(true); + } act->setToolTip(app.comment); act->setData(app.exec); - appMenu[app.category]->menuAction()->setVisible(true); empty=false; } if (!empty) @@ -1115,6 +1126,12 @@ void ONMainWindow::removeAppsFromTray() appMenu[i]->clear(); appMenu[i]->menuAction()->setVisible(false); } + foreach (QAction* act, topActions) + { + trayIconActiveConnectionMenu->removeAction(act); + delete act; + } + topActions.clear(); appSeparator->setVisible(false); } diff --git a/onmainwindow.h b/onmainwindow.h index b7c398b..4a17a92 100644 --- a/onmainwindow.h +++ b/onmainwindow.h @@ -127,7 +127,7 @@ struct Application QPixmap icon; enum {MULTIMEDIA, DEVELOPMENT, EDUCATION, GAME, GRAPHICS, NETWORK, OFFICE, - SETTINGS, SYSTEM, UTILITY, OTHER + SETTINGS, SYSTEM, UTILITY, OTHER, TOP } category; static bool lessThen(Application t1, Application t2) { @@ -636,6 +636,7 @@ private: QAction *act_embedToolBar; QAction *act_changeBrokerPass; QAction *act_testCon; + QList <QAction*> topActions; QToolBar *stb; diff --git a/onmainwindow_part3.cpp b/onmainwindow_part3.cpp index f71311b..350a648 100644 --- a/onmainwindow_part3.cpp +++ b/onmainwindow_part3.cpp @@ -203,7 +203,10 @@ void ONMainWindow::runCommand() void ONMainWindow::runApplication(QString exec) { SshProcess* proc=new SshProcess ( sshConnection, this ); - proc->startNormal ("DISPLAY=:"+resumingSession.display+" setsid "+exec+">& /dev/null & exit"); + proc->startNormal ("PULSE_CLIENTCONFIG=~/.x2go/C-"+ + resumingSession.sessionId+"/.pulse-client.conf DISPLAY=:"+ + resumingSession.display+ + " setsid "+exec+">& /dev/null & exit"); } void ONMainWindow::slotRetRunCommand ( bool result, QString output, @@ -328,6 +331,8 @@ void ONMainWindow::slotReadApplications(bool result, QString output, app.category=Application::SYSTEM; if (line.indexOf("Utility")!=-1) app.category=Application::UTILITY; + if (line.indexOf("X2Go-Top",0,Qt::CaseInsensitive)!=-1) + app.category=Application::TOP; } if (line.indexOf("<icon>")!=-1) { diff --git a/sshmasterconnection.cpp b/sshmasterconnection.cpp index 9c6626a..1f7b724 100644 --- a/sshmasterconnection.cpp +++ b/sshmasterconnection.cpp @@ -35,6 +35,12 @@ #endif #include <math.h> +#ifndef Q_OS_WIN +#include <arpa/inet.h> +#include <netinet/tcp.h> +#endif + + #include "onmainwindow.h" #undef DEBUG @@ -212,6 +218,16 @@ void SshMasterConnection::run() return; } + +#ifndef Q_OS_WIN + const int y=1; +#else + const char y=1; +#endif + socket_t session_sock=ssh_get_fd(my_ssh_session); + setsockopt(session_sock, IPPROTO_TCP, TCP_NODELAY,&y, sizeof(int)); + + if ( reverseTunnel ) { if ( channel_forward_listen ( my_ssh_session, NULL, reverseTunnelRemotePort, NULL ) !=SSH_OK ) @@ -591,6 +607,13 @@ void SshMasterConnection::channelLoop() x2goDebug<<"new forward connection"<<endl; #endif int sock=socket ( AF_INET, SOCK_STREAM,0 ); +#ifndef Q_OS_WIN + const int y=1; +#else + const char y=1; +#endif + setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,&y, sizeof(int)); + struct sockaddr_in address; address.sin_family=AF_INET; address.sin_port=htons ( reverseTunnelLocalPort ); 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).