rpms/ibus/devel ibus-HEAD.patch,1.24,1.25 ibus.spec,1.109,1.110

Takao Fujiwara fujiwara at fedoraproject.org
Wed Jun 30 05:09:01 UTC 2010


Author: fujiwara

Update of /cvs/pkgs/rpms/ibus/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv4202

Modified Files:
	ibus-HEAD.patch ibus.spec 
Log Message:

Add patch from HEAD.


ibus-HEAD.patch:
 bus/ibus.desktop.in         |    4 -
 bus/ibusimpl.c              |   12 +++
 bus/main.c                  |    8 ++
 client/gtk2/ibusimcontext.c |  134 ++++++++++++++++++++++----------------------
 configure.ac                |    9 +-
 gconf/config.c              |    6 +
 ibus/interface/iibus.py     |    2 
 po/ar.po                    |   21 +++++-
 po/as.po                    |   21 +++++-
 po/bn_IN.po                 |   21 +++++-
 po/ca.po                    |   21 +++++-
 po/da.po                    |   21 +++++-
 po/de.po                    |   21 +++++-
 po/es.po                    |   33 +++++++---
 po/fr.po                    |   25 ++++++--
 po/gu.po                    |   21 +++++-
 po/hi.po                    |   21 +++++-
 po/hu.po                    |   21 +++++-
 po/it.po                    |   21 +++++-
 po/ja.po                    |   21 +++++-
 po/kn.po                    |   21 +++++-
 po/ko.po                    |   21 +++++-
 po/ml.po                    |   21 +++++-
 po/mr.po                    |   21 +++++-
 po/or.po                    |   21 +++++-
 po/pa.po                    |   21 +++++-
 po/pl.po                    |   21 +++++-
 po/ru.po                    |   21 +++++-
 po/sr.po                    |   21 +++++-
 po/sr at latin.po              |   21 +++++-
 po/ta.po                    |   21 +++++-
 po/te.po                    |   21 +++++-
 po/vi.po                    |   21 +++++-
 po/zh_CN.po                 |   20 +++++-
 po/zh_HK.po                 |   21 +++++-
 po/zh_TW.po                 |   86 ++++++++++++++--------------
 setup/ibus-setup.desktop.in |    3 
 setup/main.py               |    8 +-
 src/ibusbus.c               |    9 +-
 src/ibuscomponent.c         |   31 +++++++++-
 src/ibuscomponent.h         |   13 +++-
 41 files changed, 706 insertions(+), 222 deletions(-)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.24 -r 1.25 ibus-HEAD.patchIndex: ibus-HEAD.patch
