This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch bugfix/osx in repository x2goclient. from 551078c configdialog.cpp: new a154a6c x2goutils.{h,cpp}: use QString references. new f86629a x2goutils.{h,cpp}: add new helper function show_RichText_WarningMsgBox. new bd06b93 configdialog.cpp: use new helper function show_RichText_WarningMsgBox to show proper errors. new f5443ca configdialog.cpp: return empty strings as paths to the XQuartz application if no valid one could be found in order to show the proper error message. The 4 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 8 +++++ src/configdialog.cpp | 86 +++++++++++++++++++++++++++----------------------- src/x2goutils.cpp | 26 +++++++++++++-- src/x2goutils.h | 6 ++-- 4 files changed, 82 insertions(+), 44 deletions(-) -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit a154a6c38107f22053edef8463a48d34f53cc3e3 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Mar 12 05:55:04 2015 +0100 x2goutils.{h,cpp}: use QString references. --- debian/changelog | 1 + src/x2goutils.cpp | 4 ++-- src/x2goutils.h | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index ea8e563..60d759f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -210,6 +210,7 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low - configdialog.cpp: reformat code, add MacPorts and XQuartz references, URL's and installation instructions, don't show outdated version warning when no XQuartz server is installed. Fixes: #792. + - x2goutils.{h,cpp}: use QString references. -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 13:25:28 +0100 diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 61d8d5c..76e8b31 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -30,7 +30,7 @@ QString expandHome( QString path ) return path; } -QString fixup_resource_URIs (const QString res_path) { +QString fixup_resource_URIs (const QString& res_path) { QString ret (res_path); if (!(res_path.isEmpty ())) { @@ -42,7 +42,7 @@ QString fixup_resource_URIs (const QString res_path) { return (ret); } -QString wrap_legacy_resource_URIs (const QString res_path) { +QString wrap_legacy_resource_URIs (const QString& res_path) { QString ret (res_path); if (!(res_path.isEmpty ())) { diff --git a/src/x2goutils.h b/src/x2goutils.h index 21365da..dc2dc71 100644 --- a/src/x2goutils.h +++ b/src/x2goutils.h @@ -24,8 +24,7 @@ #define UNUSED(x) do { (void) x; } while (0) QString expandHome( QString path ); -QString fixup_resource_URIs (const QString res_path); -QString wrap_legacy_resource_URIs (const QString res_path); - +QString fixup_resource_URIs (const QString& res_path); +QString wrap_legacy_resource_URIs (const QString& res_path); #endif /* !defined (X2GOUTILS_H) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit f86629a8a1fda7341c4880c882a8448ebce32a6b Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Mar 12 05:56:42 2015 +0100 x2goutils.{h,cpp}: add new helper function show_RichText_WarningMsgBox. --- debian/changelog | 1 + src/x2goutils.cpp | 22 ++++++++++++++++++++++ src/x2goutils.h | 1 + 3 files changed, 24 insertions(+) diff --git a/debian/changelog b/debian/changelog index 60d759f..b1226e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -211,6 +211,7 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low URL's and installation instructions, don't show outdated version warning when no XQuartz server is installed. Fixes: #792. - x2goutils.{h,cpp}: use QString references. + - x2goutils.{h,cpp}: add new helper function show_RichText_WarningMsgBox. -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 13:25:28 +0100 diff --git a/src/x2goutils.cpp b/src/x2goutils.cpp index 76e8b31..33b5410 100644 --- a/src/x2goutils.cpp +++ b/src/x2goutils.cpp @@ -20,6 +20,7 @@ #include <algorithm> #include <QString> #include <QDir> +#include <QMessageBox> QString expandHome( QString path ) { @@ -70,3 +71,24 @@ QString wrap_legacy_resource_URIs (const QString& res_path) { return (ret); } + +void show_RichText_WarningMsgBox (const QString& main_text, const QString& informative_text) { + QString fixup_main_text (main_text); + QString fixup_informative_text (informative_text); + fixup_main_text.replace ("\n", "\n<br />\n"); + fixup_informative_text.replace ("\n", "\n<br />\n"); + + // This is a workaround for a bug in Qt. Even though we set Qt::RichText as the text format + // later on, the informative text is not recognized as rich text, UNLESS a HTML tag + // is used ON THE VERY FIRST LINE. + // Make sure, that there always is one... + fixup_informative_text.prepend ("<b></b>"); + + QMessageBox msg_box (QMessageBox::Warning, QString ("X2Go Client"), + fixup_main_text, NULL); + + msg_box.setTextFormat (Qt::RichText); + msg_box.setInformativeText (fixup_informative_text); + msg_box.setWindowModality (Qt::WindowModal); + msg_box.exec (); +} diff --git a/src/x2goutils.h b/src/x2goutils.h index dc2dc71..82a5f76 100644 --- a/src/x2goutils.h +++ b/src/x2goutils.h @@ -26,5 +26,6 @@ QString expandHome( QString path ); QString fixup_resource_URIs (const QString& res_path); QString wrap_legacy_resource_URIs (const QString& res_path); +void show_RichText_WarningMsgBox (const QString& main_text, const QString& informative_text = ""); #endif /* !defined (X2GOUTILS_H) */ -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit bd06b934d935cbefd0de1aa5cbb323e7f64633d5 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Mar 12 05:59:02 2015 +0100 configdialog.cpp: use new helper function show_RichText_WarningMsgBox to show proper errors. - Format as HTML. - Use hyperlinks. - Rephrase XQuartz warning messages. --- debian/changelog | 3 ++ src/configdialog.cpp | 77 +++++++++++++++++++++++++------------------------- 2 files changed, 42 insertions(+), 38 deletions(-) diff --git a/debian/changelog b/debian/changelog index b1226e0..3ef34b2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -212,6 +212,9 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low when no XQuartz server is installed. Fixes: #792. - x2goutils.{h,cpp}: use QString references. - x2goutils.{h,cpp}: add new helper function show_RichText_WarningMsgBox. + - configdialog.cpp: use new helper function show_RichText_WarningMsgBox to + show proper errors. Format as HTML. Use hyperlinks. Rephrase XQuartz + warning messages. -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 13:25:28 +0100 diff --git a/src/configdialog.cpp b/src/configdialog.cpp index b23b6d4..de348a9 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -37,6 +37,7 @@ #include "connectionwidget.h" #include "settingswidget.h" #include "mediawidget.h" +#include "x2goutils.h" #if defined ( Q_OS_WIN) && defined (CFGCLIENT ) @@ -506,24 +507,24 @@ void ConfigDialog::slot_findXDarwin () QString version; QString path = findXDarwin (version); if (path.isEmpty ()) { - QMessageBox::warning (this, tr ("Warning"), - tr ("x2goclient could not find any suitable X11 Server.\n\n" - - "MacPorts users, please install either the port <b>xorg-server</b>\n" - "or the port <b>xorg-server-devel</b>.\n" - "Upon successful installation, please follow the instructions printed\n" - "by the port utility to autostart/load the server.\n\n" - - "All other users, please obtain and install XQuartz from\n\n" - - "\t<a href=\"https://xquartz.macosforge.org/\">" - "https://xquartz.macosforge.org/" - "</a>\n\n" - - "Afterwards, restart x2goclient and\n" - "select the correct path to the X11 application.\n" - "This will most likely be <b>/Applications/MacPorts/X11.app</b> or\n" - "<b>/Applications/Utilities/XQuartz.app</b>.")); + show_RichText_WarningMsgBox (tr ("x2goclient could not find any suitable X11 Server."), + tr ("MacPorts users, please install either the port <b>xorg-server</b>\n" + "or the port <b>xorg-server-devel</b>.\n" + "Upon successful installation, please follow the instructions printed\n" + "by the port utility to autostart/load the server.\n\n" + + "All other users, please obtain and install XQuartz from:\n" + + "<center><a href=\"https://xquartz.macosforge.org/\">" + "https://xquartz.macosforge.org/" + "</a></center>\n\n" + + "Afterwards, restart x2goclient and\n" + "select the correct path to the X11 application.\n" + "This will most likely be\n" + "<center><b>/Applications/MacPorts/X11.app</b></center>\n" + "or\n" + "<center><b>/Applications/Utilities/XQuartz.app</b></center>")); } else { QString minVer = "2.1.0"; @@ -538,26 +539,26 @@ void ConfigDialog::slot_findXDarwin () void ConfigDialog::printXDarwinVersionWarning (QString version) { - QMessageBox::warning (this, tr ("Warning"), - tr ("Your are using XQuartz (X-Window Server for OS X) version ") - + version + - tr (".\n" - "This version causes problems with X application in 24bit " - "color mode.\n" - "You should update your X11 environment.\n\n" - - "MacPorts users please follow the steps outlined on\n\n" - - "\t<a href=\"https://guide.macports.org/chunked/using.common-tasks.html\">" - "https://guide.macports.org/chunked/using.common-tasks.html" - "</a>\n\n" - - "Users who have installed XQuartz via the installer package\n" - "can find updated versions on\n\n" - - "\t<a href=\"https://xquartz.macosforge.org/\">" - "https://xquartz.macosforge.org/" - "</a>")); + show_RichText_WarningMsgBox (tr ("Your XQuartz version is too old."), + tr ("Your are using XQuartz (X Window System Server for OS X) version ") + + version + + tr (".\n\n" + "This version causes problems with X applications in 24bit " + "color mode.\n" + "You should update your X11 environment.\n\n" + + "MacPorts users please follow the steps outlined on:\n" + + "<center><a href=\"https://guide.macports.org/chunked/using.common-tasks.html\">" + "https://guide.macports.org/chunked/using.common-tasks.html" + "</a></center>\n\n" + + "Users who have installed XQuartz via the installer package\n" + "can find updated versions on:\n" + + "<center><a href=\"https://xquartz.macosforge.org/\">" + "https://xquartz.macosforge.org/" + "</a></center>")); } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch bugfix/osx in repository x2goclient. commit f5443ca999dde687a328ea08889617461dc89cf4 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Mar 12 06:01:15 2015 +0100 configdialog.cpp: return empty strings as paths to the XQuartz application if no valid one could be found in order to show the proper error message. --- debian/changelog | 3 +++ src/configdialog.cpp | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 3ef34b2..c562c68 100644 --- a/debian/changelog +++ b/debian/changelog @@ -215,6 +215,9 @@ x2goclient (4.0.4.0-0x2go1) UNRELEASED; urgency=low - configdialog.cpp: use new helper function show_RichText_WarningMsgBox to show proper errors. Format as HTML. Use hyperlinks. Rephrase XQuartz warning messages. + - configdialog.cpp: return empty strings as paths to the XQuartz + application if no valid one could be found in order to show the proper + error message. -- X2Go Release Manager <git-admin@x2go.org> Thu, 19 Feb 2015 13:25:28 +0100 diff --git a/src/configdialog.cpp b/src/configdialog.cpp index de348a9..6311dfb 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -480,7 +480,11 @@ QString ConfigDialog::findXDarwin ( QString& version, QString path ) ver2 = vst.value ("CFBundleShortVersionString", (QVariant) "0.0.0").toString (); } - if (retMaxXDarwinVersion (ver1, ver2) == ver1) { + if ((ver1.compare (ver2) == 0) && + (ver1.compare (QString ("0.0.0")) == 0)) { + return (QString ()); + } + else if (retMaxXDarwinVersion (ver1, ver2) == ver1) { version = ver1; return dir1; } @@ -497,6 +501,9 @@ QString ConfigDialog::findXDarwin ( QString& version, QString path ) version=vst.value ("CFBundleShortVersionString", (QVariant) "0.0.0").toString (); } + else { + path = QString (); + } return path; } } -- Alioth's /srv/git/code.x2go.org/x2goclient.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git