diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-08-22 12:01:56 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-08-22 12:01:56 +0800 |
| commit | eab834d3bfc704c4e2f80200914c32696177b120 (patch) | |
| tree | 9779fb0c0187154b10663c48b643916852ae988c /setup | |
| parent | 8bb2ae1cd7a80d7d9a9fbeb9317ca302b202e10a (diff) | |
| download | ibus-eab834d3bfc704c4e2f80200914c32696177b120.tar.gz ibus-eab834d3bfc704c4e2f80200914c32696177b120.tar.xz ibus-eab834d3bfc704c4e2f80200914c32696177b120.zip | |
internationalize engine's name
Diffstat (limited to 'setup')
| -rw-r--r-- | setup/main.py | 17 | ||||
| -rw-r--r-- | setup/setup.glade | 113 |
2 files changed, 68 insertions, 62 deletions
diff --git a/setup/main.py b/setup/main.py index e9cf7c4..b4eeb74 100644 --- a/setup/main.py +++ b/setup/main.py @@ -45,6 +45,7 @@ N_ = lambda a : a ( DATA_NAME, + DATA_LOCAL_NAME, DATA_LANG, DATA_ICON, DATA_AUTHOR, @@ -52,7 +53,7 @@ N_ = lambda a : a DATA_EXEC, DATA_STARTED, DATA_PRELOAD -) = range(8) +) = range(9) CONFIG_GENERAL_SHORTCUT = "/general/keyboard_shortcut_%s" CONFIG_PRELOAD_ENGINES = "/general/preload_engines" @@ -225,6 +226,8 @@ class Setup(object): buttons = gtk.BUTTONS_CLOSE, message_format = str(e)) dlg.run() + dlg.destroy() + self.__flush_gtk_events() return else: try: @@ -234,6 +237,8 @@ class Setup(object): buttons = gtk.BUTTONS_CLOSE, message_format = str(e)) dlg.run() + dlg.destroy() + self.__flush_gtk_events() return data[DATA_STARTED] = not data[DATA_STARTED] @@ -293,12 +298,12 @@ class Setup(object): langs = dict() - for name, lang, icon, author, credits, _exec, started in self.__bus.register_list_engines(): + for name, local_name, lang, icon, author, credits, _exec, started in self.__bus.register_list_engines(): _lang = ibus.LANGUAGES.get(lang, "other") _lang = _(_lang) if _lang not in langs: langs[_lang] = list() - langs[_lang].append([name, lang, icon, author, credits, _exec, started]) + langs[_lang].append([name, local_name, lang, icon, author, credits, _exec, started]) keys = langs.keys() keys.sort() @@ -319,7 +324,7 @@ class Setup(object): COLUMN_DATA, None) langs[key].sort() - for name, lang, icon, author, credits, _exec, started in langs[key]: + for name, local_name, lang, icon, author, credits, _exec, started in langs[key]: child_iter = model.append(iter) is_preload = "%s:%s" % (lang, name) in self.__preload_engines @@ -328,13 +333,13 @@ class Setup(object): pixbuf = pixbuf_missing model.set(child_iter, - COLUMN_NAME, name, + COLUMN_NAME, local_name, COLUMN_ENABLE, started, COLUMN_PRELOAD, is_preload, COLUMN_VISIBLE, True, COLUMN_ICON, pixbuf, COLUMN_DATA, - [name, lang, icon, author, credits, _exec, started, is_preload]) + [name, local_name, lang, icon, author, credits, _exec, started, is_preload]) return model diff --git a/setup/setup.glade b/setup/setup.glade index d8d1c9d..25e2c6b 100644 --- a/setup/setup.glade +++ b/setup/setup.glade @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> -<!--Generated with glade3 3.4.4 on Thu Aug 21 13:47:06 2008 --> +<!--Generated with glade3 3.4.4 on Fri Aug 22 11:28:43 2008 --> <glade-interface> <widget class="GtkDialog" id="dialog_setup"> <property name="border_width">5</property> @@ -20,6 +20,7 @@ <child> <widget class="GtkVBox" id="vbox2"> <property name="visible">True</property> + <property name="spacing">2</property> <child> <widget class="GtkCheckButton" id="checkbutton_auto_start"> <property name="visible">True</property> @@ -49,19 +50,13 @@ <property name="n_rows">3</property> <property name="n_columns">3</property> <child> - <widget class="GtkButton" id="button_prev_engine"> + <widget class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="sensitive">False</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">...</property> - <property name="response_id">0</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Trigger:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> @@ -69,51 +64,46 @@ </packing> </child> <child> - <widget class="GtkButton" id="button_next_engine"> + <widget class="GtkEntry" id="entry_trigger"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="label" translatable="yes">...</property> - <property name="response_id">0</property> + <property name="editable">False</property> </widget> <packing> - <property name="left_attach">2</property> - <property name="right_attach">3</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry_prev_engine"> + <widget class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Next engine:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry_next_engine"> + <widget class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">False</property> + <property name="xalign">1</property> + <property name="label" translatable="yes">Previous engine:</property> + <property name="justify">GTK_JUSTIFY_RIGHT</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> @@ -137,59 +127,70 @@ </packing> </child> <child> - <widget class="GtkLabel" id="label9"> + <widget class="GtkEntry" id="entry_next_engine"> <property name="visible">True</property> - <property name="xalign">1</property> - <property name="label" translatable="yes">Previous engine:</property> - <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="can_focus">True</property> + <property name="editable">False</property> </widget> <packing> - <property name="top_attach">2</property> - <property name="bottom_attach">3</property> - <property name="x_options">GTK_FILL</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> </packing> </child> <child> - <widget class="GtkLabel" id="label8"> + <widget class="GtkEntry" id="entry_prev_engine"> <property name="visible">True</property> - <property name="xalign">1</property> - <property name="label" translatable="yes">Next engine:</property> - <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="can_focus">True</property> + <property name="editable">False</property> </widget> <packing> - <property name="top_attach">1</property> - <property name="bottom_attach">2</property> - <property name="x_options">GTK_FILL</property> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> </packing> </child> <child> - <widget class="GtkEntry" id="entry_trigger"> + <widget class="GtkButton" id="button_next_engine"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="editable">False</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">...</property> + <property name="response_id">0</property> </widget> <packing> - <property name="left_attach">1</property> - <property name="right_attach">2</property> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> <property name="y_padding">4</property> </packing> </child> <child> - <widget class="GtkLabel" id="label7"> + <widget class="GtkButton" id="button_prev_engine"> <property name="visible">True</property> - <property name="xalign">1</property> - <property name="label" translatable="yes">Trigger:</property> - <property name="justify">GTK_JUSTIFY_RIGHT</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="label" translatable="yes">...</property> + <property name="response_id">0</property> </widget> <packing> + <property name="left_attach">2</property> + <property name="right_attach">3</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> <property name="x_options">GTK_FILL</property> <property name="y_options">GTK_FILL</property> <property name="x_padding">4</property> |
