This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit 5d55e6d5672cc2e7d37774bc37049c4c81f9a04c Author: Mihai Moldovan <ionic@ionic.de> Date: Mon May 25 01:21:49 2015 +0200 general: improve debug output and error messages. Affects: - LDAPSession.cpp - configdialog.cpp - contest.cpp - cupsprintersettingsdialog.cpp - exportdialog.cpp - folderexplorer.cpp - httpbrokerclient.cpp - onmainwindow.cpp - onmainwindow.h - printdialog.cpp - printprocess.cpp - printwidget.cpp - sessionbutton.cpp - sessionexplorer.cpp - sessionmanagedialog.cpp - sessionwidget.cpp - settingswidget.cpp - sharewidget.cpp - sshmasterconnection.cpp - sshprocess.cpp - wapi.cpp --- debian/changelog | 23 ++ src/LDAPSession.cpp | 2 +- src/configdialog.cpp | 6 +- src/contest.cpp | 2 +- src/cupsprintersettingsdialog.cpp | 4 +- src/exportdialog.cpp | 2 +- src/folderexplorer.cpp | 8 +- src/httpbrokerclient.cpp | 52 ++-- src/onmainwindow.cpp | 483 +++++++++++++++++++------------------ src/onmainwindow.h | 4 +- src/printdialog.cpp | 9 +- src/printprocess.cpp | 19 +- src/printwidget.cpp | 2 +- src/sessionbutton.cpp | 6 +- src/sessionexplorer.cpp | 10 +- src/sessionmanagedialog.cpp | 2 +- src/sessionwidget.cpp | 10 +- src/settingswidget.cpp | 6 +- src/sharewidget.cpp | 2 +- src/sshmasterconnection.cpp | 156 ++++++------ src/sshprocess.cpp | 42 ++-- src/wapi.cpp | 10 +- 22 files changed, 442 insertions(+), 418 deletions(-) diff --git a/debian/changelog b/debian/changelog index ebbdc77..f4666e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -402,6 +402,29 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low - onmainwindow.h: revert const-qualifier for get_translator(). It's static and can't have any cv-qualifier. - copy-deps-win32.bat: actually let xcopy error correctly. + - general: improve debug output and error messages. + Affects: + + LDAPSession.cpp + + configdialog.cpp + + contest.cpp + + cupsprintersettingsdialog.cpp + + exportdialog.cpp + + folderexplorer.cpp + + httpbrokerclient.cpp + + onmainwindow.cpp + + onmainwindow.h + + printdialog.cpp + + printprocess.cpp + + printwidget.cpp + + sessionbutton.cpp + + sessionexplorer.cpp + + sessionmanagedialog.cpp + + sessionwidget.cpp + + settingswidget.cpp + + sharewidget.cpp + + sshmasterconnection.cpp + + sshprocess.cpp + + wapi.cpp [ Fernando Pedemonte ] * New upstream release (4.0.4.0): diff --git a/src/LDAPSession.cpp b/src/LDAPSession.cpp index 5e1bb04..18501e8 100644 --- a/src/LDAPSession.cpp +++ b/src/LDAPSession.cpp @@ -80,7 +80,7 @@ LDAPSession::LDAPSession ( string server,int port,string bindDN, { ld=ldap_init ( server.c_str(),port ); if ( !ld ) - throw LDAPExeption ( "ldap_init","Can't init LDAP library" ); + throw LDAPExeption ( "ldap_init","Can't initialize LDAP library." ); int ver=3; int errc=ldap_set_option ( ld,LDAP_OPT_PROTOCOL_VERSION,&ver ); if ( errc != LDAP_SUCCESS ) diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 0b9701b..c0b2285 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -204,7 +204,7 @@ ConfigDialog::ConfigDialog ( QWidget * parent, Qt::WFlags f ) #endif //USELDAP #ifdef Q_OS_DARWIN - QGroupBox* xgb=new QGroupBox ( tr ( "X-Server settings" ),fr ); + QGroupBox* xgb=new QGroupBox ( tr ( "X.Org Server settings" ),fr ); QGridLayout *xLay=new QGridLayout ( xgb ); leXexec=new QLineEdit ( xgb ); @@ -257,7 +257,7 @@ ConfigDialog::ConfigDialog ( QWidget * parent, Qt::WFlags f ) QHBoxLayout* sshLay=new QHBoxLayout(); sshLay->addWidget ( new QLabel ( tr ( - "Clientside SSH port for file system export usage:" + "Clientside (local) SSH daemon port for file system export usage:" ),fr ) ); sshLay->addWidget ( clientSshPort ); sshLay->addStretch(); @@ -349,7 +349,7 @@ ConfigDialog::ConfigDialog ( QWidget * parent, Qt::WFlags f ) #if defined ( Q_OS_WIN) && defined (CFGCLIENT ) xsetWidg=new XSettingsWidget(this); - tabWidg->addTab(xsetWidg, tr("X-Server settings")); + tabWidg->addTab(xsetWidg, tr("X.Org Server settings")); #endif } diff --git a/src/contest.cpp b/src/contest.cpp index 2d0351a..94e68de 100644 --- a/src/contest.cpp +++ b/src/contest.cpp @@ -145,7 +145,7 @@ void ConTest::slotError(QAbstractSocket::SocketError socketError) { QString error; if (socketError==QAbstractSocket::SocketTimeoutError) - error=tr("Socket operation timed out"); + error=tr("Socket operation timed out."); else error=socket->errorString(); diff --git a/src/cupsprintersettingsdialog.cpp b/src/cupsprintersettingsdialog.cpp index d3a4f13..2489364 100644 --- a/src/cupsprintersettingsdialog.cpp +++ b/src/cupsprintersettingsdialog.cpp @@ -269,7 +269,7 @@ bool CUPSPrinterSettingsDialog::setNewValue ( const QString& option, if ( !res ) { QString textMessage= - tr ( "This value is in conflict with other option" ); + tr ( "This value is in conflict with another option." ); QString txt; m_cups->getOptionText ( confOpt,txt ); QString val,valt; @@ -279,7 +279,7 @@ bool CUPSPrinterSettingsDialog::setNewValue ( const QString& option, textMessage+="\n("+txt+" : "+valt+")"; } - QMessageBox::critical ( this,tr ( "Options conflict" ), + QMessageBox::critical ( this,tr ( "Options conflict." ), textMessage ); } return res; diff --git a/src/exportdialog.cpp b/src/exportdialog.cpp index c205e5c..6d4495c 100644 --- a/src/exportdialog.cpp +++ b/src/exportdialog.cpp @@ -77,7 +77,7 @@ ExportDialog::ExportDialog ( QString sid,QWidget * par, Qt::WFlags f ) fr->setLineWidth ( 2 ); setSizeGripEnabled ( true ); - setWindowTitle ( tr ( "share folders" ) ); + setWindowTitle ( tr ( "Share Folders" ) ); connect ( sessions,SIGNAL ( clicked ( const QModelIndex& ) ), this,SLOT ( slot_activated ( const QModelIndex& ) ) ); connect ( sessions,SIGNAL ( doubleClicked ( const QModelIndex& ) ), diff --git a/src/folderexplorer.cpp b/src/folderexplorer.cpp index 8694d77..a358414 100644 --- a/src/folderexplorer.cpp +++ b/src/folderexplorer.cpp @@ -78,9 +78,9 @@ void FolderExplorer::slotContextMenu(QPoint p) if(menuItem!=root) { - connect(menu.addAction(tr("Rename Folder...")), SIGNAL(triggered(bool)), this, SLOT(slotChangeName())); - connect(menu.addAction(tr("Change Icon...")), SIGNAL(triggered(bool)), this, SLOT(slotChangeIcon())); - connect(menu.addAction(tr("Delete Folder...")), SIGNAL(triggered(bool)), this, SLOT(slotDeleteFolder())); + connect(menu.addAction(tr("Rename Folder ...")), SIGNAL(triggered(bool)), this, SLOT(slotChangeName())); + connect(menu.addAction(tr("Change Icon ...")), SIGNAL(triggered(bool)), this, SLOT(slotChangeIcon())); + connect(menu.addAction(tr("Delete Folder ...")), SIGNAL(triggered(bool)), this, SLOT(slotDeleteFolder())); } menu.exec(treeWidget->viewport()->mapToGlobal(p)); } @@ -128,7 +128,7 @@ void FolderExplorer::slotDeleteFolder() if(!explorer->isFolderEmpty(menuItem->data(0, Qt::UserRole).toString())) { QMessageBox::critical(this, tr("Error"), tr("Unable to remove \"")+menuItem->text(0)+ - tr("\". Folder is not empty. Please remove content of folder and try again.")); + tr("\". Folder is not empty. Please remove the contents of this directory and try again.")); return; } if(QMessageBox::question(this, "X2Go Client", tr("Delete folder \"")+menuItem->text(0)+"\"?",QMessageBox::Ok|QMessageBox::Cancel) == QMessageBox::Ok) diff --git a/src/httpbrokerclient.cpp b/src/httpbrokerclient.cpp index b25ffb1..4f40191 100644 --- a/src/httpbrokerclient.cpp +++ b/src/httpbrokerclient.cpp @@ -126,7 +126,7 @@ void HttpBrokerClient::slotSshServerAuthError(int error, QString sshMessage, Ssh { case SSH_SERVER_KNOWN_CHANGED: errMsg=tr ( "Host key for server changed.\nIt is now: " ) +sshMessage+"\n"+ - tr ( "For security reasons, connection will be stopped" ); + tr ( "For security reasons, the connection attempt will be aborted." ); connection->writeKnownHosts(false); connection->wait(); if(sshConnection && sshConnection !=connection) @@ -139,9 +139,9 @@ void HttpBrokerClient::slotSshServerAuthError(int error, QString sshMessage, Ssh return; case SSH_SERVER_FOUND_OTHER: - errMsg=tr ( "The host key for this server was not found but an other" - "type of key exists.An attacker might change the default server key to" - "confuse your client into thinking the key does not exist" ); + errMsg=tr ( "The host key for this server was not found but another" + "type of key exists. An attacker might have changed the default server key to " + "trick your client into thinking the key does not exist yet." ); connection->writeKnownHosts(false); connection->wait(); if(sshConnection && sshConnection !=connection) @@ -174,7 +174,7 @@ void HttpBrokerClient::slotSshServerAuthError(int error, QString sshMessage, Ssh break; } - if ( QMessageBox::warning ( 0, tr ( "Host key verification failed" ),errMsg,tr ( "Yes" ), tr ( "No" ) ) !=0 ) + if ( QMessageBox::warning ( 0, tr ( "Host key verification failed." ),errMsg,tr ( "Yes" ), tr ( "No" ) ) !=0 ) { connection->writeKnownHosts(false); connection->wait(); @@ -184,7 +184,7 @@ void HttpBrokerClient::slotSshServerAuthError(int error, QString sshMessage, Ssh delete sshConnection; } sshConnection=0; - slotSshUserAuthError ( tr ( "Host key verification failed" ) ); + slotSshUserAuthError ( tr ( "Host key verification failed." ) ); return; } connection->writeKnownHosts(true); @@ -232,7 +232,7 @@ void HttpBrokerClient::slotSshUserAuthError(QString error) sshConnection=0l; } - QMessageBox::critical ( 0l,tr ( "Authentication failed" ),error, + QMessageBox::critical ( 0l,tr ( "Authentication failed." ),error, QMessageBox::Ok, QMessageBox::NoButton ); emit authFailed(); @@ -246,7 +246,7 @@ void HttpBrokerClient::getUserSessions() if (config->brokerAutologoff) { nextAuthId=config->brokerUserId; } - x2goDebug<<"called getUserSessions: brokeruser: "<<brokerUser<<" authid: "<<nextAuthId; + x2goDebug<<"Called getUserSessions: brokeruser: "<<brokerUser<<" authid: "<<nextAuthId; if(mainWindow->getUsePGPCard()) brokerUser=mainWindow->getCardLogin(); config->sessiondata=QString::null; @@ -297,7 +297,7 @@ void HttpBrokerClient::selectUserSession(const QString& session) "user="<<QUrl::toPercentEncoding(brokerUser)<<"&"<< "password="<<QUrl::toPercentEncoding(config->brokerPass)<<"&"<< "authid="<<nextAuthId; - x2goDebug << "sending request: "<< req.toUtf8(); + x2goDebug << "Sending request: "<< req.toUtf8(); QNetworkRequest request(QUrl(config->brokerurl)); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); selSessRequest=http->post (request, req.toUtf8() ); @@ -332,7 +332,7 @@ void HttpBrokerClient::changePassword(QString newPass) "user="<<QUrl::toPercentEncoding(brokerUser)<<"&"<< "password="<<QUrl::toPercentEncoding(config->brokerPass)<<"&"<< "authid="<<nextAuthId; - x2goDebug << "sending request: "<< req.toUtf8(); + x2goDebug << "Sending request: "<< req.toUtf8(); QNetworkRequest request(QUrl(config->brokerurl)); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); chPassRequest=http->post (request, req.toUtf8() ); @@ -351,13 +351,13 @@ void HttpBrokerClient::changePassword(QString newPass) void HttpBrokerClient::testConnection() { - x2goDebug<<"called testConnection"; + x2goDebug<<"Called testConnection."; if(!sshBroker) { QString req; QTextStream ( &req ) << "task=testcon"; - x2goDebug << "sending request: "<< req.toUtf8(); + x2goDebug << "Sending request: "<< req.toUtf8(); QNetworkRequest request(QUrl(config->brokerurl)); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); testConRequest=http->post (request, req.toUtf8() ); @@ -380,7 +380,7 @@ void HttpBrokerClient::createIniFile(const QString& raw_content) QString content; content = raw_content; content.replace("<br>","\n"); - x2goDebug<<"inifile content: "<<content<<"\n"; + x2goDebug<<"Inifile content: "<<content<<endl; QString cont; QStringList lines=content.split("START_USER_SESSIONS\n"); if (lines.count()>1) @@ -394,13 +394,13 @@ void HttpBrokerClient::createIniFile(const QString& raw_content) bool HttpBrokerClient::checkAccess(QString answer ) { - x2goDebug<<"called checkAccess - answer was: "<<answer; + x2goDebug<<"Called checkAccess - answer was: "<<answer; if (answer.indexOf("Access granted")==-1) { QMessageBox::critical ( 0,tr ( "Error" ), tr ( "Login failed!<br>" - "Please try again" ) ); + "Please try again." ) ); emit authFailed(); return false; } @@ -416,7 +416,7 @@ bool HttpBrokerClient::checkAccess(QString answer ) void HttpBrokerClient::slotConnectionTest(bool success, QString answer, int) { - x2goDebug<<"called slotConnectionTest"; + x2goDebug<<"Called slotConnectionTest."; if(!success) { x2goDebug<<answer; @@ -428,7 +428,7 @@ void HttpBrokerClient::slotConnectionTest(bool success, QString answer, int) return; if(!sshBroker) { - x2goDebug<<"elapsed: "<<requestTime.elapsed()<<"received:"<<answer.size()<<endl; + x2goDebug<<"Elapsed: "<<requestTime.elapsed()<<"; received:"<<answer.size()<<endl; emit connectionTime(requestTime.elapsed(),answer.size()); } return; @@ -491,7 +491,7 @@ void HttpBrokerClient::slotRequestFinished ( QNetworkReply* reply ) } QString answer ( reply->readAll() ); - x2goDebug<<"A http request returned. Result was: "<<answer; + x2goDebug<<"A http request returned. Result was: "<<answer; if (reply == testConRequest) { slotConnectionTest(true,answer,0); @@ -516,7 +516,7 @@ void HttpBrokerClient::slotRequestFinished ( QNetworkReply* reply ) void HttpBrokerClient::parseSession(QString sinfo) { - x2goDebug<<"starting parser\n"; + x2goDebug<<"Starting parser."; QStringList lst=sinfo.split("SERVER:",QString::SkipEmptyParts); int keyStartPos=sinfo.indexOf("-----BEGIN DSA PRIVATE KEY-----"); if(keyStartPos==-1) @@ -535,15 +535,15 @@ void HttpBrokerClient::parseSession(QString sinfo) config->serverIp=words[0]; if (words.count()>1) config->sshport=words[1]; - x2goDebug<<"server IP: "<<config->serverIp<<"\n"; - x2goDebug<<"server port: "<<config->sshport<<"\n"; + x2goDebug<<"Server IP address: "<<config->serverIp; + x2goDebug<<"Server port: "<<config->sshport; if (sinfo.indexOf("SESSION_INFO")!=-1) { QStringList lst=sinfo.split("SESSION_INFO:",QString::SkipEmptyParts); config->sessiondata=lst[1]; - x2goDebug<<"session data: "<<config->sessiondata<<"\n"; + x2goDebug<<"Session data: "<<config->sessiondata<<"\n"; } - x2goDebug<<"parsing has finished\n"; + x2goDebug<<"Parsing has finished."; emit sessionSelected(); } @@ -589,7 +589,7 @@ void HttpBrokerClient::slotSslErrors ( QNetworkReply* netReply, const QList<QSsl "if you are using an internet connection " "that you do not trust completely or if you are " "not used to seeing a warning for this server.</p>" ); - QMessageBox mb ( QMessageBox::Warning,tr ( "Secure connection failed" ), + QMessageBox mb ( QMessageBox::Warning,tr ( "Secure connection failed." ), text ); text=QString::null; QTextStream ( &text ) <<err.join ( "\n" ) <<"\n"<< @@ -638,7 +638,7 @@ void HttpBrokerClient::slotSslErrors ( QNetworkReply* netReply, const QList<QSsl mb.exec(); if ( mb.clickedButton() == ( QAbstractButton* ) okButton ) { - x2goDebug<<"accept certificate"; + x2goDebug<<"User accepted certificate."; QDir dr; dr.mkpath ( homeDir+"/.x2go/ssl/exceptions/"+lurl.host() +"/" ); QFile fl ( homeDir+"/.x2go/ssl/exceptions/"+ @@ -647,7 +647,7 @@ void HttpBrokerClient::slotSslErrors ( QNetworkReply* netReply, const QList<QSsl QTextStream ( &fl ) <<cert.toPem(); fl.close(); netReply->ignoreSslErrors(); - x2goDebug<<"store certificate in "<<homeDir+"/.x2go/ssl/exceptions/"+ + x2goDebug<<"Storing certificate in "<<homeDir+"/.x2go/ssl/exceptions/"+ lurl.host() +"/"+fname; requestTime.restart(); } diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index db51edc..eba9a3a 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -58,7 +58,7 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) #ifdef Q_OS_LINUX image=shape=0; #endif - x2goInfof(1) << tr("Starting x2goclient..."); + x2goInfof(1) << tr("Starting X2Go Client..."); debugging = false; setFocusPolicy ( Qt::NoFocus ); @@ -259,7 +259,7 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) homeDir=portableDataPath; - x2goInfof(2)<<tr("Starting x2goclient in portable mode... data directory is: ")<<portableDataPath; + x2goInfof(2)<<tr("Starting X2Go Client in portable mode. Data directory is: ")<<portableDataPath; QTimer *timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(slotCheckPortableDir())); timer->start(1000); @@ -492,11 +492,11 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) connect( xineramaTimer, SIGNAL(timeout()), this, SLOT(slotConfigXinerama())); - x2goInfof(3)<<tr("Started x2goclient."); + x2goInfof(3)<<tr("Started X2Go Client."); x2goDebug<<"$HOME=" + homeDir.toAscii(); if (thinMode) { - x2goDebug<<"ThinMode is active."; + x2goDebug<<"Thin Mode is active."; showMaximized(); activateWindow(); raise(); @@ -506,10 +506,10 @@ ONMainWindow::ONMainWindow ( QWidget *parent ) :QMainWindow ( parent ) ONMainWindow::~ONMainWindow() { - x2goDebug<<"Destroying x2goclient..."; + x2goDebug<<"Destroying X2Go Client's main window."; if ( !closeEventSent ) closeClient(); - x2goDebug<<"Destroyed x2goclient."; + x2goDebug<<"Finished destructor hooks for X2Go Client's main window."; } void ONMainWindow::slotShutdownThinClient() @@ -585,7 +585,7 @@ bool ONMainWindow::get_translator (QString file_name_start, QTranslator **transl for (QStringList::const_iterator it = ui_languages.constBegin (); it != ui_languages.constEnd (); ++it) { /* Respect English locales. Don't try to load any translation, because we do not ship nop-English translations. */ if ((*it).startsWith ("en")) { - x2goWarningf (1) << tr ("English language requested, not loading translator"); + x2goWarningf (1) << tr ("English language requested, not loading translator."); break; } else { @@ -858,7 +858,7 @@ void ONMainWindow::initWidgetsNormal() setWindowIcon ( QIcon ( ":/img/icons/128x128/x2go.png" ) ); act_edit=new QAction ( QIcon ( iconsPath ( "/32x32/edit.png" ) ), - tr ( "Session management..." ),this ); + tr ( "Session management ..." ),this ); act_edit->setShortcut ( tr ( "Ctrl+E" ) ); if (noSessionEdit) @@ -869,7 +869,7 @@ void ONMainWindow::initWidgetsNormal() act_sessicon=new QAction ( QIcon ( iconsPath ( "/32x32/create_file.png" ) ), - tr ( "&Create session icon on desktop..." ), + tr ( "&Create session icon on desktop ..." ), this ); if (brokerMode) act_sessicon->setEnabled(false); @@ -878,7 +878,7 @@ void ONMainWindow::initWidgetsNormal() { act_changeBrokerPass=new QAction ( QIcon ( iconsPath ( "/32x32/auth.png" ) ), - tr ( "&Set broker password..." ), + tr ( "&Set broker password ..." ), this ); connect ( act_changeBrokerPass,SIGNAL ( triggered(bool)),this, SLOT ( slotChangeBrokerPass()) ); @@ -889,7 +889,7 @@ void ONMainWindow::initWidgetsNormal() { act_testCon=new QAction ( QIcon ( iconsPath ( "/32x32/contest.png" ) ), - tr ( "&Connectivity test..." ), + tr ( "&Connectivity test ..." ), this ); connect ( act_testCon,SIGNAL ( triggered(bool)),this, SLOT ( slotTestConnection()) ); @@ -1047,7 +1047,7 @@ void ONMainWindow::slotCheckPortableDir() { if (!QFile::exists(homeDir)) { - x2goDebug<<"Portable directory does not exists, closing."; + x2goDebug<<"Portable directory does not exist, closing."; close(); } } @@ -1163,7 +1163,7 @@ void ONMainWindow::trayIconInit() if (!hideFolderSharing) - trayIconActiveConnectionMenu->addAction(tr ("Share folder..." ),this, SLOT(slotExportDirectory())); + 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, @@ -1193,7 +1193,7 @@ void ONMainWindow::trayIconInit() trayIcon->setContextMenu(trayIconMenu); trayIcon->setIcon(QIcon ( ":/img/icons/128x128/x2go.png") ); - trayIcon->setToolTip(tr("Left mouse button to hide/restore - Right mouse button to display context menu")); + trayIcon->setToolTip(tr("A left click hides or restores the window. A right click displays the context menu.")); } if (!startHidden | forceToShowTrayicon) @@ -1379,13 +1379,13 @@ void ONMainWindow::slotResize ( const QSize sz ) void ONMainWindow::closeClient() { - x2goInfof(6)<<tr("Closing x2goclient..."); + x2goInfof(6)<<tr("Closing X2Go Client ..."); if(trayIcon) trayIcon->hide(); closeEventSent=true; if ( !startMaximized && !startHidden && !embedMode ) { - x2goDebug<<"Saving settings..."; + x2goDebug<<"Saving settings ..."; X2goSettings st ( "sizes" ); st.setting()->setValue ( "mainwindow/size", @@ -1394,7 +1394,7 @@ void ONMainWindow::closeClient() st.setting()->setValue ( "mainwindow/maximized", QVariant ( isMaximized() ) ); st.setting()->sync(); - x2goDebug<<"Saved settings."; + x2goDebug<<"Saved settings."; #ifdef Q_OS_LINUX if (image) XFreePixmap(QX11Info::display(),image); @@ -1406,19 +1406,19 @@ void ONMainWindow::closeClient() { if ( nxproxy->state() ==QProcess::Running ) { - x2goDebug<<"Terminating proxy..."; + x2goDebug<<"Terminating proxy ..."; nxproxy->terminate(); - x2goDebug<<"Terminated proxy."; + x2goDebug<<"Terminated proxy."; } - x2goDebug<<"Deleting proxy..."; + x2goDebug<<"Deleting proxy ..."; delete nxproxy; - x2goDebug<<"Deleted proxy."; + x2goDebug<<"Deleted proxy."; } if ( sshConnection && !useLdap) { - x2goDebug<<"Waiting for the SSH connection to finish..."; + x2goDebug<<"Waiting for the SSH connection to finish ..."; delete sshConnection; - x2goDebug<<"Waited for the SSH connection to finish."; + x2goDebug<<"SSH connection finished."; sshConnection=0; } if (useLdap) @@ -1427,26 +1427,26 @@ void ONMainWindow::closeClient() { if (serverSshConnections[i]) { - x2goDebug<<"Waiting for the SSH connection to finish..."; + x2goDebug<<"Waiting for the SSH connection to finish ..."; delete serverSshConnections[i]; - x2goDebug<<"Waited for the SSH connection to finish."; + x2goDebug<<"SSH connection finished."; } } } if ( soundServer ) { - x2goDebug<<"Deleting the sound server..."; + x2goDebug<<"Deleting the sound server ..."; delete soundServer; - x2goDebug<<"Deleted the sound server."; + x2goDebug<<"Deleted the sound server."; } if ( gpgAgent!=0l ) { if ( gpgAgent->state() ==QProcess::Running ) { - x2goDebug<<"Terminating gpg-agent..."; + x2goDebug<<"Terminating GPG Agent ..."; gpgAgent->terminate(); - x2goDebug<<"Terminated gpg-agent."; + x2goDebug<<"Terminated GPG Agent."; } } @@ -1464,15 +1464,15 @@ void ONMainWindow::closeClient() #ifdef Q_OS_WIN if ( pulseServer && pulseStarted ) { - x2goDebug<<"Deleting the pulse timer..."; + x2goDebug<<"Deleting the pulse timer ..."; delete pulseTimer; - x2goDebug<<"Deleted the pulse timer."; - x2goDebug<<"Killing the pulse sound server..."; + x2goDebug<<"Deleted the pulse timer."; + x2goDebug<<"Killing the PulseAudio sound server ..."; pulseServer->kill(); - x2goDebug<<"Killed the pulse sound server."; - x2goDebug<<"Deleting the pulse process..."; + x2goDebug<<"Killed the PulseAudio sound server."; + x2goDebug<<"Deleting the PulseAudio process ..."; delete pulseServer; - x2goDebug<<"Deleted the pulse process."; + x2goDebug<<"Deleted the PulseAudio process."; QDir dr ( homeDir ); dr.remove ( pulseDir+"/config.pa" ); @@ -1482,12 +1482,12 @@ void ONMainWindow::closeClient() } if ( xorg ) { - x2goDebug<<"Terminating xorg..."; + x2goDebug<<"Terminating the X.Org Server ..."; xorg->terminate(); - x2goDebug<<"Terminated xorg."; - x2goDebug<<"Deleting xorg..."; + x2goDebug<<"Terminated the X.Org Server."; + x2goDebug<<"Deleting the X.Org Server ..."; delete xorg; - x2goDebug<<"Deleted xorg."; + x2goDebug<<"Deleted the X.Org Server."; } if ( winSshdStarted ) @@ -1499,9 +1499,9 @@ void ONMainWindow::closeClient() #else if ( userSshd && sshd ) { - x2goDebug<<"Terminating sshd..."; + x2goDebug<<"Terminating the OpenSSH server ..."; sshd->terminate(); - x2goDebug<<"Terminated sshd."; + x2goDebug<<"Terminated the OpenSSH server."; delete sshd; } @@ -1527,7 +1527,7 @@ void ONMainWindow::closeClient() } SshMasterConnection::finalizeLibSsh(); - x2goInfof(7)<<tr("Closed x2goclient."); + x2goInfof(7)<<tr("Finished X2Go Client closing hooks."); } void ONMainWindow::closeEvent ( QCloseEvent* event ) @@ -1556,7 +1556,7 @@ void ONMainWindow::hideEvent(QHideEvent* event) void ONMainWindow::trayQuit() { - x2goDebug<<"Quitting tray icon and closing application."<<endl; + x2goDebug<<"Quitting from tray icon and closing application."<<endl; closeClient(); qApp->quit(); @@ -1751,7 +1751,7 @@ void ONMainWindow::slotClosePass() { if (!config.brokerAuthenticated) { - x2goErrorf(15)<<tr("Broker authenication failed!"); + x2goErrorf(15)<<tr("Broker authentication failed!"); close(); } } @@ -1825,7 +1825,7 @@ void ONMainWindow::slotPassEnter() } catch ( LDAPExeption e ) { - QString message="Exeption in: "; + QString message="Exception in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); QMessageBox::critical ( 0l,tr ( "Error" ),message, @@ -1835,7 +1835,7 @@ void ONMainWindow::slotPassEnter() } if ( res.size() ==0 ) { - QString message=tr ( "no X2Go server found in LDAP " ); + QString message=tr ( "no X2Go Server found in LDAP " ); QMessageBox::critical ( 0l,tr ( "Error" ),message, QMessageBox::Ok,QMessageBox::NoButton ); slotConfig(); @@ -1862,7 +1862,7 @@ void ONMainWindow::slotPassEnter() sPort=sL.front().c_str(); } - x2goDebug<<"SSH-Server("<<server.name<<") port: "<<sPort; + x2goDebug<<"SSH server: "<<server.name<<"; port: "<<sPort; QString sFactor="1"; list<string> serialNumber=LDAPSession::getStringAttrValues ( @@ -1872,7 +1872,7 @@ void ONMainWindow::slotPassEnter() sFactor=serialNumber.front().c_str(); } - x2goDebug<<"SSH-Server("<<server.name<<") factor: "<<sFactor; + x2goDebug<<"SSH server: "<<server.name<<"; factor: "<<sFactor; server.factor=sFactor.toFloat(); server.sess=0; @@ -2008,7 +2008,7 @@ void ONMainWindow::readUsers() } catch ( LDAPExeption e ) { - QString message="Exeption in: "; + QString message="Exception in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); QMessageBox::critical ( 0l,tr ( "Error" ), @@ -2184,7 +2184,7 @@ void ONMainWindow::slotReadSessions() if(!startHidden) QMessageBox::critical(this,tr("Error"),error); else - x2goErrorf(1)<<error; // tr("No X2Go sessions not found, closing."); + x2goErrorf(1)<<error; close(); return; } @@ -2310,7 +2310,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) { #ifdef USELDAP - x2goDebug<<"Initializing LDAP sessions..."; + x2goDebug<<"Initializing LDAP sessions ..."; try { @@ -2319,7 +2319,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) } catch ( LDAPExeption e ) { - QString message="Exeption0 in: "; + QString message="Exception0 in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); @@ -2335,7 +2335,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) } catch ( LDAPExeption e ) { - QString message="Exeption1 in: "; + QString message="Exception1 in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); @@ -2353,7 +2353,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) catch ( LDAPExeption e ) { QString message= - "Exeption2 in: "; + "Exception2 in: "; message=message+ e.err_type.c_str(); message=message+" : "+ @@ -2423,7 +2423,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) } catch ( LDAPExeption e ) { - QString message="Exeption in: "; + QString message="Exception in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); QMessageBox::critical ( 0l,tr ( "Error" ),message, @@ -2468,7 +2468,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) } catch ( LDAPExeption e ) { - QString message="Exeption in: "; + QString message="Exception in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); QMessageBox::critical ( 0l,tr ( "Error" ),message, @@ -2520,7 +2520,7 @@ bool ONMainWindow::initLdapSession ( bool showError ) } } #endif - x2goDebug<<"Initialized LDAP sessions."; + x2goDebug<<"Initialized LDAP sessions."; return true; } @@ -2654,7 +2654,7 @@ void ONMainWindow::slotSelectedFromList ( SessionButton* session ) selectedCommand=command.split("/").last(); command=transAppName ( command ); login->setText ( userName ); - x2goDebug << "creating QPixmap with session icon: '" << sessIcon << "'."; + x2goDebug << "Creating QPixmap with session icon: '" << sessIcon << "'."; QPixmap pix ( sessIcon ); if ( !miniMode ) { @@ -2721,7 +2721,7 @@ void ONMainWindow::slotSelectedFromList ( SessionButton* session ) } else if ( cardReady || autologin || krblogin ) { - x2goDebug<<"Starting session via smartcard, ssh-agent or kerberos token."; + x2goDebug<<"Starting session via Smart Card, SSH Agent or Kerberos token."; nopass=true; if ( cardReady ) login->setText ( cardLogin ); @@ -2755,7 +2755,7 @@ SshMasterConnection* ONMainWindow::startSshConnection ( QString host, QString po x2goInfof(8)<<tr("Starting connection to server: ") + host + ":" + port; SshMasterConnection* con; - x2goDebug<<"Start new ssh connection to server:"<<host<<":"<<port<<" krbLogin: "<<krbLogin; + x2goDebug<<"Starting new ssh connection to server:"<<host<<":"<<port<<" krbLogin: "<<krbLogin; for ( int i=0; i<sshEnv.size(); ++i ) { @@ -2806,7 +2806,7 @@ SshMasterConnection* ONMainWindow::startSshConnection ( QString host, QString po void ONMainWindow::slotSshConnectionError ( QString message, QString lastSessionError ) { - x2goErrorf(2)<< tr("Connection Error(") + message + "): " + lastSessionError; + x2goErrorf(2)<< tr("Connection error: ") + message + ": " + lastSessionError; if ( sshConnection ) { sshConnection->wait(); @@ -2863,7 +2863,7 @@ void ONMainWindow::slotSshConnectionOk() SshMasterConnection* ONMainWindow::findServerSshConnection(QString host) { - x2goDebug<<"Searching for SSH connections..."; + x2goDebug<<"Searching for SSH connections ..."; for (int i=0; i<serverSshConnections.count(); ++i) { if (serverSshConnections[i]) @@ -2875,7 +2875,7 @@ SshMasterConnection* ONMainWindow::findServerSshConnection(QString host) } } } - x2goWarningf(3)<< tr("Couldn't find a SSH connection."); + x2goWarningf(3)<< tr("Couldn't find an SSH connection."); return 0l; } @@ -2884,7 +2884,7 @@ void ONMainWindow::slotServSshConnectionOk(QString server) SshMasterConnection* con=findServerSshConnection(server); if (!con) return; - x2goDebug<<"Getting sessions on Host: " + server; + x2goDebug<<"Getting sessions on host: " + server; con->executeCommand( "export HOSTNAME && x2golistsessions", this, SLOT (slotListAllSessions ( bool,QString,int ) )); } @@ -2937,9 +2937,9 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa errMsg=tr ( "Host key for server changed.\nIt is now: " ) +sshMessage+"\n"+ tr ( "This can be an indication of a man-in-the-middle attack.\n" "Somebody might be eavesdropping on you.\n" - "For security reasons, it is recommended to stop the connection.\n" + "For security reasons, it is recommended to stop the connection attempt.\n" "Do you want to terminate the connection?\n" ); - if (QMessageBox::warning (0, tr ("Host key verification failed"), + if (QMessageBox::warning (0, tr ("Host key verification failed."), errMsg, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { @@ -2950,7 +2950,7 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa sshConnection->wait(); delete sshConnection; } - slotSshUserAuthError ( tr ( "Host key verification failed" ) ); + slotSshUserAuthError ( tr ( "Host key verification failed." ) ); sshConnection=0; return; } @@ -2962,12 +2962,12 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa } break; case SSH_SERVER_FOUND_OTHER: - errMsg=tr ( "The host key for this server was not found but an other" - "type of key exists. An attacker might change the default server key to " - "confuse your client into thinking the key does not exist. \n" - "For security reasons, it is recommended to stop the connection.\n" + errMsg=tr ( "The host key for this server was not found but another" + "type of key exists. An attacker might have changed the default server key to " + "trick your client into thinking the key does not exist yet.\n" + "For security reasons, it is recommended to stop the connection attempt.\n" "Do you want to terminate the connection?\n"); - if (QMessageBox::warning (0, tr ("Host key verification failed"), + if (QMessageBox::warning (0, tr ("Host key verification failed."), errMsg, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::Yes) { @@ -2978,7 +2978,7 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa sshConnection->wait(); delete sshConnection; } - slotSshUserAuthError ( tr ( "Host key verification failed" ) ); + slotSshUserAuthError ( tr ( "Host key verification failed." ) ); sshConnection=0; return; } @@ -3010,7 +3010,7 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa break; } - if (QMessageBox::warning (this, tr ("Host key verification failed"), + if (QMessageBox::warning (this, tr ("Host key verification failed."), errMsg, QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No) { @@ -3022,7 +3022,7 @@ void ONMainWindow::slotSshServerAuthError ( int error, QString sshMessage, SshMa delete sshConnection; } sshConnection=0; - slotSshUserAuthError ( tr ( "Host key verification failed" ) ); + slotSshUserAuthError ( tr ( "Host key verification failed." ) ); return; } connection->writeKnownHosts(true); @@ -3054,7 +3054,7 @@ void ONMainWindow::slotSshUserAuthError ( QString error ) trayQuit(); } - QMessageBox::critical (0l, tr ("Authentication failed"), + QMessageBox::critical (0l, tr ("Authentication failed."), error, QMessageBox::Ok, QMessageBox::NoButton); setEnabled ( true ); @@ -3117,7 +3117,7 @@ void ONMainWindow::slotSessEnter() void ONMainWindow::continueNormalSession() { - x2goDebug<<"Continue normal x2go session"; + x2goDebug<<"Continue normal X2Go session"; if (brokerMode && !shadowSession) { @@ -3460,7 +3460,7 @@ void ONMainWindow::slotListSessions ( bool result,QString output, { cardReady=false; cardStarted=false; - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -3512,7 +3512,7 @@ void ONMainWindow::slotListSessions ( bool result,QString output, else { x2goSession s=getSessionFromString (config.sessiondata); - x2goDebug<<"Resuming managed session with Id: " + s.sessionId; + x2goDebug<<"Resuming managed session with ID: " + s.sessionId; resumeSession ( s ); } return; @@ -3670,7 +3670,7 @@ void ONMainWindow::startNewSession() if ( host==QString::null ) { QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "No server available" ), + tr ( "No server available." ), QMessageBox::Ok, QMessageBox::NoButton ); return; @@ -3679,7 +3679,7 @@ void ONMainWindow::startNewSession() if (!sshConnection) { QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "Server not available" ), + tr ( "Server not available." ), QMessageBox::Ok, QMessageBox::NoButton ); return; @@ -4028,7 +4028,7 @@ void ONMainWindow::resumeSession ( const x2goSession& s ) if (!sshConnection) { QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "Server not availabel" ), + tr ( "Server not available." ), QMessageBox::Ok, QMessageBox::NoButton ); return; @@ -4239,8 +4239,12 @@ void ONMainWindow::resumeSession ( const x2goSession& s ) * @brief ONMainWindow::setTrayIconToSessionIcon * @param info: message to be displayed in tray icon message * - * set the tray session icon picture as tray icon picture and show a tray icon information message about something is doing - * this message avoid the users think nothing is happend for some seconds while x2go session window is showed + * Sets the tray session icon picture as the tray icon picture and + * shows a tray icon information message about what X2Go Client + * is currently doing. + * + * This message gives the user some feedback while the X2Go session + * window is displayed. * */ void ONMainWindow::setTrayIconToSessionIcon(QString info) { @@ -4305,7 +4309,7 @@ void ONMainWindow::selectSession ( QStringList& sessions ) QFontMetrics fm ( sessTv->font() ); for ( int row = 0; row < sessions.size(); ++row ) { - x2goDebug<<"Decoding Sessionstring:" + sessions[row]; + x2goDebug<<"Decoding session string:" + sessions[row]; x2goSession s=getSessionFromString ( sessions[row] ); selectedSessions.append ( s ); @@ -4362,7 +4366,7 @@ void ONMainWindow::selectSession ( QStringList& sessions ) { QMessageBox::information ( this,tr ( "Information" ), tr ( "No accessible desktop " - "found" ) ); + "found." ) ); slotCloseSelectDlg(); return; } @@ -4491,19 +4495,18 @@ void ONMainWindow::slotResumeSess() { res=QMessageBox::warning ( 0l,tr ( "Warning" ), - tr ( - "Your current color depth is " - "different to the color depth of your " - "x2go-session. This may cause problems " - "reconnecting to this session and in most " - "cases <b>you will loose the session</b> " - "and have to start a new one! It's highly " - "recommended to change the color depth of " - "your Display to " ) +tr ( "24 or 32" ) + - tr ( - " bit and restart your X-server before you " - "reconnect to this x2go-session.<br>Resume " - "this session anyway?" ),tr ( "Yes" ), + tr ("Your current color depth is different from " + "the session's color depth. This may cause " + "problems reconnecting to this session and " + "in most cases <b>you will loose the " + "session</b> and have to start a new one! " + "It's highly recommended to change the color " + "depth of your display to " ) + + tr ( "24 or 32" ) + + tr (" bits and restart your X.Org Server before you " + "reconnect to this X2Go session.<br />" + "Do you want to resume this session anyway?" ), + tr ( "Yes" ), tr ( "No" ) ); } @@ -4511,19 +4514,18 @@ void ONMainWindow::slotResumeSess() { res=QMessageBox::warning ( 0l,tr ( "Warning" ), - tr ( - "Your current color depth is different to " - "the color depth of your x2go-session. " - "This may cause problems reconnecting to " - "this session and in most cases <b>you " - "will loose the session</b> and have to " - "start a new one! It's highly recommended " - "to change the color depth of your " - "Display to " ) +depth+ - tr ( - " bit and restart your X-server before you " - "reconnect to this x2go-session.<br>Resume " - "this session anyway?" ),tr ( "Yes" ), + tr ("Your current color depth is different from " + "the session's color depth. This may cause " + "problems reconnecting to this session and " + "in most cases <b>you will loose the " + "session</b> and have to start a new one! " + "It's highly recommended to change the color " + "depth of your display to " ) + + depth + + tr (" bits and restart your X.Org Server before you " + "reconnect to this X2Go session.<br />" + "Do you want to resume this session anyway?" ), + tr ( "Yes" ), tr ( "No" ) ); } if ( res==0 ) @@ -4582,7 +4584,7 @@ void ONMainWindow::slotSuspendSess() if (!sshConnection) { QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "Server not availabel" ), + tr ( "Server not available." ), QMessageBox::Ok, QMessageBox::NoButton ); return; @@ -4655,7 +4657,7 @@ void ONMainWindow::slotRetSuspSess ( bool result, QString output, { if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( @@ -4727,7 +4729,7 @@ void ONMainWindow::slotTermSess() if (!sshConnection) { QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "Server not availabel" ), + tr ( "Server not available." ), QMessageBox::Ok, QMessageBox::NoButton ); return; @@ -4749,7 +4751,7 @@ void ONMainWindow::slotRetTermSess ( bool result, QString output, { if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( @@ -4782,7 +4784,7 @@ void ONMainWindow::slotRetResumeSess ( bool result, if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( @@ -4797,7 +4799,7 @@ void ONMainWindow::slotRetResumeSess ( bool result, } if ( output.indexOf ( "ACCESS DENIED" ) !=-1 ) { - message="Access denied from user"; + message="Access denied for user"; } QMessageBox::critical ( 0l,tr ( "Error" ), @@ -5456,7 +5458,7 @@ void ONMainWindow::slotSndTunnelFailed ( bool result, QString output, { if ( !managedMode ) { - QString message=tr ( "Unable to create SSH Tunnel for audio data:\n" ) + QString message=tr ( "Unable to create SSH tunnel for audio data:\n" ) +output; QMessageBox::warning ( 0l,tr ( "Warning" ),message, QMessageBox::Ok, @@ -5608,7 +5610,7 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus ) x2goWarningf(5)<< tr( "Waiting for proxy to exit." ); if ( !nxproxy->waitForFinished ( 3000 ) ) { - x2goWarningf(6)<< tr( "Failed, killing the proxy." ); + x2goWarningf(6)<< tr( "Proxy didn't terminate after 3 seconds. Killing the proxy." ); nxproxy->kill(); } } @@ -5646,16 +5648,16 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus ) { x2goDebug<<"Deleting SSH connection instance."; delete sshConnection; - x2goDebug<<"Deleted SSH connection instance." ; + x2goDebug<<"Deleted SSH connection instance." ; sshConnection=0; if (startHidden) { - x2goInfof(9) << tr("Closing X2Go Client (because it was started in hidden mode)."); + x2goInfof(9) << tr("Closing X2Go Client because it was started in hidden mode."); close(); } else if (closeDisconnect) { - x2goInfof(10) << tr("Closing X2Go Client (because --close-disconnect was used on the cmdline)."); + x2goInfof(10) << tr("Closing X2Go Client because the --close-disconnect parameter was passed."); close(); } } @@ -5680,7 +5682,7 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus ) } else if ( brokerMode && config.brokerAutologoff ) { - x2goDebug<<"Logging off from broker as requested via cmdline."; + x2goDebug<<"Logging off from broker as requested via command line."; QTimer::singleShot(1, this,SLOT(slotGetBrokerAuth())); } else if ( !embedMode ) @@ -5696,7 +5698,7 @@ void ONMainWindow::slotProxyFinished ( int,QProcess::ExitStatus ) sessionStatusDlg->hide(); resumeSession ( resumingSession ); } - x2goDebug<<"Finished Proxy."; + x2goDebug<<"Finished proxy."; setStatStatus ( tr ( "Finished" ) ); #ifdef Q_OS_DARWIN //fixes bug, when mainwindow inputs not accepting focus under mac @@ -5873,7 +5875,7 @@ void ONMainWindow::slotShowPassForm() { #ifdef Q_OS_DARWIN //fixes bug, when mainwindow inputs not accepting focus under mac - x2goDebug<<"set focus"<<endl; + x2goDebug<<"Setting focus."<<endl; QTimer::singleShot(500, this, SLOT(setFocus())); setFocus(); #endif @@ -6016,7 +6018,7 @@ bool ONMainWindow::termSession ( QString sessId, bool warn ) tr ( "Are you sure you want to terminate " "this session?\n" - "Unsaved documents will be lost" ), + "Unsaved documents will be lost." ), QMessageBox::Yes,QMessageBox::No ); if (hide_after) hide(); @@ -6402,7 +6404,7 @@ void ONMainWindow::slotRetRunCommand ( bool result, QString output, { if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n:\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n:\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -6432,7 +6434,7 @@ void ONMainWindow::slotReadApplications(bool result, QString output, { if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n:\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n:\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -6564,7 +6566,7 @@ void ONMainWindow::slotReadApplications(bool result, QString output, if (runStartApp && autostartApp.length()>1) { if (!startAppFound) { - x2goDebug<<"Autostart application "<<autostartApp<< " not found in Desktop files."; + x2goDebug<<"Autostart application "<<autostartApp<< " not found in desktop files."; } else { @@ -6947,7 +6949,7 @@ bool ONMainWindow::parseParameter ( QString param ) value = expandHome(value); if (! QFile::exists(value)) { - printError( param + tr(" (file not exists)")); + printError( param + tr(" (file does not exist)")); return false; } supportMenuFile=value; @@ -6958,7 +6960,7 @@ bool ONMainWindow::parseParameter ( QString param ) value = expandHome(value); if (! QFile::exists(value)) { - printError( param + tr(" (file not exists)")); + printError( param + tr(" (file does not exist)")); return false; } BGFile=value; @@ -6969,7 +6971,7 @@ bool ONMainWindow::parseParameter ( QString param ) value=expandHome(value); if (! QFile::exists(value)) { - printError( param + tr(" (file not exists)")); + printError( param + tr(" (file does not exist)")); return false; } SPixFile=value; @@ -6996,7 +6998,7 @@ bool ONMainWindow::parseParameter ( QString param ) #endif if (! dr.exists(value)) { - printError( param + tr(" (directory not exists)")); + printError( param + tr(" (directory does not exist)")); return false; } homeDir=value; @@ -7024,7 +7026,7 @@ bool ONMainWindow::linkParameter ( QString value ) else { printError( tr ( - "wrong value for argument\"--link\"" + "Invalid value for parameter \"--link\"." ).toLocal8Bit().data() ); return false; } @@ -7041,7 +7043,7 @@ bool ONMainWindow::clipboardParameter ( QString value ) else { printError( tr ( - "wrong value for argument\"--clipboard\"" + "Invalid value for parameter \"--clipboard\"." ).toLocal8Bit().data() ); return false; } @@ -7056,8 +7058,8 @@ bool ONMainWindow::soundParameter ( QString val ) defaultUseSound=false; else { - printError( tr ( "wrong value for " - "argument\"--sound\"" ).toLocal8Bit().data() ); + printError( tr ( "Invalid value for " + "parameter \"--sound\"." ).toLocal8Bit().data() ); return false; } return true; @@ -7073,7 +7075,7 @@ bool ONMainWindow::geometry_par ( QString val ) if ( res.size() !=2 ) { printError( tr ( - "wrong value for argument\"--geometry\"" ). + "Invalid value for parameter \"--geometry\"." ). toLocal8Bit().data() ); return false; } @@ -7083,7 +7085,7 @@ bool ONMainWindow::geometry_par ( QString val ) if ( ! ( defaultWidth >0 && defaultHeight >0 && o1 && o2 ) ) { printError( tr ( - "wrong value for argument\"--geometry\"" ). + "Invalid value for parameter \"--geometry\"." ). toLocal8Bit().data() ); return false; } @@ -7100,7 +7102,7 @@ bool ONMainWindow::setKbd_par ( QString val ) else { printError( tr ( - "wrong value for argument\"--set-kbd\"" ). + "Invalid value for parameter \"--set-kbd\"." ). toLocal8Bit().data() ); return false; } @@ -7116,7 +7118,7 @@ bool ONMainWindow::ldapParameter ( QString val ) if ( lst.size() !=3 ) { printError( tr ( - "wrong value for argument\"--ldap\"" ). + "Invalid value for parameter \"--ldap\"." ). toLocal8Bit().data() ); return false; } @@ -7137,7 +7139,7 @@ bool ONMainWindow::ldap1Parameter ( QString val ) if ( lst.size() !=2 ) { printError( tr ( - "wrong value for argument\"--ldap1\"" ). + "Invalid value for parameter \"--ldap1\"." ). toLocal8Bit().data() ); return false; } @@ -7156,7 +7158,7 @@ bool ONMainWindow::ldap2Parameter ( QString val ) { printError( tr ( - "wrong value for argument\"--ldap2\"" ). + "Invalid value for parameter \"--ldap2\"." ). toLocal8Bit().data() ); return false; } @@ -7209,7 +7211,7 @@ bool ONMainWindow::packParameter ( QString val ) } } file.close(); - printError ( tr("wrong value for argument\"--pack\"" )); + printError ( tr("Invalid value for parameter \"--pack\"." )); return false; } @@ -7245,7 +7247,7 @@ void ONMainWindow::showHelp () void ONMainWindow::showHelpPack() { qCritical ( "%s",tr ( - "Available pack methodes:" ).toLocal8Bit().data() ); + "Available pack methods:" ).toLocal8Bit().data() ); QFile file ( ":/txt/packs" ); if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) return; @@ -7266,7 +7268,7 @@ void ONMainWindow::showHelpPack() if (!startHidden && !haveTerminal) { HelpDialog dlg(this); - dlg.setWindowTitle(tr("Pack Methodes")); + dlg.setWindowTitle(tr("Pack Methods")); dlg.setText(msg); dlg.exec(); } @@ -7296,7 +7298,7 @@ void ONMainWindow::showChangelog() { if(!QFile::exists(":/txt/changelog")) { - qCritical()<<tr("Option is not availabel in this build"); + qCritical()<<tr("Option is not available in this build."); return; } showTextFile(":/txt/changelog", tr("Changelog")); @@ -7306,7 +7308,7 @@ void ONMainWindow::showGit() { if(!QFile::exists(":/txt/git-info")) { - qCritical()<<tr("Option is not availabel in this build"); + qCritical()<<tr("Option is not available in this build."); return; } showTextFile(":/txt/git-info", tr("Git Info")); @@ -7331,7 +7333,7 @@ void ONMainWindow::slotGetServers ( bool result, QString output, cardReady=false; cardStarted=false; - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -7413,7 +7415,7 @@ void ONMainWindow::slotListAllSessions ( bool result,QString output, if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -7443,7 +7445,7 @@ void ONMainWindow::slotListAllSessions ( bool result,QString output, ( listedSessions.size() ==1 && listedSessions[0].length() <5 ) ) { - x2goDebug<<"Start new session."; + x2goDebug<<"Starting new session."; startNewSession(); } else if ( listedSessions.size() ==1 ) @@ -7452,7 +7454,7 @@ void ONMainWindow::slotListAllSessions ( bool result,QString output, x2goSession s=getSessionFromString ( listedSessions[0] ); - x2goDebug<<"Will proceed with session."; + x2goDebug<<"Will proceed with this session."; QDesktopWidget wd; if ( s.status=="S" && isColorDepthOk ( @@ -7462,7 +7464,7 @@ void ONMainWindow::slotListAllSessions ( bool result,QString output, } else { - x2goDebug<<"Please select one session..."; + x2goDebug<<"Please select one session ..."; selectSession ( listedSessions ); } } @@ -7678,7 +7680,7 @@ void ONMainWindow::exportDefaultDirs() { QString message= tr ( - "Unable to create folder:" ) + path; + "Unable to create directory:" ) + path; QMessageBox::critical ( 0l,tr ( "Error" ),message, QMessageBox::Ok, @@ -7786,7 +7788,7 @@ QString ONMainWindow::createRSAKey() QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append ) ) { - x2goErrorf(10)<<tr("Can not open key: ")<<keyName; + x2goErrorf(10)<<tr("Cannot open key: ")<<keyName; return keyName; } QTextStream out ( &file ); @@ -7806,7 +7808,7 @@ void ONMainWindow::slotCopyKey ( bool result, QString output, int pid) if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -7870,7 +7872,7 @@ void ONMainWindow::slotRetExportDir ( bool result,QString output, if ( result==false ) { - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; x2goDebug<<"startX2goMount failed to mount client-side folder, reason: "<<message<<endl; if ( message.indexOf ( "publickey,password" ) !=-1 ) { @@ -8110,29 +8112,29 @@ void ONMainWindow::slotSupport() void ONMainWindow::slotAbout() { - QString aboutStr=tr ( - "</b><br> (C. 2005-2015 <b>obviously nice</b>: " - "Oleksandr Shneyder, Heinz-Markus Graesing)<br>" ); + QString aboutStr=tr ("<br>(C) 2005-2015 by <b>obviously nice</b>: " + "Oleksandr Shneyder, Heinz-Markus Graesing<br>" ); if ( embedMode ) - aboutStr+=tr ( "<br>x2goplugin mode was sponsored by " + aboutStr+=tr ( "<br>X2Go Plugin mode was sponsored by " "<a href=\"http://www.foss-group.de/\">" - "FOSS-Group GmbH(Freiburg)</a><br>" ); + "FOSS-Group GmbH (Freiburg)</a><br>" ); aboutStr+= tr ( - "<br>Client for use with the X2Go network based " - "computing environment. This Client will be able " - "to connect to X2Go server(s) and start, stop, " + "<br>This is a client to access the X2Go network-based " + "computing environment. This client will be able " + "to connect to X2Go Server(s) and start, stop, " "resume and terminate (running) desktop sessions. " "X2Go Client stores different server connections " "and may automatically request authentication " - "data from LDAP directories. Furthermore it can be " - "used as fullscreen loginscreen (replacement for " - "loginmanager like xdm). Please visit x2go.org for " - "further information." ); + "data from LDAP directories. Furthermore, it can be " + "used as a fullscreen login screen (replacement for " + "login managers like XDM). Please visit <a " + "href=\"http://www.x2go.org\">the project home page at " + "x2go.org</a> for further information." ); QMessageBox::about ( - this,tr ( "About X2GO client" ), - tr ( "<b>X2Go Client V. " ) +VERSION+ - " </b >(Qt - "+qVersion() +")"+ + this,tr ( "About X2Go Client" ), + tr ( "<b>X2Go Client v. " ) +VERSION+ + "</b> (Qt - "+qVersion() +")"+ aboutStr ); } @@ -8170,13 +8172,13 @@ void ONMainWindow::slotRereadUsers() } catch ( LDAPExeption e ) { - QString message="Exeption in: "; + QString message="Exception in: "; message=message+e.err_type.c_str(); message=message+" : "+e.err_str.c_str(); QMessageBox::critical ( 0l,tr ( "Error" ),message, QMessageBox::Ok,QMessageBox::NoButton ); QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "Please check LDAP Settings" ), + tr ( "Please check LDAP Settings." ), QMessageBox::Ok,QMessageBox::NoButton ); slotConfig(); return; @@ -8416,7 +8418,7 @@ void ONMainWindow::slotGpgError() if ( stdOut.indexOf ( "failed" ) !=-1 ) { QMessageBox::critical ( 0l,tr ( "Error" ), - tr ( "No valid card found" ), + tr ( "No valid card found." ), QMessageBox::Ok, QMessageBox::NoButton ); gpg->kill(); @@ -8473,7 +8475,7 @@ void ONMainWindow::slotGpgFinished ( int exitCode, QMessageBox::critical ( 0l,tr ( "Error" ), tr ( - "This card is unknown by X2Go system" ), + "This card is unknown to the X2Go system." ), QMessageBox::Ok, QMessageBox::NoButton ); QTimer::singleShot ( 1000, this, @@ -8546,9 +8548,9 @@ void ONMainWindow::slotGpgAgentFinished ( int , QProcess::ExitStatus ) QString ssh_auth_sock=envLst[2].split ( "=" ) [1]; agentPid=envLst[4].split ( "=" ) [1]; - x2goDebug<<"GPG-agent info: "<<gpg_agent_info<<ssh_auth_sock<<agentPid; - x2goDebug<<"GPG-agent pid: "<<agentPid; - x2goDebug<<"GPG-agent out:"<<envLst[0]<<envLst[2]<<envLst[4]; + x2goDebug<<"GPG Agent info: "<<gpg_agent_info<<ssh_auth_sock<<agentPid; + x2goDebug<<"GPG Agent PID: "<<agentPid; + x2goDebug<<"GPG Agent out: "<<envLst[0]<<envLst[2]<<envLst[4]; agentCheckTimer->start ( 1000 ); cardReady=true; @@ -8579,7 +8581,7 @@ void ONMainWindow::slotGpgAgentFinished ( int , QProcess::ExitStatus ) QString sshout ( sshadd.readAllStandardOutput() ); sshout=sshout.simplified(); - x2goDebug<<"SSH-ADD out: "<<sshout; + x2goDebug<<"ssh-add out: "<<sshout; if(brokerMode && (!config.brokerAutologoff)) { @@ -8600,7 +8602,7 @@ void ONMainWindow::slotGpgAgentFinished ( int , QProcess::ExitStatus ) QString sshout ( sshadd.readAllStandardOutput() ); sshout=sshout.simplified(); - x2goDebug<<"SSH-ADD out: "<<sshout; + x2goDebug<<"ssh-add out: "<<sshout; return; } @@ -8626,14 +8628,14 @@ void ONMainWindow::slotCheckAgentProcess() if ( nxproxy ) if ( nxproxy->state() ==QProcess::Running ) { - x2goDebug<<"Suspending session..."; + x2goDebug<<"Suspending session ..."; slotSuspendSessFromSt(); - x2goDebug<<"Suspended session."; + x2goDebug<<"Suspended session."; // nxproxy->terminate(); } } - x2goDebug<<"GPG-Agent finished."; + x2goDebug<<"GPG Agent finished."; slotStartPGPAuth(); } @@ -8664,7 +8666,7 @@ QString ONMainWindow::getXDisplay() // There, it is possible no $DISPLAY variable is set. // Start X11 manually. First, find a free display number. - x2goDebug<< "entering 10.4 compat mode, checking for free X11 display"; + x2goDebug<< "Entering 10.4 compat mode, checking for free X11 display."; int xFreeDisp = 0; @@ -8800,7 +8802,7 @@ QString ONMainWindow::getXDisplay() QMessageBox::critical ( this,QString::null, tr ( - "Can't start X Server\nPlease check your installation" ) + "Can't start X.Org Server.\nPlease check your installation." ) ); close(); } @@ -8938,12 +8940,12 @@ void ONMainWindow::check_cmd_status() void ONMainWindow::slotCmdMessage ( bool result,QString output, int) { - x2goDebug<<"Command Message: " + output; + x2goDebug<<"Command message: " + output; if ( result==false ) { cardReady=false; cardStarted=false; - QString message=tr ( "<b>Connection failed</b>\n" ) +output; + QString message=tr ( "<b>Connection failed.</b>\n" ) +output; if ( message.indexOf ( "publickey,password" ) !=-1 ) { message=tr ( "<b>Wrong password!</b><br><br>" ) + @@ -8980,12 +8982,12 @@ void ONMainWindow::slotCmdMessage ( bool result,QString output, sshConnection=0; if (startHidden) { - x2goInfof(11) << tr("Closing X2Go Client (because it was started in hidden mode)."); + x2goInfof(11) << tr("Closing X2Go Client because it was started in hidden mode."); close(); } else if (closeDisconnect) { - x2goInfof(12) << tr("Closing X2Go Client (because --close-disconnect was used on the cmdline)."); + x2goInfof(12) << tr("Closing X2Go Client because the --close-disconnect parameter was passed."); close(); } } @@ -8995,18 +8997,17 @@ int ONMainWindow::startSshFsTunnel() { fsTunReady=false; - x2goDebug<<"Starting fs tunnel for: "<<resumingSession.sessionId; - x2goDebug<<"fs port: "<<resumingSession.fsPort; + x2goDebug<<"Starting Folder Sharing tunnel for: "<<resumingSession.sessionId; + x2goDebug<<"FS port: "<<resumingSession.fsPort; if ( resumingSession.fsPort.length() <=0 ) { - QString message=tr ( - "Remote server does not " - "support file system export " - "through SSH Tunnel\n" - "Please update to a newer " - "x2goserver package" ); + QString message=tr ("Remote server does not " + "support file system exports " + "through SSH tunnels.\n" + "Please update your x2goserver " + "package." ); slotFsTunnelFailed ( false,message,0 ); return 1; } @@ -9027,7 +9028,7 @@ void ONMainWindow::slotFsTunnelFailed ( bool result, QString output, if ( !managedMode ) { - QString message=tr ( "Unable to create SSH tunnel for foldersharing and printing:\n" ) + QString message=tr ( "Unable to create SSH tunnel for Folder Sharing and Printing support:\n" ) +output; QMessageBox::critical ( 0l,tr ( "Error" ),message, QMessageBox::Ok, @@ -9041,7 +9042,7 @@ void ONMainWindow::slotFsTunnelFailed ( bool result, QString output, void ONMainWindow::slotFsTunnelOk(int) { - x2goDebug<<"FS tunnel through SSH seems to be up and running..."<<endl; + x2goDebug<<"FS tunnel through SSH seems to be up and running ..."<<endl; fsTunReady=true; //start reverse mounting if RSA Key and FS tunnel are ready @@ -9056,7 +9057,7 @@ void ONMainWindow::startX2goMount() QFile file ( fsExportKey+".pub" ); if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) { - QString message=tr ( "Unable to read :\n" ) +fsExportKey+".pub"; + QString message=tr ( "Unable to read:\n" ) +fsExportKey+".pub"; QMessageBox::critical ( 0l,tr ( "Error" ),message, QMessageBox::Ok, QMessageBox::NoButton ); @@ -9083,7 +9084,7 @@ void ONMainWindow::startX2goMount() if ( !file1.open ( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append ) ) { - QString message=tr ( "Unable to write :\n" ) + authofname; + QString message=tr ( "Unable to write:\n" ) + authofname; QMessageBox::critical ( 0l,tr ( "Error" ),message, QMessageBox::Ok, QMessageBox::NoButton ); @@ -9292,7 +9293,7 @@ bool ONMainWindow::isServerRunning ( int port ) if (addr.s_addr == INADDR_NONE) { - x2goDebug<< "WARNING: The IPv4 address entered must be a legal address\n"; + x2goDebug<< "WARNING: The IPv4 address entered was invalid.\n"; return false; } @@ -9306,7 +9307,7 @@ bool ONMainWindow::isServerRunning ( int port ) return false; } - x2goDebug<<"got localhost"; + x2goDebug<<"Resolved localhost."; localIP = inet_ntoa (*(struct in_addr *)*localHost->h_addr_list); @@ -9318,7 +9319,7 @@ bool ONMainWindow::isServerRunning ( int port ) ConnectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (ConnectSocket == INVALID_SOCKET) { - x2goDebug<<"WARNING: socket failed with error: "<< WSAGetLastError(); + x2goDebug<<"WARNING: Socket failed with error: "<< WSAGetLastError(); return false; } @@ -9334,7 +9335,7 @@ bool ONMainWindow::isServerRunning ( int port ) } closesocket(ConnectSocket); - x2goDebug<<"Port already used: "<<port; + x2goDebug<<"Port already in use: "<<port; return true; #endif @@ -9394,7 +9395,7 @@ void ONMainWindow::startXOrg () exec=appDir+"\\vcxsrv\\vcxsrv.exe"; winServersReady=false; - x2goDebug<<"using internal X: "<<useInternalX; + x2goDebug<<"Using internal X.Org Server: "<<useInternalX; //#ifdef CFGCLIENT if (!useInternalX || internalX!=XMING) @@ -9468,8 +9469,8 @@ void ONMainWindow::startXOrg () { QMessageBox::critical ( 0,QString::null, - tr ( "Can't start X Server\n" - "Please check your installation" ) ); + tr ( "Can't start X.Org Server.\n" + "Please check your installation." ) ); close(); } // #ifdef CFGCLIENT @@ -9488,7 +9489,7 @@ void ONMainWindow::slotCheckXOrgConnection() if (isServerRunning(6000+xDisplay)) { - x2goDebug<<"X is started."; + x2goDebug<<"X.Org Server started."; slotSetWinServersReady(); } @@ -9498,14 +9499,14 @@ void ONMainWindow::slotCheckXOrgConnection() { QMessageBox::critical ( 0,QString::null, - tr ( "Can't start X Server\n" - "Please check your installation" ) ); + tr ( "Can't start X.Org Server.\n" + "Please check your installation." ) ); close(); } else { - x2goDebug<<"...waiting for X."; + x2goDebug<<"Waiting for X.Org Server to start."; QTimer::singleShot(1000, this, SLOT(slotCheckXOrgConnection())); } @@ -9537,7 +9538,7 @@ void WinServerStarter::run() void ONMainWindow::startWinServers() { - x2goDebug<<"Starting win servers..."; + x2goDebug<<"Starting helper servers for Windows ..."; QString etcDir=homeDir+"/.x2go/etc"; QDir dr ( homeDir ); @@ -9634,7 +9635,7 @@ void ONMainWindow::removeCygwinEntry() QSettings st ( "HKEY_CURRENT_USER\\Software" "\\Cygwin", QSettings::NativeFormat ); - x2goDebug<<"Removing cygwin from registry\n"; + x2goDebug<<"Removing cygwin entry from registry."; st.remove ( "" ); st.sync(); @@ -9654,7 +9655,7 @@ void ONMainWindow::startPulsed() QString pulseVersionLine= pulseVersionTest->readAllStandardOutput().replace("\n"," ").simplified(); - x2goDebug <<"PulseAudio Version Line: "<<pulseVersionLine; + x2goDebug <<"PulseAudio version line: "<<pulseVersionLine; if (pulseVersionLine.contains("pulseaudio 0.", Qt::CaseInsensitive)) pulseVersionIsLegacy = true; if (pulseVersionLine.contains("pulseaudio 1.", Qt::CaseInsensitive)) @@ -9664,11 +9665,11 @@ void ONMainWindow::startPulsed() if (pulseVersionIsLegacy) { - x2goDebug <<"PulseAudio <= 2.1 Detected. PulseAudio will automatically use .pulse-cookie"; + x2goDebug <<"PulseAudio <= 2.1 detected. PulseAudio will automatically use .pulse-cookie"; } else { - x2goDebug <<"PulseAudio >= 3.0 Detected. x2goclient will tell PulseAudio to use .pulse-cookie."; + x2goDebug <<"PulseAudio >= 3.0 detected. X2Go Client will tell PulseAudio to use .pulse-cookie."; } #endif while ( isServerRunning ( pulsePort ) ) @@ -9685,7 +9686,7 @@ void ONMainWindow::startPulsed() // The tempoerary dir for config.pa (and pulse.log if it exists) pulseDir=pulseBaseDir; pulseDir=wapiShortFileName ( pulseDir ); - x2goDebug<<"pulse template: "<<pulseDir+"/tmp"; + x2goDebug<<"PulseAudio template: "<<pulseDir+"/tmp"; QTemporaryFile* fl=new QTemporaryFile ( pulseDir+"/tmp" ); fl->open(); pulseDir=fl->fileName(); @@ -9694,7 +9695,7 @@ void ONMainWindow::startPulsed() QFile::remove ( pulseDir ); dr.mkpath ( pulseDir ); - x2goDebug<<"pulse tmp file: "<<pulseDir; + x2goDebug<<"PulseAudio tmp file: "<<pulseDir; QStringList pEnv=QProcess::systemEnvironment(); for ( int i=0; i<pEnv.size(); ++i ) @@ -9772,7 +9773,7 @@ void ONMainWindow::startPulsed() QSysInfo::WindowsVersion == QSysInfo::WV_2003 ) { x2goDebug<<"Windows XP or Server 2003 (R2) detected."; - x2goDebug<<"Setting PulseAudio to \"Normal\" CPU priority."; + x2goDebug<<"Setting PulseAudio to \"normal\" CPU priority."; pulseArgs<<"--high-priority=no"; } #else @@ -9811,7 +9812,7 @@ void ONMainWindow::slotCheckPulse() void ONMainWindow::xorgSettings() { - x2goDebug<<"Getting Xorg settings."; + x2goDebug<<"Getting X.Org Server settings."; X2goSettings st ( "settings" ); @@ -9855,7 +9856,7 @@ void ONMainWindow::xorgSettings() void ONMainWindow::slotSetWinServersReady() { - x2goDebug<<"All winservers are started."; + x2goDebug<<"All helper servers for Windows are started."; winServersReady=true; restoreCygnusSettings(); @@ -10015,11 +10016,11 @@ bool ONMainWindow::startSshd() if (!isServerRunning (clientSshPort.toInt ())) { printSshDError_startupFailure (); - x2goDebug << "Failed to start usermode sshd."; + x2goDebug << "Failed to start user mode OpenSSH server."; return (false); } else { - x2goDebug << "Usermode sshd started successfully."; + x2goDebug << "User mode OpenSSH server started successfully."; return (true); } } @@ -10121,7 +10122,7 @@ void ONMainWindow::slotSetProxyWinFullscreen() False, SubstructureNotifyMask ,&event); if(!st) { - x2goDebug<<"Couldn't get fullscreen"; + x2goDebug<<"Couldn't fetch fullscreen setting."; } XSync(QX11Info::display(),false); XMapWindow(QX11Info::display(), proxyWinId); @@ -10149,7 +10150,7 @@ void ONMainWindow::resizeProxyWinOnDisplay(int disp) ", y: "+ QString("%1").arg(geom.y()) + ", w: "+ QString("%1").arg(geom.width()) + ", h: "+ QString("%1").arg(geom.height()); - x2goDebug<<"Resizing proxy window to fit Display: " + QString("%1").arg(disp) + " " + geoStr; + x2goDebug<<"Resizing proxy window to fit display: " + QString("%1").arg(disp) + " " + geoStr; #ifdef Q_OS_LINUX XSync(QX11Info::display(),false); @@ -10272,13 +10273,13 @@ void ONMainWindow::slotXineramaConfigured() void ONMainWindow::slotFindProxyWin() { #ifndef Q_OS_DARWIN - x2goDebug<<"Searching proxy win: X2GO-" + resumingSession.sessionId; + x2goDebug<<"Searching proxy window: X2GO-" + resumingSession.sessionId; proxyWinId=findWindow ( "X2GO-"+resumingSession.sessionId ); bool xinerama=defaultXinerama; if ( proxyWinId ) { - x2goDebug<<"Proxy win found: " + QString("%1").arg(proxyWinId); + x2goDebug<<"Proxy window found: " + QString("%1").arg(proxyWinId); setProxyWinTitle(); proxyWinTimer->stop(); @@ -10316,7 +10317,7 @@ void ONMainWindow::slotFindProxyWin() } if (xinerama) { - x2goDebug<<"Starting Xinerama Timer."; + x2goDebug<<"Starting Xinerama timer."; lastDisplayGeometry=QRect(); xineramaScreens.clear(); @@ -10338,7 +10339,7 @@ void ONMainWindow::slotFindProxyWin() } #ifdef Q_OS_WIN - x2goDebug<<"Maximize proxy win: "<<maximizeProxyWin; + x2goDebug<<"Maximize proxy window: "<<maximizeProxyWin; if ( !startEmbedded ) { @@ -10346,7 +10347,7 @@ void ONMainWindow::slotFindProxyWin() { QDesktopWidget dw; - x2goDebug<<"Making proxy win full screen."; + x2goDebug<<"Putting proxy window into fullscreen."; wapiSetFSWindow ( ( HWND ) proxyWinId, dw.screenGeometry ( this ) ); /*wapiShowWindow ( ( HWND ) proxyWinId, @@ -10388,7 +10389,7 @@ void ONMainWindow::slotDetachProxyWindow() if ( !embedControlChanged ) { slotFindProxyWin(); - x2goDebug<<"Proxy win detached, proxywin is: "<<proxyWinId; + x2goDebug<<"Proxy window detached, proxywin is: "<<proxyWinId; } #endif embedControlChanged=false; @@ -10675,7 +10676,7 @@ void ONMainWindow::processCfgLine ( QString line ) { qCritical ( "%s",tr ( - "wrong value for argument\"speed\"" + "Invalid value for argument \"speed\"" ).toLocal8Bit().data() ); } return; @@ -11045,14 +11046,14 @@ void ONMainWindow::initStatusDlg() slVal->setFixedHeight ( slName->sizeHint().height() ); sbApps=new QToolButton (sessionStatusDlg ); - sbApps->setToolTip(tr ( "Applications..." )); + sbApps->setToolTip(tr ( "Applications ..." )); sbApps->setIcon(QPixmap(":/img/icons/32x32/apps.png")); sbApps->setAutoRaise(true); sbApps->setFocusPolicy(Qt::NoFocus); sbExp=new QToolButton (sessionStatusDlg ); sbExp->setIcon(QPixmap(":/img/icons/32x32/open_dir.png")); - sbExp->setToolTip (tr ("Share folder..." )); + sbExp->setToolTip (tr ("Share folder ..." )); sbExp->setAutoRaise(true); sbExp->setFocusPolicy(Qt::NoFocus); @@ -11995,7 +11996,7 @@ void ONMainWindow::setX2goconfig ( const QString& text ) { m_x2goconfig=text; - x2goDebug<<"Haveing a session config."; + x2goDebug<<"Having a session config."; initWidgetsEmbed(); } @@ -12135,7 +12136,7 @@ void ONMainWindow::embedWindow ( long wndId ) embedContainer->show(); #ifdef Q_OS_LINUX - x2goDebug<<"Embedding window with id "<<wndId<<" in container."; + x2goDebug<<"Embedding window with ID "<<wndId<<" in container."; embedContainer->embedClient ( wndId ); #endif @@ -12185,8 +12186,8 @@ void ONMainWindow::detachClient() -QTNPFACTORY_BEGIN ( "X2GoClient Plug-in "VERSION, - "Allows you to start X2Go session in a webbrowser" ) +QTNPFACTORY_BEGIN ( "X2Go Client Plug-in "VERSION, + "Allows you to start X2Go sessions in a web browser." ) QTNPCLASS ( ONMainWindow ) QTNPFACTORY_END() diff --git a/src/onmainwindow.h b/src/onmainwindow.h index 69f1a57..1797258 100644 --- a/src/onmainwindow.h +++ b/src/onmainwindow.h @@ -177,7 +177,7 @@ struct ConfigFile QString brokerCaCertFile; QString iniFile; QString server; - QString serverIp;//Can be different from server (use for loadballancing) + QString serverIp;//Can be different from server (use for load balancing) QString sshport; QString command; QString key; @@ -294,7 +294,7 @@ class ONMainWindow : public QMainWindow Q_CLASSINFO ( "EventsID", "{44900013-f8bd-4d2e-a2cf-eab407c03005}" ) Q_CLASSINFO ( "MIME", "application/x2go:x2go:Configuration File " - "for X2Go Session" ) + "for X2Go Sessions" ) Q_CLASSINFO ( "ToSuperClass", "ONMainWindow" ) Q_CLASSINFO ( "DefaultProperty","x2goconfig" ) #endif diff --git a/src/printdialog.cpp b/src/printdialog.cpp index d0a85b1..30c72d2 100644 --- a/src/printdialog.cpp +++ b/src/printdialog.cpp @@ -58,10 +58,11 @@ void PrintDialog::accept() void PrintDialog::slot_dlgShowEnabled ( bool enable ) { if ( !enable ) - QMessageBox::warning ( this, tr ( "You've deactivated the x2go " - "client printing dialog." ), + QMessageBox::warning ( this, tr ( "You've deactivated the X2Go " + "Client printing dialog." ), tr ( "You may reactivate this dialog " - "using the x2goclient settings " - "dialog (Menu -> Options -> " + "using the X2Go Client settings " + "dialog. To do so, follow this path " + "in the menu bar: Options -> " "Settings)" ) ); } diff --git a/src/printprocess.cpp b/src/printprocess.cpp index afe93ad..c7a6509 100644 --- a/src/printprocess.cpp +++ b/src/printprocess.cpp @@ -38,7 +38,7 @@ PrintProcess::PrintProcess ( QString pdf, QString title, QObject *parent ) : QObject ( parent ) { - x2goDebug<<"Starting print process."<<endl; + x2goDebug<<"Starting print process."; pdfFile=pdf; pdfTitle=title; parentWidg= ( QWidget* ) parent; @@ -49,12 +49,12 @@ PrintProcess::PrintProcess ( QString pdf, QString title, QObject *parent ) : } if ( viewPdf ) { - x2goDebug<<"Opening PDF file: "<<pdfFile<<" ("<<pdfTitle<<")"<<endl; + x2goDebug<<"Opening PDF file: "<<pdfFile<<"; title: "<<pdfTitle; QTimer::singleShot ( 100, this, SLOT ( openPdf() ) ); } else { - x2goDebug<<"Printing PDF file: "<<pdfFile<<" ("<<pdfTitle<<")"<<endl; + x2goDebug<<"Printing PDF file: "<<pdfFile<<"; title: "<<pdfTitle; QTimer::singleShot ( 100, this, SLOT ( print() ) ); } } @@ -62,7 +62,7 @@ PrintProcess::PrintProcess ( QString pdf, QString title, QObject *parent ) : PrintProcess::~PrintProcess() { - x2goDebug<<"Closing print process."<<endl; + x2goDebug<<"Closing print process."; } @@ -138,7 +138,7 @@ bool PrintProcess::loadSettings() void PrintProcess::openPdf() { - x2goDebug<<"opening/saving PDF..."<<endl; + x2goDebug<<"Opening/saving PDF ..."; if ( pdfOpen ) { #ifndef Q_OS_WIN @@ -147,8 +147,7 @@ void PrintProcess::openPdf() #else QString cmd=pdfOpenCmd+"\""+pdfFile+"\""; #endif - x2goDebug<<"Using PDF viewer command: "<<cmd<<endl; - x2goDebug<<cmd; + x2goDebug<<"Using PDF viewer command: "<<cmd; if ( ! QProcess::startDetached ( cmd ) ) slot_error ( QProcess::FailedToStart ); @@ -187,7 +186,7 @@ void PrintProcess::print() prn.setCurrentPrinter ( prn.getDefaultUserPrinter() ); prn.print ( pdfFile, pdfTitle ); #else - x2goDebug<<"printing to "<<winX2goPrinter<<endl; + x2goDebug<<"Printing to "<<winX2goPrinter; wapiShellExecute ( "printto", wapiShortFileName ( pdfFile ), winX2goPrinter, @@ -279,14 +278,14 @@ void PrintProcess::slot_error ( QProcess::ProcessError ) message+=pdfFile; } } - QMessageBox::critical ( 0l, tr ( "Printing error" ), + QMessageBox::critical ( 0l, tr ( "Printing error." ), message ); } void PrintProcess::slot_pdf2psError ( QProcess::ProcessError ) { - QMessageBox::critical ( 0l, tr ( "Printing error" ), + QMessageBox::critical ( 0l, tr ( "Printing error." ), tr ( "Failed to execute command:\n" ) + "pdf2ps "+pdfFile+" "+psFile ); } diff --git a/src/printwidget.cpp b/src/printwidget.cpp index bcb75d3..6ac18c0 100644 --- a/src/printwidget.cpp +++ b/src/printwidget.cpp @@ -63,7 +63,7 @@ PrintWidget::PrintWidget ( QWidget* parent ) "<a href=\"http://pages.cs.wisc.edu/~ghost/doc/GPL/index.htm\">" "ghostprint</a> and " "<a href=\"http://pages.cs.wisc.edu/~ghost/gsview/\">" - "ghostview</a><br>You can find further information " + "ghostview</a><br>You can find further information " "<a href=\"http://www.x2go.org/index.php?id=49\">here</a>." ), ui.gbPrint ); rtfm->setWordWrap ( true ); diff --git a/src/sessionbutton.cpp b/src/sessionbutton.cpp index 75d676f..2d51a23 100644 --- a/src/sessionbutton.cpp +++ b/src/sessionbutton.cpp @@ -134,12 +134,12 @@ SessionButton::SessionButton ( ONMainWindow* mw,QWidget *parent, QString id ) act_edit=sessMenu->addAction ( QIcon ( mw->iconsPath ( "/16x16/edit.png" ) ), - tr ( "Session preferences..." ) ); + tr ( "Session preferences ..." ) ); #if (!defined Q_WS_HILDON) && (!defined Q_OS_DARWIN) act_createIcon=sessMenu->addAction ( QIcon ( mw->iconsPath ( "/16x16/create_file.png" ) ), tr ( - "Create session icon on desktop..." ) ); + "Create session icon on desktop ..." ) ); #endif act_remove=sessMenu->addAction ( QIcon ( mw->iconsPath ( "/16x16/delete.png" ) ), @@ -316,7 +316,7 @@ void SessionButton::redraw() sessIcon = expandHome(sessIcon); QPixmap* pix; - x2goDebug << "creating QPixmap with session icon: '" << sessIcon.toAscii () << "'."; + x2goDebug << "Creating QPixmap with session icon: " << sessIcon.toAscii () << "."; if (!par->brokerMode || sessIcon == ":/img/icons/128x128/x2gosession.png") pix=new QPixmap( sessIcon ); else diff --git a/src/sessionexplorer.cpp b/src/sessionexplorer.cpp index 5e54c0d..0ccbae9 100644 --- a/src/sessionexplorer.cpp +++ b/src/sessionexplorer.cpp @@ -136,13 +136,13 @@ void SessionExplorer::slotEdit ( SessionButton* bt ) void SessionExplorer::slotCreateDesktopIcon ( SessionButton* bt ) { QMessageBox messageBox(QMessageBox::Question, - tr ( "Create session icon on desktop" ), + tr ( "Create session icon on desktop." ), tr ( "Desktop icons can be configured " - "not to show x2goclient (hidden mode). " + "not to show X2Go Client (hidden mode.) " "If you like to use this feature you'll " - "need to configure login by a gpg key " - "or gpg smart card.\n\n" - "Use x2goclient hidden mode?" ), + "need to configure login via a GPG key " + "or GPG Smart Card.\n\n" + "Use X2Go Client's hidden mode?" ), QMessageBox::Yes|QMessageBox::No, parent); diff --git a/src/sessionmanagedialog.cpp b/src/sessionmanagedialog.cpp index c88f0f2..59423fa 100644 --- a/src/sessionmanagedialog.cpp +++ b/src/sessionmanagedialog.cpp @@ -55,7 +55,7 @@ SessionManageDialog::SessionManageDialog ( QWidget * parent, #if (!defined Q_WS_HILDON) && (!defined Q_OS_DARWIN) if ( !ONMainWindow::getPortable() ) createSessionIcon=new QPushButton ( - tr ( "&Create session icon on desktop..." ),fr ); + tr ( "&Create session icon on desktop ..." ),fr ); #endif par= ( ONMainWindow* ) parent; newSession->setIcon ( QIcon ( diff --git a/src/sessionwidget.cpp b/src/sessionwidget.cpp index f06efde..db92d5b 100644 --- a/src/sessionwidget.cpp +++ b/src/sessionwidget.cpp @@ -137,7 +137,7 @@ SessionWidget::SessionWidget ( bool newSession, QString id, ONMainWindow * mw, sgbLay->addLayout ( suLay ); sgbLay->addLayout ( keyLay ); - cbAutoLogin=new QCheckBox(tr("Try auto login (ssh-agent or default ssh key)"),sgb); + cbAutoLogin=new QCheckBox(tr("Try auto login (via SSH Agent or default SSH key)"),sgb); cbKrbLogin=new QCheckBox(tr("Kerberos 5 (GSSAPI) authentication"),sgb); cbKrbDelegation=new QCheckBox(tr("Delegation of GSSAPI credentials to the server"),sgb); sgbLay->addWidget(cbAutoLogin); @@ -168,7 +168,7 @@ SessionWidget::SessionWidget ( bool newSession, QString id, ONMainWindow * mw, pbOpenProxyKey=new QPushButton ( QIcon ( mainWindow->iconsPath ( "/16x16/file-open.png" ) ), QString::null,proxyBox ); - cbProxyAutologin=new QCheckBox(tr("ssh-agent or default ssh key"),proxyBox); + cbProxyAutologin=new QCheckBox(tr("SSH Agent or default SSH key"),proxyBox); cbProxyKrbLogin=new QCheckBox(tr("Kerberos 5 (GSSAPI) authentication"),proxyBox); @@ -213,7 +213,7 @@ SessionWidget::SessionWidget ( bool newSession, QString id, ONMainWindow * mw, sessBox->addItem ( "TRINITY" ); sessBox->addItem ( "OPENBOX" ); sessBox->addItem ( "ICEWM" ); - sessBox->addItem ( tr ( "Connect to Windows terminal server" ) ); + sessBox->addItem ( tr ( "Connect to Windows Terminal Server" ) ); sessBox->addItem ( tr ( "XDMCP" ) ); sessBox->addItem ( tr ( "Connect to local desktop" ) ); sessBox->addItem ( tr ( "Custom desktop" ) ); @@ -244,7 +244,7 @@ SessionWidget::SessionWidget ( bool newSession, QString id, ONMainWindow * mw, sessLay->addWidget ( sgb ); sessLay->addWidget ( deskSess ); #ifdef Q_OS_LINUX - cbDirectRDP=new QCheckBox(tr("Direct RDP Connection"), deskSess); + cbDirectRDP=new QCheckBox(tr("Direct RDP connection"), deskSess); cmdLay->addWidget(cbDirectRDP,1,0,1,6); cbDirectRDP->hide(); connect(cbDirectRDP,SIGNAL(clicked()), this, SLOT(slot_rdpDirectClicked())); @@ -516,7 +516,7 @@ void SessionWidget::slot_rdpOptions() bool ok; QString text = QInputDialog::getText ( this, - tr ( "Connect to Windows terminal server" ), + tr ( "Connect to Windows Terminal Server" ), tr ( "rdesktop command line options:" ), QLineEdit::Normal, rdpOptions, &ok ); diff --git a/src/settingswidget.cpp b/src/settingswidget.cpp index 46de1e4..e2c8881 100644 --- a/src/settingswidget.cpp +++ b/src/settingswidget.cpp @@ -47,7 +47,7 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw, tabSettings->addTab ( kgb,tr ( "&Keyboard" ) ); #else QGroupBox *dgb=new QGroupBox ( tr ( "&Display" ),this ); - clipGr=new QGroupBox ( tr ( "&Clipboard Mode" ),this ); + clipGr=new QGroupBox ( tr ( "&Clipboard mode" ),this ); kgb=new QGroupBox ( tr ( "&Keyboard" ),this ); #endif QVBoxLayout *dbLay = new QVBoxLayout ( dgb ); @@ -165,7 +165,7 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw, clipRadioGroup->addButton(rbClipNone); - rbKbdAuto=new QRadioButton(tr("Auto detect keyboard settings"),kgb); + rbKbdAuto=new QRadioButton(tr("Auto-detect keyboard settings"),kgb); rbKbdNoSet=new QRadioButton(tr("Do not configure keyboard"),kgb); rbKbdSet=new QRadioButton(tr("Configure keyboard"),kgb); QButtonGroup* kbRadio=new QButtonGroup(kgb); @@ -201,7 +201,7 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw, setLay->addWidget ( kgb ); #ifdef Q_OS_LINUX #ifdef CFGCLIENT - rdpBox=new QGroupBox ( tr ( "RDP Client" ),this ); + rdpBox=new QGroupBox ( tr ( "RDP client" ),this ); setLay->addWidget ( rdpBox ); rRdesktop=new QRadioButton ("rdesktop",rdpBox ); rRdesktop->setChecked(true); diff --git a/src/sharewidget.cpp b/src/sharewidget.cpp index b42fd75..9f28121 100644 --- a/src/sharewidget.cpp +++ b/src/sharewidget.cpp @@ -98,7 +98,7 @@ ShareWidget::ShareWidget ( QString id, ONMainWindow * mw, loadEnc ( cbTo ); cbFsSshTun=new QCheckBox ( - tr ( "Use ssh port forwarding to tunnel file system " + tr ( "Use SSH port forwarding to tunnel file system " "connections through firewalls" ),egb ); QVBoxLayout* expLay=new QVBoxLayout ( this ); diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp index 17cde87..9871c9f 100644 --- a/src/sshmasterconnection.cpp +++ b/src/sshmasterconnection.cpp @@ -137,7 +137,7 @@ void SshMasterConnection::parseKnownHosts() fields.removeFirst(); settings.setValue(keyName,fields.join(",")); #ifdef DEBUG - x2goDebug<<"writing key in registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys"<<endl; + x2goDebug<<"Writing key to registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\SshHostKeys"<<endl; x2goDebug<<keyName<<"="<<fields.join(",")<<endl; #endif } @@ -198,15 +198,15 @@ SshMasterConnection::SshMasterConnection (QObject* parent, QString host, int por #ifdef DEBUG if (kerberos) { - x2goDebug<<"starting ssh connection with kerberos authentication"<<endl; + x2goDebug<<"Starting SSH connection with Kerberos authentication."; } else { - x2goDebug<<"starting ssh connection without kerberos authentication"<<endl; + x2goDebug<<"Starting SSH connection without Kerberos authentication."; } #endif #ifdef DEBUG - x2goDebug<<"SshMasterConnection, instance "<<this<<" created"; + x2goDebug<<"SshMasterConnection, instance "<<this<<" created."; #endif } @@ -214,7 +214,7 @@ SshMasterConnection::SshMasterConnection (QObject* parent, QString host, int por void SshMasterConnection::slotSshProxyConnectionOk() { #ifdef DEBUG - x2goDebug<<"sshproxy connected"; + x2goDebug<<"SSH proxy connected."; #endif @@ -324,7 +324,7 @@ void SshMasterConnection::checkReverseTunnelConnections() address.sin_family=AF_INET; address.sin_port=htons ( req.localPort ); #ifdef DEBUG - x2goDebug<<"connecting to "<<req.localHost<<":"<<req.localPort<<endl; + x2goDebug<<"Connecting to "<<req.localHost<<":"<<req.localPort<<endl; #endif #ifndef Q_OS_WIN inet_aton ( req.localHost.toAscii(), &address.sin_addr ); @@ -402,7 +402,7 @@ int SshMasterConnection::startTunnel(const QString& forwardHost, uint forwardPor void SshMasterConnection::slotSshProxyConnectionError(QString err1, QString err2) { breakLoop=true; - emit connectionError(tr("SSH proxy connection error"),err1+" "+err2); + emit connectionError(tr("SSH proxy connection error."),err1+" "+err2); } void SshMasterConnection::slotSshProxyServerAuthError(int errCode, QString err, SshMasterConnection* con) @@ -420,7 +420,7 @@ void SshMasterConnection::slotSshProxyUserAuthError(QString err) void SshMasterConnection::slotSshProxyTunnelOk(int) { #ifdef DEBUG - x2goDebug<<"Ssh proxy tunnel established"; + x2goDebug<<"SSH proxy tunnel established."; #endif sshProxyReady=true; } @@ -429,7 +429,7 @@ void SshMasterConnection::slotSshProxyTunnelFailed(bool , QString output, int) { breakLoop=true; - emit connectionError(tr("Failed to create SSH proxy tunnel"), output); + emit connectionError(tr("Failed to create SSH proxy tunnel."), output); } @@ -442,7 +442,7 @@ void SshMasterConnection::slotSshProxyServerAuthAborted() void SshMasterConnection::run() { #ifdef DEBUG - x2goDebug<<"SshMasterConnection, instance "<<this<<" entering thread"; + x2goDebug<<"SshMasterConnection, instance "<<this<<" entering thread."; #endif if(useproxy && proxytype==PROXYSSH) { @@ -478,11 +478,11 @@ void SshMasterConnection::run() if ( !isLibSshInited ) { #ifdef DEBUG - x2goDebug<<"libSsh not inited yet, initting\n"; + x2goDebug<<"libssh not initialized yet. Initializing."; #endif if ( ssh_init() !=0 ) { - QString err=tr ( "Cannot initialize libssh" ); + QString err=tr ( "Cannot initialize libssh." ); #ifdef DEBUG x2goDebug<<err<<endl; #endif @@ -495,7 +495,7 @@ void SshMasterConnection::run() #ifdef DEBUG else { - x2goDebug<<"already inited\n"; + x2goDebug<<"libssh already initialized."; } #endif @@ -510,7 +510,7 @@ void SshMasterConnection::run() my_ssh_session = ssh_new(); if ( my_ssh_session == NULL ) { - QString err=tr ( "Cannot create ssh session" ); + QString err=tr ( "Cannot create SSH session." ); #ifdef DEBUG x2goDebug<<err<<endl; #endif @@ -522,7 +522,7 @@ void SshMasterConnection::run() #ifdef Q_OS_WIN ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, (mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit()); #ifdef DEBUG - x2goDebug<<"setting SSH DIR to "<<(mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit(); + x2goDebug<<"Setting SSH directory to "<<(mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit(); #endif if (kerberos) { @@ -546,7 +546,7 @@ void SshMasterConnection::run() proxysocket = tcpProxySocket->socketDescriptor(); if (!tcpProxySocket->waitForConnected(30000)) { - QString message=tr ( "Cannot connect to proxy server" ); + QString message=tr ( "Cannot connect to proxy server." ); #ifdef DEBUG x2goDebug<<message<<endl; #endif @@ -556,12 +556,12 @@ void SshMasterConnection::run() return; } #ifdef DEBUG - x2goDebug << "Created HTTP proxy socket " << proxysocket << endl; + x2goDebug << "Created HTTP proxy socket: " << proxysocket << endl; #endif ssh_options_set( my_ssh_session, SSH_OPTIONS_FD, &proxysocket); ssh_set_fd_toread( my_ssh_session); #ifdef DEBUG - x2goDebug<<"Connected to HTTP proxy server " << proxyserver << ":" + x2goDebug<<"Connected to HTTP proxy server: " << proxyserver << ":" << proxyport <<endl; #endif } @@ -571,7 +571,7 @@ void SshMasterConnection::run() if(disconnectSessionFlag) { #ifdef DEBUG - x2goDebug<<"session already disconnected, exiting"<<endl; + x2goDebug<<"Session is already disconnected, exiting."<<endl; #endif return; } @@ -588,7 +588,7 @@ void SshMasterConnection::run() if(disconnectSessionFlag) { #ifdef DEBUG - x2goDebug<<"session already disconnected, exiting"<<endl; + x2goDebug<<"Session is already disconnected, exiting."<<endl; #endif return; } @@ -599,7 +599,7 @@ void SshMasterConnection::run() if(disconnectSessionFlag) { #ifdef DEBUG - x2goDebug<<"session already disconnected, exiting"<<endl; + x2goDebug<<"Session is already disconnected, exiting."<<endl; #endif return; } @@ -626,7 +626,7 @@ void SshMasterConnection::run() if(disconnectSessionFlag) { #ifdef DEBUG - x2goDebug<<"session already disconnected, exiting"<<endl; + x2goDebug<<"Session is already disconnected, exiting."<<endl; #endif return; } @@ -640,7 +640,7 @@ void SshMasterConnection::run() #ifdef Q_OS_WIN ssh_options_set ( my_ssh_session, SSH_OPTIONS_SSH_DIR, (mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit()); #ifdef DEBUG - x2goDebug<<"setting SSH DIR to "<<(mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit(); + x2goDebug<<"Setting SSH directory to "<<(mainWnd->getHomeDirectory()+"/ssh").toLocal8Bit(); #endif #endif @@ -649,12 +649,12 @@ void SshMasterConnection::run() if(disconnectSessionFlag) { #ifdef DEBUG - x2goDebug<<"session already disconnected, exiting"<<endl; + x2goDebug<<"Session is already disconnected, exiting."<<endl; #endif return; } #ifdef DEBUG - x2goDebug<<"user auth OK\n"; + x2goDebug<<"User authentication OK."; #endif emit connectionOk(host); } @@ -663,7 +663,7 @@ void SshMasterConnection::run() if(disconnectSessionFlag) { #ifdef DEBUG - x2goDebug<<"session already disconnected, exiting"<<endl; + x2goDebug<<"Session is already disconnected, exiting."<<endl; #endif return; } @@ -676,7 +676,7 @@ void SshMasterConnection::run() { err=sshProcErrString; } - QString message=tr ( "Authentication failed" ); + QString message=tr ( "Authentication failed." ); #ifdef DEBUG x2goDebug<<message<<" - "<<err; #endif @@ -708,18 +708,18 @@ SshMasterConnection::~SshMasterConnection() disconnectSessionFlag=true; disconnectFlagMutex.unlock(); #ifdef DEBUG - x2goDebug<<"SshMasterConnection, instance "<<this<<" waiting for thread to finish"; + x2goDebug<<"SshMasterConnection, instance "<<this<<" waiting for thread to finish."; #endif wait(15000); #ifdef DEBUG - x2goDebug<<"SshMasterConnection, instance "<<this<<" thread finished"; + x2goDebug<<"SshMasterConnection, instance "<<this<<" thread finished."; #endif for(int i=processes.count()-1; i>=0; --i) { delete processes[i]; } #ifdef DEBUG - x2goDebug<<"SshMasterConnection, instance "<<this<<" SshMasterConnection, instance SshMasterConnection(0x7fce7c008aa0) deleted"; + x2goDebug<<"SshMasterConnection, instance "<<this<<" finished destructor."; #endif } @@ -729,14 +729,14 @@ void SshMasterConnection::finalizeLibSsh() if ( !isLibSshInited ) { #ifdef DEBUG - x2goDebug<<"libssh not inited yet\n"; + x2goDebug<<"libssh not initialized yet."; #endif return; } ssh_finalize(); #ifdef DEBUG - x2goDebug<<"libssh finalized\n"; + x2goDebug<<"libssh finalized."; #endif } @@ -789,7 +789,7 @@ void SshMasterConnection::writeKnownHosts(bool write) int SshMasterConnection::serverAuth ( QString& errorMsg ) { #ifdef DEBUG - x2goDebug<<"cserverAuth\n "; + x2goDebug<<"cserverAuth"; #endif int state, hlen; @@ -899,7 +899,7 @@ bool SshMasterConnection::userChallengeAuth() challengeAuthVerificationCode=keyPhrase; if(challengeAuthVerificationCode==QString::null) { - authErrors<<tr("Authentication failed"); + authErrors<<tr("Authentication failed."); return false; } } @@ -917,7 +917,7 @@ bool SshMasterConnection::userChallengeAuth() } case SSH_AUTH_SUCCESS: #ifdef DEBUG - x2goDebug<<"Challenge auth ok"<<endl; + x2goDebug<<"Challenge authentication OK."<<endl; #endif return true; case SSH_AUTH_DENIED: @@ -954,7 +954,7 @@ bool SshMasterConnection::userAuthWithPass() if (method& SSH_AUTH_METHOD_INTERACTIVE) { #ifdef DEBUG - x2goDebug<<"Challenge authentication"<<endl; + x2goDebug<<"Challenge authentication requested."<<endl; #endif challengeAuthPasswordAccepted=false; return userChallengeAuth(); @@ -963,7 +963,7 @@ bool SshMasterConnection::userAuthWithPass() if (method & SSH_AUTH_METHOD_PASSWORD) { #ifdef DEBUG - x2goDebug<<"Password authentication"<<endl; + x2goDebug<<"Password authentication requested."<<endl; #endif int rc = ssh_userauth_password ( my_ssh_session, NULL, pass.toAscii() ); if ( rc != SSH_AUTH_SUCCESS ) @@ -1034,7 +1034,7 @@ void SshMasterConnection::setKeyPhrase(QString phrase) bool SshMasterConnection::userAuthWithKey() { #ifdef DEBUG - x2goDebug<<"try authenticate user with private key" <<endl; + x2goDebug<<"Trying to authenticate user with private key." <<endl; #endif QString keyName=key; bool autoRemove=false; @@ -1052,7 +1052,7 @@ bool SshMasterConnection::userAuthWithKey() fl.close(); autoRemove=true; #ifdef DEBUG - x2goDebug<<"temporary save key in "<<keyName<<endl; + x2goDebug<<"Temporarily saved key in "<<keyName<<endl; #endif } @@ -1094,7 +1094,7 @@ bool SshMasterConnection::userAuthWithKey() if (!prkey) { #ifdef DEBUG - x2goDebug<<"Failed to get public key from private key"<<endl; + x2goDebug<<"Failed to get public key from private key."<<endl; #endif privatekey_free(prkey); if ( autoRemove ) @@ -1115,7 +1115,7 @@ bool SshMasterConnection::userAuthWithKey() string_free(pubkeyStr); #ifdef DEBUG - x2goDebug<<"auth with key: "<<rc<<endl; + x2goDebug<<"Authenticating with key: "<<rc<<endl; #endif if ( autoRemove ) @@ -1153,7 +1153,7 @@ bool SshMasterConnection::userAuthKrb() #endif #ifdef DEBUG - x2goDebug<<"starting ssh:" <<sshCmd<<endl; + x2goDebug<<"Starting ssh:" <<sshCmd<<endl; #endif ssh.start(sshCmd); @@ -1163,17 +1163,17 @@ bool SshMasterConnection::userAuthKrb() sshProcErrString=ssh.errorString(); authErrors<<sshProcErrString; #ifdef DEBUG - x2goDebug<<"ssh start failed:" <<sshProcErrString<<endl; + x2goDebug<<"SSH start failed:" <<sshProcErrString<<endl; #endif return false; } if (!ssh.waitForFinished(20000)) { sshProcErrString=ssh.errorString(); - authErrors<<tr("Failed to start SSH Client. Please check your installation and GSSApi configuration."); + authErrors<<tr("Failed to start SSH client. Please check your installation and GSSApi configuration."); authErrors<<sshProcErrString; #ifdef DEBUG - x2goDebug<<"ssh not finished:" <<sshProcErrString<<endl; + x2goDebug<<"SSH did not finish:" <<sshProcErrString<<endl; #endif return false; @@ -1181,10 +1181,10 @@ bool SshMasterConnection::userAuthKrb() QString outp=ssh.readAllStandardOutput(); QString err=ssh.readAllStandardError(); #ifdef DEBUG - x2goDebug<<"ssh exited\n"; - x2goDebug<<"stdout - "<<outp<<endl; - x2goDebug<<"stderr - "<<err<<endl; - x2goDebug<<"code - "<<ssh.exitCode()<<", status - "<<ssh.exitStatus()<<endl; + x2goDebug<<"SSH exited."; + x2goDebug<<"stdout: "<<outp<<endl; + x2goDebug<<"stderr: "<<err<<endl; + x2goDebug<<"Exit code: "<<ssh.exitCode()<<"; status: "<<ssh.exitStatus()<<endl; #endif QString begin_marker = "X2GODATABEGIN:"+uuidStr+"\n"; @@ -1245,11 +1245,11 @@ void SshMasterConnection::addChannelConnection ( SshProcess* creator, QString uu con.command=cmd; con.uuid=uuid; - x2goDebug << "locking SSH channel connection MUTEX."; + x2goDebug << "Locking SSH channel connection MUTEX."; channelConnectionsMutex.lock(); - x2goDebug << "passing con to channelConnections."; + x2goDebug << "Passing new channel conenction object to channelConnections."; channelConnections<<con; - x2goDebug << "unlocking SSH channel connection MUTEX."; + x2goDebug << "Unlocking SSH channel connection MUTEX."; channelConnectionsMutex.unlock(); } @@ -1282,7 +1282,7 @@ void SshMasterConnection::copy() if ( scp == NULL ) { #ifdef DEBUG - x2goDebug<<"Error allocating scp session: "<< ssh_get_error ( my_ssh_session ) <<endl; + x2goDebug<<"Error allocating SCP session: "<< ssh_get_error ( my_ssh_session ) <<endl; #endif return; } @@ -1290,7 +1290,7 @@ void SshMasterConnection::copy() if ( rc != SSH_OK ) { #ifdef DEBUG - x2goDebug<<"Error initializing scp session: "<< ssh_get_error ( my_ssh_session ) <<endl; + x2goDebug<<"Error initializing SCP session: "<< ssh_get_error ( my_ssh_session ) <<endl; #endif ssh_scp_free ( scp ); return; @@ -1356,7 +1356,7 @@ void SshMasterConnection::channelLoop() if ( disconnect ) { #ifdef DEBUG - x2goDebug<<"Disconnecting..."<<endl; + x2goDebug<<"Disconnecting ..."<<endl; #endif if (useproxy && proxytype==PROXYSSH&&sshProxy) @@ -1367,7 +1367,7 @@ void SshMasterConnection::channelLoop() channelConnectionsMutex.lock(); #ifdef DEBUG - x2goDebug<<"Deleting channel connections"<<endl; + x2goDebug<<"Deleting channel connections."<<endl; #endif for ( int i=0; i<channelConnections.size(); ++i ) { @@ -1375,20 +1375,20 @@ void SshMasterConnection::channelLoop() } channelConnectionsMutex.unlock(); #ifdef DEBUG - x2goDebug<<"Disconnect session"<<endl; + x2goDebug<<"Disconnecting session."<<endl; #endif ssh_disconnect ( my_ssh_session ); ssh_free ( my_ssh_session ); #ifdef DEBUG - x2goDebug<<"Delete sockets"<<endl; + x2goDebug<<"Deleting sockets."<<endl; #endif if (tcpProxySocket != NULL) delete tcpProxySocket; if (tcpNetworkProxy != NULL) delete tcpNetworkProxy; #ifdef DEBUG - x2goDebug<<"All channels closed, session disconnected, quiting session loop"<<endl; + x2goDebug<<"All channels closed and session disconnected. Quiting session loop."<<endl; #endif quit(); return; @@ -1437,17 +1437,17 @@ void SshMasterConnection::channelLoop() if ( channelConnections.at ( i ).channel==0l ) { #ifdef DEBUG - x2goDebug<<"creating new channel"<<endl; + x2goDebug<<"Creating new channel."<<endl; #endif ssh_channel channel=channel_new ( my_ssh_session ); #ifdef DEBUG - x2goDebug<<"new channel:"<<channel<<endl; + x2goDebug<<"New channel:"<<channel<<endl; #endif channelConnections[i].channel=channel; if ( tcpSocket>0 ) { #ifdef DEBUG - x2goDebug<<"forwarding new channel, local port: "<<channelConnections.at ( i ).localPort<<endl; + x2goDebug<<"Forwarding new channel, local port: "<<channelConnections.at ( i ).localPort<<endl; #endif if ( channel_open_forward ( channel, channelConnections.at ( i ).forwardHost.toAscii(), @@ -1456,7 +1456,7 @@ void SshMasterConnection::channelLoop() channelConnections.at ( i ).localPort ) != SSH_OK ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "channel_open_forward failed" ); + QString errorMsg=tr ( "channel_open_forward failed." ); emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG x2goDebug<<errorMsg<<": "<<err<<endl; @@ -1465,19 +1465,19 @@ void SshMasterConnection::channelLoop() #ifdef DEBUG else { - x2goDebug<<" new channel forwarded"<<endl; + x2goDebug<<"New channel forwarded."<<endl; } #endif } else { #ifdef DEBUG - x2goDebug<<"executing remote: "<<channelConnections.at ( i ).command<<endl; + x2goDebug<<"Executing remote: "<<channelConnections.at ( i ).command<<endl; #endif if ( channel_open_session ( channel ) !=SSH_OK ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "channel_open_session failed" ); + QString errorMsg=tr ( "channel_open_session failed." ); emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG x2goDebug<<errorMsg<<": "<<err<<endl; @@ -1495,7 +1495,7 @@ void SshMasterConnection::channelLoop() #ifdef DEBUG else { - x2goDebug<<" new exec channel created"<<endl; + x2goDebug<<"New exec channel created."<<endl; } #endif } @@ -1513,7 +1513,7 @@ void SshMasterConnection::channelLoop() if ( retval == -1 ) { #ifdef DEBUG - x2goDebug<<"select error\n"; + x2goDebug<<"select() error."; #endif continue; } @@ -1544,7 +1544,7 @@ void SshMasterConnection::channelLoop() if ( rez==SSH_EOF ) { #ifdef DEBUG - x2goDebug<<"EOF ON CHANNEL "<<channel<<" (SshProcess: "<<channelConnections[i].creator->pid<<")"<<endl; + x2goDebug<<"EOF on channel "<<channel<<"; SshProcess PID: "<<channelConnections[i].creator->pid<<<<endl; #endif //////Finished//////// finalize ( i ); @@ -1565,9 +1565,9 @@ void SshMasterConnection::channelLoop() { if ( send ( tcpSocket,buffer, nbytes,0 ) != nbytes ) { - QString errMsg=tr ( "error writing to socket" ); + QString errMsg=tr ( "Error writing to socket." ); #ifdef DEBUG - x2goDebug<<"error writing "<<nbytes<<" to tcp socket"<<tcpSocket<<endl; + x2goDebug<<"Error writing "<<nbytes<<" to TCP socket"<<tcpSocket<<endl; #endif emit ioErr ( channelConnections[i].creator,errMsg,"" ); finalize ( i ); @@ -1587,7 +1587,7 @@ void SshMasterConnection::channelLoop() { //////ERROR!!!!!//////// QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "error reading channel" ); + QString errorMsg=tr ( "Error reading channel." ); emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG x2goDebug<<errorMsg<<" - "<<err<<endl; @@ -1599,7 +1599,7 @@ void SshMasterConnection::channelLoop() if ( channel_is_eof ( channel ) ) { #ifdef DEBUG - x2goDebug<<"EOF ON CHANNEL "<<channel<<" (SshProcess: "<<channelConnections[i].creator->pid<<")"<<endl; + x2goDebug<<"EOF on channel "<<channel<<"; SshProcess PID: "<<channelConnections[i].creator->pid<<endl; #endif //////Finished//////// finalize ( i ); @@ -1621,7 +1621,7 @@ void SshMasterConnection::channelLoop() if ( channel_write ( channel, buffer, nbytes ) !=nbytes ) { QString err=ssh_get_error ( my_ssh_session ); - QString errorMsg=tr ( "channel_write failed" ); + QString errorMsg=tr ( "channel_write failed." ); emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG x2goDebug<<errorMsg<<" - "<<err<<endl; @@ -1637,7 +1637,7 @@ void SshMasterConnection::channelLoop() { //////ERROR!!!!!//////// QString err=""; - QString errorMsg=tr ( "error reading tcp socket" ); + QString errorMsg=tr ( "Error reading from TCP socket." ); emit ioErr ( channelConnections[i].creator, errorMsg, err ); #ifdef DEBUG x2goDebug<<errorMsg<<" - "<<err<<endl; @@ -1648,7 +1648,7 @@ void SshMasterConnection::channelLoop() if ( nbytes==0 ) { #ifdef DEBUG - x2goDebug<<"socket closed "<<tcpSocket<<endl; + x2goDebug<<"Socket "<<tcpSocket<<" closed."<<endl; #endif finalize ( i ); continue; @@ -1667,11 +1667,11 @@ void SshMasterConnection::finalize ( int item ) { channel_send_eof ( channel ); #ifdef DEBUG - x2goDebug<<"eof sent\n"; + x2goDebug<<"EOF sent."; #endif channel_close ( channel ); #ifdef DEBUG - x2goDebug<<"channel closed\n"; + x2goDebug<<"Channel closed."; #endif channel_free ( channel ); } diff --git a/src/sshprocess.cpp b/src/sshprocess.cpp index dc27bd2..94948bc 100644 --- a/src/sshprocess.cpp +++ b/src/sshprocess.cpp @@ -49,7 +49,7 @@ SshProcess::SshProcess(SshMasterConnection* master, int pid): QObject(0) SshProcess::~SshProcess() { #ifdef DEBUG - x2goDebug<<"ssh process destructor"; + x2goDebug<<"SshProcess destructor called."; #endif if (proc) @@ -106,12 +106,12 @@ void SshProcess::slotCheckNewConnection() return; #ifdef DEBUG - x2goDebug<<"new tcp connection\n"; + x2goDebug<<"New TCP connection."; #endif int tcpSocket=accept(serverSocket, (struct sockaddr*)&address,&addrlen); #ifdef DEBUG - x2goDebug<<"new socket:"<<tcpSocket<<endl; + x2goDebug<<"New socket: "<<tcpSocket; #endif masterCon->addChannelConnection(this, tcpSocket, forwardHost, forwardPort, localHost, ntohs(address.sin_port)); @@ -124,7 +124,7 @@ void SshProcess::tunnelLoop() serverSocket=socket(AF_INET, SOCK_STREAM, 0); if (serverSocket<=0) { - QString err=tr("Error creating socket"); + QString err=tr("Error creating socket."); x2goDebug<<err<<endl; emit sshFinished(false,err,pid); return; @@ -154,7 +154,7 @@ void SshProcess::tunnelLoop() timer->start(100); emit sshTunnelOk(pid); #ifdef DEBUG - x2goDebug<<"Direct tunnel: waiting for connections on "<<localHost<<":"<<localPort<<endl; + x2goDebug<<"Direct tunnel: waiting for connections on "<<localHost<<":"<<localPort; #endif } @@ -174,12 +174,12 @@ void SshProcess::rmPuttyReg(QString uuidStr) if (uuidStr.isEmpty()) { #ifdef DEBUG - x2goDebug<<"uuidStr is empty. No PuTTY session reg key to delete."<<endl; + x2goDebug<<"uuidStr is empty. No PuTTY session reg key to delete."; #endif return; } #ifdef DEBUG - x2goDebug<<"deleting key in registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions\\"+uuidStr<<endl; + x2goDebug<<"Deleting key in registry: HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions\\"+uuidStr; #endif QSettings st("HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions", QSettings::NativeFormat); @@ -196,12 +196,12 @@ void SshProcess::startNormal(const QString& cmd) //#ifdef DEBUG // ONLY UNCOMMENT FOR TESTING, MIGHT REVEAL PASSWORD WHEN command=RDP - x2goDebug<<"executing remote command via SshProcess object ("<<pid<<"): "<<cmd<<endl; + x2goDebug<<"Executing remote command via SshProcess object "<<pid<<": "<<cmd; // #endif if(!masterCon->useKerberos()) { QString shcmd = "sh -c 'echo X2GODATABEGIN:" + uuidStr + "; PATH=/usr/local/bin:/usr/bin:/bin "+cmd+"; echo X2GODATAEND:" + uuidStr +";'"; - x2goDebug << "running masterCon->addChannelConnection(this, '" << uuidStr << "', '" << shcmd.left (200) << "');"; + x2goDebug << "Running masterCon->addChannelConnection(this, '" << uuidStr << "', '" << shcmd.left (200) << "');"; masterCon->addChannelConnection(this, uuidStr, shcmd); connect(masterCon,SIGNAL(stdOut(SshProcess*,QByteArray)),this,SLOT(slotStdOut(SshProcess*,QByteArray))); connect(masterCon,SIGNAL(channelClosed(SshProcess*,QString)), this,SLOT(slotChannelClosed(SshProcess*,QString))); @@ -229,7 +229,7 @@ void SshProcess::startNormal(const QString& cmd) QString::number(masterCon->getPort())+" -l "+ masterCon->getUser()+" "+ host + " \""+shcmd+"\""; - x2goDebug<<"evoking ssh command via SshProcess object ("<<pid<<"): "<<sshString<<endl; + x2goDebug<<"Evoking SSH command via SshProcess object "<<pid<<": "<<sshString; procUuid=uuidStr; proc->start(sshString); @@ -252,7 +252,7 @@ void SshProcess::startNormal(const QString& cmd) void SshProcess::start_cp(QString src, QString dst) { - x2goDebug<<"copying file via SshProcess object ("<<pid<<"): "<<src<<" -> "<<dst<<endl; + x2goDebug<<"Copying file via SshProcess object "<<pid<<": "<<src<<" -> "<<dst; scpSource=src; if(!masterCon->useKerberos()) @@ -299,7 +299,7 @@ void SshProcess::start_cp(QString src, QString dst) QString::number(masterCon->getPort())+" "+src+" "+ masterCon->getUser()+"@"+ masterCon->getHost()+":"+dst; #ifdef DEBUG - x2goDebug<<"running scp:" <<sshString<<endl; + x2goDebug<<"Running scp:" <<sshString; #endif proc->start(sshString); @@ -307,7 +307,7 @@ void SshProcess::start_cp(QString src, QString dst) { stdErrString=proc->errorString(); #ifdef DEBUG - x2goDebug<<"ssh start failed:" <<stdErrString<<endl; + x2goDebug<<"SSH start failed:" <<stdErrString; #endif slotChannelClosed(this,""); return; @@ -323,7 +323,7 @@ void SshProcess::start_cp(QString src, QString dst) void SshProcess::startTunnel(const QString& forwardHost, uint forwardPort, const QString& localHost, uint localPort, bool reverse) { - x2goDebug<<"Starting tunnel via SshProcess object ("<<pid<<"): "<<forwardHost<<":"<<forwardPort<<" -> "<<localHost<<":"<<localPort<<endl; + x2goDebug<<"Starting tunnel via SshProcess object "<<pid<<": "<<forwardHost<<":"<<forwardPort<<" -> "<<localHost<<":"<<localPort<<endl; tunnel=true; tunnelOkEmited=false; @@ -353,7 +353,7 @@ void SshProcess::startTunnel(const QString& forwardHost, uint forwardPort, const sshString+=" -R "+ QString::number(forwardPort)+":"+forwardHost+":"+QString::number(localPort); #ifdef DEBUG - x2goDebug<<"TUNNEL: running ssh:" <<sshString<<endl; + x2goDebug<<"Tunnel: running ssh:" <<sshString; #endif proc->start(sshString); @@ -361,7 +361,7 @@ void SshProcess::startTunnel(const QString& forwardHost, uint forwardPort, const { stdErrString=proc->errorString(); #ifdef DEBUG - x2goDebug<<"ssh start failed:" <<stdErrString<<endl; + x2goDebug<<"SSH start failed:" <<stdErrString; #endif slotChannelClosed(this,""); return; @@ -392,7 +392,7 @@ void SshProcess::slotStdErr(SshProcess* creator, QByteArray data) { tunnelOkEmited=true; #ifdef DEBUG - x2goDebug<<"Tunnel OK"<<endl; + x2goDebug<<"Tunnel OK"; #endif emit sshTunnelOk(pid); } @@ -414,7 +414,7 @@ void SshProcess::slotIOerr(SshProcess* creator, QString message, QString sshSess if (sshSessionErr.length()) sshSessionErr = " - "+sshSessionErr; #ifdef DEBUG - x2goDebug<<"I/O error: "<<message<<sshSessionErr<<" ("<<pid<<")."<<endl; + x2goDebug<<"I/O error: "<<message<<sshSessionErr<<" ("<<pid<<")."; #endif normalExited=false; abortString="I/O error: "+message+sshSessionErr; @@ -473,12 +473,12 @@ void SshProcess::slotChannelClosed(SshProcess* creator, QString uuid) normalExited=false; output=stdErrString; #ifdef DEBUG - x2goDebug<<"have only stderr, something must be wrong"<<endl; + x2goDebug<<"Have stderr only, something must be wrong."; #endif } } #ifdef DEBUG - x2goDebug<<"ssh finished: "<<normalExited<<" - "<<output<<" ("<<pid<<")."<<endl; + x2goDebug<<"SSH finished: "<<normalExited<<" - "<<output<<" ("<<pid<<")."; #endif emit sshFinished(normalExited, output, pid); } @@ -489,7 +489,7 @@ void SshProcess::slotSshProcFinished(int exitCode, QProcess::ExitStatus exitStat if (exitCode==0 && exitStatus==QProcess::NormalExit) normalExited=true; #ifdef DEBUG - x2goDebug<<"ssh process exit code :"<<exitStatus; + x2goDebug<<"SSH process exit code :"<<exitStatus; #endif #ifdef Q_OS_WIN if(masterCon->useKerberos()) diff --git a/src/wapi.cpp b/src/wapi.cpp index e98e1ba..2977c21 100644 --- a/src/wapi.cpp +++ b/src/wapi.cpp @@ -223,8 +223,8 @@ void wapiSetWindowIcon ( HWND wnd, const QPixmap& icon) largeIcon=icon.scaled(iconx,icony, Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON (); smallIcon=icon.scaled(smallx,smally, Qt::IgnoreAspectRatio,Qt::SmoothTransformation).toWinHICON (); - x2goDebug<<"large icon: "<<largeIcon<<iconx<<"x"<<icony<<endl; - x2goDebug<<"small icon: "<<smallIcon<<smallx<<"x"<<smally<<endl; + x2goDebug<<"Large icon: "<<largeIcon<<iconx<<"x"<<icony; + x2goDebug<<"Small icon: "<<smallIcon<<smallx<<"x"<<smally; int rez=SetClassLong(wnd,GCL_HICON, (LONG)largeIcon); if (!rez) x2goDebug<<"ERROR: "<<GetLastError()<<endl; @@ -270,13 +270,13 @@ QString wapiGetDriveByLabel(const QString& label) for (int i=0; i<len; i+=4) { QString drive=QString::fromUtf16 ( ( const ushort* ) buf+i ); - x2goDebug<<"drive:"<<drive; + x2goDebug<<"Drive: "<<drive; TCHAR vol[MAX_PATH+1]; TCHAR fs[MAX_PATH+1]; GetVolumeInformation(buf+i,vol,MAX_PATH,0,0,0,fs,MAX_PATH); QString volume=QString::fromUtf16 ( ( const ushort* ) vol ); - x2goDebug<<"vol:"<<volume<< - "fs:"<<QString::fromUtf16 ( ( const ushort* ) fs ); + x2goDebug<<"Volume: "<<volume<< + "; fs: "<<QString::fromUtf16 ( ( const ushort* ) fs ); if (!volume.compare(label,Qt::CaseInsensitive)) { x2goDebug<<"matched! "; -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git