===================================================================
RCS file: /cvs/pkgs/rpms/ibus/devel/ibus-HEAD.patch,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -p -r1.24 -r1.25
--- ibus-HEAD.patch	12 Aug 2009 01:54:42 -0000	1.24
+++ ibus-HEAD.patch	30 Jun 2010 05:09:01 -0000	1.25
@@ -1 +1,2513 @@
-
+diff --git a/bus/ibus.desktop.in b/bus/ibus.desktop.in
+index a36cb9b..9212d5a 100644
+--- a/bus/ibus.desktop.in
++++ b/bus/ibus.desktop.in
+@@ -1,8 +1,8 @@
+ [Desktop Entry]
+ Encoding=UTF-8
+ _Name=IBus
+-_GenericName=IBus input method framework
+-_Comment=IBus input method framework
++_GenericName=Input Method Framework
++_Comment=Start IBus Input Method Framework
+ Exec=ibus-daemon --xim
+ Icon=ibus
+ Terminal=false
+diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
+index 32f6df0..c14831c 100644
+--- a/bus/ibusimpl.c
++++ b/bus/ibusimpl.c
+@@ -395,11 +395,15 @@ bus_ibus_impl_reload_config (BusIBusImpl *ibus)
+         void ( *func) (BusIBusImpl *, GValue *);
+     } entries [] = {
+         { "general/hotkey", "trigger", bus_ibus_impl_set_trigger },
++        #if 0
+         /* Only for backward compatibility, shall be removed later. */
+         { "general/hotkey", "next_engine", bus_ibus_impl_set_next_engine_in_menu },
++        #endif
+         { "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu },
++        #if 0
+         /* Only for backward compatibility, shall be removed later. */
+         { "general/hotkey", "prev_engine", bus_ibus_impl_set_previous_engine },
++        #endif
+         { "general/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine },
+         { "general", "preload_engines", bus_ibus_impl_set_preload_engines },
+         { "general", "use_system_keyboard_layout", bus_ibus_impl_set_use_sys_layout },
+@@ -444,11 +448,15 @@ _config_value_changed_cb (IBusConfig  *config,
+         void ( *func) (BusIBusImpl *, GValue *);
+     } entries [] = {
+         { "general/hotkey", "trigger", bus_ibus_impl_set_trigger },
++        #if 0
+         /* Only for backward compatibility, shall be removed later. */
+         { "general/hotkey", "next_engine", bus_ibus_impl_set_next_engine_in_menu },
++        #endif
+         { "general/hotkey", "next_engine_in_menu", bus_ibus_impl_set_next_engine_in_menu },
++        #if 0
+         /* Only for backward compatibility, shall be removed later. */
+         { "general/hotkey", "prev_engine", bus_ibus_impl_set_previous_engine },
++        #endif
+         { "general/hotkey", "previous_engine", bus_ibus_impl_set_previous_engine },
+         { "general", "preload_engines",    bus_ibus_impl_set_preload_engines },
+         { "general", "use_system_keyboard_layout", bus_ibus_impl_set_use_sys_layout },
+@@ -712,7 +720,7 @@ _ibus_introspect (BusIBusImpl     *ibus,
+         "      <arg name=\"context\" direction=\"out\" type=\"o\"/>\n"
+         "    </method>\n"
+         "    <method name=\"CurrentInputContext\">\n"
+-        "      <arg name=\"name\" direction=\"out\" type=\"s\"/>\n"
++        "      <arg name=\"name\" direction=\"out\" type=\"o\"/>\n"
+         "    </method>\n"
+         "    <method name=\"RegisterComponent\">\n"
+         "      <arg name=\"components\" direction=\"in\" type=\"v\"/>\n"
+@@ -1255,7 +1263,7 @@ _ibus_current_input_context (BusIBusImpl     *ibus,
+     reply = ibus_message_new_method_return (message);
+     path = ibus_service_get_path((IBusService *)ibus->focused_context);
+     ibus_message_append_args (reply,
+-                              G_TYPE_STRING, &path,
++                              IBUS_TYPE_OBJECT_PATH, &path,
+                               G_TYPE_INVALID);
+ 
+     return reply;
+diff --git a/bus/main.c b/bus/main.c
+index b100d2a..2357ae8 100644
+--- a/bus/main.c
++++ b/bus/main.c
+@@ -36,6 +36,7 @@ static gboolean daemonize = FALSE;
+ static gboolean single = FALSE;
+ static gboolean xim = FALSE;
+ static gboolean replace = FALSE;
++static gboolean restart = FALSE;
+ static gchar *panel = "default";
+ static gchar *config = "default";
+ static gchar *desktop = "gnome";
+@@ -72,6 +73,7 @@ static const GOptionEntry entries[] =
+     { "monitor-timeout", 'j', 0, G_OPTION_ARG_INT,    &g_monitor_timeout, "timeout of poll changes of engines in seconds. 0 to disable it. ", "timeout [default is 0]" },
+ #endif
+     { "mem-profile", 'm', 0, G_OPTION_ARG_NONE,   &g_mempro,   "enable memory profile, send SIGUSR2 to print out the memory profile.", NULL },
++    { "restart",     'R', 0, G_OPTION_ARG_NONE,   &restart,    "restart panel and config processes when they die.", NULL },
+     { "verbose",   'v', 0, G_OPTION_ARG_NONE,   &g_verbose,   "verbose.", NULL },
+     { NULL },
+ };
+@@ -255,6 +257,9 @@ main (gint argc, gchar **argv)
+         if (g_strcmp0 (config, "default") == 0) {
+             IBusComponent *component;
+             component = bus_registry_lookup_component_by_name (BUS_DEFAULT_REGISTRY, IBUS_SERVICE_CONFIG);
++            if (component) {
++                ibus_component_set_restart (component, restart);
++            }
+             if (component == NULL || !ibus_component_start (component, g_verbose)) {
+                 g_printerr ("Can not execute default config program\n");
+                 exit (-1);
+@@ -268,6 +273,9 @@ main (gint argc, gchar **argv)
+         if (g_strcmp0 (panel, "default") == 0) {
+             IBusComponent *component;
+             component = bus_registry_lookup_component_by_name (BUS_DEFAULT_REGISTRY, IBUS_SERVICE_PANEL);
++            if (component) {
++                ibus_component_set_restart (component, restart);
++            }
+             if (component == NULL || !ibus_component_start (component, g_verbose)) {
+                 g_printerr ("Can not execute default panel program\n");
+                 exit (-1);
+diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
+index 2bf1e7b..2bd37a9 100644
+--- a/client/gtk2/ibusimcontext.c
++++ b/client/gtk2/ibusimcontext.c
+@@ -141,6 +141,8 @@ static IBusBus              *_bus = NULL;
+ void
+ ibus_im_context_register_type (GTypeModule *type_module)
+ {
++    IDEBUG ("%s", __FUNCTION__);
++
+     static const GTypeInfo ibus_im_context_info = {
+         sizeof (IBusIMContextClass),
+         (GBaseInitFunc)        NULL,
+@@ -175,6 +177,8 @@ ibus_im_context_register_type (GTypeModule *type_module)
+ GType
+ ibus_im_context_get_type (void)
+ {
++    IDEBUG ("%s", __FUNCTION__);
++
+     if (_ibus_type_im_context == 0) {
+         ibus_im_context_register_type (NULL);
+     }
+@@ -186,10 +190,10 @@ ibus_im_context_get_type (void)
+ IBusIMContext *
+ ibus_im_context_new (void)
+ {
+-    IBusIMContext *obj;
+-    obj = IBUS_IM_CONTEXT(g_object_new (IBUS_TYPE_IM_CONTEXT, NULL));
++    IDEBUG ("%s", __FUNCTION__);
+ 
+-    return obj;
++    GObject *obj = g_object_new (IBUS_TYPE_IM_CONTEXT, NULL);
++    return IBUS_IM_CONTEXT (obj);
+ }
+ 
+ static gint
+@@ -200,8 +204,7 @@ _key_snooper_cb (GtkWidget   *widget,
+     IDEBUG ("%s", __FUNCTION__);
+     gboolean retval = FALSE;
+ 
+-    IBusIMContext *ibusimcontext;
+-    ibusimcontext = (IBusIMContext *) _focus_im_context;
++    IBusIMContext *ibusimcontext = (IBusIMContext *)_focus_im_context;
+ 
+     if (G_UNLIKELY (!_use_key_snooper))
+         return retval;
+@@ -249,6 +252,8 @@ _key_snooper_cb (GtkWidget   *widget,
+ static void
+ ibus_im_context_class_init     (IBusIMContextClass *klass)
+ {
++    IDEBUG ("%s", __FUNCTION__);
++
+     GtkIMContextClass *im_context_class = GTK_IM_CONTEXT_CLASS (klass);
+     GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+ 
+@@ -330,6 +335,7 @@ ibus_im_context_class_init     (IBusIMContextClass *klass)
+ static void
+ ibus_im_context_init (GObject *obj)
+ {
++    IDEBUG ("%s", __FUNCTION__);
+ 
+     IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (obj);
+ 
+@@ -398,8 +404,7 @@ ibus_im_context_init (GObject *obj)
+ static void
+ ibus_im_context_finalize (GObject *obj)
+ {
+-    g_return_if_fail (obj != NULL);
+-    g_return_if_fail (IBUS_IS_IM_CONTEXT (obj));
++    IDEBUG ("%s", __FUNCTION__);
+ 
+     IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (obj);
+ 
+@@ -432,11 +437,8 @@ ibus_im_context_filter_keypress (GtkIMContext *context,
+                                  GdkEventKey  *event)
+ {
+     IDEBUG ("%s", __FUNCTION__);
+-    g_return_val_if_fail (context != NULL, FALSE);
+-    g_return_val_if_fail (IBUS_IS_IM_CONTEXT (context), FALSE);
+-
+-    IBusIMContext *ibusimcontext = (IBusIMContext *) context;
[...2123 lines suppressed...]
+ msgid "Use system keyboard layout"
+ msgstr "使用系統鍵盤配置"
+ 
+@@ -497,4 +502,3 @@ msgstr "垂直"
+ #: ../setup/setup.ui.h:56
+ msgid "When active"
+ msgstr "當啟用時"
+-
+diff --git a/setup/ibus-setup.desktop.in b/setup/ibus-setup.desktop.in
+index 4acd5f3..940a84d 100644
+--- a/setup/ibus-setup.desktop.in
++++ b/setup/ibus-setup.desktop.in
+@@ -1,8 +1,7 @@
+ [Desktop Entry]
+ Encoding=UTF-8
+ _Name=IBus Preferences
+-_GenericName=IBus Preferences
+-_Comment=IBus Preferences
++_Comment=Set IBus Preferences
+ Exec=ibus-setup
+ Icon=ibus-setup
+ Terminal=false
+diff --git a/setup/main.py b/setup/main.py
+index 4d8a328..d778ac3 100644
+--- a/setup/main.py
++++ b/setup/main.py
+@@ -107,25 +107,25 @@ class Setup(object):
+ 
+         # next engine
+         shortcuts = self.__config.get_value(
+-                        "general/hotkey", "next_engine",
++                        "general/hotkey", "next_engine_in_menu",
+                         ibus.CONFIG_GENERAL_SHORTCUT_NEXT_ENGINE_DEFAULT)
+         button = self.__builder.get_object("button_next_engine")
+         entry = self.__builder.get_object("entry_next_engine")
+         entry.set_text("; ".join(shortcuts))
+         entry.set_tooltip_text("\n".join(shortcuts))
+         button.connect("clicked", self.__shortcut_button_clicked_cb,
+-                    N_("next input method"), "general/hotkey", "next_engine", entry)
++                    N_("next input method"), "general/hotkey", "next_engine_in_menu", entry)
+ 
+         # prev engine
+         shortcuts = self.__config.get_value(
+-                        "general/hotkey", "prev_engine",
++                        "general/hotkey", "previous_engine",
+                         ibus.CONFIG_GENERAL_SHORTCUT_PREV_ENGINE_DEFAULT)
+         button = self.__builder.get_object("button_prev_engine")
+         entry = self.__builder.get_object("entry_prev_engine")
+         entry.set_text("; ".join(shortcuts))
+         entry.set_tooltip_text("\n".join(shortcuts))
+         button.connect("clicked", self.__shortcut_button_clicked_cb,
+-                    N_("previous input method"), "general/hotkey", "prev_engine", entry)
++                    N_("previous input method"), "general/hotkey", "previous_engine", entry)
+ 
+         # lookup table orientation
+         self.__combobox_lookup_table_orientation = self.__builder.get_object("combobox_lookup_table_orientation")
+diff --git a/src/ibusbus.c b/src/ibusbus.c
+index 82ecbba..40d4566 100644
+--- a/src/ibusbus.c
++++ b/src/ibusbus.c
+@@ -527,7 +527,7 @@ ibus_bus_current_input_context(IBusBus      *bus)
+     g_assert (IBUS_IS_BUS (bus));
+     g_return_val_if_fail (ibus_bus_is_connected (bus), NULL);
+ 
+-    gchar *name = NULL;
++    gchar *path = NULL;
+     IBusMessage *reply = NULL;
+     IBusError *error = NULL;
+ 
+@@ -539,9 +539,10 @@ ibus_bus_current_input_context(IBusBus      *bus)
+                                       G_TYPE_INVALID);
+ 
+     if (reply) {
+-        if (ibus_message_get_args (reply, &error, G_TYPE_STRING, &name,
++        if (ibus_message_get_args (reply, &error,
++                                   IBUS_TYPE_OBJECT_PATH, &path,
+                                    G_TYPE_INVALID)) {
+-            name = g_strdup (name);
++            path = g_strdup (path);
+         } else {
+             g_warning ("%s: %s", error->name, error->message);
+             ibus_error_free (error);
+@@ -550,7 +551,7 @@ ibus_bus_current_input_context(IBusBus      *bus)
+         ibus_message_unref (reply);
+     }
+ 
+-    return name;
++    return path;
+ }
+ 
+ static void
+diff --git a/src/ibuscomponent.c b/src/ibuscomponent.c
+index 49f9ef1..0c55268 100644
+--- a/src/ibuscomponent.c
++++ b/src/ibuscomponent.c
+@@ -29,12 +29,15 @@ enum {
+ 
+ /* IBusComponentPriv */
+ struct _IBusComponentPrivate {
+-    gpointer pad;
++    // TRUE if the component started in the verbose mode.
++    gboolean verbose;
++    // TRUE if the component needs to be restarted when it dies.
++    gboolean restart;
+ };
+ typedef struct _IBusComponentPrivate IBusComponentPrivate;
+ 
+ #define IBUS_COMPONENT_GET_PRIVATE(o)  \
+-   (G_TYPE_INSTANCE_GET_PRIVATE ((o), BUS_TYPE_COMPONENT, IBusComponentPrivate))
++   (G_TYPE_INSTANCE_GET_PRIVATE ((o), IBUS_TYPE_COMPONENT, IBusComponentPrivate))
+ 
+ // static guint            _signals[LAST_SIGNAL] = { 0 };
+ 
+@@ -66,6 +69,8 @@ ibus_component_class_init (IBusComponentClass *klass)
+     IBusObjectClass *object_class = IBUS_OBJECT_CLASS (klass);
+     IBusSerializableClass *serializable_class = IBUS_SERIALIZABLE_CLASS (klass);
+ 
++    g_type_class_add_private (klass, sizeof (IBusComponentPrivate));
++
+     object_class->destroy = (IBusObjectDestroyFunc) ibus_component_destroy;
+ 
+     serializable_class->serialize   = (IBusSerializableSerializeFunc) ibus_component_serialize;
+@@ -91,6 +96,10 @@ ibus_component_init (IBusComponent *component)
+     component->observed_paths = NULL;
+     component->pid = 0;
+     component->child_source_id = 0;
++
++    IBusComponentPrivate * priv = IBUS_COMPONENT_GET_PRIVATE (component);
++    priv->verbose = FALSE;
++    priv->restart = FALSE;
+ }
+ 
+ static void
+@@ -657,6 +666,12 @@ ibus_component_child_cb (GPid            pid,
+     g_spawn_close_pid (pid);
+     component->pid = 0;
+     component->child_source_id = 0;
++
++    IBusComponentPrivate *priv = IBUS_COMPONENT_GET_PRIVATE (component);
++    if (priv->restart) {
++        g_debug ("==== Restarting %s", component->exec);
++        ibus_component_start (component, priv->verbose);
++    }
+ }
+ 
+ gboolean
+@@ -667,6 +682,9 @@ ibus_component_start (IBusComponent *component, gboolean verbose)
+     if (component->pid != 0)
+         return TRUE;
+ 
++    IBusComponentPrivate *priv = IBUS_COMPONENT_GET_PRIVATE (component);
++    priv->verbose = verbose;
++
+     gint argc;
+     gchar **argv;
+     gboolean retval;
+@@ -748,3 +766,12 @@ ibus_component_get_from_engine (IBusEngineDesc *engine)
+     component = (IBusComponent *)g_object_get_data ((GObject *)engine, "component");
+     return component;
+ }
++
++void
++ibus_component_set_restart (IBusComponent *component, gboolean restart)
++{
++    g_assert (IBUS_IS_COMPONENT (component));
++
++    IBusComponentPrivate *priv = IBUS_COMPONENT_GET_PRIVATE (component);
++    priv->restart = restart;
++}
+diff --git a/src/ibuscomponent.h b/src/ibuscomponent.h
+index 6685e61..249c8cf 100644
+--- a/src/ibuscomponent.h
++++ b/src/ibuscomponent.h
+@@ -233,7 +233,7 @@ gboolean         ibus_component_check_modification
+ /**
+  * ibus_component_start:
+  * @component: An IBusComponent.
+- * @verbose: if redirect the child output to /dev/null
++ * @verbose: if FALSE, redirect the child output to /dev/null
+  * @returns: TRUE if the component is started; FALSE otherwise.
+  *
+  * Whether the IBusComponent is started.
+@@ -268,6 +268,17 @@ gboolean         ibus_component_is_running      (IBusComponent  *component);
+  */
+ IBusComponent   *ibus_component_get_from_engine (IBusEngineDesc *engine);
+ 
++/**
++ * ibus_component_set_restart:
++ * @component: An IBusComponent.
++ * @restart: if TRUE, the component will be restartd when it dies.
++ *
++ * Set whether the component needs to be restarted when it dies.
++ */
++void             ibus_component_set_restart     (IBusComponent  *component,
++                                                 gboolean        restart);
++
++
+ G_END_DECLS
+ #endif
+ 


Index: ibus.spec
===================================================================
RCS file: /cvs/pkgs/rpms/ibus/devel/ibus.spec,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -p -r1.109 -r1.110
--- ibus.spec	29 Jun 2010 02:52:19 -0000	1.109
+++ ibus.spec	30 Jun 2010 05:09:01 -0000	1.110
@@ -9,14 +9,14 @@
 
 Name:       ibus
 Version:    1.3.5
-Release:    3%{?dist}
+Release:    4%{?dist}
 Summary:    Intelligent Input Bus for Linux OS
 License:    LGPLv2+
 Group:      System Environment/Libraries
 URL:        http://code.google.com/p/ibus/
 Source0:    http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
 Source1:    xinput-ibus
-# Patch0:     ibus-HEAD.patch
+Patch0:     ibus-HEAD.patch
 
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -111,7 +111,6 @@ docs for ibus.
 Summary:    Developer documents for ibus
 Group:      Development/Libraries
 Requires:   %{name} = %{version}-%{release}
-Requires:   gtk-doc
 
 %description devel-docs
 The ibus-devel-docs package contains developer documentation for ibus
@@ -119,7 +118,7 @@ The ibus-devel-docs package contains dev
 
 %prep
 %setup -q
-# %patch0 -p1
+%patch0 -p1
 
 %build
 %configure \
@@ -252,6 +251,9 @@ fi
 %{_datadir}/gtk-doc/html/*
 
 %changelog
+* Wed Jun 30 2010 Takao Fujiwara <takao.fujiwara1 at gmail.com> - 1.3.5-4
+- Add patch from HEAD.
+
 * Mon Jun 28 2010 Matthias Clasen <mclasen at redhat.com> - 1.3.5-3
 - Rebuild against newer gtk
 



More information about the scm-commits mailing list