[X2go-Commits] x2goclient.git - master (branch) updated: 3.99.2.2-9-g4658ef3
X2Go dev team
git-admin at x2go.org
Tue Sep 4 13:43:38 CEST 2012
The branch, master has been updated
via 4658ef38188f4bd0f18ca31679b69b919f939d56 (commit)
from b9e0f3498b4b681341f6bb4bfad28a64d2afee37 (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 4658ef38188f4bd0f18ca31679b69b919f939d56
Author: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
Date: Tue Sep 4 13:43:33 2012 +0200
Build direct RDP feature only for linux
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 1 +
editconnectiondialog.cpp | 6 ++++--
editconnectiondialog.h | 2 ++
onmainwindow.cpp | 32 +++++++++++++++++++++++---------
onmainwindow.h | 5 ++++-
sessionwidget.cpp | 36 ++++++++++++++++++++++++++++++------
sessionwidget.h | 8 ++++++++
settingswidget.cpp | 30 ++++++++++++++++++++----------
settingswidget.h | 11 +++++++++--
9 files changed, 101 insertions(+), 30 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 3dfcf1d..422655a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ x2goclient (3.99.2.3-0~x2go3) UNRELEASED; urgency=low
[ Oleksandr Shneyder ]
* Add settings for direct RDP connection
* Implement direct RDP connection using standalone client
+ * Build direct RDP feature only for linux
-- Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de> Tue, 04 Sep 2012 12:13:43 +0200
diff --git a/editconnectiondialog.cpp b/editconnectiondialog.cpp
index f50ed85..66ae84a 100644
--- a/editconnectiondialog.cpp
+++ b/editconnectiondialog.cpp
@@ -101,7 +101,9 @@ EditConnectionDialog::EditConnectionDialog ( QString id, QWidget * par,
setContentsMargins ( 3,3,3,3 );
fr->setCurrentIndex ( ind );
slot_changeCaption(sessSet->sessionName());
+#ifdef Q_OS_LINUX
sessSet->slot_rdpDirectClicked();
+#endif
}
@@ -152,11 +154,11 @@ void EditConnectionDialog::slot_default()
}
}
+#ifdef Q_OS_LINUX
void EditConnectionDialog::slot_directRDP(bool direct)
{
fr->setTabEnabled(1,!direct);
fr->setTabEnabled(3,!direct);
otherSet->setDirectRdp(direct);
}
-
-
+#endif
diff --git a/editconnectiondialog.h b/editconnectiondialog.h
index ea177db..c90730f 100644
--- a/editconnectiondialog.h
+++ b/editconnectiondialog.h
@@ -57,7 +57,9 @@ class EditConnectionDialog : public QDialog
void slot_changeCaption ( const QString& newName );
void slot_accepted();
void slot_default();
+#ifdef Q_OS_LINUX
void slot_directRDP(bool direct);
+#endif
};
#endif
diff --git a/onmainwindow.cpp b/onmainwindow.cpp
index 7294d56..5fbb941 100644
--- a/onmainwindow.cpp
+++ b/onmainwindow.cpp
@@ -3006,6 +3006,7 @@ void ONMainWindow::continueLDAPSession()
proc->startNormal ( "x2gogetservers" );
}
+#ifdef Q_OS_LINUX
void ONMainWindow::startDirectRDP()
{
@@ -3093,7 +3094,7 @@ void ONMainWindow::startDirectRDP()
}
-
+#endif
@@ -3101,7 +3102,9 @@ void ONMainWindow::startDirectRDP()
bool ONMainWindow::startSession ( const QString& sid )
{
setEnabled ( false );
+#ifdef Q_OS_LINUX
directRDP=false;
+#endif
QString passwd;
QString user;
QString host;
@@ -3133,6 +3136,7 @@ bool ONMainWindow::startSession ( const QString& sid )
( QVariant ) false ).toBool();
krblogin=st.setting()->value ( sid+"/krblogin",
( QVariant ) false ).toBool();
+#ifdef Q_OS_LINUX
directRDP=st.setting()->value ( sid+"/directrdp",
( QVariant ) false ).toBool();
if (cmd =="RDP" && directRDP)
@@ -3140,6 +3144,7 @@ bool ONMainWindow::startSession ( const QString& sid )
startDirectRDP();
return true;
}
+#endif
if ( cmd=="SHADOW" )
shadowSession=true;
}
@@ -4121,12 +4126,13 @@ void ONMainWindow::slotResumeSess()
void ONMainWindow::slotSuspendSess()
{
+#ifdef Q_OS_LINUX
if (directRDP)
{
nxproxy->terminate();
return;
}
-
+#endif
QString passwd;
QString user=getCurrentUname();
@@ -4175,12 +4181,14 @@ void ONMainWindow::slotSuspendSess()
void ONMainWindow::slotSuspendSessFromSt()
{
- x2goDebug<<"suspend from st";
+
+#ifdef Q_OS_LINUX
if (directRDP)
{
nxproxy->terminate();
return;
}
+#endif
QString passwd;
QString user=getCurrentUname();
passwd=getCurrentPass();
@@ -4197,12 +4205,13 @@ void ONMainWindow::slotSuspendSessFromSt()
void ONMainWindow::slotTermSessFromSt()
{
- x2goDebug<<"term from st";
+#ifdef Q_OS_LINUX
if (directRDP)
{
nxproxy->terminate();
return;
}
+#endif
/* x2goDebug <<"disconnect export"<<endl;
disconnect ( sbExp,SIGNAL ( clicked() ),this,
SLOT ( slot_exportDirectory() ) );*/
@@ -4264,12 +4273,13 @@ void ONMainWindow::slotRetSuspSess ( bool result, QString output,
void ONMainWindow::slotTermSess()
{
+#ifdef Q_OS_LINUX
if (directRDP)
{
nxproxy->terminate();
return;
}
-
+#endif
selectSessionDlg->setEnabled ( false );
@@ -5074,10 +5084,13 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus )
}
}
x2goDebug<<"nxproxy not running"<<endl;
- if (!directRDP)
- delete nxproxy;
- else
+
+#ifdef Q_OS_LINUX
+ if (directRDP)
nxproxy=0;
+ else
+#endif
+ delete nxproxy;
}
#endif
x2goDebug<<"proxy deleted"<<endl;
@@ -5087,6 +5100,7 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus )
nxproxy=0l;
proxyWinId=0;
+#ifdef Q_OS_LINUX
if (directRDP)
{
pass->setText ( "" );
@@ -5094,7 +5108,7 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus )
SLOT ( slotShowPassForm() ) );
return;
}
-
+#endif
if ( !shadowSession && !usePGPCard && ! ( embedMode &&
( config.checkexitstatus==false ) ) )
check_cmd_status();
diff --git a/onmainwindow.h b/onmainwindow.h
index 2fadcfd..f3969d5 100644
--- a/onmainwindow.h
+++ b/onmainwindow.h
@@ -670,8 +670,9 @@ private:
bool ldapOnly;
bool isScDaemonOk;
bool parecTunnelOk;
+#ifdef Q_OS_LINUX
bool directRDP;
-
+#endif
bool startSessSound;
int startSessSndSystem;
@@ -1028,7 +1029,9 @@ private:
void printSshDError();
void loadPulseModuleNativeProtocol();
void initEmbedToolBar();
+#ifdef Q_OS_LINUX
void startDirectRDP();
+#endif
bool isServerRunning ( int port );
void filterDesktops ( const QString& filter,
bool strict=false );
diff --git a/sessionwidget.cpp b/sessionwidget.cpp
index be73c9b..e9b69e6 100644
--- a/sessionwidget.cpp
+++ b/sessionwidget.cpp
@@ -67,10 +67,12 @@ SessionWidget::SessionWidget ( QString id, ONMainWindow * mw,
sshPort->setValue ( mainWindow->getDefaultSshPort().toInt() );
sshPort->setMinimum ( 1 );
sshPort->setMaximum ( 999999999 );
+#ifdef Q_OS_LINUX
rdpPort=new QSpinBox ( sgb );
rdpPort->setValue ( mainWindow->getDefaultSshPort().toInt() );
rdpPort->setMinimum ( 1 );
rdpPort->setMaximum ( 999999999 );
+#endif
key=new QLineEdit ( sgb );
#ifndef Q_WS_HILDON
@@ -95,7 +97,9 @@ SessionWidget::SessionWidget ( QString id, ONMainWindow * mw,
elLay->addWidget ( server );
elLay->addWidget ( uname );
elLay->addWidget ( sshPort );
+#ifdef Q_OS_LINUX
elLay->addWidget ( rdpPort );
+#endif
suLay->addLayout ( slLay );
suLay->addLayout ( elLay );
#ifdef Q_WS_HILDON
@@ -197,7 +201,9 @@ SessionWidget::SessionWidget ( QString id, ONMainWindow * mw,
SIGNAL ( nameChanged ( const QString & ) ) );
connect (server, SIGNAL(textChanged(const QString&)),this, SLOT(slot_emitSettings()));
connect (uname, SIGNAL(textChanged(const QString&)),this, SLOT(slot_emitSettings()));
+#ifdef Q_OS_LINUX
connect (rdpPort, SIGNAL(valueChanged(int)),this, SLOT(slot_emitSettings()));
+#endif
readConfig();
cbKrbLogin->setChecked(false);
cbKrbLogin->setVisible(false);
@@ -207,7 +213,7 @@ SessionWidget::~SessionWidget()
{
}
-
+#ifdef Q_OS_LINUX
void SessionWidget::slot_rdpDirectClicked()
{
bool isDirectRDP=cbDirectRDP->isChecked();
@@ -234,6 +240,7 @@ void SessionWidget::slot_rdpDirectClicked()
emit directRDP(isDirectRDP);
slot_emitSettings();
}
+#endif
void SessionWidget::slot_getIcon()
{
@@ -297,7 +304,9 @@ void SessionWidget::slot_changeCmd ( int var )
{
leCmdIp->setText ( tr ( "Command:" ) );
pbAdvanced->hide();
+#ifdef Q_OS_LINUX
cbDirectRDP->hide();
+#endif
leCmdIp->show();
cmd->show();
if ( var==APPLICATION )
@@ -323,7 +332,9 @@ void SessionWidget::slot_changeCmd ( int var )
leCmdIp->setText ( tr ( "Server:" ) );
pbAdvanced->show();
cmd->setText ( rdpServer );
+#ifdef Q_OS_LINUX
cbDirectRDP->show();
+#endif
}
if ( var== XDMCP )
{
@@ -337,7 +348,9 @@ void SessionWidget::slot_changeCmd ( int var )
cmd->setText ( "" );
}
}
+#ifdef Q_OS_LINUX
slot_rdpDirectClicked();
+#endif
}
void SessionWidget::slot_rdpOptions()
@@ -385,11 +398,12 @@ void SessionWidget::readConfig()
sessionId+"/sshport",
( QVariant ) mainWindow->getDefaultSshPort().toInt()
).toInt() );
+#ifdef Q_OS_LINUX
rdpPort->setValue (
st.setting()->value (
sessionId+"/rdpport",3389
).toInt() );
-
+#endif
QStringList appNames=st.setting()->value (
sessionId+"/applications" ).toStringList();
bool rootless=st.setting()->value (
@@ -408,10 +422,10 @@ void SessionWidget::readConfig()
( QVariant ) "" ).toString();
xdmcpServer=st.setting()->value ( sessionId+"/xdmcpserver",
( QVariant ) "localhost" ).toString();
-
+#ifdef Q_OS_LINUX
cbDirectRDP->setChecked(st.setting()->value (
sessionId+"/directrdp",false ).toBool());
-
+#endif
for ( int i=0;i<appNames.count();++i )
{
@@ -466,8 +480,10 @@ void SessionWidget::readConfig()
cmd->setEnabled ( true );
cmd->setText ( rdpServer );
pbAdvanced->show();
+#ifdef Q_OS_LINUX
cbDirectRDP->show();
slot_rdpDirectClicked();
+#endif
}
else if ( command=="XDMCP" )
{
@@ -488,7 +504,9 @@ void SessionWidget::readConfig()
sessName->selectAll();
sessName->setFocus();
}
+#ifdef Q_OS_LINUX
slot_rdpDirectClicked();
+#endif
}
void SessionWidget::setDefaults()
@@ -510,7 +528,9 @@ void SessionWidget::setDefaults()
icon->setIcon ( QIcon ( sessIcon ) );
sshPort->setValue (
mainWindow->getDefaultSshPort().toInt() );
+#ifdef Q_OS_LINUX
rdpPort->setValue (3389);
+#endif
}
@@ -529,14 +549,17 @@ void SessionWidget::saveSettings()
st.setting()->setValue ( sessionId+"/key",
( QVariant ) key->text() );
+#ifdef Q_OS_LINUX
st.setting()->setValue ( sessionId+"/rdpport",
( QVariant ) rdpPort->value() );
-
+#endif
st.setting()->setValue ( sessionId+"/sshport",
( QVariant ) sshPort->value() );
st.setting()->setValue(sessionId+"/autologin",( QVariant ) cbAutoLogin->isChecked());
st.setting()->setValue(sessionId+"/krblogin",( QVariant ) cbKrbLogin->isChecked());
+#ifdef Q_OS_LINUX
st.setting()->setValue(sessionId+"/directrdp",( QVariant ) cbDirectRDP->isChecked());
+#endif
QString command;
bool rootless=false;
bool published=false;
@@ -604,8 +627,9 @@ QString SessionWidget::sessionName()
return sessName->text();
}
+#ifdef Q_OS_LINUX
void SessionWidget::slot_emitSettings()
{
emit settingsChanged(server->text(), QString::number( rdpPort->value()), uname->text());
}
-
+#endif
diff --git a/sessionwidget.h b/sessionwidget.h
index 9ad5c35..2c6750f 100644
--- a/sessionwidget.h
+++ b/sessionwidget.h
@@ -40,8 +40,10 @@ private slots:
void slot_changeCmd ( int var );
void slot_rdpOptions();
public slots:
+#ifdef Q_OS_LINUX
void slot_rdpDirectClicked();
void slot_emitSettings();
+#endif
private:
enum {KDE,GNOME,LXDE,UNITY,RDP,XDMCP,SHADOW,OTHER,APPLICATION,PUBLISHED};
@@ -49,11 +51,15 @@ private:
QLineEdit* uname;
QLineEdit* server;
QSpinBox* sshPort;
+#ifdef Q_OS_LINUX
QSpinBox* rdpPort;
+#endif
QLineEdit* key;
QCheckBox* cbAutoLogin;
QCheckBox* cbKrbLogin;
+#ifdef Q_OS_LINUX
QCheckBox* cbDirectRDP;
+#endif
QString sessIcon;
QPushButton* icon;
QLineEdit* cmd;
@@ -71,8 +77,10 @@ private:
void readConfig();
signals:
void nameChanged ( const QString & );
+#ifdef Q_OS_LINUX
void directRDP(bool);
void settingsChanged(const QString &, const QString &, const QString &);
+#endif
};
#endif
diff --git a/settingswidget.cpp b/settingswidget.cpp
index 2529a76..ed1b49b 100644
--- a/settingswidget.cpp
+++ b/settingswidget.cpp
@@ -45,8 +45,10 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
QGroupBox *dgb=new QGroupBox ( tr ( "&Display" ),this );
kgb=new QGroupBox ( tr ( "&Keyboard" ),this );
sbgr=new QGroupBox ( tr ( "Sound" ),this );
+#ifdef Q_OS_LINUX
rdpBox=new QGroupBox ( tr ( "RDP Client" ),this );
#endif
+#endif
QVBoxLayout *dbLay = new QVBoxLayout ( dgb );
QVBoxLayout *sndLay=new QVBoxLayout ( sbgr );
QHBoxLayout* sLay=new QHBoxLayout ( );
@@ -63,13 +65,16 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
custom=new QRadioButton ( tr ( "Window" ),dgb );
#endif
display=new QRadioButton ( tr ( "Use whole display" ),dgb );
+#ifdef Q_OS_LINUX
maxRes=new QRadioButton ( tr ( "Maximum available" ),dgb );
-
+#endif
radio->addButton ( fs );
radio->addButton ( custom );
radio->setExclusive ( true );
radio->addButton(display);
+#ifdef Q_OS_LINUX
radio->addButton(maxRes);
+#endif
width=new QSpinBox ( dgb );
height=new QSpinBox ( dgb );
cbSetDPI=new QCheckBox ( tr ( "Set display DPI" ),dgb );
@@ -102,7 +107,9 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
dwLay->addStretch();
dispLay->addWidget(display);
+#ifdef Q_OS_LINUX
dispLay->addWidget(maxRes);
+#endif
dispLay->addSpacing(15);
dispLay->addWidget(lDisplay=new QLabel(tr("&Display:"),dgb));
dispLay->addWidget(displayNumber=new QSpinBox(dgb));
@@ -230,13 +237,11 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
setLay->addWidget ( dgb );
setLay->addWidget ( kgb );
setLay->addWidget ( sbgr );
+#ifdef Q_OS_LINUX
setLay->addWidget ( rdpBox );
-
-
rRdesktop=new QRadioButton ("rdesktop",rdpBox );
rRdesktop->setChecked(true);
rXfreeRDP=new QRadioButton ( "xfreerdp",rdpBox);
-
QButtonGroup* rClient=new QButtonGroup(rdpBox);
rClient->addButton ( rRdesktop );
rClient->addButton ( rXfreeRDP );
@@ -251,6 +256,7 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
params=new QLineEdit(rdpBox);
rdpLay->addWidget(cmdLine,4,0,1,2);
rdpLay->addWidget(params,2,1);
+#endif //Q_OS_LINUX
#else
setLay->addWidget ( tabSettings );
// cbClientPrint->hide();
@@ -296,11 +302,13 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
connect ( cbDefSndPort,SIGNAL ( toggled ( bool ) ),this,
SLOT ( slot_sndDefPortChecked ( bool ) ) );
+#ifdef Q_OS_LINUX
connect (rClient, SIGNAL(buttonClicked(int)), this, SLOT(updateCmdLine()));
connect (radio, SIGNAL(buttonClicked(int)), this, SLOT(updateCmdLine()));
connect (params, SIGNAL(textChanged(QString)), this, SLOT(updateCmdLine()));
connect (width, SIGNAL(valueChanged(int)), this, SLOT(updateCmdLine()));
connect (height, SIGNAL(valueChanged(int)), this, SLOT(updateCmdLine()));
+#endif
kbd->setChecked ( true );
custom->setChecked ( true );
readConfig();
@@ -311,6 +319,7 @@ SettingsWidget::~SettingsWidget()
{
}
+#ifdef Q_OS_LINUX
void SettingsWidget::setDirectRdp(bool direct)
{
cbClientPrint->setVisible(!direct);
@@ -344,6 +353,7 @@ void SettingsWidget::setDirectRdp(bool direct)
}
}
}
+#endif
void SettingsWidget::slot_identDisplays()
{
@@ -524,18 +534,15 @@ void SettingsWidget::readConfig()
displayNumber->setValue(1);
}
-
+#ifdef Q_OS_LINUX
maxRes->setChecked(st.setting()->value ( sessionId+"/maxdim", false).toBool());
-
QString client=st.setting()->value ( sessionId+"/rdpclient","rdesktop").toString();
-
if(client=="rdesktop")
rRdesktop->setChecked(true);
else
rXfreeRDP->setChecked(true);
-
params->setText(st.setting()->value ( sessionId+"/directrdpsettings","").toString());
-
+#endif
cbSetDPI->setChecked (
@@ -657,6 +664,7 @@ void SettingsWidget::saveSettings()
st.setting()->setValue ( sessionId+"/display",
( QVariant ) displayNumber->value() );
+#ifdef Q_OS_LINUX
st.setting()->setValue ( sessionId+"/maxdim",
( QVariant ) maxRes->isChecked() );
@@ -668,7 +676,7 @@ void SettingsWidget::saveSettings()
( QVariant ) "rdesktop" );
st.setting()->setValue ( sessionId+"/directrdpsettings",
( QVariant ) params->text());
-
+#endif
st.setting()->setValue ( sessionId+"/height",
( QVariant ) height->value() );
st.setting()->setValue ( sessionId+"/dpi",
@@ -709,6 +717,7 @@ void SettingsWidget::saveSettings()
st.setting()->sync();
}
+#ifdef Q_OS_LINUX
void SettingsWidget::setServerSettings(QString server, QString port, QString user)
{
this->server=server;
@@ -747,3 +756,4 @@ void SettingsWidget::updateCmdLine()
}
cmdLine->setText(client +" "+params->text()+ grOpt +userOpt+" -p <"+tr("password")+"> "+ server+":"+port );
}
+#endif
diff --git a/settingswidget.h b/settingswidget.h
index 79aae0c..eeed255 100644
--- a/settingswidget.h
+++ b/settingswidget.h
@@ -37,10 +37,13 @@ public:
~SettingsWidget();
void setDefaults();
void saveSettings();
+#ifdef Q_OS_LINUX
void setDirectRdp(bool direct);
public slots:
void setServerSettings(QString server, QString port, QString user);
void updateCmdLine();
+#endif
+
private slots:
void slot_sndSysSelected ( int system );
void slot_sndToggled ( bool val );
@@ -59,7 +62,9 @@ private:
QLineEdit* type;
QRadioButton* custom;
QRadioButton* display;
+#ifdef Q_OS_LINUX
QRadioButton* maxRes;
+#endif
QRadioButton* arts;
QRadioButton* pulse;
QRadioButton* esd;
@@ -84,16 +89,18 @@ private:
QList <QMainWindow*> identWins;
QGroupBox *kgb;
QGroupBox *sbgr;
+#ifdef Q_OS_LINUX
QGroupBox *rdpBox;
QRadioButton* rRdesktop;
QRadioButton* rXfreeRDP;
QLineEdit* cmdLine;
QLineEdit* params;
- QFrame* hLine1;
- QFrame* hLine2;
QString server;
QString user;
QString port;
+#endif
+ QFrame* hLine1;
+ QFrame* hLine2;
private:
void readConfig();
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).
More information about the x2go-commits
mailing list