[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 0.1.0.10-237-g9264eee
X2Go dev team
git-admin at x2go.org
Tue Aug 27 13:22:22 CEST 2013
The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
via 9264eee6b541eea834b8f46aa975d465cc350f47 (commit)
from e3d22dd947f9424598314f589c03ad4284fe3a6d (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 | 2 ++
pyhoca-gui | 1 +
pyhoca/wxgui/frontend.py | 2 +-
pyhoca/wxgui/splash.py | 16 +++++++++++++---
4 files changed, 17 insertions(+), 4 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index f737d38..1c7abfb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -126,6 +126,8 @@ pyhoca-gui (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
- Python gevent will drop gevent.dns in v1.0. Not using it anymore.
- Add options --tray-icon and --tray-icon-connecting to customize the
system tray icon (e.g. for branding).
+ - Add option --splash-image that allows to name a custom splash image
+ that gets shown during application startup.
* 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 ae66833..f3c6b31 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -213,6 +213,7 @@ x2go_gui_options = [
{'args':['--resume-all-on-connect'], 'default': False, 'action': 'store_true', 'help': 'auto-resume all suspended sessions on connect', },
{'args':['--disconnect-on-suspend'], 'default': False, 'action': 'store_true', 'help': 'disconnect a server if a session has been suspended', },
{'args':['--disconnect-on-terminate'], 'default': False, 'action': 'store_true', 'help': 'disconnect a server if a session has been terminated', },
+ {'args':['--splash-image'], 'default': None, 'metavar': '<your-splash-image>', 'help': 'define an alternative splash image that gets shown on application startup (PNG files only, full path or filename as found in <share>/img)', },
{'args':['--disable-splash'], 'default': False, 'action': 'store_true', 'help': 'disable the applications splash screen', },
{'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', },
diff --git a/pyhoca/wxgui/frontend.py b/pyhoca/wxgui/frontend.py
index 972c03f..43518e2 100644
--- a/pyhoca/wxgui/frontend.py
+++ b/pyhoca/wxgui/frontend.py
@@ -181,7 +181,7 @@ class PyHocaGUI(wx.App, x2go.X2goClient):
#SetExitHandler(self._exit_handler)
if not self.args.disable_splash:
- splash.PyHocaGUI_SplashScreen()
+ splash.PyHocaGUI_SplashScreen(splash_image=self.args.splash_image)
self.Bind(wx.EVT_IDLE, self.OnIdle)
diff --git a/pyhoca/wxgui/splash.py b/pyhoca/wxgui/splash.py
index e18547c..dda5aaa 100644
--- a/pyhoca/wxgui/splash.py
+++ b/pyhoca/wxgui/splash.py
@@ -35,10 +35,20 @@ import os
import basepath
class PyHocaGUI_SplashScreen(wx.SplashScreen):
- def __init__(self):
- splash_bitmap = wx.Bitmap(os.path.join(basepath.images_basepath, 'pyhoca-splash.png'), wx.BITMAP_TYPE_PNG)
+ def __init__(self, splash_image=None):
+
+ if splash_image is None:
+ splash_image = 'pyhoca-splash.png'
+
+ if os.path.basename(splash_image) == splash_image:
+ splash_image = os.path.join(basepath.images_basepath, splash_image)
+
+ splash_wximage = wx.Image(splash_image, wx.BITMAP_TYPE_PNG, )
+ splash_wximage.Rescale(400, int(float(400)/splash_wximage.Width*splash_wximage.Height))
+
+ splash_wxbitmap = splash_wximage.ConvertToBitmap()
wx.SplashScreen.__init__(self,
- splash_bitmap,
+ splash_wxbitmap,
splashStyle=wx.SPLASH_CENTRE_ON_SCREEN|wx.SPLASH_TIMEOUT,
milliseconds=5000,
parent=None,
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