[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.10-177-g65b6557
X2Go dev team
git-admin at x2go.org
Tue Aug 27 13:22:14 CEST 2013
The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
via 65b6557b68a0cae496fe931ebc1cd87e1da5e910 (commit)
from edf44b3f4db29102e1c91a88dfba4780bb2020f4 (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 | 1 +
pyhoca-gui | 1 +
pyhoca/wxgui/frontend.py | 1 +
pyhoca/wxgui/notify.py | 28 +++++++++++++++-------------
4 files changed, 18 insertions(+), 13 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 937a05c..f4b2642 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -93,6 +93,7 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
- Allow TCP ports higher than 64000 for SSH and sound server connections.
- Be more precise on error causes during SSH authentication.
- Fix cmdline option --restricted-trayicon.
+ - Add cmdline option --disable-notifications.
* Depend on Python X2Go 0.1.2.0.
* Install GNOME icons via dh_links.
* Install X2Go icons with explicit install paths.
diff --git a/pyhoca-gui b/pyhoca-gui
index 196c26a..4364be4 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -213,6 +213,7 @@ x2go_gui_options = [
{'args':['--disable-options'], 'default': False, 'action': 'store_true', 'help': 'disable the client options configuration window', },
{'args':['--disable-printingprefs'], 'default': False, 'action': 'store_true', 'help': 'disable the client\'s printing preferences window', },
{'args':['--disable-profilemanager'], 'default': False, 'action': 'store_true', 'help': 'disable the session profile manager window', },
+ {'args':['--disable-notifications'], 'default': False, 'action': 'store_true', 'help': 'disable all applet notifications', },
{'args':['--display'], 'default': None, 'metavar': '<hostname>:<screennumber>', 'help': 'set the DISPLAY environment variable to <hostname>:<screennumber>', },
{'args':['--logon-window-position'], 'default': None, 'metavar': '<x-pos>x<y-pos>', 'help': 'give a custom position for the logon window, use negative values to position relative to right/bottom border', },
{'args':['--published-applications-no-submenus'], 'default': 10, 'metavar': '<number>', 'help': 'the number of published applications that will be rendered without submenus', },
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 659476d..ac7a798 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -234,6 +234,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
self.disconnect_on_terminate = self.args.disconnect_on_terminate
self.show_profile_metatypes = self.args.show_profile_metatypes
self.restricted_trayicon = self.args.restricted_trayicon
+ self.disable_notifications = self.args.disable_notifications
self._pyhoca_logger('PyHoca GUI is starting up', loglevel=x2go.log.loglevel_INFO, )
self._pyhoca_logger('registering PyHocaGUI control sessions', loglevel=x2go.log.loglevel_INFO, )
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index af6a2d6..06e11da 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -83,13 +83,14 @@ class libnotify_NotifierPopup(object):
icon = 'file://%s/PyHoca/32x32/%s.png' % (_icons_location, icon)
- n = pynotify.Notification(title, text, icon)
- n.set_urgency(pynotify.URGENCY_NORMAL)
- n.set_timeout(timeout)
-
self._pyhoca_logger('[%s] %s' % (title.encode(utils.get_encoding()), text.encode(utils.get_encoding())), loglevel=log.loglevel_NOTICE)
- if not n.show():
- raise PyHocaNotificationException('could not notify user')
+
+ if not self._PyHocaGUI.disable_notifications:
+ n = pynotify.Notification(title, text, icon)
+ n.set_urgency(pynotify.URGENCY_NORMAL)
+ n.set_timeout(timeout)
+ if not n.show():
+ raise PyHocaNotificationException('could not notify user')
def Close(self):
@@ -161,13 +162,14 @@ class notificationmessage_NotifierPopup(object):
icon = wx.ICON_INFORMATION
try:
- # you will need wxPython >= 2.9 for this
- _notification_msg = wx.NotificationMessage()
- _notification_msg.SetTitle(title)
- _notification_msg.SetMessage(text)
- _notification_msg.SetParent(self._PyHocaGUI.about)
- _notification_msg.SetFlags(icon)
- _notification_msg.Show(timeout=1)
+ if not self._PyHocaGUI.disable_notifications:
+ # you will need wxPython >= 2.9 for this
+ _notification_msg = wx.NotificationMessage()
+ _notification_msg.SetTitle(title)
+ _notification_msg.SetMessage(text)
+ _notification_msg.SetParent(self._PyHocaGUI.about)
+ _notification_msg.SetFlags(icon)
+ _notification_msg.Show(timeout=1)
except:
# if we are running wxPython 2.8, we ignore missing
# wx.NotificationMessage class
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