This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 28fed7be79735db48e8cca5f5debee023858b7f5 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Mon Mar 3 16:53:08 2014 +0100 Check if txt/changelog and txt/git exist on config phase. Rename option "--git" to "--git-info". --- changelog.rcc | 5 +++++ debian/changelog | 4 +++- git.rcc | 5 +++++ onmainwindow.cpp | 28 +++++++++++++++++++++++----- resources.rcc | 2 -- x2goclient.pro | 10 ++++++++++ 6 files changed, 46 insertions(+), 8 deletions(-) diff --git a/changelog.rcc b/changelog.rcc new file mode 100644 index 0000000..44d7faf --- /dev/null +++ b/changelog.rcc @@ -0,0 +1,5 @@ +<RCC> + <qresource> + <file>txt/changelog</file> + </qresource> +</RCC> diff --git a/debian/changelog b/debian/changelog index 896cde6..ca8e8bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,9 @@ x2goclient (4.0.2.0-0x2go1) UNRELEASED; urgency=low - Don't show GUI dialog for --version, --help, etc, if started from terminal on linux and mac. - If no user in session config, display system username in pass form. - + - Check if txt/changelog and txt/git exist on config phase. Rename option + "--git" to "--git-info". + [ Josh Lukens ] * New upstream version (4.0.2.0): - Switch to QNetworkAccessManager. diff --git a/git.rcc b/git.rcc new file mode 100644 index 0000000..7f4d6ba --- /dev/null +++ b/git.rcc @@ -0,0 +1,5 @@ +<RCC> + <qresource> + <file>txt/git</file> + </qresource> +</RCC> diff --git a/onmainwindow.cpp b/onmainwindow.cpp index 993f67a..f66b1b5 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -6596,7 +6596,7 @@ bool ONMainWindow::parseParameter ( QString param ) return false; } - if ( param=="--git" ) + if ( param=="--git-info" ) { showGit(); return false; @@ -7187,9 +7187,17 @@ void ONMainWindow::showHelp() "Usage: x2goclient [Options]\n" "Options:\n" "--help\t\t\t\t show this message\n" - "--version\t\t\t\t show version\n" - "--changelog\t\t\t\t show changelog\n" - "--git\t\t\t\t show GIT info\n" + "--version\t\t\t show version\n"; + if(QFile::exists(":/txt/changelog")) + { + helpMsg+="--changelog\t\t\t show changelog\n"; + } + if(QFile::exists(":/txt/git")) + { + helpMsg+= "--git-info\t\t\t show GIT info\n"; + + } + helpMsg+= "--help-pack\t\t\t show available pack methods\n" "--debug\t\t\t\t enables extensive output for console output.\n" "--no-menu\t\t\t hide menu bar\n" @@ -7231,7 +7239,7 @@ void ONMainWindow::showHelp() "--autostart=<app> \t\t launch \"app\" by session start in \"published " "applications\" mode\n" "--session-conf=<file>\t\t path to alternative session config\n" - "--tray-icon\t\t force to show session trayicon\n"; + "--tray-icon\t\t\t force to show session trayicon\n"; qCritical ( "%s",helpMsg.toLocal8Bit().data() ); if (!startHidden && !haveTerminal) @@ -7295,11 +7303,21 @@ void ONMainWindow::showTextFile(QString fname, QString title) void ONMainWindow::showChangelog() { + if(!QFile::exists(":/txt/changelog")) + { + qCritical()<<tr("Option is not availabel in this build"); + return; + } showTextFile(":/txt/changelog", tr("Changelog")); } void ONMainWindow::showGit() { + if(!QFile::exists(":/txt/git")) + { + qCritical()<<tr("Option is not availabel in this build"); + return; + } showTextFile(":/txt/git", tr("Git Info")); } diff --git a/resources.rcc b/resources.rcc index 79217cf..b6f80c0 100644 --- a/resources.rcc +++ b/resources.rcc @@ -81,8 +81,6 @@ <file>icons/22x22/preferences-system.png</file> <file>txt/packs</file> <file>txt/encodings</file> - <file>txt/changelog</file> - <file>txt/git</file> <file>x2goclient_de.qm</file> <file>x2goclient_da.qm</file> <file>x2goclient_es.qm</file> diff --git a/x2goclient.pro b/x2goclient.pro index 204316a..3a100fd 100755 --- a/x2goclient.pro +++ b/x2goclient.pro @@ -146,6 +146,16 @@ DEPENDPATH += . INCLUDEPATH += . RESOURCES += resources.rcc +exists( txt/git ) { + message( "Configuring with --git-info" ) + RESOURCES += git.rcc +} + +exists( txt/changelog ) { + message( "Configuring with --changelog" ) + RESOURCES += changelog.rcc +} + linux-g++ { message(building $$TARGET with ldap and cups) LIBS += -lldap -lcups -lX11 -lXpm -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git