diff --git a/.gitignore b/.gitignore
index a161180..20f05a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,4 @@ ibus-1.3.6.tar.gz
/ibus-gjs-3.2.1.20111104.tar.gz
/ibus-gjs-3.0.2.20111118.tar.gz
/ibus-gjs-3.2.1.20111118.tar.gz
+/ibus-gjs-3.2.1.20111128.tar.gz
diff --git a/ibus-530711-preload-sys.patch b/ibus-530711-preload-sys.patch
index 6896c57..ddd1bbd 100644
--- a/ibus-530711-preload-sys.patch
+++ b/ibus-530711-preload-sys.patch
@@ -563,7 +563,7 @@ diff --git a/setup/main.py b/setup/main.py
index 7f4a040..095084b 100644
--- a/setup/main.py
+++ b/setup/main.py
-@@ -92,6 +92,7 @@ class Setup(object):
+@@ -91,6 +91,7 @@ class Setup(object):
# keyboard shortcut
# trigger
self.__config = self.__bus.get_config()
@@ -571,7 +571,7 @@ index 7f4a040..095084b 100644
shortcuts = self.__config.get_value(
"general/hotkey", "trigger",
ibus.CONFIG_GENERAL_SHORTCUT_TRIGGER_DEFAULT)
-@@ -213,15 +214,22 @@ class Setup(object):
+@@ -212,15 +213,22 @@ class Setup(object):
self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb)
# init engine page
@@ -599,7 +599,7 @@ index 7f4a040..095084b 100644
self.__treeview = self.__builder.get_object("treeview_engines")
self.__treeview.set_engines(engines)
-@@ -247,7 +255,8 @@ class Setup(object):
+@@ -248,7 +256,8 @@ class Setup(object):
def __combobox_notify_active_engine_cb(self, combobox, property):
engine = self.__combobox.get_active_engine()
button = self.__builder.get_object("button_engine_add")
@@ -607,9 +607,9 @@ index 7f4a040..095084b 100644
+ button.set_sensitive(engine != None and \
+ engine.name not in map(lambda e: e.name, self.__treeview.get_engines()))
- def __treeview_notify_cb(self, treeview, property):
- if property.name != "active-engine" and property.name != "engines":
-@@ -265,6 +274,26 @@ class Setup(object):
+ def __get_engine_setup_exec_args(self, engine):
+ args = []
+@@ -290,6 +299,26 @@ class Setup(object):
engine_names = map(lambda e: e.name, engines)
self.__config.set_list("general", "preload_engines", engine_names, "s")
@@ -636,9 +636,9 @@ index 7f4a040..095084b 100644
def __button_engine_add_cb(self, button):
engine = self.__combobox.get_active_engine()
self.__treeview.append_engine(engine)
-@@ -276,6 +305,32 @@ class Setup(object):
- about.run()
- about.destroy()
+@@ -319,6 +348,32 @@ class Setup(object):
+ del self.__engine_setup_exec_list[name]
+ self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args)
+ def __checkbutton_preload_engine_mode_toggled_cb(self, button):
+ if button.get_active():
@@ -669,7 +669,7 @@ index 7f4a040..095084b 100644
def __init_bus(self):
try:
self.__bus = ibus.Bus()
-@@ -466,7 +521,11 @@ class Setup(object):
+@@ -509,7 +564,11 @@ class Setup(object):
self.__config.set_value("general", "use_global_engine", value)
def __config_value_changed_cb(self, bus, section, name, value):
@@ -686,7 +686,7 @@ diff --git a/setup/setup.ui b/setup/setup.ui
index f1e6d0b..562c091 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
-@@ -582,7 +582,22 @@
+@@ -585,7 +585,22 @@
True
vertical
@@ -710,7 +710,7 @@ index f1e6d0b..562c091 100644
True
@@ -719,7 +719,7 @@ index f1e6d0b..562c091 100644
-@@ -772,7 +787,7 @@ You may use up/down buttons to change it.</i></small>
+@@ -791,7 +806,7 @@ You may use up/down buttons to change it
False
diff --git a/ibus-711632-fedora-fallback-icon.patch b/ibus-711632-fedora-fallback-icon.patch
deleted file mode 100644
index 4e1a273..0000000
--- a/ibus-711632-fedora-fallback-icon.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- ibus/ibus/_config.py.in.orig 2011-11-01 18:32:09.235894859 +0900
-+++ ibus/ibus/_config.py.in 2011-11-02 10:26:40.672355868 +0900
-@@ -47,10 +47,14 @@ def get_license():
-
- def get_ICON_KEYBOARD():
- import gtk
-- theme = gtk.icon_theme_get_default()
- icon = '@IBUS_ICON_KEYBOARD@'
-+ fallback_icon = 'ibus-keyboard'
-+ settings = gtk.settings_get_default()
-+ if settings.get_property('gtk-icon-theme-name') != 'gnome':
-+ icon = fallback_icon
-+ theme = gtk.icon_theme_get_default()
- if not theme.lookup_icon(icon, 18, 0):
-- icon = 'ibus-keyboard'
-+ icon = fallback_icon
- return icon
-
- def use_bridge_hotkey():
---- ibus/ui/gtk/main.py.orig 2011-04-25 12:33:39.296999692 +0900
-+++ ibus/ui/gtk/main.py 2011-06-08 11:53:44.027232075 +0900
-@@ -86,6 +86,9 @@ class UIApplication:
- pass
-
- def launch_panel(replace):
-+ settings = gtk.settings_get_default()
-+ if settings.get_property('gtk-fallback-icon-theme') == None:
-+ settings.set_property('gtk-fallback-icon-theme', 'gnome')
- # gtk.settings_get_default().props.gtk_theme_name = "/home/phuang/.themes/aud-Default/gtk-2.0/gtkrc"
- # gtk.rc_parse("./themes/default/gtkrc")
- UIApplication(replace).run()
---- ibus/ui/gtk/panel.py.orig 2011-11-01 18:31:49.845898037 +0900
-+++ ibus/ui/gtk/panel.py 2011-11-01 18:31:34.480900329 +0900
-@@ -654,7 +660,7 @@ class Panel(ibus.PanelBase):
- menu = gtk.Menu()
- item = gtk.ImageMenuItem(_("No input window"))
- size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
-- item.set_image(_icon.IconWidget("gtk-info", size[0]))
-+ item.set_image(_icon.IconWidget("gtk-dialog-info", size[0]))
- menu.add(item)
- menu.show_all()
- else:
diff --git a/ibus-HEAD.patch b/ibus-HEAD.patch
index 7d3816e..a9f7599 100644
--- a/ibus-HEAD.patch
+++ b/ibus-HEAD.patch
@@ -249,11 +249,15 @@ index 327a5d9..b6ca12e 100644
--
1.7.6.4
-From 05f9556278f791bacc0f1019427f8575fa39c9db Mon Sep 17 00:00:00 2001
+From 02893693fc0a8692a6242b0be6dc8f09e14c1c54 Mon Sep 17 00:00:00 2001
From: fujiwarat
-Date: Wed, 2 Nov 2011 10:47:55 +0900
+Date: Wed, 2 Nov 2011 14:17:50 +0900
Subject: [PATCH] Rerotate next/previous engines without global engine.
+BUG=http://code.google.com/p/ibus/issues/detail?id=1331
+TEST=Linux desktop
+
+Review URL: http://codereview.appspot.com/5321067
---
bus/ibusimpl.c | 31 ++++++++++++++++++++++++++++---
1 files changed, 28 insertions(+), 3 deletions(-)
@@ -323,17 +327,95 @@ index 0a4f3fb..059d660 100644
--
1.7.6.4
-From a8c21dd867f4a9e1c37cae4f6509af1491c5fc96 Mon Sep 17 00:00:00 2001
+From 613e01520f27a53c947fed476d99aeb8ae1ae39b Mon Sep 17 00:00:00 2001
From: fujiwarat
-Date: Thu, 17 Nov 2011 15:10:05 +0900
-Subject: [PATCH] Use ibus_input_context_process_key_event_async in ibus-x11
+Date: Tue, 8 Nov 2011 10:48:42 +0900
+Subject: [PATCH] Fixed fallback icons.
+
+1. Set 'ibus-keyboard' icon for IME off in non-GNOME theme.
+People would think the application icon for non-GNONE classic desktop.
+The themed icon is applied for GNOME icon theme only.
+
+2. Set gtk-fallback-icon-theme as 'gnome'
+ibus gtk panel needs gtk stock icons but some desktop does not load GNOME
+icon theme. I assigned 'gnome' for gtk-fallback-icon-theme if it's none.
+
+3. Use 'gtk-dialog-info' if 'gtk-info' is not found.
+It seems the latest gtk2 does not have 'gtk-info' icon via pygtk2.
+
+BUG=RH#711632
+TEST=Linux desktop
+
+Review URL: http://codereview.appspot.com/5320066
+---
+ ibus/_config.py.in | 8 ++++++--
+ ui/gtk/main.py | 3 +++
+ ui/gtk/panel.py | 2 +-
+ 3 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/ibus/_config.py.in b/ibus/_config.py.in
+index a830136..098d805 100644
+--- a/ibus/_config.py.in
++++ b/ibus/_config.py.in
+@@ -45,10 +45,14 @@ def get_license():
+
+ def get_ICON_KEYBOARD():
+ import gtk
+- theme = gtk.icon_theme_get_default()
+ icon = '@IBUS_ICON_KEYBOARD@'
++ fallback_icon = 'ibus-keyboard'
++ settings = gtk.settings_get_default()
++ if settings.get_property('gtk-icon-theme-name') != 'gnome':
++ return fallback_icon
++ theme = gtk.icon_theme_get_default()
+ if not theme.lookup_icon(icon, 18, 0):
+- icon = 'ibus-keyboard'
++ return fallback_icon
+ return icon
+
+ ISOCODES_PREFIX='@ISOCODES_PREFIX@'
+diff --git a/ui/gtk/main.py b/ui/gtk/main.py
+index 0412aea..cadcc96 100644
+--- a/ui/gtk/main.py
++++ b/ui/gtk/main.py
+@@ -86,6 +86,9 @@ class UIApplication:
+ pass
+
+ def launch_panel(replace):
++ settings = gtk.settings_get_default()
++ if settings.get_property('gtk-fallback-icon-theme') == None:
++ settings.set_property('gtk-fallback-icon-theme', 'gnome')
+ # gtk.settings_get_default().props.gtk_theme_name = "/home/phuang/.themes/aud-Default/gtk-2.0/gtkrc"
+ # gtk.rc_parse("./themes/default/gtkrc")
+ UIApplication(replace).run()
+diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py
+index 90be1d5..f71a36d 100644
+--- a/ui/gtk/panel.py
++++ b/ui/gtk/panel.py
+@@ -477,7 +477,7 @@ class Panel(ibus.PanelBase):
+ menu = gtk.Menu()
+ item = gtk.ImageMenuItem(_("No input window"))
+ size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
+- item.set_image(_icon.IconWidget("gtk-info", size[0]))
++ item.set_image(_icon.IconWidget("gtk-dialog-info", size[0]))
+ menu.add(item)
+ menu.show_all()
+ else:
+--
+1.7.6.4
+
+From c73b2d449e21ae0cb87845e34abadd2e54e1e423 Mon Sep 17 00:00:00 2001
+From: fujiwarat
+Date: Mon, 21 Nov 2011 11:00:09 +0900
+Subject: [PATCH] Use ibus_input_context_process_key_event_async in
+ ibus-x11
---
- client/x11/main.c | 115 ++++++++++++++++++++++++++++++++++++++++++++---------
- 1 files changed, 96 insertions(+), 19 deletions(-)
+ client/x11/main.c | 113 ++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 files changed, 94 insertions(+), 19 deletions(-)
diff --git a/client/x11/main.c b/client/x11/main.c
-index 0ba826c..8611bfc 100644
+index 0ba826c..58069fc 100644
--- a/client/x11/main.c
+++ b/client/x11/main.c
@@ -116,6 +116,8 @@ static gint g_debug_level = 0;
@@ -371,13 +453,13 @@ index 0ba826c..8611bfc 100644
+ if (retval == FALSE) {
+ IMForwardEvent (_xims, (XPointer) pfe);
+ }
-+ g_free (pfe);
++ g_slice_free (IMForwardEventStruct, pfe);
+}
+
static int
xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
{
-@@ -469,32 +496,61 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
+@@ -469,30 +496,57 @@ xim_forward_event (XIMS xims, IMForwardEventStruct *call_data)
if (event.type == GDK_KEY_RELEASE) {
event.state |= IBUS_RELEASE_MASK;
}
@@ -431,13 +513,13 @@ index 0ba826c..8611bfc 100644
+ else {
+ IMForwardEventStruct *pfe;
+
-+ pfe = g_new0 (IMForwardEventStruct, 1);
++ pfe = g_slice_new0 (IMForwardEventStruct);
+ pfe->major_code = XIM_FORWARD_EVENT;
+ pfe->icid = x11ic->icid;
+ pfe->connect_id = x11ic->connect_id;
+ pfe->sync_bit = 0;
+ pfe->serial_number = 0L;
-+ memcpy (&pfe->event, xevent, sizeof (XKeyEvent));
++ pfe->event = call_data->event;
+
+ ibus_input_context_process_key_event_async (
+ x11ic->context,
@@ -453,12 +535,8 @@ index 0ba826c..8611bfc 100644
+ return retval;
}
-+#undef _XIM_COPY_XKEYEVENT
-+
- static int
- xim_open (XIMS xims, IMOpenStruct *call_data)
-@@ -897,6 +953,25 @@ _context_disabled_cb (IBusInputContext *context,
+@@ -897,6 +951,25 @@ _context_disabled_cb (IBusInputContext *context,
_xim_preedit_end (_xims, x11ic);
}
@@ -484,7 +562,7 @@ index 0ba826c..8611bfc 100644
static void
_init_ibus (void)
{
-@@ -909,6 +984,8 @@ _init_ibus (void)
+@@ -909,6 +982,8 @@ _init_ibus (void)
g_signal_connect (_bus, "disconnected",
G_CALLBACK (_bus_disconnected_cb), NULL);
@@ -496,3 +574,358 @@ index 0ba826c..8611bfc 100644
--
1.7.6.4
+From e7a722948025948f39ac8e7f9d5527a79f23c7ff Mon Sep 17 00:00:00 2001
+From: fujiwarat
+Date: Fri, 25 Nov 2011 17:19:53 +0900
+Subject: [PATCH] Add the engine preference button on ibus-setup
+
+The new preference button launches $libexecdir/ibus-setup- + engine.name
+by default. The engine is IBusEngineDesc.
+If engine.setup has a value, the button launches it instead.
+---
+ ibus/enginedesc.py | 11 +++++++++--
+ setup/ibus-setup.in | 2 ++
+ setup/main.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++
+ setup/setup.ui | 16 ++++++++++++++++
+ src/ibusenginedesc.c | 31 +++++++++++++++++++++++++++++++
+ src/ibusenginedesc.h | 12 ++++++++++--
+ 6 files changed, 114 insertions(+), 4 deletions(-)
+
+diff --git a/ibus/enginedesc.py b/ibus/enginedesc.py
+index 3ca7f24..055a3a0 100644
+--- a/ibus/enginedesc.py
++++ b/ibus/enginedesc.py
+@@ -31,7 +31,7 @@ from serializable import *
+ class EngineDesc(Serializable):
+ __gtype_name__ = "PYIBusEngineDesc"
+ __NAME__ = "IBusEngineDesc"
+- def __init__(self, name="", longname="", description="", language="", license="", author="", icon="", layout="", hotkeys="", rank=0, symbol=""):
++ def __init__(self, name="", longname="", description="", language="", license="", author="", icon="", layout="", hotkeys="", rank=0, symbol="", setup=""):
+ super(EngineDesc, self).__init__()
+ self.__name = name
+ self.__longname = longname
+@@ -44,6 +44,7 @@ class EngineDesc(Serializable):
+ self.__rank = rank
+ self.__hotkeys = hotkeys
+ self.__symbol = symbol
++ self.__setup = setup
+
+ def get_name(self):
+ return self.__name
+@@ -78,6 +79,9 @@ class EngineDesc(Serializable):
+ def get_symbol(self):
+ return self.__symbol
+
++ def get_setup(self):
++ return self.__setup
++
+ name = property(get_name)
+ longname = property(get_longname)
+ description = property(get_description)
+@@ -89,6 +93,7 @@ class EngineDesc(Serializable):
+ rank = property(get_rank)
+ hotkeys = property(get_hotkeys)
+ symbol = property(get_symbol)
++ setup = property(get_setup)
+
+ def serialize(self, struct):
+ super(EngineDesc, self).serialize(struct)
+@@ -103,6 +108,7 @@ class EngineDesc(Serializable):
+ struct.append(dbus.UInt32(self.__rank))
+ struct.append(dbus.String(self.__hotkeys))
+ struct.append(dbus.String(self.__symbol))
++ struct.append(dbus.String(self.__setup))
+
+ def deserialize(self, struct):
+ super(EngineDesc, self).deserialize(struct)
+@@ -117,9 +123,10 @@ class EngineDesc(Serializable):
+ self.__rank = struct.pop(0)
+ self.__hotkeys = struct.pop(0)
+ self.__symbol = struct.pop(0)
++ self.__setup = struct.pop(0)
+
+ def test():
+- engine = EngineDesc("Hello", "", "", "", "", "", "", "", "", 0, "")
++ engine = EngineDesc("Hello", "", "", "", "", "", "", "", "", 0, "", "")
+ value = serialize_object(engine)
+ engine = deserialize_object(value)
+
+diff --git a/setup/ibus-setup.in b/setup/ibus-setup.in
+index 72bc1a4..f3c3730 100644
+--- a/setup/ibus-setup.in
++++ b/setup/ibus-setup.in
+@@ -23,8 +23,10 @@
+ prefix=@prefix@
+ exec_prefix=@exec_prefix@
+ datarootdir=@datarootdir@
++libexecdir=@libexecdir@
+ export IBUS_PREFIX=@prefix@
+ export IBUS_DATAROOTDIR=@datarootdir@
+ export IBUS_LOCALEDIR=@localedir@
++export IBUS_LIBEXECDIR=${libexecdir}
+ exec @PYTHON@ @prefix@/share/ibus/setup/main.py $@
+
+diff --git a/setup/main.py b/setup/main.py
+index a22bb0c..6c0fb0e 100644
+--- a/setup/main.py
++++ b/setup/main.py
+@@ -238,6 +238,10 @@ class Setup(object):
+ button = self.__builder.get_object("button_engine_about")
+ button.connect("clicked", self.__button_engine_about_cb)
+
++ self.__engine_setup_exec_list = {}
++ button = self.__builder.get_object("button_engine_preferences")
++ button.connect("clicked", self.__button_engine_preferences_cb)
++
+ self.__combobox.connect("notify::active-engine", self.__combobox_notify_active_engine_cb)
+ self.__treeview.connect("notify", self.__treeview_notify_cb)
+
+@@ -246,6 +250,24 @@ class Setup(object):
+ button = self.__builder.get_object("button_engine_add")
+ button.set_sensitive(engine != None and engine not in self.__treeview.get_engines())
+
++ def __get_engine_setup_exec_args(self, engine):
++ args = []
++ if engine == None:
++ return args
++ setup = str(engine.setup)
++ if len(setup) != 0:
++ args = setup.split()
++ args.insert(1, path.basename(args[0]))
++ return args
++ name = str(engine.name)
++ libexecdir = os.environ['IBUS_LIBEXECDIR']
++ setup_path = (libexecdir + '/' + 'ibus-setup-' if libexecdir != None \
++ else 'ibus-setup-') + name.split(':')[0]
++ if path.exists(setup_path):
++ args.append(setup_path)
++ args.append(path.basename(setup_path))
++ return args
++
+ def __treeview_notify_cb(self, treeview, property):
+ if property.name != "active-engine" and property.name != "engines":
+ return
+@@ -258,6 +280,12 @@ class Setup(object):
+ 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)
++
+ if property.name == "engines":
+ engine_names = map(lambda e: e.name, engines)
+ self.__config.set_list("general", "preload_engines", engine_names, "s")
+@@ -273,6 +301,24 @@ class Setup(object):
+ about.run()
+ about.destroy()
+
++ def __button_engine_preferences_cb(self, button):
++ engine = self.__treeview.get_active_engine()
++ args = self.__get_engine_setup_exec_args(engine)
++ if len(args) == 0:
++ return
++ name = engine.name
++ if name in self.__engine_setup_exec_list.keys():
++ try:
++ wpid, sts = os.waitpid(self.__engine_setup_exec_list[name],
++ os.WNOHANG)
++ # the setup is still running.
++ if wpid == 0:
++ return
++ except OSError:
++ pass
++ del self.__engine_setup_exec_list[name]
++ self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args)
++
+ def __init_bus(self):
+ try:
+ self.__bus = ibus.Bus()
+diff --git a/setup/setup.ui b/setup/setup.ui
+index 0a69df8..c7ff564 100644
+--- a/setup/setup.ui
++++ b/setup/setup.ui
+@@ -726,6 +726,22 @@
+ 4
+
+
++
++
++
++ False
++ False
++ 5
++
++
+
+
+
+diff --git a/src/ibusenginedesc.c b/src/ibusenginedesc.c
+index fa3a768..48ecb07 100644
+--- a/src/ibusenginedesc.c
++++ b/src/ibusenginedesc.c
+@@ -40,6 +40,7 @@ enum {
+ PROP_RANK,
+ PROP_HOTKEYS,
+ PROP_SYMBOL,
++ PROP_SETUP,
+ };
+
+
+@@ -56,6 +57,7 @@ struct _IBusEngineDescPrivate {
+ guint rank;
+ gchar *hotkeys;
+ gchar *symbol;
++ gchar *setup;
+ };
+
+ #define IBUS_ENGINE_DESC_GET_PRIVATE(o) \
+@@ -247,6 +249,19 @@ ibus_engine_desc_class_init (IBusEngineDescClass *class)
+ "The icon symbol chars of engine description",
+ "",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
++
++ /**
++ * IBusEngineDesc:setup:
++ *
++ * The exec lists of the engine setup command
++ */
++ g_object_class_install_property (gobject_class,
++ PROP_SETUP,
++ g_param_spec_string ("setup",
++ "setup args",
++ "The exec lists of the engine setup command",
++ "",
++ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+ }
+
+ static void
+@@ -265,6 +280,7 @@ ibus_engine_desc_init (IBusEngineDesc *desc)
+ desc->priv->rank = 0;
+ desc->priv->hotkeys = NULL;
+ desc->priv->symbol = NULL;
++ desc->priv->setup = NULL;
+ }
+
+ static void
+@@ -280,6 +296,7 @@ ibus_engine_desc_destroy (IBusEngineDesc *desc)
+ g_free (desc->priv->layout);
+ g_free (desc->priv->hotkeys);
+ g_free (desc->priv->symbol);
++ g_free (desc->priv->setup);
+
+ IBUS_OBJECT_CLASS (ibus_engine_desc_parent_class)->destroy (IBUS_OBJECT (desc));
+ }
+@@ -334,6 +351,10 @@ ibus_engine_desc_set_property (IBusEngineDesc *desc,
+ g_assert (desc->priv->symbol == NULL);
+ desc->priv->symbol = g_value_dup_string (value);
+ break;
++ case PROP_SETUP:
++ g_assert (desc->priv->setup == NULL);
++ desc->priv->setup = g_value_dup_string (value);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
+ }
+@@ -379,6 +400,9 @@ ibus_engine_desc_get_property (IBusEngineDesc *desc,
+ case PROP_SYMBOL:
+ g_value_set_string (value, ibus_engine_desc_get_symbol (desc));
+ break;
++ case PROP_SETUP:
++ g_value_set_string (value, ibus_engine_desc_get_setup (desc));
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
+ }
+@@ -410,6 +434,7 @@ ibus_engine_desc_serialize (IBusEngineDesc *desc,
+ g_variant_builder_add (builder, "u", desc->priv->rank);
+ g_variant_builder_add (builder, "s", NOTNULL (desc->priv->hotkeys));
+ g_variant_builder_add (builder, "s", NOTNULL (desc->priv->symbol));
++ g_variant_builder_add (builder, "s", NOTNULL (desc->priv->setup));
+ #undef NOTNULL
+
+ return TRUE;
+@@ -439,6 +464,7 @@ ibus_engine_desc_deserialize (IBusEngineDesc *desc,
+ g_variant_get_child (variant, retval++, "u", &desc->priv->rank);
+ g_variant_get_child (variant, retval++, "s", &desc->priv->hotkeys);
+ g_variant_get_child (variant, retval++, "s", &desc->priv->symbol);
++ g_variant_get_child (variant, retval++, "s", &desc->priv->setup);
+
+ return retval;
+ }
+@@ -464,6 +490,7 @@ ibus_engine_desc_copy (IBusEngineDesc *dest,
+ dest->priv->rank = src->priv->rank;
+ dest->priv->hotkeys = g_strdup (src->priv->hotkeys);
+ dest->priv->symbol = g_strdup (src->priv->symbol);
++ dest->priv->setup = g_strdup (src->priv->setup);
+ return TRUE;
+ }
+
+@@ -502,6 +529,7 @@ ibus_engine_desc_output (IBusEngineDesc *desc,
+ OUTPUT_ENTRY_1(layout);
+ OUTPUT_ENTRY_1(hotkeys);
+ OUTPUT_ENTRY_1(symbol);
++ OUTPUT_ENTRY_1(setup);
+ g_string_append_indent (output, indent + 1);
+ g_string_append_printf (output, "%u\n", desc->priv->rank);
+ #undef OUTPUT_ENTRY
+@@ -536,6 +564,7 @@ ibus_engine_desc_parse_xml_node (IBusEngineDesc *desc,
+ PARSE_ENTRY_1(layout);
+ PARSE_ENTRY_1(hotkeys);
+ PARSE_ENTRY_1(symbol);
++ PARSE_ENTRY_1(setup);
+ #undef PARSE_ENTRY
+ #undef PARSE_ENTRY_1
+ if (g_strcmp0 (sub_node->name , "rank") == 0) {
+@@ -565,6 +594,7 @@ IBUS_ENGINE_DESC_GET_PROPERTY (layout, const gchar *)
+ IBUS_ENGINE_DESC_GET_PROPERTY (rank, guint)
+ IBUS_ENGINE_DESC_GET_PROPERTY (hotkeys, const gchar *)
+ IBUS_ENGINE_DESC_GET_PROPERTY (symbol, const gchar *)
++IBUS_ENGINE_DESC_GET_PROPERTY (setup, const gchar *)
+ #undef IBUS_ENGINE_DESC_GET_PROPERTY
+
+ IBusEngineDesc *
+@@ -613,6 +643,7 @@ ibus_engine_desc_new_varargs (const gchar *first_property_name, ...)
+ g_assert (desc->priv->layout);
+ g_assert (desc->priv->hotkeys);
+ g_assert (desc->priv->symbol);
++ g_assert (desc->priv->setup);
+
+ return desc;
+ }
+diff --git a/src/ibusenginedesc.h b/src/ibusenginedesc.h
+index 76a7adc..928743e 100644
+--- a/src/ibusenginedesc.h
++++ b/src/ibusenginedesc.h
+@@ -255,8 +255,16 @@ const gchar *ibus_engine_desc_get_hotkeys (IBusEngineDesc *info);
+ *
+ * Return the symbol property in IBusEngineDesc. It should not be freed.
+ */
+-const gchar *ibus_engine_desc_get_symbol
+- (IBusEngineDesc *info);
++const gchar *ibus_engine_desc_get_symbol (IBusEngineDesc *info);
++
++/**
++ * ibus_engine_desc_get_setup:
++ * @info: An IBusEngineDesc
++ * @returns: setup property in IBusEngineDesc
++ *
++ * Return the setup property in IBusEngineDesc. It should not be freed.
++ */
++const gchar *ibus_engine_desc_get_setup (IBusEngineDesc *info);
+
+ /**
+ * ibus_engine_desc_output:
+--
+1.7.6.4
+
diff --git a/ibus-xx-bridge-hotkey.patch b/ibus-xx-bridge-hotkey.patch
index c7c2bf6..ffec57c 100644
--- a/ibus-xx-bridge-hotkey.patch
+++ b/ibus-xx-bridge-hotkey.patch
@@ -1,6 +1,6 @@
-From 1f5b2a32bf2ab762d293fb493ca355f3eb21ae48 Mon Sep 17 00:00:00 2001
+From 18ad10e6dd89a0327fa29535f03fa51b953e7635 Mon Sep 17 00:00:00 2001
From: fujiwarat
-Date: Fri, 4 Nov 2011 18:54:23 +0900
+Date: Mon, 28 Nov 2011 12:23:06 +0900
Subject: [PATCH] Add a bridge hotkey which use prev-next engines instead
of on-off.
@@ -13,16 +13,16 @@ Subject: [PATCH] Add a bridge hotkey which use prev-next engines instead
bus/registry.h | 10 +
configure.ac | 31 ++
data/Makefile.am | 6 +-
- data/ibus.schemas.in | 287 -------------------
- data/ibus.schemas.in.in | 300 ++++++++++++++++++++
+ data/ibus.schemas.in | 298 -------------------
+ data/ibus.schemas.in.in | 311 ++++++++++++++++++++
ibus/_config.py.in | 6 +
ibus/inputcontext.py | 17 +-
ibus/interface/iinputcontext.py | 7 +-
ibus/xkbxml.py.in | 4 +
setup/enginecombobox.py | 3 +
setup/enginetreeview.py | 8 +-
- setup/main.py | 24 ++
- setup/setup.ui | 55 ++++-
+ setup/main.py | 45 +++
+ setup/setup.ui | 64 ++++-
src/Makefile.am | 18 +-
src/ibushotkey.c | 11 +
src/ibushotkey.h | 11 +
@@ -34,7 +34,7 @@ Subject: [PATCH] Add a bridge hotkey which use prev-next engines instead
xkb/Makefile.am | 2 +
xkb/ibus-engine-xkb-main.c | 16 +
xkb/xkbxml.c | 10 +-
- 29 files changed, 1616 insertions(+), 392 deletions(-)
+ 29 files changed, 1653 insertions(+), 407 deletions(-)
delete mode 100644 data/ibus.schemas.in
create mode 100644 data/ibus.schemas.in.in
@@ -70,7 +70,7 @@ index 074b456..0efaa1b 100644
AM_LDADD = \
@GOBJECT2_LIBS@ \
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
-index 059d660..71bb6f1 100644
+index 059d660..67761fb 100644
--- a/bus/ibusimpl.c
+++ b/bus/ibusimpl.c
@@ -20,12 +20,17 @@
@@ -1281,8 +1281,8 @@ index a830136..4c3c980 100644
"ISOCODES_PREFIX",
"_"
)
-@@ -51,4 +53,8 @@ def get_ICON_KEYBOARD():
- icon = 'ibus-keyboard'
+@@ -55,4 +57,8 @@ def get_ICON_KEYBOARD():
+ return fallback_icon
return icon
+def use_bridge_hotkey():
@@ -1400,19 +1400,16 @@ index f620361..664dc99 100644
self.__emit_changed()
diff --git a/setup/main.py b/setup/main.py
-index 7f4a040..a22ac78 100644
+index 7f4a040..a773944 100644
--- a/setup/main.py
+++ b/setup/main.py
-@@ -213,6 +213,25 @@ class Setup(object):
+@@ -213,6 +213,22 @@ class Setup(object):
self.__config.get_value("general", "use_global_engine", False))
self.__checkbutton_use_global_engine.connect("toggled", self.__checkbutton_use_global_engine_toggled_cb)
+ # hotkey settings
+ if ibus.use_bridge_hotkey():
-+ label = self.__builder.get_object("label_trigger_hotkey")
-+ label.set_label(_("Toggle:"))
-+ label.set_tooltip_text(_("The trigger shortcut keys to toggle "
-+ "the previous and next input methods"))
++ self.__set_bridge_hotkey_labels()
+ self.__checkbutton_use_on_off_hotkey = \
+ self.__builder.get_object("checkbutton_use_on_off_hotkey")
+ self.__checkbutton_use_on_off_hotkey.set_active(
@@ -1429,7 +1426,7 @@ index 7f4a040..a22ac78 100644
# init engine page
preload_engine_mode = self.__config.get_value("general",
"preload_engine_mode",
-@@ -519,6 +538,11 @@ class Setup(object):
+@@ -519,6 +535,35 @@ class Setup(object):
value = self.__checkbutton_use_global_engine.get_active()
self.__config.set_value("general", "use_global_engine", value)
@@ -1437,15 +1434,47 @@ index 7f4a040..a22ac78 100644
+ value = self.__checkbutton_use_on_off_hotkey.get_active()
+ self.__config.set_value("general/hotkey", "use_bridge_hotkey",
+ not value)
++ self.__set_bridge_hotkey_labels()
++
++ def __set_bridge_hotkey_labels(self):
++ label = self.__builder.get_object("label_trigger_hotkey")
++ label_enable = self.__builder.get_object("label_enable")
++ hbox_enable = self.__builder.get_object("hbox_enable")
++ label_disable = self.__builder.get_object("label_disable")
++ hbox_disable = self.__builder.get_object("hbox_disable")
++ if self.__config.get_value("general/hotkey", "use_bridge_hotkey", True):
++ label.set_label(_("Toggle input methods:"))
++ label.set_tooltip_text(_("The shortcut keys to toggle "
++ "the previous and next input methods"))
++ label_enable.hide()
++ hbox_enable.hide()
++ label_disable.hide()
++ hbox_disable.hide()
++ else:
++ label.set_label(_("Enable or disable:"))
++ label.set_tooltip_text(_("The shortcut keys for turning "
++ "input method on or off"))
++ label_enable.show()
++ hbox_enable.show()
++ label_disable.show()
++ hbox_disable.show()
+
def __config_value_changed_cb(self, bus, section, name, value):
if section == 'general' and name == 'preload_engines':
engines = self.__get_engine_descs_from_names(value)
diff --git a/setup/setup.ui b/setup/setup.ui
-index f1e6d0b..77714a7 100644
+index f1e6d0b..671b84c 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
-@@ -232,7 +232,7 @@
+@@ -100,6 +100,7 @@
+ 2
+ 12
+ 6
++ True
+
+
@@ -1454,7 +1483,43 @@ index f1e6d0b..77714a7 100644
True
The shortcut keys for turning input method on or off
0
-@@ -962,6 +962,59 @@ You may use up/down buttons to change it.</i></small>
+@@ -244,7 +245,7 @@
+
+
+
+-
+
+-
++
+ True
+ 6
+
+@@ -292,7 +293,7 @@
+
+
+
+-
++
+ True
+ 0
+ Disable:
+@@ -305,7 +306,7 @@
+
+
+
+-
++
+ True
+ 6
+
+@@ -962,6 +963,59 @@ You may use up/down buttons to change it.</i></small>
1
@@ -1479,7 +1544,7 @@ index f1e6d0b..77714a7 100644
+ 6
+
+
-+ Use trigger keys to enable or disable an input method
++ Use toggle shortcut keys to enable or disable an input method
+ True
+ True
+ False
diff --git a/ibus.spec b/ibus.spec
index c235fab..01f8079 100644
--- a/ibus.spec
+++ b/ibus.spec
@@ -7,17 +7,20 @@
%if 0%{?fedora} > 16
%define have_bridge_hotkey 1
-%define ibus_gjs_version 3.2.1.20111118
+%define ibus_gjs_version 3.2.1.20111128
%define ibus_gjs_build_failure 1
+%define have_dconf 1
%else
%if 0%{?fedora} > 15
%define have_bridge_hotkey 1
-%define ibus_gjs_version 3.2.1.20111118
+%define ibus_gjs_version 3.2.1.20111128
%define ibus_gjs_build_failure 0
+%define have_dconf 1
%else
%define have_bridge_hotkey 0
%define ibus_gjs_version 3.0.2.20111118
%define ibus_gjs_build_failure 0
+%define have_dconf 0
%endif
%endif
@@ -30,7 +33,7 @@
Name: ibus
Version: 1.4.0
-Release: 11%{?dist}
+Release: 12%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@@ -46,14 +49,12 @@ Patch2: ibus-541492-xkb.patch
Patch3: ibus-xx-bridge-hotkey.patch
Patch4: ibus-xx-setup-frequent-lang.patch
-# Workaround for oxygen-gtk icon theme until bug 699103 is fixed.
-Patch91: ibus-711632-fedora-fallback-icon.patch
# Workaround gnome-shell build failure
# http://koji.fedoraproject.org/koji/getfile?taskID=3317917&name=root.log
-Patch92: ibus-gjs-xx-gnome-shell-3.1.4-build-failure.patch
+Patch91: ibus-gjs-xx-gnome-shell-3.1.4-build-failure.patch
# Workaround to disable preedit on gnome-shell until bug 658420 is fixed.
# https://bugzilla.gnome.org/show_bug.cgi?id=658420
-Patch93: ibus-xx-g-s-disable-preedit.patch
+Patch92: ibus-xx-g-s-disable-preedit.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -69,6 +70,10 @@ BuildRequires: dbus-glib-devel
BuildRequires: dbus-python-devel >= %{dbus_python_version}
BuildRequires: desktop-file-utils
BuildRequires: gtk-doc
+%if %have_dconf
+BuildRequires: dconf-devel
+%endif
+# for AM_GCONF_SOURCE_2 in configure.ac
BuildRequires: GConf2-devel
BuildRequires: pygobject2-devel
BuildRequires: intltool
@@ -94,7 +99,11 @@ Requires: iso-codes
Requires: dbus-python >= %{dbus_python_version}
Requires: dbus-x11
Requires: im-chooser
+%if %have_dconf
+Requires: dconf
+%else
Requires: GConf2
+%endif
Requires: notify-python
Requires: librsvg2
Requires: gnome-icon-theme-legacy >= %{gnome_icon_theme_legacy_version}
@@ -189,12 +198,12 @@ zcat %SOURCE2 | tar xf -
%if %ibus_gjs_build_failure
d=`basename %SOURCE2 .tar.gz`
cd $d
-%patch92 -p1 -b .fail-g-s
+%patch91 -p1 -b .fail-g-s
cd ..
%endif
%endif
%patch0 -p1
-%patch93 -p1 -b .g-s-preedit
+%patch92 -p1 -b .g-s-preedit
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
%patch1 -p1 -b .preload-sys
%if %have_libxkbfile
@@ -204,8 +213,6 @@ mv data/ibus.schemas.in data/ibus.schemas.in.in
%patch3 -p1 -b .bridge-key
%patch4 -p1 -b .setup-frequent-lang
-%patch91 -p1 -b .fallback-icon
-
%build
%if %have_libxkbfile
XKB_PRELOAD_LAYOUTS=\
@@ -237,6 +244,10 @@ automake -a -c -f
%endif
%if %have_bridge_hotkey
--enable-bridge-hotkey \
+%endif
+%if %have_dconf
+ --enable-dconf \
+ --disable-gconf \
%endif
--enable-introspection
@@ -308,20 +319,26 @@ touch --no-create %{_datadir}/icons/hicolor || :
%{_sbindir}/alternatives --install %{_sysconfdir}/X11/xinit/xinputrc xinputrc %{_xinputconf} 83 || :
+%if !%have_dconf
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/ibus.schemas > /dev/null 2>&1 || :
+%endif
%pre
+%if !%have_dconf
if [ "$1" -gt 1 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas > /dev/null 2>&1 || :
fi
+%endif
%preun
+%if !%have_dconf
if [ "$1" -eq 0 ]; then
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/ibus.schemas > /dev/null 2>&1 || :
fi
+%endif
%postun
# recreate icon cache
@@ -363,11 +380,22 @@ fi
%{_datadir}/ibus/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*
+%if %have_dconf
+%{_datadir}/GConf/gsettings/*
+%{_datadir}/glib-2.0/schemas/*.xml
+%{_libexecdir}/ibus-dconf
+%else
%{_libexecdir}/ibus-gconf
+%endif
%{_libexecdir}/ibus-ui-gtk
%{_libexecdir}/ibus-x11
# %{_sysconfdir}/xdg/autostart/ibus.desktop
+%if %have_dconf
+%{_sysconfdir}/dconf/db/ibus
+%{_sysconfdir}/dconf/profile/ibus
+%else
%{_sysconfdir}/gconf/schemas/ibus.schemas
+%endif
%config %{_xinputconf}
%if %have_libxkbfile
%{_libexecdir}/ibus-engine-xkb
@@ -406,6 +434,14 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
+* Fri Nov 25 2011 Takao Fujiwara - 1.4.0-12
+- Enabled dconf.
+- Updated ibus-HEAD.patch
+ Fixed Bug 618229 - engine setup buton on ibus-setup.
+- Removed ibus-711632-fedora-fallback-icon.patch as upstreamed.
+- Updated ibus-xx-bridge-hotkey.patch
+ Removed Enable/Disable buttons on ibus-setup
+
* Fri Nov 18 2011 Takao Fujiwara - 1.4.0-11
- Updated ibus-541492-xkb.patch
Fixed Bug 750484 - support reloading Xmodmap
diff --git a/sources b/sources
index 03f0ac7..0ed76cb 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
b4f063794e89c71eb1f8cb543210da30 ibus-1.4.0.tar.gz
4257048de65ea404389bb941a51db667 ibus-gjs-3.0.2.20111118.tar.gz
-ff5fdd8df5c64f3253ec37db135f336a ibus-gjs-3.2.1.20111118.tar.gz
+e79a4f384ff42491ee1e263482bd1bc6 ibus-gjs-3.2.1.20111128.tar.gz