This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from 9903612 Fix maximizing client window in thinclient mode with Qt5 (bullseye). new bcdd8ca Add mime type application/x-x2go. X2Go Client can now automatically open session files with .x2go extension. The 1 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 | 2 ++ desktop/x2goclient.desktop | 1 + mime/x-x2go.xml | 8 ++++++++ src/onmainwindow.cpp | 23 ++++++++++++++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 mime/x-x2go.xml -- Alioth's /home/x2go-admin/maintenancescripts/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 master in repository x2goclient. commit bcdd8ca7c949155e35975bdb1549b9951f65cc7d Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Wed Jan 13 10:19:06 2021 -0600 Add mime type application/x-x2go. X2Go Client can now automatically open session files with .x2go extension. --- debian/changelog | 2 ++ desktop/x2goclient.desktop | 1 + mime/x-x2go.xml | 8 ++++++++ src/onmainwindow.cpp | 23 ++++++++++++++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7ec4103..7b94f93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium - Set min width of session status label. - set clipboard mode of x2gokdriveclient in cmd line option. - Fix maximizing client window in thinclient mode with Qt5 (bullseye). + - Add mime type application/x-x2go. X2Go Client can now automatically open + session files with .x2go extension. [ Ryan Schmidt ] * New upstream version (4.1.2.3): diff --git a/desktop/x2goclient.desktop b/desktop/x2goclient.desktop index fbb396d..250484f 100644 --- a/desktop/x2goclient.desktop +++ b/desktop/x2goclient.desktop @@ -11,3 +11,4 @@ X-Osso-Type=application/x-executable Terminal=false Categories=Qt;KDE;Network; Keywords=Terminal,Client,Remote,Desktop,Published,Applications,Session,Profile; +MimeType=application/x-x2go; diff --git a/mime/x-x2go.xml b/mime/x-x2go.xml new file mode 100644 index 0000000..e410fad --- /dev/null +++ b/mime/x-x2go.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-x2go"> + <comment>X2Go session file</comment> + <glob pattern="*.x2go"/> + <generic-icon name="x2goclient"/> + </mime-type> +</mime-info> diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index 72d42c3..f44c75e 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -2406,7 +2406,7 @@ void ONMainWindow::slotReadSessions() } } } - else + else if(defaultSessionName.length() > 0) { QString normalDefaultSName=defaultSessionName.split("/",QString::SkipEmptyParts).join("/"); for ( int i=0; i<sessionExplorer->getSessionsList()->size(); ++i ) @@ -2427,6 +2427,19 @@ void ONMainWindow::slotReadSessions() } } } + //no session name or id provided + //started with ".x2go" session file. + //if this file has only one session, chose it automatically + else + { + if(sessionExplorer->getSessionsList()->size()==1) + { + sessionExplorer->setCurrrentPath(sessionExplorer->getSessionsList()->at(0)->getPath()); + sessionExplorer->placeButtons(); + sfound=true; + slotSelectedFromList ( sessionExplorer->getSessionsList()->at(0) ); + } + } if ( !sfound && startHidden ) { startHidden=false; @@ -7682,6 +7695,14 @@ bool ONMainWindow::parseParameter ( QString param ) } #endif /* defined (Q_OS_UNIX) */ +//open session file with .x2go extension + if ( param.endsWith(".x2go", Qt::CaseInsensitive) ) + { + ONMainWindow::sessionCfg=expandHome(param); + defaultSession=true; + return true; + } + if ( param=="--help" ) { showHelp(); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git