From 3862735d41168a87d9b77e9ce78ddf228212e015 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Mon, 13 Feb 2012 13:56:44 +0900
Subject: [PATCH] Don't look for ibus-1.0.pc when generating GIR.
BUG=http://lists.alioth.debian.org/pipermail/pkg-ime-devel/2012-February/001778.html
TEST=manually
Review URL: https://codereview.appspot.com/5653072
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 68950ff..d2fdefc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -170,7 +170,7 @@ introspection_files = \
ibusenumtypes.h \
$(NULL)
IBus-1.0.gir: $(libibus) Makefile
-IBus_1_0_gir_SCANNERFLAGS = --pkg=ibus-1.0 $(IBUS_GIR_SCANNERFLAGS)
+IBus_1_0_gir_SCANNERFLAGS = --pkg-export=ibus-1.0 $(IBUS_GIR_SCANNERFLAGS)
IBus_1_0_gir_INCLUDES = GLib-2.0 GObject-2.0 Gio-2.0
IBus_1_0_gir_LIBS = $(libibus)
IBus_1_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_files))
--
1.7.10
From a5b51c91cb1185f35f3315ad35e1e03b84264faf Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Mon, 13 Feb 2012 16:03:13 +0900
Subject: [PATCH] Fix typo.
BUG=http://code.google.com/p/ibus/issues/detail?id=1388
TEST=Linux desktop
Review URL: https://codereview.appspot.com/5652077
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index a74ce2a..9456397 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,7 +149,7 @@ AM_CONDITIONAL([ENABLE_GTK2], [test x"$enable_gtk2" = x"yes"])
# --disable-gtk3 option.
AC_ARG_ENABLE(gtk3,
AS_HELP_STRING([--disable-gtk3],
- [Build gtk3 im module]),
+ [Do not build gtk3 im module]),
[enable_gtk3=$enableval],
[enable_gtk3=yes]
)
--
1.7.10
From 3b8d6ee8fbd42a8daf3b544e8d0ba17a198a9acf Mon Sep 17 00:00:00 2001
From: Daiki Ueno <ueno@unixuser.org>
Date: Tue, 14 Feb 2012 10:45:20 +0900
Subject: [PATCH] Fix typoes in gtk-doc comments.
BUG=none
TEST=manually
Review URL: https://codereview.appspot.com/5645095
---
src/ibusbus.h | 6 +++---
src/ibusconfig.h | 52 ++++++++++++++++++++++++------------------------
src/ibusengine.h | 4 ++--
src/ibushotkey.h | 2 +-
src/ibusinputcontext.h | 4 ++--
src/ibusserializable.h | 32 ++++++++++++++---------------
src/ibusshare.h | 10 +++++-----
7 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/src/ibusbus.h b/src/ibusbus.h
index 8f78f87..7c4fdee 100644
--- a/src/ibusbus.h
+++ b/src/ibusbus.h
@@ -102,9 +102,9 @@ gboolean ibus_bus_is_connected (IBusBus *bus);
/**
* ibus_bus_get_connection:
* @bus: An #IBusBus.
- * @returns: (transfer none): A #GDBusConnection of an #IBusIBus instance.
+ * @returns: (transfer none): A #GDBusConnection of an #IBusBus instance.
*
- * Return #GDBusConnection of an #IBusIBus instance.
+ * Return #GDBusConnection of an #IBusBus instance.
*/
GDBusConnection *
ibus_bus_get_connection (IBusBus *bus);
@@ -112,7 +112,7 @@ GDBusConnection *
/**
* ibus_bus_hello:
* @bus: An #IBusBus.
- * @returns: The unique name of #IBus process in DBus.
+ * @returns: The unique name of IBus process in DBus.
*
* This function sends a "HELLO" message to DBus daemon,
* which replies the unique name of current IBus process.
diff --git a/src/ibusconfig.h b/src/ibusconfig.h
index 07f5ce8..c3e0105 100644
--- a/src/ibusconfig.h
+++ b/src/ibusconfig.h
@@ -81,10 +81,10 @@ GType ibus_config_get_type (void);
/**
* ibus_config_new:
- * @connection: An GDBusConnection.
- * @returns: An newly allocated IBusConfig corresponding to @connection.
+ * @connection: A #GDBusConnection.
+ * @returns: An newly allocated #IBusConfig corresponding to @connection.
*
- * New an #IBusConfig from existing GDBusConnection.
+ * New an #IBusConfig from existing #GDBusConnection.
*/
IBusConfig *ibus_config_new (GDBusConnection *connection,
GCancellable *cancellable,
@@ -98,7 +98,7 @@ IBusConfig *ibus_config_new (GDBusConnection *connection,
* The callback should not be %NULL.
* @user_data: The data to pass to callback.
*
- * New an #IBusContext asynchronously.
+ * New an #IBusConfig asynchronously.
*/
void ibus_config_new_async (GDBusConnection *connection,
GCancellable *cancellable,
@@ -121,7 +121,7 @@ IBusConfig *ibus_config_new_async_finish
/**
* ibus_config_get_value:
- * @config: An IBusConfig
+ * @config: An #IBusConfig
* @section: Section name of the configuration option.
* @name: Name of the configure option.
* @returns: A #GVariant or %NULL. Free with g_variant_unref().
@@ -135,7 +135,7 @@ IBusConfig *ibus_config_new_async_finish
*
* ibus-chewing, for example, stores its setting in /desktop/ibus/engine/Chewing,
* so the section name for it is "engine/Chewing".
- * @see_also: ibus_config_set_value.
+ * See also: ibus_config_set_value().
*/
GVariant *ibus_config_get_value (IBusConfig *config,
const gchar *section,
@@ -143,17 +143,17 @@ GVariant *ibus_config_get_value (IBusConfig *config,
/**
* ibus_config_get_value_async:
- * @config: An IBusConfig
+ * @config: An #IBusConfig
* @section: Section name of the configuration option.
* @name: Name of the configure option.
- * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout.
+ * @timeout_ms: The timeout in milliseconds or -1 to use the default timeout.
* @cancellable: A #GCancellable or %NULL.
* @callback: Callback function to invoke when the return value is ready.
* @user_data: The data to pass to callback.
*
* Get the value of a configuration option asynchronously.
*
- * @see_also: ibus_config_get_value.
+ * See also: ibus_config_get_value().
*/
void ibus_config_get_value_async (IBusConfig *config,
const gchar *section,
@@ -165,14 +165,14 @@ void ibus_config_get_value_async (IBusConfig *config,
/**
* ibus_config_get_value_async_finish:
- * @confi: A #IBusConfig.
+ * @config: A #IBusConfig.
* @result: A #GAsyncResult.
* @error: Return location for error or %NULL.
* @returns: A #GVariant or %NULL if error is set. Free with g_variant_unref().
*
* Finish get value of a configuration option.
*
- * @see_also: ibus_config_get_value_async.
+ * See also: ibus_config_get_value_async().
*/
GVariant *ibus_config_get_value_async_finish
(IBusConfig *config,
@@ -181,20 +181,20 @@ GVariant *ibus_config_get_value_async_finish
/**
* ibus_config_get_values:
- * @config: An IBusConfig
+ * @config: An #IBusConfig
* @section: Section name of the configuration option.
* @returns: A #GVariant or %NULL. Free with g_variant_unref().
*
* Get all values in a section synchronously.
*
- * @see_also: ibus_config_set_value.
+ * See also: ibus_config_set_value().
*/
GVariant *ibus_config_get_values (IBusConfig *config,
const gchar *section);
/**
* ibus_config_get_values_async:
- * @config: An IBusConfig
+ * @config: An #IBusConfig
* @section: Section name of the configuration option.
* @timeout_ms: The timeout in milliseconds or -1 to use the default timeout.
* @cancellable: A #GCancellable or %NULL.
@@ -203,7 +203,7 @@ GVariant *ibus_config_get_values (IBusConfig *config,
*
* Get all values in a section asynchronously.
*
- * @see_also: ibus_config_get_values.
+ * See also: ibus_config_get_values().
*/
void ibus_config_get_values_async(IBusConfig *config,
const gchar *section,
@@ -221,7 +221,7 @@ void ibus_config_get_values_async(IBusConfig *config,
*
* Finish get values in a section.
*
- * @see_also: ibus_config_get_values_async.
+ * See also: ibus_config_get_values_async().
*/
GVariant *ibus_config_get_values_async_finish
(IBusConfig *config,
@@ -230,15 +230,15 @@ GVariant *ibus_config_get_values_async_finish
/**
* ibus_config_set_value:
- * @config: An IBusConfig
+ * @config: An #IBusConfig
* @section: Section name of the configuration option.
* @name: Name of the configure option its self.
* @value: A #GVariant that holds the value. If the value is floating, the
* function takes ownership of it.
- * @returns: TRUE if succeed; FALSE otherwise.
+ * @returns: %TRUE if succeed; %FALSE otherwise.
*
* Set the value of a configuration option synchronously.
- * @see_also: ibus_config_get_value.
+ * See also: ibus_config_get_value().
*/
gboolean ibus_config_set_value (IBusConfig *config,
const gchar *section,
@@ -252,14 +252,14 @@ gboolean ibus_config_set_value (IBusConfig *config,
* @name: Name of the configure option.
* @value: A #GVariant that holds the value. If the value is floating, the
* function takes ownership of it.
- * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout.
+ * @timeout_ms: The timeout in milliseconds or -1 to use the default timeout.
* @cancellable: A #GCancellable or %NULL.
* @callback: Callback function to invoke when the return value is ready.
* @user_data: The data to pass to callback.
*
* Set the value of a configuration option asynchronously.
*
- * @see_also: ibus_config_set_value.
+ * See also: ibus_config_set_value().
*/
void ibus_config_set_value_async (IBusConfig *config,
const gchar *section,
@@ -272,14 +272,14 @@ void ibus_config_set_value_async (IBusConfig *config,
/**
* ibus_config_set_value_async_finish:
- * @confi: A #IBusConfig.
+ * @config: A #IBusConfig.
* @result: A #GAsyncResult.
* @error: Return location for error or %NULL.
* @returns: %TRUE or %FALSE if error is set.
*
* Finish set value of a configuration option.
*
- * @see_also: ibus_config_set_value_async.
+ * See also: ibus_config_set_value_async().
*/
gboolean ibus_config_set_value_async_finish
(IBusConfig *config,
@@ -288,13 +288,13 @@ gboolean ibus_config_set_value_async_finish
/**
* ibus_config_unset:
- * @config: An IBusConfig
+ * @config: An #IBusConfig
* @section: Section name of the configuration option.
* @name: Name of the configure option its self.
- * @returns: TRUE if succeed; FALSE otherwise.
+ * @returns: %TRUE if succeed; %FALSE otherwise.
*
* Remove an entry of a configuration option.
- * @see_also: ibus_config_get_value.
+ * See also: ibus_config_get_value().
*/
gboolean ibus_config_unset (IBusConfig *config,
const gchar *section,
diff --git a/src/ibusengine.h b/src/ibusengine.h
index 9ee3462..d2d01a0 100644
--- a/src/ibusengine.h
+++ b/src/ibusengine.h
@@ -158,8 +158,8 @@ GType ibus_engine_get_type (void);
/**
* ibus_engine_new:
- * @name: Name of the IBusObject.
- * @path: Path for IBusService.
+ * @engine_name: Name of the IBusObject.
+ * @object_path: Path for IBusService.
* @connection: An opened GDBusConnection.
* @returns: A newly allocated IBusEngine.
*
diff --git a/src/ibushotkey.h b/src/ibushotkey.h
index 9a341f6..65cdc5b 100644
--- a/src/ibushotkey.h
+++ b/src/ibushotkey.h
@@ -156,7 +156,7 @@ gboolean ibus_hotkey_profile_remove_hotkey_by_event
*
* Emit a <constant>::trigger</constant> signal when a hotkey is in a profile.
*
- * @see_also: ::trigger
+ * See also: ::trigger
*/
GQuark ibus_hotkey_profile_filter_key_event
(IBusHotkeyProfile *profile,
diff --git a/src/ibusinputcontext.h b/src/ibusinputcontext.h
index be3c502..f584de3 100644
--- a/src/ibusinputcontext.h
+++ b/src/ibusinputcontext.h
@@ -283,7 +283,7 @@ gboolean ibus_input_context_process_key_event_async_finish
*
* Pass the key event to input method engine and wait for the reply from ibus (i.e. synchronous IPC).
*
- * @see_also: ibus_input_context_process_key_event_async()
+ * See also: ibus_input_context_process_key_event_async()
*/
gboolean ibus_input_context_process_key_event
(IBusInputContext *context,
@@ -333,7 +333,7 @@ void ibus_input_context_set_capabilities
*
* Activate the property asynchronously.
*
- * @see_also: #IBusEngine::property_activate
+ * See also: #IBusEngine::property_activate
*/
void ibus_input_context_property_activate
(IBusInputContext *context,
diff --git a/src/ibusserializable.h b/src/ibusserializable.h
index 7a100c2..742aeb6 100644
--- a/src/ibusserializable.h
+++ b/src/ibusserializable.h
@@ -29,8 +29,8 @@
* @short_description: A serializable object.
* @stability: Stable
*
- * An IBusSerializable is an IBus object which can be serialized, that is,
- * to be to and from an IBusMessage.
+ * An #IBusSerializable is an IBus object which can be serialized, that is,
+ * to be to and from a #GVariant.
*
* This class is to be extended by other class that requires serialization.
* An extended class should overrides following methods:
@@ -85,10 +85,10 @@
/**
* ibus_serializable_get_attachment:
- * @o: An IBusSerializable.
+ * @o: An #IBusSerializable.
* @k: String formatted key for indexing value.
*
- * Get a value from attachment of an IBusSerializable.
+ * Get a value from attachment of an #IBusSerializable.
* This macro is an convenient wrapper of ibus_serializable_get_qattachment().
*/
#define ibus_serializable_get_attachment(o, k) \
@@ -96,10 +96,10 @@
/**
* ibus_serializable_remove_attachment:
- * @o: An IBusSerializable.
+ * @o: An #IBusSerializable.
* @k: String formatted key for indexing value.
*
- * Remove a value from attachment of an IBusSerializable.
+ * Remove a value from attachment of an #IBusSerializable.
* This macro is an convenient wrapper of ibus_serializable_remove_qattachment().
*/
#define ibus_serializable_remove_attachment(o, k) \
@@ -131,7 +131,7 @@ struct _IBusSerializable {
* @returns: %TRUE if succeed; %FALSE otherwise.
*
* Prototype of serialize function.
- * Serialize function convert an IBusSerializable to IBusMessageIter.
+ * Serialize function convert an #IBusSerializable to #GVariantBuilder.
* Returns a gboolean value which indicates whether the conversion is success.
* Return %TRUE if succeed.
*/
@@ -145,7 +145,7 @@ typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable
* @returns: The number of values in the variant(tuple) are consumed.
*
* Prototype of deserialize function.
- * Deserialize function convert an IBusMessageIter to IBusSerializable.
+ * Deserialize function convert a #GVariant to #IBusSerializable.
* Returns an integer value which indicates how many values in
* the variant(tuple) are consumed.
*/
@@ -155,7 +155,7 @@ typedef gint (* IBusSerializableDeserializeFunc) (IBusSerializable
/**
* IBusSerializableCopyFunc:
* @dest: The destination #IBusSerializable.
- * @src: A source #IBusMessageIter.
+ * @src: A source #IBusSerializable.
* @returns: %TRUE if succeed; %FALSE otherwise.
*
* Prototype of copy function.
@@ -197,10 +197,10 @@ IBusSerializable *ibus_serializable_new (void);
* @key: String formatted key for indexing value.
* @value: Value to be attached or %NULL to remove any prevoius value.
*
- * Attach a value to an IBusSerializable. If the value is floating,
+ * Attach a value to an #IBusSerializable. If the value is floating,
* the serializable will take the ownership.
*
- * @see_also: ibus_serializable_set_attachment().
+ * See also: ibus_serializable_set_attachment().
*/
void ibus_serializable_set_qattachment (IBusSerializable *serializable,
GQuark key,
@@ -213,7 +213,7 @@ void ibus_serializable_set_qattachment (IBusSerializable *ser
* @returns: The attached value; or %NULL if fail to retrieve the value.
*
* Get a value from attachment of an #IBusSerializable.
- * @see_also: ibus_serializable_set_attachment().
+ * See also: ibus_serializable_set_attachment().
*/
GVariant *ibus_serializable_get_qattachment (IBusSerializable *serializable,
GQuark key);
@@ -224,7 +224,7 @@ GVariant *ibus_serializable_get_qattachment (IBusSerializable *ser
* @key: String formatted key for indexing value.
*
* Remove a value from attachment of an #IBusSerializable.
- * @see_also: ibus_serializable_remove_attachment().
+ * See also: ibus_serializable_remove_attachment().
*/
void ibus_serializable_remove_qattachment
(IBusSerializable *serializable,
@@ -238,7 +238,7 @@ void ibus_serializable_remove_qattachment
* Clone an #IBusSerializable.
* The copy method should be implemented in extended class.
*
- * @see_also: IBusSerializableCopyFunc().
+ * See also: IBusSerializableCopyFunc().
*/
IBusSerializable *ibus_serializable_copy (IBusSerializable *serializable);
@@ -250,7 +250,7 @@ IBusSerializable *ibus_serializable_copy (IBusSerializable *ser
* Serialize an #IBusSerializable to a #GVariant.
* The serialize method should be implemented in extended class.
*
- * @see_also: IBusSerializableCopyFunc().
+ * See also: IBusSerializableCopyFunc().
*/
GVariant *ibus_serializable_serialize (IBusSerializable *serializable);
@@ -262,7 +262,7 @@ GVariant *ibus_serializable_serialize (IBusSerializable *ser
* Deserialize a #GVariant to an #IBusSerializable/
* The deserialize method should be implemented in extended class.
*
- * @see_also: IBusSerializableCopyFunc().
+ * See also: IBusSerializableCopyFunc().
*/
IBusSerializable *ibus_serializable_deserialize (GVariant *variant);
diff --git a/src/ibusshare.h b/src/ibusshare.h
index d1cf237..61db3cd 100644
--- a/src/ibusshare.h
+++ b/src/ibusshare.h
@@ -188,7 +188,7 @@ void ibus_set_display (const gchar *display);
* <listitem><para>Socket file under ~/.config/ibus/bus/</para></listitem>
* </orderedlist>
*
- * @see_also: ibus_write_address().
+ * See also: ibus_write_address().
*/
const gchar *ibus_get_address (void);
@@ -198,7 +198,7 @@ const gchar *ibus_get_address (void);
*
* Write D-Bus address to socket file.
*
- * @see_also: ibus_get_address().
+ * See also: ibus_get_address().
*/
void ibus_write_address (const gchar *address);
@@ -302,7 +302,7 @@ void ibus_init (void);
*
* Runs an IBus main loop until ibus_quit() is called in the loop.
*
- * @see_also: ibus_quit().
+ * See also: ibus_quit().
*/
void ibus_main (void);
@@ -312,7 +312,7 @@ void ibus_main (void);
* Stops an IBus from running.
*
* Any calls to ibus_quit() for the loop will return.
- * @see_also: ibus_main().
+ * See also: ibus_main().
*/
void ibus_quit (void);
@@ -325,7 +325,7 @@ void ibus_quit (void);
*
* (ibus-daemon:7088): IBUS-DEBUG: 18:06:45.822819: ibus-daemon started
*
- * If @verbose is TRUE, all levels of messages will be logged. Otherwise,
+ * If @verbose is %TRUE, all levels of messages will be logged. Otherwise,
* DEBUG and WARNING messages will be ignored. The function is used in
* ibus-daemon, but can be useful for IBus client programs as well for
* debugging. It's totally fine for not calling this function. If you
--
1.7.10
From 60587bf804feb7ed4dcb8c1731f115420ca28b49 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 16 Feb 2012 13:04:05 +0900
Subject: [PATCH] Fix gir annotations.
- It seems python does not allow to use 'exec' as a variable.
Renamed 'exec' property so that the constructor in IBus.Component is used.
- It seems the python virtual method is available when the function is
described in header files in case that annotations are needed so
the signal function ibus_factory_create_engine is added newly.
TEST=Linux desktop
Review URL: https://codereview.appspot.com/5649082
---
src/ibusattribute.h | 8 ++++----
src/ibuscomponent.c | 20 ++++++++++----------
src/ibuscomponent.h | 8 ++++----
src/ibusfactory.c | 20 +++++++++++++++++---
src/ibusfactory.h | 11 +++++++++++
5 files changed, 46 insertions(+), 21 deletions(-)
diff --git a/src/ibusattribute.h b/src/ibusattribute.h
index 9096ff3..7a7fcb6 100644
--- a/src/ibusattribute.h
+++ b/src/ibusattribute.h
@@ -130,7 +130,7 @@ GType ibus_attribute_get_type ();
* @value: Value of the attribute.
* @start_index: Where attribute starts.
* @end_index: Where attribute ends.
- * @returns: A newly allocated IBusAttribute.
+ * @returns: (transfer none): A newly allocated IBusAttribute.
*
* New an IBusAttribute.
*/
@@ -182,7 +182,7 @@ guint ibus_attribute_get_end_index
* @underline_type: Type of underline.
* @start_index: Where attribute starts.
* @end_index: Where attribute ends.
- * @returns: A newly allocated #IBusAttribute.
+ * @returns: (transfer none): A newly allocated #IBusAttribute.
*
* New an underline #IBusAttribute.
*/
@@ -194,7 +194,7 @@ IBusAttribute *ibus_attr_underline_new (guint underline_type,
* @color: Color in RGB.
* @start_index: Where attribute starts.
* @end_index: Where attribute ends.
- * @returns: A newly allocated #IBusAttribute.
+ * @returns: (transfer none): A newly allocated #IBusAttribute.
*
* New an foreground #IBusAttribute.
*/
@@ -206,7 +206,7 @@ IBusAttribute *ibus_attr_foreground_new (guint color,
* @color: Color in RGB.
* @start_index: Where attribute starts.
* @end_index: Where attribute ends.
- * @returns: A newly allocated #IBusAttribute.
+ * @returns: (transfer none): A newly allocated #IBusAttribute.
*
* New an background #IBusAttribute.
*/
diff --git a/src/ibuscomponent.c b/src/ibuscomponent.c
index 1c52a23..af8ca4f 100644
--- a/src/ibuscomponent.c
+++ b/src/ibuscomponent.c
@@ -34,7 +34,7 @@ enum {
PROP_LICENSE,
PROP_AUTHOR,
PROP_HOMEPAGE,
- PROP_EXEC,
+ PROP_COMMAND_LINE,
PROP_TEXTDOMAIN,
};
@@ -188,15 +188,15 @@ ibus_component_class_init (IBusComponentClass *class)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
/**
- * IBusComponent:exec:
+ * IBusComponent:command-line:
*
* The exec path of component
*/
g_object_class_install_property (gobject_class,
- PROP_EXEC,
- g_param_spec_string ("exec",
- "component exec",
- "The exec path of component",
+ PROP_COMMAND_LINE,
+ g_param_spec_string ("command-line",
+ "component command-line",
+ "The command line of component",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
@@ -305,7 +305,7 @@ ibus_component_set_property (IBusComponent *component,
g_assert (component->priv->homepage == NULL);
component->priv->homepage = g_value_dup_string (value);
break;
- case PROP_EXEC:
+ case PROP_COMMAND_LINE:
g_assert (component->priv->exec == NULL);
component->priv->exec = g_value_dup_string (value);
break;
@@ -343,7 +343,7 @@ ibus_component_get_property (IBusComponent *component,
case PROP_HOMEPAGE:
g_value_set_string (value, ibus_component_get_homepage (component));
break;
- case PROP_EXEC:
+ case PROP_COMMAND_LINE:
g_value_set_string (value, ibus_component_get_exec (component));
break;
case PROP_TEXTDOMAIN:
@@ -698,7 +698,7 @@ ibus_component_new (const gchar *name,
const gchar *license,
const gchar *author,
const gchar *homepage,
- const gchar *exec,
+ const gchar *command_line,
const gchar *textdomain)
{
return ibus_component_new_varargs ("name", name,
@@ -707,7 +707,7 @@ ibus_component_new (const gchar *name,
"license", license,
"author", author,
"homepage", homepage,
- "exec", exec,
+ "command-line", command_line,
"textdomain", textdomain,
NULL);
}
diff --git a/src/ibuscomponent.h b/src/ibuscomponent.h
index 97a48ec..8f35b94 100644
--- a/src/ibuscomponent.h
+++ b/src/ibuscomponent.h
@@ -84,7 +84,7 @@ typedef struct _IBusComponentPrivate IBusComponentPrivate;
* license: Distribution license of this component.
* author: Author(s) of the component.
* homepage: Homepage of the component.
- * exec: path to component executable.
+ * command_line: path to component executable.
* textdomain: Domain name for dgettext()
*/
struct _IBusComponent {
@@ -115,7 +115,7 @@ GType ibus_component_get_type (void);
* @license: Distribution license of this component.
* @author: Author(s) of the component.
* @homepage: Homepage of the component.
- * @exec: path to component executable.
+ * @command_line: path to component executable.
* @textdomain: Domain name for dgettext()
* @returns: A newly allocated IBusComponent.
*
@@ -127,7 +127,7 @@ IBusComponent *ibus_component_new (const gchar *name,
const gchar *license,
const gchar *author,
const gchar *homepage,
- const gchar *exec,
+ const gchar *command_line,
const gchar *textdomain);
/**
@@ -139,7 +139,7 @@ IBusComponent *ibus_component_new (const gchar *name,
* ibus_component_new_varargs() supports the va_list format.
* name property is required. e.g.
* IBusComponent *component = ibus_component_new_varargs ("name", "ibus-foo",
- * "exec", "/usr/libexec/ibus-engine-foo --ibus",
+ * "command_line", "/usr/libexec/ibus-engine-foo --ibus",
* NULL)
*/
IBusComponent *ibus_component_new_varargs (const gchar *first_property_name,
diff --git a/src/ibusfactory.c b/src/ibusfactory.c
index cdcf1a6..ceb7fb9 100644
--- a/src/ibusfactory.c
+++ b/src/ibusfactory.c
@@ -100,8 +100,8 @@ static const gchar introspection_xml[] =
"</node>";
static IBusEngine *
-_ibus_factory_create_engine (IBusFactory *factory,
- const gchar *engine_name)
+ibus_factory_real_create_engine (IBusFactory *factory,
+ const gchar *engine_name)
{
GType engine_type;
gchar *object_path = NULL;
@@ -154,7 +154,7 @@ ibus_factory_class_init (IBusFactoryClass *class)
IBUS_SERVICE_CLASS (class)->service_method_call = ibus_factory_service_method_call;
IBUS_SERVICE_CLASS (class)->service_get_property = ibus_factory_service_get_property;
IBUS_SERVICE_CLASS (class)->service_set_property = ibus_factory_service_set_property;
- class->create_engine = _ibus_factory_create_engine;
+ class->create_engine = ibus_factory_real_create_engine;
ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml);
@@ -372,3 +372,17 @@ ibus_factory_add_engine (IBusFactory *factory,
g_hash_table_insert (factory->priv->engine_table, g_strdup (engine_name), (gpointer) engine_type);
}
+
+IBusEngine *
+ibus_factory_create_engine (IBusFactory *factory,
+ const gchar *engine_name)
+{
+ IBusEngine *engine = NULL;
+
+ g_assert (engine_name != NULL);
+
+ g_signal_emit (factory, factory_signals[CREATE_ENGINE],
+ 0, engine_name, &engine);
+
+ return engine;
+}
diff --git a/src/ibusfactory.h b/src/ibusfactory.h
index e5e6fba..dd683d0 100644
--- a/src/ibusfactory.h
+++ b/src/ibusfactory.h
@@ -168,6 +168,17 @@ void ibus_factory_add_engine (IBusFactory *factory,
const gchar *engine_name,
GType engine_type);
+/**
+ * ibus_factory_create_engine:
+ * @factory: An #IBusFactory.
+ * @engine_name: Name of an engine.
+ * @returns: (transfer full): #IBusEngine with @engine_name.
+ *
+ * Create an #IBusEngine with @engine_name.
+ */
+IBusEngine *ibus_factory_create_engine (IBusFactory *factory,
+ const gchar *engine_name);
+
G_END_DECLS
#endif
--
1.7.10
From 1b5b4067486212d5cf5d937d40eb18da6941acee Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 23 Feb 2012 12:07:44 +0900
Subject: [PATCH] Add ibus_unset_log_handler to remove the handler in
ibus_set_log_handler
TEST=Linux desktop
Review URL: https://codereview.appspot.com/5690064
---
src/ibusshare.c | 19 ++++++++++++++++++-
src/ibusshare.h | 7 +++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/ibusshare.c b/src/ibusshare.c
index dc7c350..9215369 100644
--- a/src/ibusshare.c
+++ b/src/ibusshare.c
@@ -354,6 +354,7 @@ ibus_quit (void)
}
static gboolean ibus_log_handler_is_verbose = FALSE;
+static guint ibus_log_handler_id = 0;
static void
ibus_log_handler (const gchar *log_domain,
@@ -387,6 +388,22 @@ ibus_log_handler (const gchar *log_domain,
void
ibus_set_log_handler (gboolean verbose)
{
+ if (ibus_log_handler_id != 0) {
+ g_log_remove_handler (G_LOG_DOMAIN, ibus_log_handler_id);
+ }
+
ibus_log_handler_is_verbose = verbose;
- g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_MASK, ibus_log_handler, NULL);
+ ibus_log_handler_id = g_log_set_handler (G_LOG_DOMAIN,
+ G_LOG_LEVEL_MASK,
+ ibus_log_handler,
+ NULL);
+}
+
+void
+ibus_unset_log_handler (void)
+{
+ if (ibus_log_handler_id != 0) {
+ g_log_remove_handler (G_LOG_DOMAIN, ibus_log_handler_id);
+ ibus_log_handler_id = 0;
+ }
}
diff --git a/src/ibusshare.h b/src/ibusshare.h
index 61db3cd..4ff4128 100644
--- a/src/ibusshare.h
+++ b/src/ibusshare.h
@@ -334,5 +334,12 @@ void ibus_quit (void);
*/
void ibus_set_log_handler (gboolean verbose);
+/**
+ * ibus_unset_log_handler:
+ *
+ * Remove the log handler which is set by ibus_set_log_handler.
+ */
+void ibus_unset_log_handler (void);
+
G_END_DECLS
#endif
--
1.7.10
From 25ea1a102f01d1ed3cbadf607b01d15d778e2214 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 24 Apr 2012 23:55:39 +0900
Subject: [PATCH] Fix ibus-x11 SEGV in _process_key_event_done.
IMForwardEvent() calls _Xi18nFindClient() and it could return NULL.
Maybe the connect_id would be disconnected during the async
process_key_event.
This fix checks XIM_DISCONNECT in ims_protocol_handler() to cancel
IMForwardEvent() in _process_key_event_done().
BUG=RH#769135
TEST=Linux desktop
Review URL: https://codereview.appspot.com/6114047
---
client/x11/main.c | 50 +++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/client/x11/main.c b/client/x11/main.c
index 65451ab..8550a53 100644
--- a/client/x11/main.c
+++ b/client/x11/main.c
@@ -464,6 +464,13 @@ _process_key_event_done (GObject *object,
g_error_free (error);
}
+ if (g_hash_table_lookup (_connections,
+ GINT_TO_POINTER ((gint) pfe->connect_id))
+ == NULL) {
+ g_slice_free (IMForwardEventStruct, pfe);
+ return;
+ }
+
if (retval == FALSE) {
IMForwardEvent (_xims, (XPointer) pfe);
}
@@ -600,29 +607,52 @@ _free_ic (gpointer data, gpointer user_data)
}
static int
-xim_close (XIMS ims, IMCloseStruct *call_data)
+_free_x11_iconn_from_id (CARD16 connect_id)
{
X11ICONN *conn;
- LOG (1, "XIM_CLOSE connect_id=%d",
- call_data->connect_id);
-
conn = (X11ICONN *) g_hash_table_lookup (_connections,
- GINT_TO_POINTER ((gint) call_data->connect_id));
- g_return_val_if_fail (conn != NULL, 0);
+ GINT_TO_POINTER ((gint) connect_id));
- g_list_foreach (conn->clients, _free_ic, NULL);
+ if (conn == NULL) {
+ return 0;
+ }
- g_list_free (conn->clients);
+ g_list_free_full (conn->clients, (GDestroyNotify) _free_ic);
g_hash_table_remove (_connections,
- GINT_TO_POINTER ((gint) call_data->connect_id));
+ GINT_TO_POINTER ((gint) connect_id));
g_slice_free (X11ICONN, conn);
return 1;
}
+static int
+xim_close (XIMS xims, IMCloseStruct *call_data)
+{
+ CARD16 connect_id = call_data->connect_id;
+
+ LOG (1, "XIM_CLOSE connect_id=%d", connect_id);
+
+ return _free_x11_iconn_from_id (connect_id);
+}
+
+static int
+xim_disconnect_ic (XIMS xims, IMDisConnectStruct *call_data)
+{
+ CARD16 connect_id = call_data->connect_id;
+
+ LOG (1, "XIM_DISCONNECT connect_id=%d", connect_id);
+
+ _free_x11_iconn_from_id (connect_id);
+
+ /* I am not sure if this can return 1 because I have not experienced
+ * that xim_disconnect_ic() is called. But I wish connect_id is
+ * released from _connections to avoid SEGV. */
+ return 0;
+}
+
static void
_xim_set_cursor_location (X11IC *x11ic)
@@ -745,6 +775,8 @@ ims_protocol_handler (XIMS xims, IMProtocol *call_data)
return xim_open (xims, (IMOpenStruct *)call_data);
case XIM_CLOSE:
return xim_close (xims, (IMCloseStruct *)call_data);
+ case XIM_DISCONNECT:
+ return xim_disconnect_ic (xims, (IMDisConnectStruct *)call_data);
case XIM_CREATE_IC:
return xim_create_ic (xims, (IMChangeICStruct *)call_data);
case XIM_DESTROY_IC:
--
1.7.10
From 3c5158e43ec7ce36080e1554b94354ad9dd57289 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Wed, 25 Apr 2012 00:07:10 +0900
Subject: [PATCH] Fix the coordinate in languagebar when dual monitors are
used.
BUG=http://code.google.com/p/ibus/issues/detail?id=1168
TEST=Linux desktop
Review URL: https://codereview.appspot.com/6119046
---
ui/gtk/languagebar.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/gtk/languagebar.py b/ui/gtk/languagebar.py
index c642d8f..8848652 100644
--- a/ui/gtk/languagebar.py
+++ b/ui/gtk/languagebar.py
@@ -245,6 +245,9 @@ class LanguageBar(gtk.Toolbar):
def set_position(self, x, y):
w, h = self.__screen.get_width(), self.__screen.get_height()
+ if self.__screen.get_n_monitors() > 1:
+ rect = self.__screen.get_monitor_geometry(0)
+ w, h = rect.width, rect.height
if x < 0 or y < 0:
x = w - 20
y = h - 40
--
1.7.10
From 43ca94c3a5849f35e5beb38b2f3f7ccd9ef2e24d Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 26 Apr 2012 10:31:29 +0900
Subject: [PATCH] Fix not to send preedit-changed signal when the preedit
is not changed.
BUG=http://code.google.com/p/ibus/issues/detail?id=1445
TEST=Linux desktop
Review URL: https://codereview.appspot.com/6111046
---
bus/inputcontext.c | 8 ++++++--
client/gtk2/ibusimcontext.c | 35 ++++++++++++++++++++---------------
2 files changed, 26 insertions(+), 17 deletions(-)
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
index 3c81688..9b25213 100644
--- a/bus/inputcontext.c
+++ b/bus/inputcontext.c
@@ -2292,8 +2292,12 @@ new_engine_cb (GObject *obj,
"Opertation was cancelled");
}
else {
- /* Let BusEngineProxy call a Disable signal. */
- bus_input_context_disable (data->context);
+ /* Let BusEngineProxy call a Disable signal.
+ * The Disable signal is needed when the engines are switched
+ * but not needed when an engine is enabled initially. */
+ if (data->context->engine) {
+ bus_input_context_disable (data->context);
+ }
bus_input_context_set_engine (data->context, engine);
g_object_unref (engine);
bus_input_context_enable (data->context);
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 72db581..ab1079f 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -1413,20 +1413,34 @@ _ibus_context_enabled_cb (IBusInputContext *ibuscontext,
}
static void
-_ibus_context_disabled_cb (IBusInputContext *ibuscontext,
- IBusIMContext *ibusimcontext)
+_ibus_im_context_clear (IBusIMContext *ibusimcontext)
{
- IDEBUG ("%s", __FUNCTION__);
+ gboolean flag = FALSE;
+
ibusimcontext->enable = FALSE;
/* clear preedit */
+ flag = ibusimcontext->preedit_visible;
ibusimcontext->preedit_visible = FALSE;
ibusimcontext->preedit_cursor_pos = 0;
+ flag &= (ibusimcontext->preedit_string != NULL &&
+ *ibusimcontext->preedit_string != '\0');
g_free (ibusimcontext->preedit_string);
ibusimcontext->preedit_string = NULL;
- g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0);
- g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0);
+ if (flag) {
+ g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0);
+ g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0);
+ }
+}
+
+static void
+_ibus_context_disabled_cb (IBusInputContext *ibuscontext,
+ IBusIMContext *ibusimcontext)
+{
+ IDEBUG ("%s", __FUNCTION__);
+
+ _ibus_im_context_clear (ibusimcontext);
}
static void
@@ -1439,16 +1453,7 @@ _ibus_context_destroy_cb (IBusInputContext *ibuscontext,
g_object_unref (ibusimcontext->ibuscontext);
ibusimcontext->ibuscontext = NULL;
- ibusimcontext->enable = FALSE;
-
- /* clear preedit */
- ibusimcontext->preedit_visible = FALSE;
- ibusimcontext->preedit_cursor_pos = 0;
- g_free (ibusimcontext->preedit_string);
- ibusimcontext->preedit_string = NULL;
-
- g_signal_emit (ibusimcontext, _signal_preedit_changed_id, 0);
- g_signal_emit (ibusimcontext, _signal_preedit_end_id, 0);
+ _ibus_im_context_clear (ibusimcontext);
}
static void
--
1.7.10
From 19c6e141b8612792e5606b79b35a4c675e691c20 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 27 Apr 2012 11:27:03 +0900
Subject: [PATCH] Enable to fall back /etc/machine-id
http://cgit.freedesktop.org/dbus/dbus/commit/dbus/dbus-sysdeps-unix.c?id=66e52541d5bdd4927a5c702963749760643313f4
BUG=http://code.google.com/p/ibus/issues/detail?id=1389
TEST=Linux desktop
Review URL: https://codereview.appspot.com/6111060
---
src/ibusshare.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/ibusshare.c b/src/ibusshare.c
index 9215369..82d39b8 100644
--- a/src/ibusshare.c
+++ b/src/ibusshare.c
@@ -44,7 +44,11 @@ ibus_get_local_machine_id (void)
if (!g_file_get_contents ("/var/lib/dbus/machine-id",
&machine_id,
NULL,
- &error)) {
+ &error) &&
+ !g_file_get_contents ("/etc/machine-id",
+ &machine_id,
+ NULL,
+ NULL)) {
g_warning ("Unable to load /var/lib/dbus/machine-id: %s", error->message);
g_error_free (error);
machine_id = "machine-id";
--
1.7.10