diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-21 16:08:42 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-21 16:08:42 +0000 |
commit | 10395c942817f04a17481cabc9d25d1ba9678b6c (patch) | |
tree | a80d4a318dd48745baa638670c9e04088c4b8a42 /gui.py | |
parent | c64619596343c12ae71aef5d1c44862f106c72b7 (diff) | |
download | anaconda-10395c942817f04a17481cabc9d25d1ba9678b6c.tar.gz anaconda-10395c942817f04a17481cabc9d25d1ba9678b6c.tar.xz anaconda-10395c942817f04a17481cabc9d25d1ba9678b6c.zip |
fork, exec for syslogd, shoot at rc parsing for language selection
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -1,17 +1,10 @@ import gettext +import os cat = gettext.Catalog ("anaconda", "/usr/share/locale") def _(string): - return cat.gettext(string) - -def setLanguage (lang): - global cat - newlangs = [lang] - if len(lang) > 2: - newlangs.append(lang[:2]) - gettext.setlangs (newlangs) - cat = gettext.Catalog ("anaconda", "/usr/share/locale") + return cat.gettext(string) from gtk import * from gtk import _root_window @@ -219,6 +212,19 @@ class InstallInterface: self.finishedTODO.wait () class InstallControlWindow (Thread): + def setLanguage (self, lang): + global cat + + newlangs = [lang] + if len(lang) > 2: + newlangs.append(lang[:2]) + gettext.setlangs (newlangs) + cat = gettext.Catalog ("anaconda", "/usr/share/locale") + for l in newlangs: + if os.access ("/etc/gtk/gtkrc." + l, os.R_OK): + rc_parse("/etc/gtk/gtkrc." + l) + print "loaded gtkrc." + l + self.window.reset_rc_styles () def instantiateWindow (self, windowClass): ics = InstallControlState (self, self.ii, self.todo) |