changeset f8e48bc87bbd in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=f8e48bc87bbd
description: [mulander] improve intl.dll search. Fixes #6006
diffstat:
src/gajim.py | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r 525ab51c07b5 -r f8e48bc87bbd src/gajim.py
--- a/src/gajim.py Sun Oct 31 18:21:33 2010 +0100
+++ b/src/gajim.py Wed Oct 27 09:41:04 2010 +0200
@@ -51,7 +51,15 @@
locale.setlocale(locale.LC_ALL, '')
import ctypes
- libintl = ctypes.cdll.LoadLibrary('gtk\\bin\\intl.dll')
+ import ctypes.util
+ libintl_path = ctypes.util.find_library('intl')
+ if libintl_path == None:
+ local_intl = ok.path.join('gtk', 'bin', 'intl.dll')
+ if os.path.exists(local_intl):
+ libintl_path = local_intl
+ if libintl_path == None:
+ raise ImportError('intl.dll library not found')
+ libintl = ctypes.cdll.LoadLibrary(libintl_path)
libintl.bindtextdomain(APP, DIR)
libintl.bind_textdomain_codeset(APP, 'UTF-8')
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits