[X2Go-Commits] [x2goclient] 01/01: Broker can send to client the number of suspended and running sessions for each session type. Client will display this information to user on session button.
git-admin at x2go.org
git-admin at x2go.org
Mon Sep 2 10:54:45 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 31ec433544592cc6134e34855c006234235df51a
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Mon Sep 2 10:54:36 2019 +0200
Broker can send to client the number of suspended and running sessions for each session type. Client will display this information to user on session button.
---
debian/changelog | 2 ++
src/sessionbutton.cpp | 19 +++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e425125..3173f8b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ x2goclient (4.1.2.2-0x2go1) UNRELEASED; urgency=medium
- Don't exit if sending event to http broker has failed.
- If using x2go broker and ssh proxy check for the option "usebrokeruserforproxy" in the session
file. If it's "true", use the same username for the proxy as broker login.
+ - Broker can send to client the number of suspended and running sessions for each session type.
+ Client will display this information to user on session button.
[ Mihai Moldovan ]
* New upstream version (4.1.2.2):
diff --git a/src/sessionbutton.cpp b/src/sessionbutton.cpp
index 0bbbdc9..3fdc97e 100644
--- a/src/sessionbutton.cpp
+++ b/src/sessionbutton.cpp
@@ -333,6 +333,25 @@ void SessionButton::redraw()
sessStatus->setText("("+tr("suspended")+")");
}
+ int suspended=st->setting()->value ( sid+"/suspended",
+ ( QVariant ) QString::null ).toUInt();
+
+ int running=st->setting()->value ( sid+"/running",
+ ( QVariant ) QString::null ).toUInt();
+ if(suspended || running)
+ {
+ QStringList parts;
+ if(suspended)
+ {
+ parts<<tr("suspended")+" - "+QString::number(suspended);
+ }
+ if(running)
+ {
+ parts<<tr("running")+" - "+QString::number(running);
+ }
+ sessStatus->setText(parts.join(", "));
+ }
+
QString sessIcon = wrap_legacy_resource_URIs (st->setting()->value (sid+"/icon",
(QVariant) ":/img/icons/128x128/x2gosession.png"
).toString ());
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list