[X2go-Commits] pyhoca-gui.git - master (branch) updated: 0.2.0.4-12-gb8235fc

X2Go dev team git-admin at x2go.org
Fri Sep 14 15:08:09 CEST 2012


The branch, master has been updated
       via  b8235fc8bdd2710ca896d64c25e063a00eade1c6 (commit)
       via  d2cfd08a175648e8bc5db432e0a6803ba899ea73 (commit)
      from  9a3d8cdb423e1a3ebe6ced33d80c52bc1c04b51a (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 -----------------------------------------------------------------
commit b8235fc8bdd2710ca896d64c25e063a00eade1c6
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Sep 14 13:30:43 2012 +0200

    Add a warning message box that DirectRDP is not yet supported by PyHoca-GUI.

commit d2cfd08a175648e8bc5db432e0a6803ba899ea73
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Sep 14 13:19:36 2012 +0200

    Slight change in internal message box API, rename custom_message class option to msg.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog         |    3 ++
 pyhoca/wxgui/frontend.py |   10 ++++++++-
 pyhoca/wxgui/messages.py |   48 +++++++++++++++++++++++-----------------------
 3 files changed, 36 insertions(+), 25 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 67d53e4..65536a9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,9 @@ pyhoca-gui (0.2.0.5-0~x2go1) UNRELEASED; urgency=low
       about the session icon name. Rewrite mistakes pyhoca-gui <= 0.2.0.4 did
       on the icon attribute in the session profile config.
     - Make DirectRDP sessions configurable through PyHoca-GUI profile manager.
+    - Slight change in internal message box API, rename custom_message class
+      option to msg.
+    - Add a warning message box that DirectRDP is not yet supported by PyHoca-GUI.
   * /debian/control:
     + Add Oleksandr Shneyder to Uploaders.
 
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 77e9d75..d5bc355 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -716,6 +716,14 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
 
         """
         profile_name = self._eventid_profilenames_map[evt.GetId()]
+        if self.session_profiles.get_profile_config(profile_name)['directrdp']:
+            m = messages.PyHoca_MessageWindow_Ok(self,
+                                                 title=_(u'%s: DirectRDP not supported yet') % self.appname,
+                                                 msg=_(u'We apologize for the inconvenience...\n\nSession profiles of type ,,DirectRDP\'\'are not\nsupported by %s (%s), yet!!\n\nDirectRDP support will be available in %s >= 0.2.2.0.' % (self.appname, self.version, self.appname)),
+                                                 icon='warning',
+                                                 profile_name=profile_name)
+            m.ShowModal()
+            return
         self.taskbar.SetIconConnecting(profile_name)
         if session_uuid is None:
             session_uuid = self._X2goClient__register_session(profile_name=profile_name)
@@ -1199,7 +1207,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
             # use a dummy parent...
             _parent = None
 
-        m = messages.PyHoca_MessageWindow_NoYes(self, parent=_parent, custom_message=_message, title=_(u'%s: Confirm Host Authorization') % profile_name, icon='profile_warning')
+        m = messages.PyHoca_MessageWindow_NoYes(self, parent=_parent, msg=_message, title=_(u'%s: Confirm Host Authorization') % profile_name, icon='profile_warning')
 
         if _parent:
             m.ShowModal()
diff --git a/pyhoca/wxgui/messages.py b/pyhoca/wxgui/messages.py
index ffb9577..1829688 100644
--- a/pyhoca/wxgui/messages.py
+++ b/pyhoca/wxgui/messages.py
@@ -39,7 +39,7 @@ class PyHoca_MessageWindow(wx.Dialog):
     A simple message window for L{PyHocaGUI}.
 
     """
-    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, custom_message=None, icon=None, buttontype='ok', 
+    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, msg=None, icon=None, buttontype='ok', 
                  profile_name=None,
                  session_name=None):
         """\
@@ -53,8 +53,8 @@ class PyHoca_MessageWindow(wx.Dialog):
         @type title: C{str}
         @param shortmsg: a short string that refers to a pre-defined message (hard-coded in this class)
         @type shortmsg: C{str}
-        @param custom_message: the message to be shown in this message box (alternative to C{shortmsg})
-        @type custom_message: C{str}
+        @param msg: the message to be shown in this message box (alternative to C{shortmsg})
+        @type msg: C{str}
         @param icon: icon name for an icon to be shown left of the text in this message box
         @type icon: C{str}
         @param buttontype: button types can be: C{ok}, C{okcancel}, C{cancelok}, C{yesno}, and C{noyes}
@@ -77,7 +77,7 @@ class PyHoca_MessageWindow(wx.Dialog):
 
 
         if shortmsg is None:
-            show_message = custom_message
+            show_message = msg
         elif shortmsg in self._pyhoca_messages.keys():
             show_message = self._pyhoca_messages[shortmsg]
         else:
@@ -237,7 +237,7 @@ class PyHoca_MessageWindow_Ok(PyHoca_MessageWindow):
     A simple ,,Ok'' message window for L{PyHocaGUI}.
 
     """
