Permalink
Browse files

Fix no gconf engines_order and the engine setup button on ibus-setup.

TEST=Linux desktop

Review URL: https://codereview.appspot.com/5702057
  • Loading branch information...
fujiwarat committed Mar 1, 2012
1 parent 25d05c6 commit 991166db3bbcaf8c76569a368dcaaf4dd7c263d8
Showing with 19 additions and 7 deletions.
  1. +12 −0 data/ibus.schemas.in
  2. +7 −7 setup/main.py
View
@@ -13,6 +13,18 @@
<long>Preload engines during ibus starts up</long>
</locale>
</schema>
+ <schema>
+ <key>/schemas/desktop/ibus/general/engines_order</key>
+ <applyto>/desktop/ibus/general/engines_order</applyto>
+ <owner>ibus</owner>
+ <type>list</type>
+ <default>[]</default>
+ <list_type>string</list_type>
+ <locale name="C">
+ <short>Engines order</short>
+ <long>Saved engines order in input method list</long>
+ </locale>
+ </schema>
<schema>
<key>/schemas/desktop/ibus/general/hotkey/trigger</key>
<applyto>/desktop/ibus/general/hotkey/trigger</applyto>
View
@@ -254,7 +254,7 @@ def __get_engine_setup_exec_args(self, engine):
args = setup.split()
args.insert(1, path.basename(args[0]))
return args
- name = str(engine.name)
+ name = str(engine.get_name())
libexecdir = os.environ['IBUS_LIBEXECDIR']
setup_path = (libexecdir + '/' + 'ibus-setup-' if libexecdir != None \
else 'ibus-setup-') + name.split(':')[0]
@@ -275,11 +275,11 @@ def __treeview_notify_cb(self, treeview, prop):
self.__builder.get_object("button_engine_up").set_sensitive(engine not in engines[:1])
self.__builder.get_object("button_engine_down").set_sensitive(engine not in engines[-1:])
- # obj = self.__builder.get_object("button_engine_preferences")
- # if len(self.__get_engine_setup_exec_args(engine)) != 0:
- # obj.set_sensitive(True)
- # else:
- # obj.set_sensitive(False)
+ obj = self.__builder.get_object("button_engine_preferences")
+ if len(self.__get_engine_setup_exec_args(engine)) != 0:
+ obj.set_sensitive(True)
+ else:
+ obj.set_sensitive(False)
if prop.name == "engines":
engine_names = map(lambda e: e.get_name(), engines)
@@ -302,7 +302,7 @@ def __button_engine_preferences_cb(self, button):
args = self.__get_engine_setup_exec_args(engine)
if len(args) == 0:
return
- name = engine.name
+ name = engine.get_name()
if name in self.__engine_setup_exec_list.keys():
try:
wpid, sts = os.waitpid(self.__engine_setup_exec_list[name],

0 comments on commit 991166d

Please sign in to comment.