The branch, master has been updated via 007e4b3f47c194baadce0977a8ee3a23e8e13d17 (commit) from 0b67b192a1e1c653773e98b306da3eee62bea4c8 (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 007e4b3f47c194baadce0977a8ee3a23e8e13d17 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Mar 12 13:13:13 2012 +0100 Add icon support for the published applications menu (any icon type except SVGs works). ----------------------------------------------------------------------- Summary of changes: debian/changelog | 2 ++ icons/PyHoca/22x22/x2go-logo-grey.png | Bin 0 -> 794 bytes pyhoca/wxgui/menus_taskbar.py | 18 +++++++++++++++++- 3 files changed, 19 insertions(+), 1 deletions(-) create mode 100644 icons/PyHoca/22x22/x2go-logo-grey.png The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 312fbe6..b71f90b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -54,6 +54,8 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low - Add published appications support. - Send a libnotify warning if server does not support published applications. + - Add icon support for the published applications menu (any icon + type except SVGs works). * Depend on Python X2Go 0.1.2.0. * Install GNOME icons via dh_links. * Install X2Go icons with explicit install paths. diff --git a/icons/PyHoca/22x22/x2go-logo-grey.png b/icons/PyHoca/22x22/x2go-logo-grey.png new file mode 100644 index 0000000..2c568b9 Binary files /dev/null and b/icons/PyHoca/22x22/x2go-logo-grey.png differ diff --git a/pyhoca/wxgui/menus_taskbar.py b/pyhoca/wxgui/menus_taskbar.py index 52e838f..b0aebea 100644 --- a/pyhoca/wxgui/menus_taskbar.py +++ b/pyhoca/wxgui/menus_taskbar.py @@ -31,9 +31,14 @@ except: pass import wx import re import copy +import StringIO +import base64 import x2go.defaults +import basepath +_icons_location = basepath.icons_basepath + class PyHocaGUI_Menu_TaskbarManageProfile(wx.Menu): """\ STILL UNDOCUMENTED @@ -414,7 +419,18 @@ def _generate_Menu_PublishedApplications(_PyHocaGUI, caller=None, profile_name=N _PyHocaGUI._eventid_profilenames_map[_pubapp_id] = profile_name _PyHocaGUI._eventid_sessionnames_map[_pubapp_id] = session_name _PyHocaGUI._eventid_pubapp_execmap[profile_name][_pubapp_id] = _menu_entry_exec - _category_map[_menu_entry_cat].Append(id=_pubapp_id, text=_menu_entry_name, help=_menu_entry_comment) + + _menu_item = wx.MenuItem(_category_map[_menu_entry_cat], id=_pubapp_id, text=_menu_entry_name, help=_menu_entry_comment) + if not _menu_entry_icon: + _menu_item.SetBitmap(wx.Bitmap('%s/PyHoca/22x22/x2go-logo-grey.png' % _icons_location)) + else: + _menu_entry_icon_decoded = base64.b64decode(_menu_entry_icon) + if not re.match('^<\?(xml|XML).*version=.*encoding=.*standalone=.*\?>.*', _menu_entry_icon_decoded.split('\n')[0]): + _icon_image = wx.ImageFromStream(StringIO.StringIO(_menu_entry_icon_decoded)) + _icon_bitmap = wx.BitmapFromImage(_icon_image.Scale(22,22)) + _menu_item.SetBitmap(_icon_bitmap) + _category_map[_menu_entry_cat].AppendItem(_menu_item) + _PyHocaGUI.Bind(wx.EVT_MENU, _PyHocaGUI.OnPubAppExecution, id=_pubapp_id) for _menu in _empty_menus: 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)).