[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.4-8-g033a966
X2Go dev team
git-admin at x2go.org
Tue Aug 27 13:21:41 CEST 2013
The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
via 033a966df66de981678e0deda2f5c008c5d6f1d2 (commit)
from 8d7f832acbd802e81a3346c735172f5cb7870dc1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 3 +++
pyhoca-gui | 5 +++++
pyhoca/wxgui/messages.py | 17 +++++++++++++----
3 files changed, 21 insertions(+), 4 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index fefe06e..12b0995 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,11 @@ pyhoca-gui (0.1.0.5-0~x2go1) UNRELEASED; urgency=low
any more.
- Add --logon-window-position option that allows custom placing of the logon
window on your desktop.
+ - Add GUI notification message if a seconed instance of PyHoca-GUI is
+ started (PyHoca-GUI is already running...)
* React to bug #627990, prefer man2html-base over man2html.
+
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Fri, 24 Jun 2011 16:39:24 +0200
pyhoca-gui (0.1.0.4-0~x2go1) unstable; urgency=low
diff --git a/pyhoca-gui b/pyhoca-gui
index 2f2b0b0..9ddab17 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -42,6 +42,7 @@ import sys
import exceptions
import locale
import gettext
+import wx
PROG_NAME = os.path.basename(sys.argv[0])
PROG_PID = os.getpid()
@@ -82,6 +83,7 @@ from x2go.defaults import BACKENDS_CLIENTSETTINGS, BACKEND_CLIENTSETTINGS_DEFAUL
from x2go.defaults import BACKENDS_CLIENTPRINTING, BACKEND_CLIENTPRINTING_DEFAULT
from pyhoca.wxgui import __VERSION__ as _version
+from pyhoca.wxgui import messages
from pyhoca.wxgui import PyHocaGUI
if _X2GOCLIENT_OS == 'Windows':
@@ -315,7 +317,10 @@ def main():
if check_running():
sys.stderr.write("\n###############################\n### %s: already running for user %s\n###############################\n" % (PROG_NAME, _CURRENT_LOCAL_USER))
+ m = messages.PyHoca_MessageWindow_Ok(wx.App(), custom_message=_(u'PyHoca-GUI is already running for user ,,%s\'\'!\n\nOnly one instance of PyHoca-GUI can be started per\nuser. The PyHoca-GUI icon can be found in your desktops\'s\nnotification area/systray.') % _CURRENT_LOCAL_USER, title=_(u'PyHoca-GUI (%s)...') % VERSION, icon='pyhoca-trayicon')
+ m.ShowModal()
version()
+
try:
thisPyHocaGUI = PyHocaGUI(args, logger, liblogger, version=VERSION)
thisPyHocaGUI.MainLoop()
diff --git a/pyhoca/wxgui/messages.py b/pyhoca/wxgui/messages.py
index 1df4e35..9fa0c5f 100644
--- a/pyhoca/wxgui/messages.py
+++ b/pyhoca/wxgui/messages.py
@@ -62,8 +62,11 @@ class PyHoca_MessageWindow(wx.Dialog):
self.show_message = show_message
self.result = None
- if parent is None:
- parent = self._PyHocaGUI.about
+ try:
+ if parent is None:
+ parent = self._PyHocaGUI.about
+ except AttributeError:
+ pass
wx.Dialog.__init__(self, parent, wx.ID_ANY, )
self.SetTitle('%s' % title)
@@ -126,7 +129,10 @@ class PyHoca_MessageWindow(wx.Dialog):
maxX, maxY = wx.GetDisplaySize()
self.Move((maxX/2 - self.GetSize().GetWidth()/2, maxY/2 - self.GetSize().GetHeight()/2))
- self._PyHocaGUI._sub_windows.append(self)
+ try:
+ self._PyHocaGUI._sub_windows.append(self)
+ except AttributeError:
+ pass
def OnTrue(self, evt):
self.result = True
@@ -149,7 +155,10 @@ class PyHoca_MessageWindow(wx.Dialog):
return not self.Yes()
def Hide(self):
- self._PyHocaGUI._sub_windows.remove(self)
+ try:
+ self._PyHocaGUI._sub_windows.remove(self)
+ except AttributeError:
+ pass
self.Show(False)
def Close(self):
hooks/post-receive
--
pyhoca-gui.git (Python X2Go Client (wxPython GUI))
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).
More information about the x2go-commits
mailing list