131
by Michael Vogt
* gnome-language-selector, qt-language-selector: |
1 |
#!/usr/bin/python
|
3
by Michael Vogt
* added the missing data files |
2 |
|
72
by Michael Vogt
* exit with a useful error message when uid() != 0 |
3 |
|
4 |
import pygtk |
|
5 |
pygtk.require("2.0") |
|
6 |
import gtk |
|
7 |
import gtk.glade |
|
8 |
||
18
by Michael Vogt
* gettext support added |
9 |
import gettext |
72
by Michael Vogt
* exit with a useful error message when uid() != 0 |
10 |
import sys |
11 |
import os |
|
3
by Michael Vogt
* added the missing data files |
12 |
|
78.1.2
by Michael Vogt
* move more stuff out of the gtk frontend to the generic interface |
13 |
from LanguageSelector.gtk.GtkLanguageSelector import GtkLanguageSelector |
72
by Michael Vogt
* exit with a useful error message when uid() != 0 |
14 |
from gettext import gettext as _ |
102
by Michael Vogt
* added option to prevent verfiyInstalled check |
15 |
from optparse import OptionParser |
3
by Michael Vogt
* added the missing data files |
16 |
|
17 |
if __name__ == "__main__": |
|
18
by Michael Vogt
* gettext support added |
18 |
gettext.bindtextdomain("language-selector", "/usr/share/locale") |
19 |
gettext.textdomain("language-selector") |
|
20 |
||
102
by Michael Vogt
* added option to prevent verfiyInstalled check |
21 |
parser = OptionParser() |
22 |
parser.add_option("-n", "--no-verify-installed-lang-support", |
|
23 |
action="store_false", dest="verify_installed", |
|
24 |
default=True, |
|
219.1.2
by Michael Vogt
add --datadir argument to make debugging easier, make the strings translatable |
25 |
help=_("don't verify installed language support")) |
26 |
parser.add_option("-d", "--datadir", |
|
27 |
default="/usr/share/language-selector/", |
|
28 |
help=_("alternative datadir")) |
|
102
by Michael Vogt
* added option to prevent verfiyInstalled check |
29 |
(options, args) = parser.parse_args() |
30 |
||
219.1.2
by Michael Vogt
add --datadir argument to make debugging easier, make the strings translatable |
31 |
app = GtkLanguageSelector(datadir=options.datadir, |
102
by Michael Vogt
* added option to prevent verfiyInstalled check |
32 |
options=options) |
3
by Michael Vogt
* added the missing data files |
33 |
app.run() |