Updated to 1.4.0
Updated ibus-gjs 3.0.2.20110928 for f15. Updated ibus-gjs 3.2.0.20110928 for f16. (#740588) Updated ibus-530711-preload-sys.patch - Fixed not to show duplicated engine names in setup treeview (#740447) Updated bus-gjs-xx-gnome-shell-3.1.4-build-failure.patch for f16. Updated ibus-xx-bridge-hotkey.patch - Fixed a XKB configuration without the input focus for f16 (#739165) - Fixed not to show null strings in case of no variants (#738130)
This commit is contained in:
parent
81e73d443e
commit
e4605fa2d3
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
/ibus_master_da.po
|
||||
ibus-1.3.6.tar.gz
|
||||
/ibus-1.3.7.tar.gz
|
||||
/ibus-1.3.8.tar.gz
|
||||
@ -11,10 +12,12 @@ ibus-1.3.6.tar.gz
|
||||
/ibus-1.3.99.20110228.tar.gz
|
||||
/ibus-1.3.99.20110408.tar.gz
|
||||
/ibus-1.3.99.20110419.tar.gz
|
||||
/ibus_master_da.po
|
||||
/ibus-1.3.99.20110817.tar.gz
|
||||
/ibus-1.4.0.tar.gz
|
||||
/ibus-gjs-3.0.2.20110823.tar.gz
|
||||
/ibus-gjs-3.1.4.20110823.tar.gz
|
||||
/ibus-gjs-3.0.2.20110908.tar.gz
|
||||
/ibus-gjs-3.1.91.20110908.tar.gz
|
||||
/ibus-gjs-3.1.91.20110913.tar.gz
|
||||
/ibus-gjs-3.0.2.20110928.tar.gz
|
||||
/ibus-gjs-3.2.0.20110928.tar.gz
|
||||
|
@ -1,6 +1,6 @@
|
||||
From fd80539e980f464192aed22c71e83ff3a6ec61b3 Mon Sep 17 00:00:00 2001
|
||||
From a7e922f290c1e3eba42ca1c6147ab1704ec272fb Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Thu, 1 Sep 2011 14:38:13 +0900
|
||||
Date: Mon, 26 Sep 2011 13:06:05 +0900
|
||||
Subject: [PATCH] Reload preload engines until users customize the list.
|
||||
|
||||
The idea is, if users don't customize the preload_engines with ibus-setup,
|
||||
@ -20,10 +20,10 @@ IBUS_PRELOAD_ENGINE_MODE_USER and users can customize the value
|
||||
bus/ibusimpl.c | 412 +++++++++++++++++++++++++++++++++++++++-----------
|
||||
data/ibus.schemas.in | 15 ++-
|
||||
ibus/common.py | 6 +
|
||||
setup/main.py | 70 ++++++++-
|
||||
setup/main.py | 73 ++++++++-
|
||||
setup/setup.ui | 21 +++-
|
||||
src/ibustypes.h | 10 ++
|
||||
6 files changed, 438 insertions(+), 96 deletions(-)
|
||||
6 files changed, 440 insertions(+), 97 deletions(-)
|
||||
|
||||
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||
index 1942504..3fce912 100644
|
||||
@ -560,7 +560,7 @@ index 6483aae..127ed93 100644
|
||||
pass
|
||||
|
||||
diff --git a/setup/main.py b/setup/main.py
|
||||
index 7f4a040..192fb88 100644
|
||||
index 7f4a040..095084b 100644
|
||||
--- a/setup/main.py
|
||||
+++ b/setup/main.py
|
||||
@@ -92,6 +92,7 @@ class Setup(object):
|
||||
@ -599,7 +599,17 @@ index 7f4a040..192fb88 100644
|
||||
|
||||
self.__treeview = self.__builder.get_object("treeview_engines")
|
||||
self.__treeview.set_engines(engines)
|
||||
@@ -265,6 +273,26 @@ class Setup(object):
|
||||
@@ -247,7 +255,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")
|
||||
- button.set_sensitive(engine != None and engine not in self.__treeview.get_engines())
|
||||
+ 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):
|
||||
engine_names = map(lambda e: e.name, engines)
|
||||
self.__config.set_list("general", "preload_engines", engine_names, "s")
|
||||
|
||||
@ -626,7 +636,7 @@ index 7f4a040..192fb88 100644
|
||||
def __button_engine_add_cb(self, button):
|
||||
engine = self.__combobox.get_active_engine()
|
||||
self.__treeview.append_engine(engine)
|
||||
@@ -276,6 +304,32 @@ class Setup(object):
|
||||
@@ -276,6 +305,32 @@ class Setup(object):
|
||||
about.run()
|
||||
about.destroy()
|
||||
|
||||
@ -659,7 +669,7 @@ index 7f4a040..192fb88 100644
|
||||
def __init_bus(self):
|
||||
try:
|
||||
self.__bus = ibus.Bus()
|
||||
@@ -466,7 +520,11 @@ class Setup(object):
|
||||
@@ -466,7 +521,11 @@ class Setup(object):
|
||||
self.__config.set_value("general", "use_global_engine", value)
|
||||
|
||||
def __config_value_changed_cb(self, bus, section, name, value):
|
||||
@ -719,10 +729,10 @@ index f1e6d0b..562c091 100644
|
||||
</child>
|
||||
</object>
|
||||
diff --git a/src/ibustypes.h b/src/ibustypes.h
|
||||
index 8146719..6151cd0 100644
|
||||
index d916265..422eb84 100644
|
||||
--- a/src/ibustypes.h
|
||||
+++ b/src/ibustypes.h
|
||||
@@ -186,6 +186,16 @@ typedef enum {
|
||||
@@ -198,6 +198,16 @@ typedef enum {
|
||||
} IBusError;
|
||||
|
||||
/**
|
||||
@ -740,5 +750,5 @@ index 8146719..6151cd0 100644
|
||||
* @x: x coordinate.
|
||||
* @y: y coordinate.
|
||||
--
|
||||
1.7.5.4
|
||||
1.7.6.2
|
||||
|
||||
|
794
ibus-HEAD.patch
794
ibus-HEAD.patch
@ -1,795 +1 @@
|
||||
From 9614076737ee88c092af209485d1d65d2269f4ad Mon Sep 17 00:00:00 2001
|
||||
From: Tsuyoshi Horo <horo@chromium.org>
|
||||
Date: Thu, 18 Aug 2011 11:48:30 -0400
|
||||
Subject: [PATCH] Fix for ibus_serializable_{get,set}_attachment.
|
||||
|
||||
TEST=Linux desktop
|
||||
|
||||
Review URL: http://codereview.appspot.com/4905054
|
||||
Patch from Tsuyoshi Horo <horo@chromium.org>.
|
||||
---
|
||||
src/ibusserializable.c | 18 +++++++++---------
|
||||
src/ibusserializable.h | 3 +--
|
||||
src/tests/ibus-serializable.c | 34 ++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 44 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/ibusserializable.c b/src/ibusserializable.c
|
||||
index 2e4b21f..ed89534 100644
|
||||
--- a/src/ibusserializable.c
|
||||
+++ b/src/ibusserializable.c
|
||||
@@ -164,7 +164,7 @@ _g_value_serialize (GValue *value)
|
||||
{ \
|
||||
g##_type v; \
|
||||
v = g_value_get_##_type (value); \
|
||||
- return g_variant_new ("v", g_variant_new (signature, v)); \
|
||||
+ return g_variant_new (signature, v); \
|
||||
}
|
||||
CASE_ENTRY(CHAR, char, "y");
|
||||
CASE_ENTRY(BOOLEAN, boolean, "b");
|
||||
@@ -198,14 +198,14 @@ _g_value_deserialize (GVariant *variant)
|
||||
}
|
||||
|
||||
typedef gchar *gstring;
|
||||
-#define IF_ENTRY(TYPE, _type, signature) \
|
||||
- if (type == G_VARIANT_TYPE_##TYPE) { \
|
||||
- g##_type v; \
|
||||
- g_variant_get (variant, signature, &v); \
|
||||
- value = g_slice_new0 (GValue); \
|
||||
- g_value_init (value, G_TYPE_##TYPE); \
|
||||
- g_value_set_##_type (value, v); \
|
||||
- return value; \
|
||||
+#define IF_ENTRY(TYPE, _type, signature) \
|
||||
+ if (g_variant_type_equal(type, G_VARIANT_TYPE_##TYPE)) { \
|
||||
+ g##_type v; \
|
||||
+ g_variant_get (variant, signature, &v); \
|
||||
+ value = g_slice_new0 (GValue); \
|
||||
+ g_value_init (value, G_TYPE_##TYPE); \
|
||||
+ g_value_set_##_type (value, v); \
|
||||
+ return value; \
|
||||
}
|
||||
#define G_VARIANT_TYPE_CHAR G_VARIANT_TYPE_BYTE
|
||||
IF_ENTRY(CHAR, char, "y");
|
||||
diff --git a/src/ibusserializable.h b/src/ibusserializable.h
|
||||
index 358af32..8fd9f8a 100644
|
||||
--- a/src/ibusserializable.h
|
||||
+++ b/src/ibusserializable.h
|
||||
@@ -87,12 +87,11 @@
|
||||
* ibus_serializable_get_attachment:
|
||||
* @o: An IBusSerializable.
|
||||
* @k: String formatted key for indexing value.
|
||||
- * @v: Value to be attached. Should be also serializable.
|
||||
*
|
||||
* 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, v) \
|
||||
+#define ibus_serializable_get_attachment(o, k) \
|
||||
ibus_serializable_get_qattachment (o, g_quark_from_string (k))
|
||||
|
||||
/**
|
||||
diff --git a/src/tests/ibus-serializable.c b/src/tests/ibus-serializable.c
|
||||
index c2a7529..e2541ec 100644
|
||||
--- a/src/tests/ibus-serializable.c
|
||||
+++ b/src/tests/ibus-serializable.c
|
||||
@@ -128,6 +128,39 @@ test_property (void)
|
||||
g_variant_type_info_assert_no_infos ();
|
||||
}
|
||||
|
||||
+static void
|
||||
+test_attachment (void)
|
||||
+{
|
||||
+ IBusText *text = ibus_text_new_from_string ("main text");
|
||||
+
|
||||
+ GValue value1 = { 0 };
|
||||
+ g_value_init(&value1, G_TYPE_INT);
|
||||
+ g_value_set_int(&value1, 100);
|
||||
+ ibus_serializable_set_attachment ((IBusSerializable *)text, "key1", &value1);
|
||||
+
|
||||
+ GValue value2 = { 0 };
|
||||
+ g_value_init(&value2, G_TYPE_STRING);
|
||||
+ g_value_set_string(&value2, "value string");
|
||||
+ ibus_serializable_set_attachment ((IBusSerializable *)text, "key2", &value2);
|
||||
+
|
||||
+ GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text);
|
||||
+ g_object_unref ((IBusSerializable *)text);
|
||||
+
|
||||
+ IBusSerializable *object = (IBusSerializable *) ibus_serializable_deserialize (variant);
|
||||
+ g_variant_unref (variant);
|
||||
+
|
||||
+ g_assert_cmpstr (((IBusText *)object)->text, ==, "main text");
|
||||
+
|
||||
+ const GValue *newvalue1 = ibus_serializable_get_attachment (object, "key1");
|
||||
+ g_assert (newvalue1 != NULL);
|
||||
+ g_assert (g_value_get_int (newvalue1) == 100);
|
||||
+
|
||||
+ const GValue *newvalue2 = ibus_serializable_get_attachment (object, "key2");
|
||||
+ g_assert (newvalue2 != NULL);
|
||||
+ g_assert_cmpstr (g_value_get_string (newvalue2), ==, "value string");
|
||||
+
|
||||
+ g_variant_type_info_assert_no_infos ();
|
||||
+}
|
||||
|
||||
gint
|
||||
main (gint argc,
|
||||
@@ -142,6 +175,7 @@ main (gint argc,
|
||||
g_test_add_func ("/ibus/enginedesc", test_engine_desc);
|
||||
g_test_add_func ("/ibus/lookuptable", test_lookup_table);
|
||||
g_test_add_func ("/ibus/property", test_property);
|
||||
+ g_test_add_func ("/ibus/attachment", test_attachment);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
From ac9dfac13cef34288440a2ecdf067cd827fb2f8f Mon Sep 17 00:00:00 2001
|
||||
From: Peng Huang <shawn.p.huang@gmail.com>
|
||||
Date: Fri, 19 Aug 2011 08:23:33 -0400
|
||||
Subject: [PATCH] Use GVariant as attachment for IBusSerializable.
|
||||
|
||||
BUG=None
|
||||
TEST=Linux desktop
|
||||
|
||||
Review URL: http://codereview.appspot.com/4902051
|
||||
---
|
||||
src/ibusserializable.c | 176 ++++++-----------------------------------
|
||||
src/ibusserializable.h | 81 +++++++++----------
|
||||
src/tests/ibus-serializable.c | 47 ++++++++----
|
||||
3 files changed, 98 insertions(+), 206 deletions(-)
|
||||
|
||||
diff --git a/src/ibusserializable.c b/src/ibusserializable.c
|
||||
index ed89534..6251c89 100644
|
||||
--- a/src/ibusserializable.c
|
||||
+++ b/src/ibusserializable.c
|
||||
@@ -124,114 +124,13 @@ ibus_serializable_destroy (IBusSerializable *serializable)
|
||||
parent_class->destroy (IBUS_OBJECT (serializable));
|
||||
}
|
||||
|
||||
-static GValue *
|
||||
-ibus_g_value_dup (const GValue *value)
|
||||
-{
|
||||
- GValue *new_value;
|
||||
-
|
||||
- new_value = g_slice_new0 (GValue);
|
||||
- g_value_init (new_value, G_VALUE_TYPE (value));
|
||||
- g_value_copy (value, new_value);
|
||||
-
|
||||
- return new_value;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-ibus_g_value_free (GValue *value)
|
||||
-{
|
||||
- g_value_unset (value);
|
||||
- g_slice_free (GValue, value);
|
||||
-}
|
||||
-
|
||||
-static GVariant *
|
||||
-_g_value_serialize (GValue *value)
|
||||
-{
|
||||
- GType type;
|
||||
-
|
||||
- type = G_VALUE_TYPE (value);
|
||||
- g_return_val_if_fail (type != G_TYPE_INVALID, FALSE);
|
||||
-
|
||||
- if (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE)) {
|
||||
- IBusSerializable *object;
|
||||
- object = IBUS_SERIALIZABLE (g_value_get_object (value));
|
||||
- return ibus_serializable_serialize (object);
|
||||
- }
|
||||
-
|
||||
- typedef const gchar *gstring;
|
||||
- switch (type) {
|
||||
-#define CASE_ENTRY(TYPE, _type, signature) \
|
||||
- case G_TYPE_##TYPE: \
|
||||
- { \
|
||||
- g##_type v; \
|
||||
- v = g_value_get_##_type (value); \
|
||||
- return g_variant_new (signature, v); \
|
||||
- }
|
||||
- CASE_ENTRY(CHAR, char, "y");
|
||||
- CASE_ENTRY(BOOLEAN, boolean, "b");
|
||||
- CASE_ENTRY(INT, int, "i");
|
||||
- CASE_ENTRY(UINT, uint, "u");
|
||||
- CASE_ENTRY(INT64, int64, "x");
|
||||
- CASE_ENTRY(UINT64, uint64, "t");
|
||||
- CASE_ENTRY(FLOAT, float, "d");
|
||||
- CASE_ENTRY(DOUBLE, double, "d");
|
||||
- CASE_ENTRY(STRING, string, "s");
|
||||
-#undef CASE_ENTRY
|
||||
- }
|
||||
-
|
||||
- g_assert_not_reached ();
|
||||
-}
|
||||
-
|
||||
-static GValue *
|
||||
-_g_value_deserialize (GVariant *variant)
|
||||
-{
|
||||
- GValue *value = NULL;
|
||||
- const GVariantType *type;
|
||||
-
|
||||
- type = g_variant_get_type (variant);
|
||||
- if (type == G_VARIANT_TYPE_TUPLE) {
|
||||
- IBusSerializable *object;
|
||||
- object = ibus_serializable_deserialize (variant);
|
||||
- value = g_slice_new0 (GValue);
|
||||
- g_value_init (value, G_OBJECT_TYPE (object));
|
||||
- g_value_take_object (value, object);
|
||||
- return value;
|
||||
- }
|
||||
-
|
||||
- typedef gchar *gstring;
|
||||
-#define IF_ENTRY(TYPE, _type, signature) \
|
||||
- if (g_variant_type_equal(type, G_VARIANT_TYPE_##TYPE)) { \
|
||||
- g##_type v; \
|
||||
- g_variant_get (variant, signature, &v); \
|
||||
- value = g_slice_new0 (GValue); \
|
||||
- g_value_init (value, G_TYPE_##TYPE); \
|
||||
- g_value_set_##_type (value, v); \
|
||||
- return value; \
|
||||
- }
|
||||
-#define G_VARIANT_TYPE_CHAR G_VARIANT_TYPE_BYTE
|
||||
- IF_ENTRY(CHAR, char, "y");
|
||||
-#undef G_VARIANT_TYPE_CHAR
|
||||
- IF_ENTRY(BOOLEAN, boolean, "b");
|
||||
-#define G_VARIANT_TYPE_INT G_VARIANT_TYPE_INT32
|
||||
-#define G_VARIANT_TYPE_UINT G_VARIANT_TYPE_UINT32
|
||||
- IF_ENTRY(INT, int, "i");
|
||||
- IF_ENTRY(UINT, uint, "u");
|
||||
-#undef G_VARIANT_TYPE_INT
|
||||
-#undef G_VARIANT_TYPE_UINT
|
||||
- IF_ENTRY(INT64, int64, "x");
|
||||
- IF_ENTRY(UINT64, uint64, "t");
|
||||
- IF_ENTRY(DOUBLE, double, "d");
|
||||
- IF_ENTRY(STRING, string, "s");
|
||||
-
|
||||
- g_return_val_if_reached (NULL);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
_serialize_cb (GQuark key,
|
||||
- GValue *value,
|
||||
+ GVariant *value,
|
||||
GVariantBuilder *array)
|
||||
{
|
||||
g_variant_builder_add (array, "{sv}",
|
||||
- g_quark_to_string (key), _g_value_serialize (value));
|
||||
+ g_quark_to_string (key), g_variant_new_variant (value));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -257,21 +156,26 @@ ibus_serializable_real_deserialize (IBusSerializable *object,
|
||||
GVariantIter *iter = NULL;
|
||||
g_variant_get_child (variant, 1, "a{sv}", &iter);
|
||||
while (g_variant_iter_loop (iter, "{&sv}", &key, &value)) {
|
||||
- ibus_serializable_set_attachment (object, key, _g_value_deserialize (value));
|
||||
+ GVariant *attachment = g_variant_get_variant (value);
|
||||
+ ibus_serializable_set_attachment (object,
|
||||
+ key,
|
||||
+ attachment);
|
||||
+ g_variant_unref (attachment);
|
||||
+ g_variant_unref (value);
|
||||
}
|
||||
g_variant_iter_free (iter);
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void
|
||||
-_copy_cb (GQuark key,
|
||||
- GValue *value,
|
||||
- GData **datalist)
|
||||
+_copy_cb (GQuark key,
|
||||
+ GVariant *value,
|
||||
+ GData **datalist)
|
||||
{
|
||||
g_datalist_id_set_data_full (datalist,
|
||||
key,
|
||||
- ibus_g_value_dup (value),
|
||||
- (GDestroyNotify) ibus_g_value_free);
|
||||
+ g_variant_ref (value),
|
||||
+ (GDestroyNotify) g_variant_unref);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -289,50 +193,21 @@ ibus_serializable_real_copy (IBusSerializable *dest,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
-gboolean
|
||||
-ibus_serializable_set_qattachment (IBusSerializable *object,
|
||||
+void
|
||||
+ibus_serializable_set_qattachment (IBusSerializable *serializable,
|
||||
GQuark key,
|
||||
- const GValue *value)
|
||||
+ GVariant *value)
|
||||
{
|
||||
- g_return_val_if_fail (IBUS_IS_SERIALIZABLE (object), FALSE);
|
||||
- g_return_val_if_fail (key != 0, FALSE);
|
||||
- g_return_val_if_fail (G_IS_VALUE (value), FALSE);
|
||||
-
|
||||
- IBusSerializablePrivate *priv;
|
||||
- priv = IBUS_SERIALIZABLE_GET_PRIVATE (object);
|
||||
-
|
||||
- GType type = G_VALUE_TYPE (value);
|
||||
-
|
||||
- switch (type) {
|
||||
- case G_TYPE_CHAR:
|
||||
- case G_TYPE_INT:
|
||||
- case G_TYPE_INT64:
|
||||
- case G_TYPE_UINT:
|
||||
- case G_TYPE_UINT64:
|
||||
- case G_TYPE_BOOLEAN:
|
||||
- case G_TYPE_DOUBLE:
|
||||
- case G_TYPE_FLOAT:
|
||||
- case G_TYPE_STRING:
|
||||
- g_datalist_id_set_data_full (&priv->attachments,
|
||||
- key,
|
||||
- ibus_g_value_dup (value),
|
||||
- (GDestroyNotify) ibus_g_value_free);
|
||||
- return TRUE;
|
||||
- }
|
||||
-
|
||||
- if (g_type_is_a (type, IBUS_TYPE_SERIALIZABLE)) {
|
||||
- g_datalist_id_set_data_full (&priv->attachments,
|
||||
- key,
|
||||
- ibus_g_value_dup (value),
|
||||
- (GDestroyNotify) ibus_g_value_free);
|
||||
- return TRUE;
|
||||
- }
|
||||
+ g_return_if_fail (IBUS_IS_SERIALIZABLE (serializable));
|
||||
+ g_return_if_fail (key != 0);
|
||||
|
||||
- g_warning ("The value of %s is not support serializing", g_type_name (type));
|
||||
- return FALSE;
|
||||
+ g_datalist_id_set_data_full (&serializable->priv->attachments,
|
||||
+ key,
|
||||
+ value ? g_variant_ref_sink (value) : NULL,
|
||||
+ (GDestroyNotify) g_variant_unref);
|
||||
}
|
||||
|
||||
-const GValue *
|
||||
+GVariant *
|
||||
ibus_serializable_get_qattachment (IBusSerializable *serializable,
|
||||
GQuark key)
|
||||
{
|
||||
@@ -340,7 +215,8 @@ ibus_serializable_get_qattachment (IBusSerializable *serializable,
|
||||
g_return_val_if_fail (IBUS_IS_SERIALIZABLE (serializable), NULL);
|
||||
g_return_val_if_fail (key != 0, NULL);
|
||||
|
||||
- return (const GValue *) g_datalist_id_get_data (&serializable->priv->attachments, key);
|
||||
+ return (GVariant *) g_datalist_id_get_data (
|
||||
+ &serializable->priv->attachments, key);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -351,7 +227,7 @@ ibus_serializable_remove_qattachment (IBusSerializable *serializable,
|
||||
g_return_if_fail (IBUS_IS_SERIALIZABLE (serializable));
|
||||
g_return_if_fail (key != 0);
|
||||
|
||||
- g_datalist_id_remove_no_notify (&serializable->priv->attachments, key);
|
||||
+ g_datalist_id_set_data (&serializable->priv->attachments, key, NULL);
|
||||
}
|
||||
|
||||
IBusSerializable *
|
||||
diff --git a/src/ibusserializable.h b/src/ibusserializable.h
|
||||
index 8fd9f8a..7a100c2 100644
|
||||
--- a/src/ibusserializable.h
|
||||
+++ b/src/ibusserializable.h
|
||||
@@ -126,39 +126,40 @@ struct _IBusSerializable {
|
||||
|
||||
/**
|
||||
* IBusSerializableSerializeFunc:
|
||||
- * @object: An IBusSerializable.
|
||||
- * @iter: An IBusMessageIter.
|
||||
- * @returns: TRUE if succeed; FALSE otherwise.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
+ * @builder: A #GVariantBuilder.
|
||||
+ * @returns: %TRUE if succeed; %FALSE otherwise.
|
||||
*
|
||||
* Prototype of serialize function.
|
||||
* Serialize function convert an IBusSerializable to IBusMessageIter.
|
||||
* Returns a gboolean value which indicates whether the conversion is success.
|
||||
- * Return TRUE if succeed.
|
||||
+ * Return %TRUE if succeed.
|
||||
*/
|
||||
-typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable *object,
|
||||
+typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable *serializable,
|
||||
GVariantBuilder *builder);
|
||||
|
||||
/**
|
||||
* IBusSerializableDeserializeFunc:
|
||||
- * @object: An IBusSerializable.
|
||||
- * @iter: An IBusMessageIter.
|
||||
- * @returns: TRUE if succeed; FALSE otherwise.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
+ * @variant: A #GVariant contains a tuple.
|
||||
+ * @returns: The number of values in the variant(tuple) are consumed.
|
||||
*
|
||||
* Prototype of deserialize function.
|
||||
* Deserialize function convert an IBusMessageIter to IBusSerializable.
|
||||
- * Returns a gboolean value which indicates whether the conversion is success.
|
||||
+ * Returns an integer value which indicates how many values in
|
||||
+ * the variant(tuple) are consumed.
|
||||
*/
|
||||
-typedef gint (* IBusSerializableDeserializeFunc) (IBusSerializable *object,
|
||||
+typedef gint (* IBusSerializableDeserializeFunc) (IBusSerializable *serializable,
|
||||
GVariant *variant);
|
||||
|
||||
/**
|
||||
* IBusSerializableCopyFunc:
|
||||
- * @dest: The destination IBusSerializable.
|
||||
- * @src: A source IBusMessageIter.
|
||||
- * @returns: TRUE if succeed; FALSE otherwise.
|
||||
+ * @dest: The destination #IBusSerializable.
|
||||
+ * @src: A source #IBusMessageIter.
|
||||
+ * @returns: %TRUE if succeed; %FALSE otherwise.
|
||||
*
|
||||
* Prototype of copy function.
|
||||
- * Copy function copy from source IBusSerializable to the destination one.
|
||||
+ * Copy function copy from source #IBusSerializable to the destination one.
|
||||
* Returns a gboolean value which indicates whether the copying is success.
|
||||
*/
|
||||
typedef gboolean (* IBusSerializableCopyFunc) (IBusSerializable *dest,
|
||||
@@ -188,79 +189,77 @@ GType ibus_serializable_get_type (void);
|
||||
*
|
||||
* Returns: a new instance of #IBusSerializable.
|
||||
*/
|
||||
-IBusSerializable * ibus_serializable_new (void);
|
||||
+IBusSerializable *ibus_serializable_new (void);
|
||||
|
||||
/**
|
||||
* ibus_serializable_set_qattachment:
|
||||
- * @object: An IBusSerializable.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
* @key: String formatted key for indexing value.
|
||||
- * @value: Value to be attached. Should be also serializable.
|
||||
- * @returns: TRUE if succeed; FALSE otherwise.
|
||||
+ * @value: Value to be attached or %NULL to remove any prevoius value.
|
||||
*
|
||||
- * Attach a value to an IBusSerializable. The value should be serializable as well.
|
||||
- * Basic type such as integer, string are deemed to be serializable.
|
||||
+ * Attach a value to an IBusSerializable. If the value is floating,
|
||||
+ * the serializable will take the ownership.
|
||||
*
|
||||
* @see_also: ibus_serializable_set_attachment().
|
||||
*/
|
||||
-gboolean ibus_serializable_set_qattachment (IBusSerializable *object,
|
||||
+void ibus_serializable_set_qattachment (IBusSerializable *serializable,
|
||||
GQuark key,
|
||||
- const GValue *value);
|
||||
+ GVariant *value);
|
||||
|
||||
/**
|
||||
* ibus_serializable_get_qattachment:
|
||||
- * @object: An IBusSerializable.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
* @key: String formatted key for indexing value.
|
||||
- * @returns: The attached value; or NULL if fail to retrieve the value.
|
||||
+ * @returns: The attached value; or %NULL if fail to retrieve the value.
|
||||
*
|
||||
- * Get a value from attachment of an IBusSerializable.
|
||||
+ * Get a value from attachment of an #IBusSerializable.
|
||||
* @see_also: ibus_serializable_set_attachment().
|
||||
*/
|
||||
-const GValue *ibus_serializable_get_qattachment (IBusSerializable *object,
|
||||
+GVariant *ibus_serializable_get_qattachment (IBusSerializable *serializable,
|
||||
GQuark key);
|
||||
|
||||
/**
|
||||
* ibus_serializable_remove_qattachment:
|
||||
- * @object: An IBusSerializable.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
* @key: String formatted key for indexing value.
|
||||
*
|
||||
- * Remove a value from attachment of an IBusSerializable.
|
||||
+ * Remove a value from attachment of an #IBusSerializable.
|
||||
* @see_also: ibus_serializable_remove_attachment().
|
||||
*/
|
||||
void ibus_serializable_remove_qattachment
|
||||
- (IBusSerializable *object,
|
||||
+ (IBusSerializable *serializable,
|
||||
GQuark key);
|
||||
|
||||
/**
|
||||
* ibus_serializable_copy:
|
||||
- * @object: An IBusSerializable.
|
||||
- * @returns: A newly allocated clone object; or NULL if @object is not serializable.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
+ * @returns: A newly allocated clone object; or %NULL if @object is not serializable.
|
||||
*
|
||||
- * Clone an IBusSerializable.
|
||||
+ * Clone an #IBusSerializable.
|
||||
* The copy method should be implemented in extended class.
|
||||
*
|
||||
* @see_also: IBusSerializableCopyFunc().
|
||||
*/
|
||||
-IBusSerializable *ibus_serializable_copy (IBusSerializable *object);
|
||||
+IBusSerializable *ibus_serializable_copy (IBusSerializable *serializable);
|
||||
|
||||
/**
|
||||
* ibus_serializable_serialize:
|
||||
- * @object: An IBusSerializable.
|
||||
- * @iter: An IBusMessageIter.
|
||||
- * @returns: TRUE if succeed; FALSE otherwise.
|
||||
+ * @serializable: An #IBusSerializable.
|
||||
+ * @returns: A #GVariant.
|
||||
*
|
||||
- * Serialize an IBusSerializable to an IBusMessageIter.
|
||||
+ * Serialize an #IBusSerializable to a #GVariant.
|
||||
* The serialize method should be implemented in extended class.
|
||||
*
|
||||
* @see_also: IBusSerializableCopyFunc().
|
||||
*/
|
||||
-GVariant *ibus_serializable_serialize (IBusSerializable *object);
|
||||
+GVariant *ibus_serializable_serialize (IBusSerializable *serializable);
|
||||
|
||||
/**
|
||||
* ibus_serializable_deserialize:
|
||||
- * @iter: An IBusMessageIter.
|
||||
- * @returns: The deserialized IBusSerializable.
|
||||
+ * @variant: A #GVariant.
|
||||
+ * @returns: The deserialized #IBusSerializable.
|
||||
*
|
||||
- * Deserialize an IBusMessageIter to an IBusSerializable/
|
||||
+ * Deserialize a #GVariant to an #IBusSerializable/
|
||||
* The deserialize method should be implemented in extended class.
|
||||
*
|
||||
* @see_also: IBusSerializableCopyFunc().
|
||||
diff --git a/src/tests/ibus-serializable.c b/src/tests/ibus-serializable.c
|
||||
index e2541ec..d2bd61a 100644
|
||||
--- a/src/tests/ibus-serializable.c
|
||||
+++ b/src/tests/ibus-serializable.c
|
||||
@@ -12,7 +12,7 @@ void test_serializable (IBusSerializable *object)
|
||||
g_variant_get_data (variant);
|
||||
s1 = g_variant_print (variant, TRUE);
|
||||
|
||||
- object = (IBusSerializable *) ibus_serializable_deserialize (variant);
|
||||
+ object = ibus_serializable_deserialize (variant);
|
||||
g_variant_unref (variant);
|
||||
|
||||
variant = ibus_serializable_serialize (object);
|
||||
@@ -131,34 +131,51 @@ test_property (void)
|
||||
static void
|
||||
test_attachment (void)
|
||||
{
|
||||
- IBusText *text = ibus_text_new_from_string ("main text");
|
||||
+ IBusText *text = ibus_text_new_from_static_string ("main text");
|
||||
|
||||
- GValue value1 = { 0 };
|
||||
- g_value_init(&value1, G_TYPE_INT);
|
||||
- g_value_set_int(&value1, 100);
|
||||
- ibus_serializable_set_attachment ((IBusSerializable *)text, "key1", &value1);
|
||||
+ ibus_serializable_set_attachment ((IBusSerializable *)text,
|
||||
+ "key1",
|
||||
+ g_variant_new_int32 (100));
|
||||
|
||||
- GValue value2 = { 0 };
|
||||
- g_value_init(&value2, G_TYPE_STRING);
|
||||
- g_value_set_string(&value2, "value string");
|
||||
- ibus_serializable_set_attachment ((IBusSerializable *)text, "key2", &value2);
|
||||
+ ibus_serializable_set_attachment ((IBusSerializable *)text,
|
||||
+ "key2",
|
||||
+ g_variant_new_string ("value string"));
|
||||
+
|
||||
+ ibus_serializable_set_attachment ((IBusSerializable *)text,
|
||||
+ "key3",
|
||||
+ g_variant_new ("(iuds)",1, 2, 3.333, "test value"));
|
||||
|
||||
GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text);
|
||||
g_object_unref ((IBusSerializable *)text);
|
||||
|
||||
- IBusSerializable *object = (IBusSerializable *) ibus_serializable_deserialize (variant);
|
||||
+ IBusSerializable *object = ibus_serializable_deserialize (variant);
|
||||
g_variant_unref (variant);
|
||||
|
||||
g_assert_cmpstr (((IBusText *)object)->text, ==, "main text");
|
||||
|
||||
- const GValue *newvalue1 = ibus_serializable_get_attachment (object, "key1");
|
||||
+ GVariant *newvalue1 = ibus_serializable_get_attachment (object, "key1");
|
||||
g_assert (newvalue1 != NULL);
|
||||
- g_assert (g_value_get_int (newvalue1) == 100);
|
||||
+ g_assert_cmpint (g_variant_get_int32 (newvalue1), ==, 100);
|
||||
|
||||
- const GValue *newvalue2 = ibus_serializable_get_attachment (object, "key2");
|
||||
+ GVariant *newvalue2 = ibus_serializable_get_attachment (object, "key2");
|
||||
g_assert (newvalue2 != NULL);
|
||||
- g_assert_cmpstr (g_value_get_string (newvalue2), ==, "value string");
|
||||
+ g_assert_cmpstr (g_variant_get_string (newvalue2, NULL), ==, "value string");
|
||||
+
|
||||
+ {
|
||||
+ GVariant *newvalue3 = ibus_serializable_get_attachment (object, "key3");
|
||||
+ g_assert (newvalue3 != NULL);
|
||||
+ gint32 i;
|
||||
+ guint32 u;
|
||||
+ gdouble d;
|
||||
+ const gchar *s;
|
||||
+ g_variant_get (newvalue3, "(iud&s)", &i, &u, &d, &s);
|
||||
+ g_assert_cmpint (i, ==, 1);
|
||||
+ g_assert_cmpuint (u, ==, 2);
|
||||
+ g_assert_cmpfloat (d, ==, 3.333);
|
||||
+ g_assert_cmpstr (s, ==, "test value");
|
||||
+ }
|
||||
|
||||
+ g_object_unref (object);
|
||||
g_variant_type_info_assert_no_infos ();
|
||||
}
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
From adcf71e6e5de45530a09e7b9f310f2e489cd9631 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Wed, 24 Aug 2011 11:44:21 +0900
|
||||
Subject: [PATCH] Check if BusInputContext has an enabled engine in global
|
||||
input method.
|
||||
|
||||
BUG=RH#731610
|
||||
TEST=Linux desktop
|
||||
|
||||
Review URL: http://codereview.appspot.com/4917041
|
||||
---
|
||||
bus/ibusimpl.c | 6 +++++-
|
||||
1 files changed, 5 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||
index 853465c..1942504 100644
|
||||
--- a/bus/ibusimpl.c
|
||||
+++ b/bus/ibusimpl.c
|
||||
@@ -1176,12 +1176,14 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||
}
|
||||
|
||||
BusEngineProxy *engine = NULL;
|
||||
+ gboolean is_enabled = FALSE;
|
||||
|
||||
if (ibus->focused_context) {
|
||||
if (ibus->use_global_engine) {
|
||||
/* dettach engine from the focused context */
|
||||
engine = bus_input_context_get_engine (ibus->focused_context);
|
||||
if (engine) {
|
||||
+ is_enabled = bus_input_context_is_enabled (ibus->focused_context);
|
||||
g_object_ref (engine);
|
||||
bus_input_context_set_engine (ibus->focused_context, NULL);
|
||||
}
|
||||
@@ -1203,7 +1205,9 @@ bus_ibus_impl_set_focused_context (BusIBusImpl *ibus,
|
||||
/* attach engine to the focused context */
|
||||
if (engine != NULL) {
|
||||
bus_input_context_set_engine (context, engine);
|
||||
- bus_input_context_enable (context);
|
||||
+ if (is_enabled) {
|
||||
+ bus_input_context_enable (context);
|
||||
+ }
|
||||
g_object_unref (engine);
|
||||
}
|
||||
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
From 894ecc8e16b01d5594ef9b8f9c5530bb2e9d0502 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Thu, 25 Aug 2011 09:59:42 +0900
|
||||
Subject: [PATCH] Add Disable signal when
|
||||
bus_ibus_impl_set_context_engine_from_desc is called.
|
||||
|
||||
BUG=#1261
|
||||
TEST=Linux desktop
|
||||
|
||||
Review URL: http://codereview.appspot.com/4875049
|
||||
---
|
||||
bus/inputcontext.c | 2 ++
|
||||
1 files changed, 2 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
|
||||
index 723b5fd..3c81688 100644
|
||||
--- a/bus/inputcontext.c
|
||||
+++ b/bus/inputcontext.c
|
||||
@@ -2292,6 +2292,8 @@ new_engine_cb (GObject *obj,
|
||||
"Opertation was cancelled");
|
||||
}
|
||||
else {
|
||||
+ /* Let BusEngineProxy call a Disable signal. */
|
||||
+ bus_input_context_disable (data->context);
|
||||
bus_input_context_set_engine (data->context, engine);
|
||||
g_object_unref (engine);
|
||||
bus_input_context_enable (data->context);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
From 34518370fbb5f69f8dfa2153d0d0da4473d0344d Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Wed, 7 Sep 2011 15:09:01 +0900
|
||||
Subject: [PATCH] Added get methods for the members in IBusAttribute for non-C
|
||||
language.
|
||||
|
||||
---
|
||||
src/ibusattribute.c | 24 ++++++++++++++++++++++++
|
||||
src/ibusattribute.h | 39 +++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 63 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/ibusattribute.c b/src/ibusattribute.c
|
||||
index 816bcee..aac14d4 100644
|
||||
--- a/src/ibusattribute.c
|
||||
+++ b/src/ibusattribute.c
|
||||
@@ -124,6 +124,30 @@ ibus_attribute_new (guint type,
|
||||
return attr;
|
||||
}
|
||||
|
||||
+guint
|
||||
+ibus_attribute_get_attr_type (IBusAttribute *attr)
|
||||
+{
|
||||
+ return attr->type;
|
||||
+}
|
||||
+
|
||||
+guint
|
||||
+ibus_attribute_get_value (IBusAttribute *attr)
|
||||
+{
|
||||
+ return attr->value;
|
||||
+}
|
||||
+
|
||||
+guint
|
||||
+ibus_attribute_get_start_index (IBusAttribute *attr)
|
||||
+{
|
||||
+ return attr->start_index;
|
||||
+}
|
||||
+
|
||||
+guint
|
||||
+ibus_attribute_get_end_index (IBusAttribute *attr)
|
||||
+{
|
||||
+ return attr->end_index;
|
||||
+}
|
||||
+
|
||||
IBusAttribute *
|
||||
ibus_attr_underline_new (guint underline_type,
|
||||
guint start_index,
|
||||
diff --git a/src/ibusattribute.h b/src/ibusattribute.h
|
||||
index 2628415..f44860c 100644
|
||||
--- a/src/ibusattribute.h
|
||||
+++ b/src/ibusattribute.h
|
||||
@@ -138,6 +138,45 @@ IBusAttribute *ibus_attribute_new (guint type,
|
||||
guint value,
|
||||
guint start_index,
|
||||
guint end_index);
|
||||
+
|
||||
+/**
|
||||
+ * ibus_attribute_get_attr_type:
|
||||
+ * @returns: An enum of IBusAttrType.
|
||||
+ *
|
||||
+ * Returns an enum of IBusAttrType.
|
||||
+ */
|
||||
+guint ibus_attribute_get_attr_type
|
||||
+ (IBusAttribute *attr);
|
||||
+
|
||||
+/**
|
||||
+ * ibus_attribute_get_value:
|
||||
+ * @returns: An unsigned int value relative with IBusAttrType.
|
||||
+ *
|
||||
+ * Returns an unsigned int value relative with IBusAttrType.
|
||||
+ * If the type is IBUS_ATTR_TYPE_UNDERLINE, the return value is
|
||||
+ * IBusAttrUnderline. If the type is IBUS_ATTR_TYPE_FOREGROUND,
|
||||
+ * the return value is the color RGB.
|
||||
+ */
|
||||
+guint ibus_attribute_get_value (IBusAttribute *attr);
|
||||
+
|
||||
+/**
|
||||
+ * ibus_attribute_get_start_index:
|
||||
+ * @returns: A start unsigned index
|
||||
+ *
|
||||
+ * Returns a start unsigned index
|
||||
+ */
|
||||
+guint ibus_attribute_get_start_index
|
||||
+ (IBusAttribute *attr);
|
||||
+
|
||||
+/**
|
||||
+ * ibus_attribute_get_end_index:
|
||||
+ * @returns: A end unsigned index
|
||||
+ *
|
||||
+ * Returns a end unsigned index
|
||||
+ */
|
||||
+guint ibus_attribute_get_end_index
|
||||
+ (IBusAttribute *attr);
|
||||
+
|
||||
/**
|
||||
* ibus_attr_underline_new:
|
||||
* @underline_type: Type of underline.
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
-GNOME_SHELL_VERSION=`GET_JS_VERSION 'Config.PACKAGE_VERSION'`
|
||||
-GJS_VERSION=`GET_JS_VERSION 'Config.GJS_VERSION'`
|
||||
+GNOME_SHELL_VERSION=3.1.91
|
||||
+GJS_VERSION=1.29.17
|
||||
+GNOME_SHELL_VERSION=3.1.92
|
||||
+GJS_VERSION=1.29.18
|
||||
AC_SUBST(GNOME_SHELL_VERSION)
|
||||
AC_SUBST(GJS_VERSION)
|
||||
|
||||
|
@ -918,14 +918,14 @@ index cdabec0..721187c 100644
|
||||
*
|
||||
* Terminate all component processes.
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 4c20ae7..21d35c3 100644
|
||||
index 227e28e..788fbef 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -462,6 +462,34 @@ else
|
||||
@@ -483,6 +483,34 @@ else
|
||||
enable_surrounding_text="no (disabled, use --enable-surrounding-text to enable)"
|
||||
fi
|
||||
|
||||
+# option for bridge hotkey
|
||||
+# Option for bridge hotkey
|
||||
+AC_ARG_ENABLE(bridge-hotkey,
|
||||
+ AS_HELP_STRING([--enable-bridge-hotkey],
|
||||
+ [Enable bridge hotkey instead of ON/OFF hotkey]),
|
||||
@ -944,7 +944,7 @@ index 4c20ae7..21d35c3 100644
|
||||
+AC_SUBST(USE_BRIDGE_HOTKEY)
|
||||
+AC_SUBST(TRIGGER_HOTKEYS)
|
||||
+
|
||||
+# define default bridge engine name
|
||||
+# Define default bridge engine name
|
||||
+AC_ARG_WITH(bridge-engine,
|
||||
+ AS_HELP_STRING([--with-bridge-engine[=bridge_engine_name]],
|
||||
+ [Set bridge engine name in IM bridge hotkey. (default: xkb:layout:default:)]),
|
||||
@ -953,10 +953,10 @@ index 4c20ae7..21d35c3 100644
|
||||
+)
|
||||
+AC_SUBST(DEFAULT_BRIDGE_ENGINE_NAME)
|
||||
+
|
||||
# check iso-codes
|
||||
# Check iso-codes.
|
||||
PKG_CHECK_MODULES(ISOCODES, [
|
||||
iso-codes
|
||||
@@ -488,6 +516,7 @@ bus/Makefile
|
||||
@@ -509,6 +537,7 @@ bus/Makefile
|
||||
util/Makefile
|
||||
util/IMdkit/Makefile
|
||||
data/Makefile
|
||||
@ -964,7 +964,7 @@ index 4c20ae7..21d35c3 100644
|
||||
data/icons/Makefile
|
||||
data/keymaps/Makefile
|
||||
data/dconf/Makefile
|
||||
@@ -540,5 +569,7 @@ Build options:
|
||||
@@ -561,5 +590,7 @@ Build options:
|
||||
No snooper regexes "$NO_SNOOPER_APPS"
|
||||
Panel icon "$IBUS_ICON_KEYBOARD"
|
||||
Enable surrounding-text $enable_surrounding_text
|
||||
@ -1386,7 +1386,7 @@ index 7cf1995..a19d16e 100644
|
||||
+
|
||||
#endif
|
||||
diff --git a/ui/gtk/panel.py b/ui/gtk/panel.py
|
||||
index 8804634..f7b3e50 100644
|
||||
index 8804634..a2a5733 100644
|
||||
--- a/ui/gtk/panel.py
|
||||
+++ b/ui/gtk/panel.py
|
||||
@@ -67,6 +67,7 @@ class Panel(ibus.PanelBase):
|
||||
@ -1431,7 +1431,7 @@ index 8804634..f7b3e50 100644
|
||||
|
||||
def set_cursor_location(self, x, y, w, h):
|
||||
self.__candidate_panel.set_cursor_location(x, y, w, h)
|
||||
@@ -233,12 +249,91 @@ class Panel(ibus.PanelBase):
|
||||
@@ -233,12 +249,97 @@ class Panel(ibus.PanelBase):
|
||||
def __set_im_name(self, name):
|
||||
self.__language_bar.set_im_name(name)
|
||||
|
||||
@ -1472,7 +1472,13 @@ index 8804634..f7b3e50 100644
|
||||
+ if model == '':
|
||||
+ model = None
|
||||
+ model_desc = _("Default Layout")
|
||||
+ if model != None:
|
||||
+ if i == 0:
|
||||
+ l = 0
|
||||
+ for j in range(0, len(models)):
|
||||
+ l = l + len(models[j])
|
||||
+ if l != 0:
|
||||
+ model_desc = model_desc + " (" + model + ")"
|
||||
+ elif model != None:
|
||||
+ model_desc = model_desc + " (" + model + ")"
|
||||
+ name = ibus.DEFAULT_BRIDGE_ENGINE_NAME + "#" + str(i)
|
||||
+ engine = registry.engine_desc_new(lang,
|
||||
@ -1524,7 +1530,7 @@ index 8804634..f7b3e50 100644
|
||||
if not enabled:
|
||||
self.__set_im_icon(ICON_KEYBOARD)
|
||||
self.__set_im_name(None)
|
||||
@@ -250,7 +345,7 @@ class Panel(ibus.PanelBase):
|
||||
@@ -250,7 +351,7 @@ class Panel(ibus.PanelBase):
|
||||
self.__set_im_icon(engine.icon)
|
||||
self.__set_im_name(engine.longname)
|
||||
if self.__bus.get_use_sys_layout():
|
||||
@ -1533,7 +1539,7 @@ index 8804634..f7b3e50 100644
|
||||
else:
|
||||
self.__set_im_icon(ICON_KEYBOARD)
|
||||
self.__set_im_name(None)
|
||||
@@ -273,7 +368,21 @@ class Panel(ibus.PanelBase):
|
||||
@@ -273,7 +374,21 @@ class Panel(ibus.PanelBase):
|
||||
return
|
||||
|
||||
enabled = self.__focus_ic.is_enabled()
|
||||
@ -1556,7 +1562,7 @@ index 8804634..f7b3e50 100644
|
||||
|
||||
if enabled == False:
|
||||
self.reset()
|
||||
@@ -287,7 +396,7 @@ class Panel(ibus.PanelBase):
|
||||
@@ -287,7 +402,7 @@ class Panel(ibus.PanelBase):
|
||||
self.__set_im_icon(engine.icon)
|
||||
self.__set_im_name(engine.longname)
|
||||
if self.__bus.get_use_sys_layout():
|
||||
@ -1565,7 +1571,7 @@ index 8804634..f7b3e50 100644
|
||||
else:
|
||||
self.__set_im_icon(ICON_KEYBOARD)
|
||||
self.__set_im_name(None)
|
||||
@@ -315,6 +424,7 @@ class Panel(ibus.PanelBase):
|
||||
@@ -315,6 +430,7 @@ class Panel(ibus.PanelBase):
|
||||
|
||||
def __config_load_show(self):
|
||||
show = self.__config.get_value("panel", "show", 0)
|
||||
@ -1573,7 +1579,7 @@ index 8804634..f7b3e50 100644
|
||||
self.__language_bar.set_show(show)
|
||||
|
||||
def __config_load_position(self):
|
||||
@@ -443,6 +553,21 @@ class Panel(ibus.PanelBase):
|
||||
@@ -443,6 +559,21 @@ class Panel(ibus.PanelBase):
|
||||
# menu.set_take_focus(False)
|
||||
# return menu
|
||||
|
||||
@ -1595,7 +1601,7 @@ index 8804634..f7b3e50 100644
|
||||
def __create_im_menu(self):
|
||||
engines = self.__bus.list_active_engines()
|
||||
current_engine = \
|
||||
@@ -453,25 +578,39 @@ class Panel(ibus.PanelBase):
|
||||
@@ -453,25 +584,39 @@ class Panel(ibus.PanelBase):
|
||||
size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
|
||||
menu = gtk.Menu()
|
||||
for i, engine in enumerate(engines):
|
||||
@ -1648,7 +1654,7 @@ index 8804634..f7b3e50 100644
|
||||
|
||||
menu.show_all()
|
||||
menu.set_take_focus(False)
|
||||
@@ -523,8 +662,25 @@ class Panel(ibus.PanelBase):
|
||||
@@ -523,8 +668,25 @@ class Panel(ibus.PanelBase):
|
||||
if not self.__focus_ic:
|
||||
return
|
||||
if engine:
|
||||
@ -1662,7 +1668,7 @@ index 8804634..f7b3e50 100644
|
||||
+ if current_engine and \
|
||||
+ current_engine.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME):
|
||||
+ self.__disabled_engines_prev_id = self.__disabled_engines_id
|
||||
+ self.__disabled_engines_swapped = 0
|
||||
+ self.__disabled_engines_swapped = 2
|
||||
+ else:
|
||||
+ self.__disabled_engines_prev_id = -1
|
||||
+ self.__disabled_engines_id = engine.disabled_engines_id
|
||||
@ -1675,7 +1681,7 @@ index 8804634..f7b3e50 100644
|
||||
self.__focus_ic.disable()
|
||||
|
||||
def __sys_menu_item_activate_cb(self, item, command):
|
||||
@@ -573,12 +729,85 @@ class Panel(ibus.PanelBase):
|
||||
@@ -573,12 +735,113 @@ class Panel(ibus.PanelBase):
|
||||
self.__setup_pid = pid
|
||||
glib.child_watch_add(self.__setup_pid, self.__child_watch_cb)
|
||||
|
||||
@ -1746,17 +1752,45 @@ index 8804634..f7b3e50 100644
|
||||
+ self.__disabled_engines != None and \
|
||||
+ self.__disabled_engines_id < len(self.__disabled_engines):
|
||||
+ if changed_state and self.__disabled_engines_prev_id != -1:
|
||||
+ # state_changed is always called twice because we change
|
||||
+ # stateChanged is always called triple because we change
|
||||
+ # the engine. So the first two calls are ignored here.
|
||||
+ # Since this._disabledEnginesPrevID needs to be reseted
|
||||
+ # to -1 and and stateChanged is called multiple times.
|
||||
+ # engine.layout is not used.
|
||||
+ #
|
||||
+ # When stateChanged is called by Control + Space,
|
||||
+ # this._disabledEnginesID and this._disabledEnginesPrevID
|
||||
+ # are toggled because this._disabledEnginesID is the
|
||||
+ # current XKB group id and this._disabledEnginesPrevID
|
||||
+ # is the next XKB group id.
|
||||
+ #
|
||||
+ # When stateChanged is called by ibus activate menu,
|
||||
+ # this._disabledEnginesID is the XKB group id.
|
||||
+ #
|
||||
+ # FIXME: If this._activeEngine is used, focusIn event is
|
||||
+ # called by either choosing ibus menu item or switching
|
||||
+ # input contexts.
|
||||
+ # So there is a bug: After XKB group is switched by
|
||||
+ # ibus menu, if the input contexts are switched,
|
||||
+ # the next toggled input method has next XKB group keymap
|
||||
+ # instead of the current XKB group keymap.
|
||||
+ # focusIn event don't know either choosing ibus menu or
|
||||
+ # switching input contexts are happened.
|
||||
+ if self.__disabled_engines_swapped < 2:
|
||||
+ self.__disabled_engines_swapped = \
|
||||
+ self.__disabled_engines_swapped + 1
|
||||
+ else:
|
||||
+ x = self.__disabled_engines_prev_id
|
||||
+ self.__disabled_engines_prev_id = self.__disabled_engines_id
|
||||
+ self.__disabled_engines_id = x
|
||||
+ self.__disabled_engines_swapped = 1
|
||||
+ self.__disabled_engines_swapped = \
|
||||
+ 1 if self.__disabled_engines_swapped == 0 else 0
|
||||
+ else:
|
||||
+ self.__disabled_engines_swapped = \
|
||||
+ self.__disabled_engines_swapped + 1 \
|
||||
+ if self.__disabled_engines_swapped < 4 else 0
|
||||
+ retval = self.__disabled_engines[self.__disabled_engines_id].layout
|
||||
+ # engine is an input-method or a keymap and if engine is
|
||||
+ # a keymap, the layout is not 'default'.
|
||||
+ # if engine is an input-method, the layout is merged with the
|
||||
+ # current XKB keymap here.
|
||||
+ if engine.layout != None and engine.layout.startswith("default"):
|
||||
+ return self.__merge_models_and_options(retval, engine.layout)
|
||||
+ return retval
|
||||
|
19
ibus.spec
19
ibus.spec
@ -23,8 +23,8 @@
|
||||
%define gnome_icon_theme_legacy_version 2.91.6
|
||||
|
||||
Name: ibus
|
||||
Version: 1.3.99.20110817
|
||||
Release: 5%{?dist}
|
||||
Version: 1.4.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
@ -34,7 +34,7 @@ Source1: xinput-ibus
|
||||
%if %have_gjsfile
|
||||
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz
|
||||
%endif
|
||||
Patch0: ibus-HEAD.patch
|
||||
# Patch0: ibus-HEAD.patch
|
||||
Patch1: ibus-530711-preload-sys.patch
|
||||
Patch2: ibus-541492-xkb.patch
|
||||
Patch3: ibus-xx-bridge-hotkey.patch
|
||||
@ -187,7 +187,7 @@ cd $d
|
||||
cd ..
|
||||
%endif
|
||||
%endif
|
||||
%patch0 -p1
|
||||
# %patch0 -p1
|
||||
%patch93 -p1 -b .g-s-preedit
|
||||
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c
|
||||
%patch1 -p1 -b .preload-sys
|
||||
@ -386,6 +386,17 @@ fi
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 28 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.0-1
|
||||
- Updated to 1.4.0
|
||||
- Updated ibus-gjs 3.0.2.20110928 for f15.
|
||||
- Updated ibus-gjs 3.2.0.20110928 for f16. (#740588)
|
||||
- Updated ibus-530711-preload-sys.patch
|
||||
Fixed not to show duplicated engine names in setup treeview (#740447)
|
||||
- Updated bus-gjs-xx-gnome-shell-3.1.4-build-failure.patch for f16.
|
||||
- Updated ibus-xx-bridge-hotkey.patch
|
||||
Fixed a XKB configuration without the input focus for f16 (#739165)
|
||||
Fixed not to show null strings in case of no variants (#738130)
|
||||
|
||||
* Tue Sep 13 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110817-5
|
||||
- Updated ibus-gjs 3.1.91.20110913 for f16.
|
||||
|
||||
|
6
sources
6
sources
@ -1,3 +1,3 @@
|
||||
52614e55e966b7c7101a19b276c51f10 ibus-1.3.99.20110817.tar.gz
|
||||
96f29410fde5c56d371b5d5a1981885d ibus-gjs-3.0.2.20110908.tar.gz
|
||||
b9dd7967f86c59843c04dfaf8b27d33e ibus-gjs-3.1.91.20110913.tar.gz
|
||||
b4f063794e89c71eb1f8cb543210da30 ibus-1.4.0.tar.gz
|
||||
d22db933185cca069fb45694320ee522 ibus-gjs-3.0.2.20110928.tar.gz
|
||||
74d11c1c56eeb35433c0ee0ca2f10279 ibus-gjs-3.2.0.20110928.tar.gz
|
||||
|
Loading…
Reference in New Issue
Block a user