diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2013-08-25 20:50:57 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2013-08-29 12:57:17 +0900 |
commit | d62eb73a03fc0fc264eb1eb7dc06c21aca67d40f (patch) | |
tree | 3319607a100039bf40f3a605619c47911e1c7644 /setup | |
parent | a6d2c590d750f00c0678d0620e500e761ba71ba9 (diff) | |
download | ibus-anthy-d62eb73a03fc0fc264eb1eb7dc06c21aca67d40f.tar.gz |
Enhanced dictionary selection.
Diffstat (limited to 'setup')
-rw-r--r-- | setup/anthyprefs.py.in | 12 | ||||
-rw-r--r-- | setup/main.py | 38 | ||||
-rw-r--r-- | setup/setup.ui | 43 |
3 files changed, 14 insertions, 79 deletions
diff --git a/setup/anthyprefs.py.in b/setup/anthyprefs.py.in index b78887f..2a8c622 100644 --- a/setup/anthyprefs.py.in +++ b/setup/anthyprefs.py.in @@ -1070,9 +1070,9 @@ _config = { }, 'dict': { - 'anthy_zipcode': ['@ANTHY_ZIPCODE_FILE@'], - 'ibus_symbol': ['@pkgdatadir@/dicts/symbol.t'], - 'ibus_oldchar': ['@pkgdatadir@/dicts/oldchar.t'], + 'zipcode': ['@ANTHY_ZIPCODE_FILE@'], + 'symbol': ['@pkgdatadir@/dicts/symbol.t'], + 'oldchar': ['@pkgdatadir@/dicts/oldchar.t'], 'files': [ '@ANTHY_ZIPCODE_FILE@', '@pkgdatadir@/dicts/symbol.t', @@ -1103,7 +1103,7 @@ _config = { 'is_system': True, }, - 'dict/file/anthy_zipcode': { + 'dict/file/zipcode': { 'embed': False, 'single': True, 'icon': None, @@ -1115,7 +1115,7 @@ _config = { 'encoding': 'euc_jp', }, - 'dict/file/ibus_symbol': { + 'dict/file/symbol': { 'embed': True, 'single': False, 'icon': None, @@ -1126,7 +1126,7 @@ _config = { 'is_system': True, }, - 'dict/file/ibus_oldchar': { + 'dict/file/oldchar': { 'embed': False, 'single': True, 'icon': None, diff --git a/setup/main.py b/setup/main.py index 68a6114..5677832 100644 --- a/setup/main.py +++ b/setup/main.py @@ -687,22 +687,6 @@ class AnthySetup(object): else: self.__thumb_kb_layout.set_sensitive(True) - use_system_keyboard = False - - try: - if self.__config != None: - use_system_keyboard = \ - self.__config.get_value('general', - 'use_system_keyboard_layout').get_boolean() - except: - pass - - if layout_mode and \ - not use_system_keyboard: - self.__builder.get_object('thumb:warning_hbox').show() - else: - self.__builder.get_object('thumb:warning_hbox').hide() - def __get_dict_cli_from_list(self, cli_list): cli_str = cli_list[0] if len(cli_list) <= 2: @@ -734,13 +718,6 @@ class AnthySetup(object): return id def __get_dict_file_from_id(self, selected_id): - if selected_id == 'anthy_zipcode': - return self.prefs.get_value('dict', 'anthy_zipcode')[0] - elif selected_id == 'ibus_symbol': - return self.prefs.get_value('dict', 'ibus_symbol')[0] - elif selected_id == 'ibus_oldchar': - return self.prefs.get_value('dict', 'ibus_oldchar')[0] - files = self.prefs.get_value('dict', 'files') retval = None @@ -784,17 +761,10 @@ class AnthySetup(object): for file in prefs.get_value('dict', 'files'): if not path.exists(file): continue - if file in prefs.get_value('dict', 'anthy_zipcode'): - id = 'anthy_zipcode' - elif file in prefs.get_value('dict', 'ibus_symbol'): - id = 'ibus_symbol' - elif file in prefs.get_value('dict', 'ibus_oldchar'): - id = 'ibus_oldchar' - else: - id = self.__get_quoted_id(file) - section = 'dict/file/' + id - if section not in prefs.sections(): - self.__fetch_dict_values(section) + id = self.__get_quoted_id(file) + section = 'dict/file/' + id + if section not in prefs.sections(): + self.__fetch_dict_values(section) is_system_dict = self.__is_system_dict_file_from_id(id) self.__append_dict_id_in_model(id, is_system_dict) diff --git a/setup/setup.ui b/setup/setup.ui index cb035b7..7ce5e74 100644 --- a/setup/setup.ui +++ b/setup/setup.ui @@ -1429,41 +1429,6 @@ </packing> </child> <child> - <object class="GtkHBox" id="thumb:warning_hbox"> - <property name="visible">False</property> - <property name="spacing">8</property> - <child> - <object class="GtkImage" id="image3"> - <property name="visible">True</property> - <property name="stock">gtk-dialog-warning</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label32"> - <property name="visible">True</property> - <property name="xalign">0</property> - <property name="wrap">True</property> - <property name="label" translatable="yes">Strongly recommend to enable "Use system keyboard layout" check button in "Advanced" tab using 'ibus-setup' command</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">4</property> - </packing> - </child> - <child> <object class="GtkHBox" id="hbox11"> <property name="visible">True</property> <property name="spacing">8</property> @@ -1502,7 +1467,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">5</property> + <property name="position">4</property> </packing> </child> <child> @@ -1538,7 +1503,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">6</property> + <property name="position">5</property> </packing> </child> <child> @@ -1556,7 +1521,7 @@ <packing> <property name="expand">False</property> <property name="fill">False</property> - <property name="position">7</property> + <property name="position">6</property> </packing> </child> @@ -1606,7 +1571,7 @@ GtkTable do not have extra space in y axis. --> <property name="fill">True</property> - <property name="position">8</property> + <property name="position">7</property> </packing> </child> </object> |