summaryrefslogtreecommitdiff
path: root/portato/gui/windows
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-09-03 18:43:29 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-09-03 18:43:29 +0200
commit5e200de2c506c40d1f2c3152471b1b11d58c4f6f (patch)
tree3dd79442a1fb9bfdd43eb6c6fd009ae682b132b5 /portato/gui/windows
parent36752ebb554be1b395ba0dfa8605fb575d70f4a5 (diff)
downloadportato-5e200de2c506c40d1f2c3152471b1b11d58c4f6f.tar.gz
portato-5e200de2c506c40d1f2c3152471b1b11d58c4f6f.tar.bz2
portato-5e200de2c506c40d1f2c3152471b1b11d58c4f6f.zip
Use this wrapper instead of ctypes to set the textdomain and stuff for the gtk.Builder
Diffstat (limited to 'portato/gui/windows')
-rw-r--r--portato/gui/windows/basic.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/portato/gui/windows/basic.py b/portato/gui/windows/basic.py
index b3f210c..46e345e 100644
--- a/portato/gui/windows/basic.py
+++ b/portato/gui/windows/basic.py
@@ -20,17 +20,13 @@ from functools import wraps
import os.path
from ...constants import TEMPLATE_DIR, APP, LOCALE_DIR
-from ...helper import error
+from ...helper import error, debug
# for the GtkBuilder to translate correctly :)
-import ctypes
-try:
- getlib = ctypes.cdll.LoadLibrary("libgettextlib.so")
-except OSError:
- error("'libgettextlib.so' cannot be loaded. Might be, that there are no translations available in the GUI.")
-else:
- getlib.textdomain(APP)
- getlib.bindtextdomain(APP, LOCALE_DIR)
+from . import gettext
+old_charset = gettext.set_gtk_gettext(APP, LOCALE_DIR)
+debug("Changed from old charset '%s' to UTF-8.", old_charset)
+del old_charset
class WrappedTree (object):
__slots__ = ("klass", "tree", "get_widget", "get_ui")