[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.10-272-g81cd8e0

X2Go dev team git-admin at x2go.org
Tue Aug 27 13:22:26 CEST 2013


The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
       via  81cd8e0962a066eeab9945148e853cfcefe407d2 (commit)
      from  3f5d4fb0c89186b000bce06e538a0a97f4baba6e (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:
 build/mo/bg/LC_MESSAGES/PyHoca-GUI.mo    |  Bin 541 -> 541 bytes
 build/mo/de/LC_MESSAGES/PyHoca-GUI.mo    |  Bin 23789 -> 23789 bytes
 build/mo/en/LC_MESSAGES/PyHoca-GUI.mo    |  Bin 22238 -> 22238 bytes
 build/mo/es/LC_MESSAGES/PyHoca-GUI.mo    |  Bin 23773 -> 23773 bytes
 build/mo/nb_NO/LC_MESSAGES/PyHoca-GUI.mo |  Bin 18139 -> 22740 bytes
 build/mo/nl/LC_MESSAGES/PyHoca-GUI.mo    |  Bin 21826 -> 21826 bytes
 build/mo/sv/LC_MESSAGES/PyHoca-GUI.mo    |  Bin 22180 -> 22180 bytes
 pyhoca/wxgui/about.py                    |   24 +++++-
 pyhoca/wxgui/logon.py                    |   30 ++++++-
 pyhoca/wxgui/menus_taskbar.py            |  126 ++++++++++++++++++++++++++----
 pyhoca/wxgui/messages.py                 |   31 +++++++-
 pyhoca/wxgui/notify.py                   |  107 +++++++++++++++++++++++++
 pyhoca/wxgui/printingprefs.py            |   31 +++++++-
 pyhoca/wxgui/sessiontitle.py             |   27 ++++++-
 pyhoca/wxgui/splash.py                   |   15 +++-
 pyhoca/wxgui/taskbar.py                  |   63 ++++++++++++---
 16 files changed, 414 insertions(+), 40 deletions(-)

The diff of changes is:
diff --git a/build/mo/bg/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/bg/LC_MESSAGES/PyHoca-GUI.mo
index 8a6e609..ddb8635 100644
Binary files a/build/mo/bg/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/bg/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/build/mo/de/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/de/LC_MESSAGES/PyHoca-GUI.mo
index 2cc0168..bdc33b7 100644
Binary files a/build/mo/de/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/de/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/build/mo/en/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/en/LC_MESSAGES/PyHoca-GUI.mo
index 04515a6..4be2182 100644
Binary files a/build/mo/en/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/en/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/build/mo/es/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/es/LC_MESSAGES/PyHoca-GUI.mo
index 4d5771f..3b12420 100644
Binary files a/build/mo/es/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/es/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/build/mo/nb_NO/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/nb_NO/LC_MESSAGES/PyHoca-GUI.mo
index bb2ec47..fb3d9c5 100644
Binary files a/build/mo/nb_NO/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/nb_NO/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/build/mo/nl/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/nl/LC_MESSAGES/PyHoca-GUI.mo
index e8e70ef..bb46034 100644
Binary files a/build/mo/nl/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/nl/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/build/mo/sv/LC_MESSAGES/PyHoca-GUI.mo b/build/mo/sv/LC_MESSAGES/PyHoca-GUI.mo
index 305f3e2..6940424 100644
Binary files a/build/mo/sv/LC_MESSAGES/PyHoca-GUI.mo and b/build/mo/sv/LC_MESSAGES/PyHoca-GUI.mo differ
diff --git a/pyhoca/wxgui/about.py b/pyhoca/wxgui/about.py
index 436d5b6..07ea039 100644
--- a/pyhoca/wxgui/about.py
+++ b/pyhoca/wxgui/about.py
@@ -43,11 +43,23 @@ import basepath
 
 class PyHocaGUI_AboutFrame(wx.Frame):
     """\
-    STILL UNDOCUMENTED
+    wxWidget displaying an ,,About'' window for this application.
 
     """
     def __init__(self, _PyHocaGUI, caller=None, about_image=None, icon_name='pyhoca-winicon.png'):
-
+        """\
+        About window (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param about_image: full image path for background image of About window
+        @type about_image: C{str}
+        @param icon_name: icon name for window icon
+        @type icon_name: C{str}
+
+        """
         self._PyHocaGUI = _PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
 
@@ -97,9 +109,17 @@ class PyHocaGUI_AboutFrame(wx.Frame):
         self.CenterOnScreen()
 
     def OnHide(self, evt):
+        """\
+        Hide the About window (never close it as it is the main window of the application.
+
+        """
         self.Show(False)
 
     def OnKeyDown(self, evt):
+        """\
+        Handle keyboard requests, so that pressing ESC can hide the About window.
+
+        """
         keycode = evt.GetKeyCode()
         if keycode == wx.WXK_ESCAPE:
             self.Show(False)
diff --git a/pyhoca/wxgui/logon.py b/pyhoca/wxgui/logon.py
index 8a0861d..764f1b7 100644
--- a/pyhoca/wxgui/logon.py
+++ b/pyhoca/wxgui/logon.py
@@ -57,11 +57,23 @@ else:
 
 class PyHocaGUI_DialogBoxPassword(wx.Dialog):
     """\
-    STILL UNDOCUMENTED
+    Logon window for L{PyHocaGUI}.
 
     """
     def __init__(self, _PyHocaGUI, profile_name, caller=None, sshproxy_auth=False): 
+        """\
+        Logon window (constructor)
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param profile_name: name of session profile that defines the server we authenticate against
+        @type profile_name: C{str}
+        @param caller: unused
+        @type caller: C{None}
+        @param sshproxy_auth: use (dual) SSH proxy authentication
+        @type sshproxy_auth: C{bool}
 
+        """
         self._PyHocaGUI = _PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
         self._pyhoca_logger('password dialog box started', loglevel=x2go.loglevel_INFO, )
@@ -225,7 +237,10 @@ class PyHocaGUI_DialogBoxPassword(wx.Dialog):
 
     def OnLogin(self, evt):
         """\
-        STILL UNDOCUMENTED
+        If the user clicks ,,Ok'' in the logon window.
+
+        @param evt: event
+        @type evt: C{obj}
 
         """
         username = self.userTxt.GetValue()
@@ -420,10 +435,21 @@ class PyHocaGUI_DialogBoxPassword(wx.Dialog):
         self.Destroy()
 
     def OnCancel(self, evt):
+        """
+        If the user clicks ,,Cancel'' in the logon window.
+
+        @param evt: event
+        @type evt: C{obj}
+
+        """
         self.Close()
         self.Destroy()
 
     def Destroy(self):
+        """
+        Tidy up some stuff in the main application instance when the logon window gets destroyed.
+
+        """
         try:
             self._PyHocaGUI._sub_windows.remove(self)
         except ValueError:
diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py
index baf5fb7..304e807 100644
--- a/pyhoca/wxgui/menus_taskbar.py
+++ b/pyhoca/wxgui/menus_taskbar.py
@@ -43,12 +43,19 @@ _icons_location = basepath.icons_basepath
 
 class PyHocaGUI_Menu_TaskbarManageProfile(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Individual profile management submenu: copy, use as template or delete session profile.
 
     """
     def __init__(self, _PyHocaGUI, caller=None, profile_name=None):
         """\
-        STILL UNDOCUMENTED
+        Individual profile management submenu (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param profile_name: session profile name this submenu is for
+        @type profile_name: C{str}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -78,12 +85,17 @@ class PyHocaGUI_Menu_TaskbarManageProfile(wx.Menu):
 
 class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Right-click menu of the L{PyHocaGUI} systray icon.
 
     """
     def __init__(self, _PyHocaGUI, caller=None):
         """\
-        STILL UNDOCUMENTED
+        Client and profile management menu of L{PyHocaGUI} (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -147,12 +159,25 @@ class PyHocaGUI_Menu_TaskbarOptionsManager(wx.Menu):
 
 class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Session action submenu for individual sessions: start, resume, suspend, terminate etc. sessions.
 
     """
     def __init__(self, _PyHocaGUI, caller=None, profile_name=None, session_name=None, session_info=None, status=None):
         """\
-        STILL UNDOCUMENTED
+        Session action submenu (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param profile_name: session profile name this submenu is for
+        @type profile_name: C{str}
+        @param session_name: X2Go session name this submenu is for
+        @type session_name: C{str}
+        @param session_info: session info object (C{X2goServerSessionInfo*} from Python X2Go)
+        @type session_info: C{obj}
+        @param status: status of this session (R for running, S for suspended)
+        @type status: C{str}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -266,12 +291,19 @@ class PyHocaGUI_Menu_TaskbarSessionActions(wx.Menu):
 
 class PyHocaGUI_Menu_TaskbarProfileSharedFolders(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Submenu that manages folder sharing per connected session profile.
 
     """
     def __init__(self, _PyHocaGUI, caller=None, profile_name=None):
         """\
-        STILL UNDOCUMENTED
+        Folder sharing submenu (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param profile_name: session profile name this submenu is for
+        @type profile_name: C{str}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -337,11 +369,22 @@ class PyHocaGUI_Menu_TaskbarProfileSharedFolders(wx.Menu):
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnShareCustomLocalFolder, id=ID_SHARECUSTOMLOCALFOLDER)
         self._PyHocaGUI.Bind(wx.EVT_MENU, self._PyHocaGUI.OnUnshareAllLocalFolders, id=ID_UNSHAREALLLOCALFOLDERS)
 
+
 class PyHocaGUI_Menu_LaunchSingleApplication(wx.Menu):
+    """\
+    Submenu that triggers single application launches.
 
+    """
     def __init__(self, _PyHocaGUI, caller=None, profile_name=None):
         """\
-        STILL UNDOCUMENTED
+        Single application launching submenu (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param profile_name: session profile name this submenu is for
+        @type profile_name: C{str}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -369,7 +412,19 @@ class PyHocaGUI_Menu_LaunchSingleApplication(wx.Menu):
 
 def _generate_Menu_PublishedApplications(_PyHocaGUI, caller=None, profile_name=None, session_name=None):
     """\
-    STILL UNDOCUMENTED
+    Generate wxPython based menu tree for X2Go published applications.
+
+    @param _PyHocaGUI: main application instance
+    @type _PyHocaGUI: C{obj}
+    @param caller: unused
+    @type caller: C{None}
+    @param profile_name: session profile name this submenu is for
+    @type profile_name: C{str}
+    @param session_name: X2Go session name this submenu is for
+    @type session_name: C{str}
+
+    @return: dictionary based menu tree containing wx.Menu objects for menu rendering.
+    @rtype: C{dict}
 
     """
     _lang = _PyHocaGUI.lang
@@ -436,12 +491,19 @@ def _generate_Menu_PublishedApplications(_PyHocaGUI, caller=None, profile_name=N
 
 class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Submenu for a connected session profile.
 
     """
     def __init__(self, _PyHocaGUI, caller=None, profile_name=None):
         """\
-        STILL UNDOCUMENTED
+        Session profile submenu (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param profile_name: session profile name this submenu is for
+        @type profile_name: C{str}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -697,7 +759,7 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
                                                       submenu=PyHocaGUI_Menu_TaskbarProfileSharedFolders(self._PyHocaGUI, caller=self,
                                                       profile_name=profile_name)
                                                      )
-                    if not self._PyHocaGUI._X2goClient__client_associated_sessions_of_profile_name(profile_name=profile_name, return_objects=False) or _foldersharing_disabled:
+                    if not self._PyHocaGUI.get_master_session(profile_name=profile_name) or _foldersharing_disabled:
                         _shared_folders.Enable(False)
 
 
@@ -726,7 +788,10 @@ class PyHocaGUI_Menu_TaskbarSessionProfile(wx.Menu):
 
 class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Render a (recursive) menu subtree that contains a cascaded menu tree of all session profile names.
+
+    If session profile names contain '/' as a separator character then those session profile names
+    will be rendered in a tree-like fashion.
 
     """
     def __init__(self, _PyHocaGUI, caller=None, 
@@ -735,7 +800,29 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu):
                  submenu=None,
                  group_menus=True, group_name='', parent_group=''):
         """\
-        STILL UNDOCUMENTED
+        Session profile name (recursive) menu subtree
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
+        @param sub_profile_items: on recursion this argument contains those session profile names
+            that will be rendered for this session profile subtree
+        @type  sub_profile_items: C{list}
+        @param filter_profiles: allow filtering of profile names (hiding certain session profiles)
+        @type filter_profiles: C{list}
+        @param disabled_profiles: session profile names that get greyed out in the menu tree
+        @type disabled_profiles: C{list}
+        @param bind_method: if session profile names are menu items this argument names the Python method that menu items will bind to
+        @type bind_method: C{method}
+        @param submenu: if session profile names are submenus this argument names the wx.Menu class that handles the submenu rendering
+        @type submenu: C{class}
+        @param group_menus: group session profile names in submenus (i.e. switch on recursion mode)
+        @type group_menus: C{bool}
+        @param group_name: on recursion, this argument names the parent menu folder of the current submenu
+        @type group_name: C{str}
+        @param parent_group: on recursion, the parent group of C{group_name}
+        @type parent_group: C{str}
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -836,12 +923,17 @@ class PyHocaGUI_Menu_TaskbarProfileNames(wx.Menu):
 
 class PyHocaGUI_Menu_TaskbarSessionManager(wx.Menu):
     """\
-    STILL UNDOCUMENTED
+    Right-click menu of the L{PyHocaGUI} systray icon.
 
     """
     def __init__(self, _PyHocaGUI, caller=None):
         """\
-        STILL UNDOCUMENTED
+        Session management menu of L{PyHocaGUI} (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param caller: unused
+        @type caller: C{None}
 
         """
         self._PyHocaGUI = _PyHocaGUI
diff --git a/pyhoca/wxgui/messages.py b/pyhoca/wxgui/messages.py
index 59dc0cf..cc3e4a1 100644
--- a/pyhoca/wxgui/messages.py
+++ b/pyhoca/wxgui/messages.py
@@ -35,13 +35,36 @@ from x2go.defaults import CURRENT_LOCAL_USER as _CURRENT_LOCAL_USER
 _icons_location = basepath.icons_basepath
 
 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', 
                  profile_name=None,
-                 session_name=None,
-                 username=None,
-                 hostname=None, ):
-
+                 session_name=None):
+        """\
+        L{PyHocaGUI} message window.
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+        @param parent: the parent (calling) object
+        @type parent: C{obj}
+        @param title: window title
+        @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 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}
+        @type buttontype: C{str}
+        @param profile_name: session profile name of the profile this message box refers to
+        @type profile_name: C{str}
+        @param session_name: X2Go session name of the session this message box refers to
+        @type session_name: C{str}
+
+        """
         self._PyHocaGUI = _PyHocaGUI
 
         try: wx.EndBusyCursor()
diff --git a/pyhoca/wxgui/notify.py b/pyhoca/wxgui/notify.py
index c7eb0c1..df7e7ac 100644
--- a/pyhoca/wxgui/notify.py
+++ b/pyhoca/wxgui/notify.py
@@ -35,13 +35,23 @@ class NotSupportedException(exceptions.StandardError): pass
 class PyHocaNotificationException(exceptions.StandardError): pass
 
 class libnotify_NotifierPopup(object):
+    """\
+    L{PyHocaGUI} notification utilizing C{libnotify}, used on Linux/Unix OS.
 
+    """
     title = {}
     text = {}
     icon = {}
     timeout = {}
 
     def __init__(self, _PyHocaGUI):
+        """\
+        Notifier popup (constructor).
+
+        @param _PyHocaGUI: main application instance
+        @type _PyHocaGUI: C{obj}
+
+        """
         self._PyHocaGUI = _PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
 
@@ -49,6 +59,24 @@ class libnotify_NotifierPopup(object):
             raise NotSupportedException
 
     def prepare(self, context, title=None, text=None, icon=None, timeout=None):
+        """\
+        Prepare a notification that gets sent to C{libnotify} later (by the L{send()} method).
+
+        Use C{context} as a unique identifier. When sending the notification later, C{context}
+        will unequivocally map to the notification content that shall get sent.
+
+        @param context: a unique identifier for this notification preparation
+        @type context: C{str}
+        @param title: notification title
+        @type title: C{str}
+        @param text: notification text
+        @type text: C{str}
+        @param icon: icon name for an icon that appears with the notification
+        @type icon: C{str}
+        @param timeout: let notification disappear after C{<timeout>} milliseconds
+        @type timeout: C{int}
+
+        """
         if title is not None:
             self.title[context] = title
         if text is not None:
@@ -59,6 +87,23 @@ class libnotify_NotifierPopup(object):
             self.timeout[context] = timeout
 
     def send(self, title=None, text=None, context=None, icon=None, timeout=8000):
+        """\
+        Send notifications directly (or use a prepared notification).
+
+        @param title: notification title
+        @type title: C{str}
+        @param text: notification text
+        @type text: C{str}
+        @param context: an identifier that refers to a prepared notification
+        @type context: C{str}
+        @param icon: icon name for an icon that appears with the notification
+        @type icon: C{str}
+        @param timeout: let notification disappear after C{<timeout>} milliseconds
+        @type timeout: C{int}
+
+        @raise PyHocaNotificationException: if notification failed
+
+        """
         if context is not None:
             try:
                 title = self.title[context]
@@ -93,24 +138,62 @@ class libnotify_NotifierPopup(object):
                 raise PyHocaNotificationException('could not notify user')
 
     def Close(self):
+        """\
+        Provide a C{Close()} method which does nothing.
+
+        """
         pass
 
     def Destroy(self):
+        """\
+        Provide a C{Destroy()} method which does nothing.
+
+        """
         pass
 
 
 class notificationmessage_NotifierPopup(object):
+    """\
+    L{PyHocaGUI} notification utilizing C{wx.NotificationMessage()}, used on Windows OS.
+
+    Note: C{wx.NotificationMessage()} has only been added to wxPython in version 2.9.x.
 
+    """
     title = {}
     text = {}
     icon = {}
     timeout = {}
 
     def __init__(self, _about):
+        """\
+        Notifier popup (constructor).
+
+        @param _about: main application window
+        @type _about: C{obj}
+
+        """
         self._PyHocaGUI = _about._PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
 
     def prepare(self, context, title=None, text=None, icon=None, timeout=None):
+        """\
+        Prepare a notification that gets sent to C{libnotify} later (by the L{send()} method).
+
+        Use C{context} as a unique identifier. When sending the notification later, C{context}
+        will unequivocally map to the notification content that shall get sent.
+
+        @param context: a unique identifier for this notification preparation
+        @type context: C{str}
+        @param title: notification title
+        @type title: C{str}
+        @param text: notification text
+        @type text: C{str}
+        @param icon: icon name for an icon that appears with the notification
+        @type icon: C{str}
+        @param timeout: let notification disappear after C{<timeout>} milliseconds
+        @type timeout: C{int}
+
+        """
         if title is not None:
             self.title[context] = title
         if text is not None:
@@ -121,6 +204,22 @@ class notificationmessage_NotifierPopup(object):
             self.timeout[context] = timeout
 
     def send(self, title=None, text=None, context=None, icon=None, timeout=8000):
+        """\
+        Send notifications directly (or use a prepared notification).
+
+        @param title: notification title
+        @type title: C{str}
+        @param text: notification text
+        @type text: C{str}
+        @param context: an identifier that refers to a prepared notification
+        @type context: C{str}
+        @param icon: icon name for an icon that appears with the notification
+        @type icon: C{str}
+        @param timeout: let notification disappear after C{<timeout>} milliseconds
+        @type timeout: C{int}
+
+        """
+        if context is not None:
         if context is not None:
             try:
                 title = self.title[context]
@@ -195,7 +294,15 @@ class notificationmessage_NotifierPopup(object):
         except UnicodeDecodeError: self._pyhoca_logger('Unicode error occurred while rendering a log message...', loglevel=log.loglevel_WARN)
 
     def Close(self):
+        """\
+        Provide a C{Close()} method which does nothing.
+
+        """
         pass
 
     def Destroy(self):
+        """\
+        Provide a C{Destroy()} method which does nothing.
+
+        """
         pass
diff --git a/pyhoca/wxgui/printingprefs.py b/pyhoca/wxgui/printingprefs.py
index 68e9c98..3bfc35a 100644
--- a/pyhoca/wxgui/printingprefs.py
+++ b/pyhoca/wxgui/printingprefs.py
@@ -39,12 +39,21 @@ _icons_location = basepath.icons_basepath
 
 class PyHocaGUI_PrintingPreferences(wx.Dialog):
     """\
-    STILL UNDOCUMENTED
+    The print preferences dialog box allowing the configuration and re-configuration
+    of the processing of incoming / client-side print jobs.
 
     """
     def __init__(self, _PyHocaGUI, profile_name=None, session_name=None, mode='edit'):
         """\
-        STILL UNDOCUMENTED
+        Printing preferences dialog box (constructor).
+
+        @param _PyHocaGUI: the master/parent object of the application
+        @type _PyHocaGUI: C{obj}
+        @param profile_name: session profile name
+        @type profile_name: C{str}
+        @param session_name: the X2Go session name of the Window that we intend to modify the name of
+        @type session_name C{str}
+        @param sesion_name: is this instance launched on an incoming pring job? Or are wie in editor mode.
 
         """
         self._PyHocaGUI = _PyHocaGUI
@@ -153,7 +162,10 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
 
 
     def __set_properties(self):
+        """\
+        Set field properties (before layouting).
 
+        """
         _textfield_height = self.PdfViewCmdBrowseButton.GetBestSize().GetHeight()-2
         self.PrintActionLabel.SetMinSize((-1, 16))
         self.PrintAction.SetMinSize((-1, _textfield_height+4))
@@ -165,7 +177,10 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
         self.CancelButton.SetMinSize((-1, 30))
 
     def __do_layout(self):
+        """\
+        Arrange the frame's widget  layout.
 
+        """
         sizer_1 = wx.BoxSizer(wx.VERTICAL)
         sizer_1_1 = wx.GridBagSizer(hgap=2, vgap=5)
         sizer_1_1.Add(self.PrintActionLabel, pos=(0,0), flag=wx.ALIGN_CENTER_VERTICAL|wx.RIGHT|wx.BOTTOM, border=7, )
@@ -213,7 +228,10 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
         self.Show(True)
 
     def __update_fields(self):
+        """\
+        Update field from running application.
 
+        """
         print_action_name = self.client_printing.get_print_action(reload=True, reinit=True, return_name=True)
 
         self.PdfViewCmd.SetValue(self.client_printing.get_property('pdfview_cmd'))
@@ -275,9 +293,17 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
         }
 
     def get_print_action(self):
+        """\
+        Retrieve the current print action.
+
+        """
         return self.client_printing.get_print_action(reinit=True)
 
     def get_print_action_properties(self):
+        """\
+        Retrieve action properties from all users.
+
+        """
         return self._print_action_properties
 
     def _onPrintActionChange(self):
@@ -371,7 +397,6 @@ class PyHocaGUI_PrintingPreferences(wx.Dialog):
             self.PdfSaveToFolder.SetValue(_save_to_folder)
 
     def __validate(self):
-
         validateOk = True
         return validateOk
 
diff --git a/pyhoca/wxgui/sessiontitle.py b/pyhoca/wxgui/sessiontitle.py
index 9d45d2e..d0156f7 100644
--- a/pyhoca/wxgui/sessiontitle.py
+++ b/pyhoca/wxgui/sessiontitle.py
@@ -51,11 +51,21 @@ else:
 
 class PyHocaGUI_DialogBoxSessionTitle(wx.Dialog):
     """\
-    STILL UNDOCUMENTED
+    Simple dialog box for selecting a session title string.
 
     """
     def __init__(self, _PyHocaGUI, profile_name, session_name): 
+        """\
+        Session title renaming dialog box (constructor).
+
+        @param _PyHocaGUI: the master/parent object of the application
+        @type _PyHocaGUI: C{obj}
+        @param profile_name: session profile name
+        @type profile_name: C{str}
+        @param session_name: the X2Go session name of the Window that we intend to modify the name of
+        @type session_name C{str}
 
+        """
         self._PyHocaGUI = _PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
         self._pyhoca_logger('session title query box started', loglevel=x2go.loglevel_INFO, )
@@ -126,7 +136,10 @@ class PyHocaGUI_DialogBoxSessionTitle(wx.Dialog):
 
     def OnOk(self, evt):
         """\
-        STILL UNDOCUMENTED
+        Continue here, if the user clicks the Ok button in the dialog box.
+
+        @param evt: event
+        @type evt: C{obj}
 
         """
         title = self.titleTxt.GetValue()
@@ -138,11 +151,21 @@ class PyHocaGUI_DialogBoxSessionTitle(wx.Dialog):
         self.Destroy()
 
     def OnCancel(self, evt):
+        """\
+        Continue here, if the user clicks the Cancel button in the dialog box.
 
+        @param evt: event
+        @type evt: C{obj}
+
+        """
         self.Close()
         self.Destroy()
 
     def Destroy(self):
+        """\
+        Do some PyHocaGUI specific cleanup if this window gets destroyed.
+
+        """
         try:
             self._PyHocaGUI._sub_windows.remove(self)
         except ValueError:
diff --git a/pyhoca/wxgui/splash.py b/pyhoca/wxgui/splash.py
index 86b659b..c7809d5 100644
--- a/pyhoca/wxgui/splash.py
+++ b/pyhoca/wxgui/splash.py
@@ -35,8 +35,18 @@ import os
 import basepath
 
 class PyHocaGUI_SplashScreen(wx.SplashScreen):
+    """\
+    L{PyHocaGUI} splash screen that gets shown an application startup.
+
+    """
     def __init__(self, splash_image=None):
+        """
+        Splash screen (constructor).
+
+        @param splash_image: file name of a splash image file (currently, only PNGs are supported)
+        @type splash_image: C{str}
 
+        """
         if splash_image and os.path.basename(splash_image) == splash_image:
             splash_image = os.path.join(basepath.images_basepath, splash_image)
 
@@ -61,8 +71,11 @@ class PyHocaGUI_SplashScreen(wx.SplashScreen):
             self.Bind(wx.EVT_CLOSE, self.OnClose)
 
     def OnClose(self, evt):
+        """\
+        Hide the splash screen.
+
+        """
         # Make sure the default handler runs too so this window gets
         # destroyed
         evt.Skip()
         self.Hide()
-
diff --git a/pyhoca/wxgui/taskbar.py b/pyhoca/wxgui/taskbar.py
index b1ca28c..7fbdd3b 100644
--- a/pyhoca/wxgui/taskbar.py
+++ b/pyhoca/wxgui/taskbar.py
@@ -56,16 +56,21 @@ _icons_location = basepath.icons_basepath
 
 class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
     """\
-    STILL UNDOCUMENTED
+    Class for the L{PyHocaGUI} taskbar icon.
 
     """
-    def __init__(self, _about):
+    def __init__(self, about):
         """\
-        STILL UNDOCUMENTED
+        Initialize the systray icon. The main application window is
+        the about window, so this one has to be passed in as mandatory
+        argument.
+
+        @param about: instance of the About wx.Frame
+        @type about: C{obj}
 
         """
         wx.TaskBarIcon.__init__(self)
-        self._PyHocaGUI = _about._PyHocaGUI
+        self._PyHocaGUI = about._PyHocaGUI
         self._pyhoca_logger = self._PyHocaGUI._pyhoca_logger
         self._pyhoca_logger('start TaskBarIcon of type: %s' % (wx.PlatformInfo, ), loglevel=x2go.loglevel_INFO)
         self.SetIconIdle()
@@ -73,6 +78,14 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
         self.tooltip = ""
 
     def SetIconConnecting(self, profile_name):
+        """\
+        When connecting show the default icon and some informational text on mouse hover events
+        that gives some information what remote X2Go server the client is connecting to.
+
+        @param profile_name: the name of the session profile the application currently is connecting to
+        @type profile_name: C{str}
+
+        """
         if x2go.X2GOCLIENT_OS == 'Windows':
             icon_name = self._PyHocaGUI.tray_icon_connecting or self._PyHocaGUI.tray_icon
             self.icon = self.MakeIcon(icon_name=icon_name, fallback_name='x2go-logo-ubuntu')
@@ -83,6 +96,10 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
             self.SetIcon(self.icon, _(u"PyHoca-GUI (Python X2goClient)\nCurrently connecting you to remote X2Go server ,,%s\'\'") % profile_name)
 
     def SetIconIdle(self):
+        """\
+        When idle show the default icon and some default informational text on mouse hover events.
+
+        """
         if x2go.X2GOCLIENT_OS == 'Windows':
             icon_name = self._PyHocaGUI.tray_icon
             self.icon = self.MakeIcon(icon_name=icon_name, fallback_name='x2go-logo-ubuntu')
@@ -94,7 +111,14 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
 
     def CreateSessionManagerPopupMenu(self, evt):
         """\
-        STILL UNDOCUMENTED
+        This method is called by the L{PyHocaGUI} base class when it needs to popup
+        the menu for the default EVT_LEFT_DOWN event.
+
+        @param evt: event
+        @type evt: C{obj}
+
+        @return: a wx-based popup menu object (containing the session and connection manager)
+        @rtype: C{obj}
 
         """
         if self._PyHocaGUI.args.single_session_profile:
@@ -105,14 +129,25 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
 
     def CreatePopupMenu(self):
         """\
-        This method is called by the base class when it needs to popup
-        the menu for the default EVT_RIGHT_DOWN event.  Just create
-        the menu how you want it and return it from this function,
-        the base class takes care of the rest.
+        This method is called by the L{PyHocaGUI} base class when it needs to popup
+        the menu for the default EVT_RIGHT_DOWN event.
+
+        This method wraps around L{CreateProfileManagerPopupMenu()}.
+
+        @return: a wx-based popup menu object (containing the session profile manager, amongst others)
+        @rtype: C{obj}
+
         """
         return self.CreateProfileManagerPopupMenu()
 
     def CreateProfileManagerPopupMenu(self):
+        """\
+        Create the profile manager / client mangager popup menu (i.e. on right-click of the mouse).
+
+        @return: a wx-based popup menu object (containing the session profile manager, amongst others)
+        @rtype: C{obj}
+
+        """
         self.menu_optionsmanager = self.PopupMenu(menus_taskbar.PyHocaGUI_Menu_TaskbarOptionsManager(self._PyHocaGUI, caller=self,))
         return self.menu_optionsmanager
 
@@ -120,6 +155,12 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
         """\
         The various platforms have different requirements for the
         icon size...
+
+        @param icon_name: rel. file name of the icon image
+        @type icon_name: C{str}
+        @param fallback_name: a fallback icon file name in case C{icon_name} cannot be found
+        @type fallback_name: C{str}
+
         """
         if "wxMSW" in wx.PlatformInfo:
             icon_size = '16x16'
@@ -140,5 +181,9 @@ class PyHocaGUI_TaskBarIcon(wx.TaskBarIcon):
         return icon
 
     def Close(self):
+        """\
+        Remove the applet icon from the system tray.
+
+        """
         self.RemoveIcon()
 


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