This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 2a3e8f9300c1dbcc7c096619a43e26f883b1cc87 Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Thu Feb 27 18:12:22 2014 +0100 Display more version info. Parameters --version, --git, --changelog. --- Makefile | 3 +++ create_text.sh | 7 ++++++ debian/changelog | 1 + onmainwindow.cpp | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++---- onmainwindow.h | 4 ++++ resources.rcc | 2 ++ 6 files changed, 82 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1185888..2ac5307 100755 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ LRELEASE_BINARY=lrelease-qt4 all: build build: build_man build_pluginprovider + ./create_text.sh $(MAKE) build_client $(MAKE) build_plugin @@ -55,6 +56,8 @@ clean: clean_client clean_plugin clean_man clean_pluginprovider find . -maxdepth 2 -name 'qrc_*.cpp' -exec rm -vf {} + -type f rm -f x2goclient rm -f x2goclient.tag + rm -f txt/changelog + rm -f txt/git clean_client: rm -fr $(CLIENT_DIR) diff --git a/create_text.sh b/create_text.sh new file mode 100755 index 0000000..417d611 --- /dev/null +++ b/create_text.sh @@ -0,0 +1,7 @@ +cp -ar debian/changelog txt/ + +echo "GIT info:" > txt/git +git branch >> txt/git +echo "=================================" >> txt/git +echo "GIT history:" >> txt/git +git log -n 10 >> txt/git diff --git a/debian/changelog b/debian/changelog index dc43f54..555fc18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ x2goclient (4.0.2.0-0x2go1) UNRELEASED; urgency=low - Fix running xmodmap if X2Go Client not started from terminal. - Setting keyboard modifiers with xmodmap. - Fix multimonitor support on Linux. + - Display more version info. Parameters --version, --git, --changelog. [ Mike Gabriel ] * debian/control: diff --git a/onmainwindow.cpp b/onmainwindow.cpp index 9f306f8..1f9176d 100644 --- a/onmainwindow.cpp +++ b/onmainwindow.cpp @@ -6565,6 +6565,24 @@ bool ONMainWindow::parseParameter ( QString param ) return false; } + if ( param=="--version" || param=="-v") + { + showVersion(); + return false; + } + + if ( param=="--changelog" ) + { + showChangelog(); + return false; + } + + if ( param=="--git" ) + { + showGit(); + return false; + } + if (param == "--debug") { ONMainWindow::debugging = true; @@ -7150,6 +7168,9 @@ 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" "--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" @@ -7197,6 +7218,7 @@ void ONMainWindow::showHelp() if (!startHidden) { HelpDialog dlg(this); + dlg.setWindowTitle(tr("Help")); dlg.setText(helpMsg); dlg.exec(); } @@ -7220,16 +7242,55 @@ void ONMainWindow::showHelpPack() pc+="-[0-9]"; } msg+=pc+"\n"; - qCritical ( "%s",pc.toLocal8Bit().data() ); } file.close(); -#ifdef Q_OS_WIN + qCritical()<<msg; + if (!startHidden) + { + HelpDialog dlg(this); + dlg.setWindowTitle(tr("Pack Methodes")); + dlg.setText(msg); + dlg.exec(); + } +} - QMessageBox::information ( this,tr ( "Options" ),msg ); -#endif +void ONMainWindow::showTextFile(QString fname, QString title) +{ + QFile file ( fname ); + if ( !file.open ( QIODevice::ReadOnly | QIODevice::Text ) ) + return; + QTextStream in ( &file ); + QString msg=in.readAll(); + file.close(); + qCritical()<<msg; + if (!startHidden) + { + HelpDialog dlg(this); + dlg.setWindowTitle(title); + dlg.setText(msg); + dlg.exec(); + } + +} + + +void ONMainWindow::showChangelog() +{ + showTextFile(":/txt/changelog", tr("Changelog")); +} +void ONMainWindow::showGit() +{ + showTextFile(":/txt/git", tr("Git Info")); } +void ONMainWindow::showVersion() +{ + qCritical()<<VERSION; + slotAbout(); +} + + void ONMainWindow::slotGetServers ( bool result, QString output, int ) { diff --git a/onmainwindow.h b/onmainwindow.h index fa535d7..56567a2 100644 --- a/onmainwindow.h +++ b/onmainwindow.h @@ -499,6 +499,10 @@ public: SshMasterConnection* findServerSshConnection(QString host); void showHelp(); + void showVersion(); + void showTextFile(QString file, QString title); + void showGit(); + void showChangelog(); void showHelpPack(); void exportDirs ( QString exports,bool removable=false ); void reloadUsers(); diff --git a/resources.rcc b/resources.rcc index b6f80c0..79217cf 100644 --- a/resources.rcc +++ b/resources.rcc @@ -81,6 +81,8 @@ <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> -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git