The branch, master has been updated via 342bb695167c1808bbf969e56a3d23c136df70cb (commit) from 0aa476e1f80f8dfb19843a3257f641a36fce9800 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 342bb695167c1808bbf969e56a3d23c136df70cb Author: Oleksandr Shneyder <oleksandr.shneyder@treuchtlingen.de> Date: Fri Mar 9 15:50:39 2012 +0100 Replace text on some buttons with icons and SVG icons for published applications. ----------------------------------------------------------------------- Summary of changes: debian/changelog | 3 ++ icons/32x32/apps.png | Bin 0 -> 1664 bytes icons/32x32/open_dir.png | Bin 0 -> 476 bytes icons/32x32/stop_session.png | Bin 0 -> 1093 bytes icons/32x32/suspend_session.png | Bin 0 -> 229 bytes onmainwindow.h | 9 +++-- onmainwindow_part2.cpp | 3 +- onmainwindow_part3.cpp | 22 +++++++++++-- onmainwindow_part4.cpp | 63 ++++++++++++++++++++------------------ onmainwindow_privat.h | 2 + resources.rcc | 4 ++ 11 files changed, 67 insertions(+), 39 deletions(-) create mode 100644 icons/32x32/apps.png create mode 100644 icons/32x32/open_dir.png create mode 100644 icons/32x32/stop_session.png create mode 100644 icons/32x32/suspend_session.png The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 221a553..f69b2bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ x2goclient (3.99.2.0-0~x2go1) UNRELEASED; urgency=low session config. - Fixed bug "light font colour on light background" by dark colour schema. - Make X2Go system tray icon not transparent. + - Replace text on buttons "Application", "Share folder", "Suspend", + "Terminate" with icons to fit in dialog window. + - Support for SVG icons for published applications -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Wed, 07 Mar 2012 21:02:15 +0100 diff --git a/icons/32x32/apps.png b/icons/32x32/apps.png new file mode 100644 index 0000000..6281943 Binary files /dev/null and b/icons/32x32/apps.png differ diff --git a/icons/32x32/open_dir.png b/icons/32x32/open_dir.png new file mode 100644 index 0000000..8222226 Binary files /dev/null and b/icons/32x32/open_dir.png differ diff --git a/icons/32x32/stop_session.png b/icons/32x32/stop_session.png new file mode 100644 index 0000000..e96e746 Binary files /dev/null and b/icons/32x32/stop_session.png differ diff --git a/icons/32x32/suspend_session.png b/icons/32x32/suspend_session.png new file mode 100644 index 0000000..50bcb55 Binary files /dev/null and b/icons/32x32/suspend_session.png differ diff --git a/onmainwindow.h b/onmainwindow.h index 39cdd47..b7c398b 100644 --- a/onmainwindow.h +++ b/onmainwindow.h @@ -55,6 +55,7 @@ #if defined(CFGPLUGIN) && defined(Q_OS_LINUX) class QX11EmbedContainer; #endif +class QToolButton; class QTemporaryFile; class QLineEdit; class QFrame; @@ -544,7 +545,6 @@ private: QList<Application> applications; QPushButton* bSusp; - QPushButton* sbExp; QPushButton* bTerm; QPushButton* bNew; QPushButton* bShadow; @@ -584,9 +584,10 @@ private: QString readExportsFrom; QString readLoginsFrom; QPushButton* sOk; - QPushButton* sbSusp; - QPushButton* sbTerm; - QPushButton* sbApps; + QToolButton* sbSusp; + QToolButton* sbExp; + QToolButton* sbTerm; + QToolButton* sbApps; QCheckBox* sbAdv; QPushButton* sCancel; QString resolution; diff --git a/onmainwindow_part2.cpp b/onmainwindow_part2.cpp index 803f00c..f71648f 100644 --- a/onmainwindow_part2.cpp +++ b/onmainwindow_part2.cpp @@ -20,6 +20,7 @@ #include "onmainwindow_privat.h" + void ONMainWindow::slotSshConnectionOk() { x2goDebug<<"ssh connection ok"<<endl; @@ -2257,7 +2258,7 @@ void ONMainWindow::slotProxyStderr() exportTimer->start ( 2000 ); } } - sbSusp->setText ( tr ( "Suspend" ) ); + sbSusp->setToolTip ( tr ( "Suspend" ) ); if ( newSession ) { runCommand(); diff --git a/onmainwindow_part3.cpp b/onmainwindow_part3.cpp index e4ceb6d..bac846f 100644 --- a/onmainwindow_part3.cpp +++ b/onmainwindow_part3.cpp @@ -331,14 +331,28 @@ void ONMainWindow::slotReadApplications(bool result, QString output, } if (line.indexOf("<icon>")!=-1) { + bool isSvg=false; line=lines[++i]; - QString pic; + QByteArray pic; while (line.indexOf("</icon>")==-1) { - pic+=line; + pic+=QByteArray::fromBase64(line.toAscii()); line=lines[++i]; + if (QString(QByteArray::fromBase64(line.toAscii())).indexOf("</svg>",Qt::CaseInsensitive)!=-1) + { + isSvg=true; + } + } + if (!isSvg) + app.icon.loadFromData(pic); + else + { + QPixmap pix(32,32); + QSvgRenderer svgRenderer( pic ); + QPainter pixPainter(&pix); + svgRenderer.render(&pixPainter); + app.icon=pix; } - app.icon.loadFromData(QByteArray::fromBase64(pic.toAscii())); } } if (app.name.length()>0) @@ -891,7 +905,7 @@ void ONMainWindow::showHelp() "\t\t\t\t comma separated\n" "--kbd-type=<typed>\t\t set default keyboard type\n" "--home=<dir>\t\t\t set users home directory\n" - "--set-kbd=<0|1>\t\t\t overwrite current keyboard settings\n" + "--set-kbd=<0|1>\t\t\t overwrite current keyboard settings\n" "--session-conf=<file>\t\t\t path to alternative session config\n"; qCritical ( "%s",helpMsg.toLocal8Bit().data() ); QMessageBox::information ( this,tr ( "Options" ),helpMsg ); diff --git a/onmainwindow_part4.cpp b/onmainwindow_part4.cpp index 65dd520..cdb5ac8 100644 --- a/onmainwindow_part4.cpp +++ b/onmainwindow_part4.cpp @@ -1858,12 +1858,27 @@ void ONMainWindow::initStatusDlg() slVal->hide(); slVal->setFixedHeight ( slName->sizeHint().height() ); - sbApps=new QPushButton ( tr ( "Applications..." ), - sessionStatusDlg ); - sbExp=new QPushButton ( tr ( "Share folder..." ), - sessionStatusDlg ); - sbSusp=new QPushButton ( tr ( "Abort" ),sessionStatusDlg ); - sbTerm=new QPushButton ( tr ( "Terminate" ),sessionStatusDlg ); + + sbApps=new QToolButton (sessionStatusDlg ); + sbApps->setToolTip(tr ( "Applications..." )); + sbApps->setIcon(QPixmap(":/icons/32x32/apps.png")); + sbApps->setAutoRaise(true); + + sbExp=new QToolButton (sessionStatusDlg ); + sbExp->setIcon(QPixmap(":/icons/32x32/open_dir.png")); + sbExp->setToolTip (tr ("Share folder..." )); + sbExp->setAutoRaise(true); + + sbSusp=new QToolButton (sessionStatusDlg ); + sbSusp->setIcon(QPixmap(":/icons/32x32/suspend_session.png")); + sbSusp->setToolTip(tr ( "Abort" )); + sbSusp->setAutoRaise(true); + + sbTerm=new QToolButton (sessionStatusDlg ); + sbTerm->setIcon(QPixmap(":/icons/32x32/stop_session.png")); + sbTerm->setToolTip(tr ( "Terminate" )); + sbTerm->setAutoRaise(true); + sbAdv=new QCheckBox ( tr ( "Show details" ),sessionStatusDlg ); setWidgetStyle ( sbTerm ); setWidgetStyle ( sbApps ); @@ -1872,29 +1887,17 @@ void ONMainWindow::initStatusDlg() setWidgetStyle ( sbAdv ); sbAdv->setFixedSize ( sbAdv->sizeHint() ); -#ifndef Q_WS_HILDON - sbApps->setFixedSize ( sbApps->sizeHint() ); - sbSusp->setFixedSize ( sbSusp->sizeHint() ); - sbTerm->setFixedSize ( sbTerm->sizeHint() ); - sbExp->setFixedSize ( sbExp->sizeHint() ); -#else - QSize sz=sbSusp->sizeHint(); - sz.setWidth ( ( int ) ( sz.width() /1.5 ) ); - sz.setHeight ( ( int ) ( sz.height() /1.5 ) ); - sbSusp->setFixedSize ( sz ); - sz=sbExp->sizeHint(); - sz.setWidth ( ( int ) ( sz.width() ) ); - sz.setHeight ( ( int ) ( sz.height() /1.5 ) ); - sbExp->setFixedSize ( sz ); - sz=sbTerm->sizeHint(); - sz.setWidth ( ( int ) ( sz.width() /1.5 ) ); - sz.setHeight ( ( int ) ( sz.height() /1.5 ) ); - sbTerm->setFixedSize ( sz ); - sz=sbApps->sizeHint(); - sz.setWidth ( ( int ) ( sz.width() ) ); - sz.setHeight ( ( int ) ( sz.height() /1.5 ) ); - sbApps->setFixedSize ( sz ); -#endif + sbApps->setFixedSize ( 32,32 ); + sbSusp->setFixedSize ( 32,32 ); + sbTerm->setFixedSize ( 32,32 ); + sbExp->setFixedSize ( 32,32 ); + + /* + sbApps->setFocusPolicy(Qt::NoFocus); + sbSusp->setFocusPolicy(Qt::NoFocus); + sbTerm->setFocusPolicy(Qt::NoFocus); + sbExp->setFocusPolicy(Qt::NoFocus);*/ + sbAdv->hide(); sbSusp->hide(); sbTerm->hide(); @@ -1950,7 +1953,7 @@ void ONMainWindow::initStatusDlg() bl->addWidget ( sbExp ); bl->addWidget ( sbSusp ); bl->addWidget ( sbTerm ); - bl->addStretch(); +// bl->addStretch(); layout->addLayout ( ll ); layout->addStretch(); layout->addWidget ( stInfo ); diff --git a/onmainwindow_privat.h b/onmainwindow_privat.h index 2c5ad29..33a8bc4 100644 --- a/onmainwindow_privat.h +++ b/onmainwindow_privat.h @@ -23,6 +23,8 @@ #include <QTextStream> #include <QTranslator> +#include <QToolButton> +#include <QPainter> #include "version.h" #include "x2goclientconfig.h" diff --git a/resources.rcc b/resources.rcc index 01630d0..4263b23 100644 --- a/resources.rcc +++ b/resources.rcc @@ -45,6 +45,10 @@ <file>icons/32x32/x2goclient.png</file> <file>icons/32x32/resolution.png</file> <file>icons/32x32/contest.png</file> + <file>icons/32x32/apps.png</file> + <file>icons/32x32/open_dir.png</file> + <file>icons/32x32/suspend_session.png</file> + <file>icons/32x32/stop_session.png</file> <file>icons/16x16/audio.png</file> <file>icons/16x16/file-open.png</file> <file>icons/16x16/delete.png</file> hooks/post-receive -- x2goclient.git (X2Go Client) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "x2goclient.git" (X2Go Client).