[X2Go-Commits] pyhoca-gui.git - build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d (branch) updated: 2862512dd52f00914717874f22c413ab06550cd2
X2Go dev team
git-admin at x2go.org
Tue Aug 27 13:21:02 CEST 2013
The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated
via 2862512dd52f00914717874f22c413ab06550cd2 (commit)
from 850e8c42efa8efc7b87639459fa1ed5c97b3f7e4 (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:
pyhoca-gui | 13 ++++++++++++-
pyhoca/wxgui/basepath.py | 2 +-
pyhoca/wxgui/profilemanager.py | 8 ++++----
setup.py | 18 +++++++++++++-----
4 files changed, 30 insertions(+), 11 deletions(-)
The diff of changes is:
diff --git a/pyhoca-gui b/pyhoca-gui
index 32eebf3..f85b17a 100755
--- a/pyhoca-gui
+++ b/pyhoca-gui
@@ -59,7 +59,6 @@ if app.startswith('./') or os.path.dirname(PROG_NAME).endswith('trunk'):
print '### PyHoca-GUI running in development mode ###'
from pyhoca.wxgui.basepath import locale_basepath
-gettext.install('pyhoca-gui', localedir=locale_basepath, unicode=True)
# Python X2go modules
from x2go import CURRENT_LOCAL_USER as _CURRENT_LOCAL_USER
@@ -175,6 +174,11 @@ x2go_gui_options = [
{'args':['--disable-profilemanager'], 'default': False, 'action': 'store_true', 'help': 'disable the session profile manager window', },
{'args':['--display'], 'default': None, 'metavar': '<hostname>:<screennumber>', 'help': 'set the DISPLAY environment variable to <hostname>:<screennumber>', },
]
+if _X2GOCLIENT_OS == 'Windows':
+ x2go_gui_options.append(
+ {'args':['--lang'], 'default': None, 'metavar': 'LANGUAGE', 'help': 'set the GUI language (currently available: en, de, nl, es)', },
+ )
+
backend_options = [
{'args':['--backend-controlsession'], 'default': None, 'metavar': 'CONTROLSESSION_BACKEND', 'choices': BACKENDS_CONTROLSESSION.keys(), 'help': 'force usage of a certain CONTROLSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
{'args':['--backend-terminalsession'], 'default': None, 'metavar': 'TERMINALSESSION_BACKEND', 'choices': BACKENDS_TERMINALSESSION.keys(), 'help': 'force usage of a certain TERMINALSESSION_BACKEND (do not use this unless you know exactly what you are doing)', },
@@ -273,6 +277,13 @@ def parseargs():
def main():
args, logger, liblogger = parseargs()
+ if _X2GOCLIENT_OS == 'Windows':
+ if args.lang:
+ lang = gettext.translation('pyhoca-gui', localedir=locale_basepath, languages=[args.lang], )
+ lang.install()
+ else:
+ gettext.install('pyhoca-gui', localedir=locale_basepath, unicode=True)
+
if check_running():
sys.stderr.write("\n###############################\n### %s: already running for user %s\n###############################\n" % (PROG_NAME, _CURRENT_LOCAL_USER))
version()
diff --git a/pyhoca/wxgui/basepath.py b/pyhoca/wxgui/basepath.py
index 255b603..9cdb196 100644
--- a/pyhoca/wxgui/basepath.py
+++ b/pyhoca/wxgui/basepath.py
@@ -33,7 +33,7 @@ else:
_base_location = os.path.abspath(os.path.curdir)
_icons_location = os.path.join(_base_location, 'icons')
_images_location = os.path.join(_base_location, 'img')
- _locale_location = os.path.join(_base_location, 'locale')
+ _locale_location = os.path.join(_base_location, 'mo')
_nxproxy_location = os.path.join(_base_location, 'nxproxy', 'nxproxy.exe')
else:
_icons_location = '/usr/share/icons'
diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py
index f397497..636383e 100644
--- a/pyhoca/wxgui/profilemanager.py
+++ b/pyhoca/wxgui/profilemanager.py
@@ -819,7 +819,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.SharedFoldersList.DeleteAllItems()
_shared_folders = self.profile_config['export'].strip().strip(',').strip()
for _shared_folder_path in [ sf.strip() for sf in _shared_folders.split(',') ]:
- if self.SharedFoldersList.FindItem(-1, _shared_folder_path) == -1:
+ if self.SharedFoldersList.FindItem(0, _shared_folder_path) == -1:
_item = wx.ListItem()
_item.SetData(wx.NewId())
_item.SetText(_shared_folder_path)
@@ -944,7 +944,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
self.profile_config['useexports'] = self.UseLocalFolderSharing.GetValue()
_shared_folders = []
_item_id = self.SharedFoldersList.GetTopItem()
- while _item_id != -1:
+ while _item_id != -1 and self.SharedFoldersList.ItemCount > 0:
_item = self.SharedFoldersList.GetItem(_item_id)
_shared_folders.append(_item.GetText())
_item_id = self.SharedFoldersList.GetNextItem(_item_id)
@@ -1320,8 +1320,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog):
wx.EndBusyCursor()
self.Close()
self.Destroy()
-
- wx.EndBusyCursor()
+ else:
+ wx.EndBusyCursor()
def OnCancel(self, event):
self.Close()
diff --git a/setup.py b/setup.py
index c22a05e..41aecbb 100755
--- a/setup.py
+++ b/setup.py
@@ -66,13 +66,21 @@ if platform.system() == 'Windows':
("icons", glob(r'pixmaps\\*.ico')),
]
img_files = [("img", glob(r'img\\*.*'))]
+ i18n_files = [
+ ("mo\\en\\LC_MESSAGES", glob(r'build\\mo\\en\\LC_MESSAGES\\*.*')),
+ ("mo\\de\\LC_MESSAGES", glob(r'build\\mo\\de\\LC_MESSAGES\\*.*')),
+ ("mo\\nl\\LC_MESSAGES", glob(r'build\\mo\\nl\\LC_MESSAGES\\*.*')),
+ ("mo\\es\\LC_MESSAGES", glob(r'build\\mo\\es\\LC_MESSAGES\\*.*')),
+ ]
- data_files = data_files.extend([ "pixmaps/pyhoca-gui.ico", ] +
- dll_data_files +
- icon_files +
- img_files +
- nxproxy_files
+ data_files.extend([ "pixmaps\\pyhoca-gui.ico", ] +
+ dll_data_files +
+ icon_files +
+ img_files +
+ nxproxy_files +
+ i18n_files
)
+
if platform.system() == 'Linux':
cmd_class.update(
{
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