-    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, custom_message=None, icon='session_warning', **kwargs):
+    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, msg=None, icon='session_warning', **kwargs):
         """\
         @param _PyHocaGUI: main application instance
         @type _PyHocaGUI: C{obj}
@@ -247,15 +247,15 @@ class PyHoca_MessageWindow_Ok(PyHoca_MessageWindow):
         @type title: C{str}
         @param shortmsg: a short string that refers to a pre-defined message (hard-coded in this class)
         @type shortmsg: C{str}
-        @param custom_message: the message to be shown in this message box (alternative to C{shortmsg})
-        @type custom_message: C{str}
+        @param msg: the message to be shown in this message box (alternative to C{shortmsg})
+        @type msg: C{str}
         @param icon: icon name for an icon to be shown left of the text in this message box
         @type icon: C{str}
         @param kwargs: any other optional argument (will be ignored)
         @type kwargs: C{dict}
 
         """
-        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, custom_message=custom_message, icon=icon, buttontype='ok', **kwargs)
+        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, msg=msg, icon=icon, buttontype='ok', **kwargs)
 
 
 class PyHoca_MessageWindow_OkCancel(PyHoca_MessageWindow):
@@ -263,7 +263,7 @@ class PyHoca_MessageWindow_OkCancel(PyHoca_MessageWindow):
     A simple ,,Ok+Cancel'' (default: Ok) message window for L{PyHocaGUI}.
 
     """
-    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, custom_message=None, icon='session_warning', **kwargs):
+    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, msg=None, icon='session_warning', **kwargs):
         """\
         @param _PyHocaGUI: main application instance
         @type _PyHocaGUI: C{obj}
@@ -273,15 +273,15 @@ class PyHoca_MessageWindow_OkCancel(PyHoca_MessageWindow):
         @type title: C{str}
         @param shortmsg: a short string that refers to a pre-defined message (hard-coded in this class)
         @type shortmsg: C{str}
-        @param custom_message: the message to be shown in this message box (alternative to C{shortmsg})
-        @type custom_message: C{str}
+        @param msg: the message to be shown in this message box (alternative to C{shortmsg})
+        @type msg: C{str}
         @param icon: icon name for an icon to be shown left of the text in this message box
         @type icon: C{str}
         @param kwargs: any other optional argument (will be ignored)
         @type kwargs: C{dict}
 
         """
-        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, custom_message=custom_message,  icon=icon, buttontype='okcancel', **kwargs)
+        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, msg=msg,  icon=icon, buttontype='okcancel', **kwargs)
 
 
 class PyHoca_MessageWindow_CancelOk(PyHoca_MessageWindow):
@@ -289,7 +289,7 @@ class PyHoca_MessageWindow_CancelOk(PyHoca_MessageWindow):
     A simple ,,Ok+Cancel'' (default: Cancel) message window for L{PyHocaGUI}.
 
     """
-    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, custom_message=None, icon='session_warning', **kwargs):
+    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, msg=None, icon='session_warning', **kwargs):
         """\
         @param _PyHocaGUI: main application instance
         @type _PyHocaGUI: C{obj}
@@ -299,15 +299,15 @@ class PyHoca_MessageWindow_CancelOk(PyHoca_MessageWindow):
         @type title: C{str}
         @param shortmsg: a short string that refers to a pre-defined message (hard-coded in this class)
         @type shortmsg: C{str}
-        @param custom_message: the message to be shown in this message box (alternative to C{shortmsg})
-        @type custom_message: C{str}
+        @param msg: the message to be shown in this message box (alternative to C{shortmsg})
+        @type msg: C{str}
         @param icon: icon name for an icon to be shown left of the text in this message box
         @type icon: C{str}
         @param kwargs: any other optional argument (will be ignored)
         @type kwargs: C{dict}
 
         """
-        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, custom_message=custom_message, icon=icon, buttontype='cancelok', **kwargs)
+        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, msg=msg, icon=icon, buttontype='cancelok', **kwargs)
 
 
 class PyHoca_MessageWindow_YesNo(PyHoca_MessageWindow):
@@ -315,7 +315,7 @@ class PyHoca_MessageWindow_YesNo(PyHoca_MessageWindow):
     A simple ,,Yes+No'' (default: Yes) message window for L{PyHocaGUI}.
 
     """
-    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, custom_message=None, icon='session_warning', **kwargs):
+    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, msg=None, icon='session_warning', **kwargs):
         """\
         @param _PyHocaGUI: main application instance
         @type _PyHocaGUI: C{obj}
@@ -325,22 +325,22 @@ class PyHoca_MessageWindow_YesNo(PyHoca_MessageWindow):
         @type title: C{str}
         @param shortmsg: a short string that refers to a pre-defined message (hard-coded in this class)
         @type shortmsg: C{str}
-        @param custom_message: the message to be shown in this message box (alternative to C{shortmsg})
-        @type custom_message: C{str}
+        @param msg: the message to be shown in this message box (alternative to C{shortmsg})
+        @type msg: C{str}
         @param icon: icon name for an icon to be shown left of the text in this message box
         @type icon: C{str}
         @param kwargs: any other optional argument (will be ignored)
         @type kwargs: C{dict}
 
         """
-        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, custom_message=custom_message, icon=icon, buttontype='yesno', **kwargs)
+        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, msg=msg, icon=icon, buttontype='yesno', **kwargs)
 
 class PyHoca_MessageWindow_NoYes(PyHoca_MessageWindow):
     """\
     A simple ,,Yes+No'' (default: No) message window for L{PyHocaGUI}.
 
     """
-    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, custom_message=None, icon='session_warning', **kwargs):
+    def __init__(self, _PyHocaGUI, parent=None, title=None, shortmsg=None, msg=None, icon='session_warning', **kwargs):
         """\
         @param _PyHocaGUI: main application instance
         @type _PyHocaGUI: C{obj}
@@ -350,13 +350,13 @@ class PyHoca_MessageWindow_NoYes(PyHoca_MessageWindow):
         @type title: C{str}
         @param shortmsg: a short string that refers to a pre-defined message (hard-coded in this class)
         @type shortmsg: C{str}
-        @param custom_message: the message to be shown in this message box (alternative to C{shortmsg})
-        @type custom_message: C{str}
+        @param msg: the message to be shown in this message box (alternative to C{shortmsg})
+        @type msg: C{str}
         @param icon: icon name for an icon to be shown left of the text in this message box
         @type icon: C{str}
         @param kwargs: any other optional argument (will be ignored)
         @type kwargs: C{dict}
 
         """
-        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, custom_message=custom_message, icon=icon, buttontype='noyes', **kwargs)
+        PyHoca_MessageWindow.__init__(self, _PyHocaGUI, parent=parent, title=title, shortmsg=shortmsg, msg=msg, icon=icon, buttontype='noyes', **kwargs)
 


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