Fixed compatible issues with gnome-shell 3.1.4
This commit is contained in:
parent
095f9c1f6a
commit
0318d1b391
3
.gitignore
vendored
3
.gitignore
vendored
@ -12,5 +12,4 @@ ibus-1.3.6.tar.gz
|
||||
/ibus-1.3.99.20110408.tar.gz
|
||||
/ibus-1.3.99.20110419.tar.gz
|
||||
/ibus_master_da.po
|
||||
/ibus-gjs-1.3.99.20110720.tar.gz
|
||||
/ibus-gjs-1.3.99.20110806.tar.gz
|
||||
/ibus-gjs-1.3.99.20110814.tar.gz
|
||||
|
@ -1,6 +1,6 @@
|
||||
From a253acde0935efae4bbc8aa59ca47ab273b9907b Mon Sep 17 00:00:00 2001
|
||||
From 2d0081ff5f19101a0348461b914274fc8bd63a19 Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Fri, 5 Aug 2011 20:22:42 +0900
|
||||
Date: Thu, 11 Aug 2011 19:07:38 +0900
|
||||
Subject: [PATCH] Add XKB layouts
|
||||
|
||||
---
|
||||
@ -13,7 +13,7 @@ Subject: [PATCH] Add XKB layouts
|
||||
ibus/bus.py | 3 +
|
||||
ibus/interface/iibus.py | 3 +
|
||||
ibus/xkblayout.py.in | 230 +++++++++++++++++
|
||||
ibus/xkbxml.py.in | 416 ++++++++++++++++++++++++++++++
|
||||
ibus/xkbxml.py.in | 419 ++++++++++++++++++++++++++++++
|
||||
setup/Makefile.am | 1 +
|
||||
setup/enginecombobox.py | 7 +-
|
||||
setup/main.py | 3 +
|
||||
@ -32,9 +32,9 @@ Subject: [PATCH] Add XKB layouts
|
||||
xkb/xkblayoutconfig.xml.in | 6 +
|
||||
xkb/xkblib.c | 327 ++++++++++++++++++++++++
|
||||
xkb/xkblib.h | 41 +++
|
||||
xkb/xkbxml.c | 339 ++++++++++++++++++++++++
|
||||
xkb/xkbxml.c | 345 +++++++++++++++++++++++++
|
||||
xkb/xkbxml.h | 113 ++++++++
|
||||
30 files changed, 4027 insertions(+), 4 deletions(-)
|
||||
30 files changed, 4036 insertions(+), 4 deletions(-)
|
||||
create mode 100644 ibus/xkblayout.py.in
|
||||
create mode 100644 ibus/xkbxml.py.in
|
||||
create mode 100644 setup/xkbsetup.py
|
||||
@ -537,10 +537,10 @@ index 0000000..11fce12
|
||||
+ self.__default_option = self.get_option()
|
||||
diff --git a/ibus/xkbxml.py.in b/ibus/xkbxml.py.in
|
||||
new file mode 100644
|
||||
index 0000000..16f47df
|
||||
index 0000000..9407c13
|
||||
--- /dev/null
|
||||
+++ b/ibus/xkbxml.py.in
|
||||
@@ -0,0 +1,416 @@
|
||||
@@ -0,0 +1,419 @@
|
||||
+# vim:set et sts=4 sw=4:
|
||||
+#
|
||||
+# ibus - The Input Bus
|
||||
@ -836,7 +836,7 @@ index 0000000..16f47df
|
||||
+ layout_desc=None,
|
||||
+ variant=None,
|
||||
+ variant_desc=None,
|
||||
+ name_prefix='xkb:layout:'):
|
||||
+ name=None):
|
||||
+ if variant_desc != None:
|
||||
+ longname = variant_desc
|
||||
+ elif layout != None and variant != None:
|
||||
@ -845,12 +845,15 @@ index 0000000..16f47df
|
||||
+ longname = layout_desc
|
||||
+ else:
|
||||
+ longname = layout
|
||||
+ name_prefix='xkb:layout:'
|
||||
+ if variant != None:
|
||||
+ name = name_prefix + layout + ':' + variant
|
||||
+ if name == None:
|
||||
+ name = name_prefix + layout + ':' + variant
|
||||
+ desc = 'XKB ' + layout + '(' + variant + ') keyboard layout'
|
||||
+ engine_layout = layout + '(' + variant + ')'
|
||||
+ else:
|
||||
+ name = name_prefix + layout
|
||||
+ if name == None:
|
||||
+ name = name_prefix + layout
|
||||
+ desc = 'XKB ' + layout + ' keyboard layout'
|
||||
+ engine_layout = layout
|
||||
+
|
||||
@ -2991,7 +2994,7 @@ index 0000000..ad9cdd9
|
||||
+endif
|
||||
diff --git a/xkb/ibus-engine-xkb-main.c b/xkb/ibus-engine-xkb-main.c
|
||||
new file mode 100644
|
||||
index 0000000..a2f131c
|
||||
index 0000000..0fb0f0c
|
||||
--- /dev/null
|
||||
+++ b/xkb/ibus-engine-xkb-main.c
|
||||
@@ -0,0 +1,413 @@
|
||||
@ -3324,7 +3327,7 @@ index 0000000..a2f131c
|
||||
+ NULL,
|
||||
+ NULL,
|
||||
+ NULL);
|
||||
+ ibus_component_add_engine (component, engine);
|
||||
+ ibus_component_add_engine (component, engine);
|
||||
+ }
|
||||
+ }
|
||||
+ variants = (GList *) g_hash_table_lookup (layout_list, keys->data);
|
||||
@ -3994,10 +3997,10 @@ index 0000000..15e5d18
|
||||
+#endif
|
||||
diff --git a/xkb/xkbxml.c b/xkb/xkbxml.c
|
||||
new file mode 100644
|
||||
index 0000000..ad10c28
|
||||
index 0000000..d59a929
|
||||
--- /dev/null
|
||||
+++ b/xkb/xkbxml.c
|
||||
@@ -0,0 +1,339 @@
|
||||
@@ -0,0 +1,345 @@
|
||||
+/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
||||
+/* vim:set et sts=4: */
|
||||
+/* bus - The Input Bus
|
||||
@ -4267,19 +4270,17 @@ index 0000000..ad10c28
|
||||
+ const gchar *layout_desc,
|
||||
+ const gchar *variant,
|
||||
+ const gchar *variant_desc,
|
||||
+ const gchar *name_prefix)
|
||||
+ const gchar *alt_name)
|
||||
+{
|
||||
+ IBusEngineDesc *engine;
|
||||
+ gchar *name = NULL;
|
||||
+ gchar *longname = NULL;
|
||||
+ gchar *desc = NULL;
|
||||
+ gchar *engine_layout = NULL;
|
||||
+ const gchar *name_prefix = "xkb:layout:";
|
||||
+
|
||||
+ g_return_val_if_fail (lang != NULL && layout != NULL, NULL);
|
||||
+
|
||||
+ if (name_prefix == NULL) {
|
||||
+ name_prefix = "xkb:layout:";
|
||||
+ }
|
||||
+ if (variant_desc) {
|
||||
+ longname = g_strdup (variant_desc);
|
||||
+ } else if (layout && variant) {
|
||||
@ -4290,11 +4291,19 @@ index 0000000..ad10c28
|
||||
+ longname = g_strdup (layout);
|
||||
+ }
|
||||
+ if (variant) {
|
||||
+ name = g_strdup_printf ("%s%s:%s", name_prefix, layout, variant);
|
||||
+ if (alt_name) {
|
||||
+ name = g_strdup (alt_name);
|
||||
+ } else {
|
||||
+ name = g_strdup_printf ("%s%s:%s", name_prefix, layout, variant);
|
||||
+ }
|
||||
+ desc = g_strdup_printf ("XKB %s(%s) keyboard layout", layout, variant);
|
||||
+ engine_layout = g_strdup_printf ("%s(%s)", layout, variant);
|
||||
+ } else {
|
||||
+ name = g_strdup_printf ("%s%s", name_prefix, layout);
|
||||
+ if (alt_name) {
|
||||
+ name = g_strdup (alt_name);
|
||||
+ } else {
|
||||
+ name = g_strdup_printf ("%s%s", name_prefix, layout);
|
||||
+ }
|
||||
+ desc = g_strdup_printf ("XKB %s keyboard layout", layout);
|
||||
+ engine_layout = g_strdup (layout);
|
||||
+ }
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,17 @@
|
||||
From ff5db39a4651f4ecd3c2ba19dd315ed7b83662f4 Mon Sep 17 00:00:00 2001
|
||||
From 85d6a6d5d7e5673ac3bbc285589da18c48b562ae Mon Sep 17 00:00:00 2001
|
||||
From: fujiwarat <takao.fujiwara1@gmail.com>
|
||||
Date: Fri, 5 Aug 2011 20:21:14 +0900
|
||||
Date: Sun, 14 Aug 2011 08:44:35 +0900
|
||||
Subject: [PATCH] Add create-engine signal in IBusFactory for non-C
|
||||
applications.
|
||||
|
||||
---
|
||||
bus/ibusimpl.c | 6 +++-
|
||||
bus/inputcontext.c | 5 ++++
|
||||
src/ibusfactory.c | 54 ++++++++++++++++++++++++++++++++++++++++-------
|
||||
src/ibusfactory.h | 7 +++++-
|
||||
bus/inputcontext.c | 5 ++
|
||||
src/ibusfactory.c | 107 ++++++++++++++++++++++++++++++++++++++++-------
|
||||
src/ibusfactory.h | 7 +++-
|
||||
src/ibusmarshalers.list | 1 +
|
||||
src/ibusservice.h | 5 +--
|
||||
6 files changed, 64 insertions(+), 14 deletions(-)
|
||||
src/ibusservice.h | 5 +-
|
||||
5 files changed, 105 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/bus/ibusimpl.c b/bus/ibusimpl.c
|
||||
index 853465c..f13d8e0 100644
|
||||
--- a/bus/ibusimpl.c
|
||||
+++ b/bus/ibusimpl.c
|
||||
@@ -1604,8 +1604,10 @@ _ibus_register_component (BusIBusImpl *ibus,
|
||||
g_object_ref_sink (buscomp));
|
||||
GList *engines = bus_component_get_engines (buscomp);
|
||||
g_list_foreach (engines, (GFunc) g_object_ref, NULL);
|
||||
- ibus->register_engine_list = g_list_concat (ibus->register_engine_list,
|
||||
- engines);
|
||||
+ /* We always override the register_engine_list or need to prepare
|
||||
+ * unregister_component() method so that both ibus gtk and gnome-shell
|
||||
+ * can call register_component. */
|
||||
+ ibus->register_engine_list = engines;
|
||||
|
||||
g_signal_connect (buscomp, "destroy", G_CALLBACK (_component_destroy_cb), ibus);
|
||||
|
||||
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
|
||||
index 47ac9d5..4e8cdc5 100644
|
||||
--- a/bus/inputcontext.c
|
||||
@ -47,7 +29,7 @@ index 47ac9d5..4e8cdc5 100644
|
||||
g_object_unref (engine);
|
||||
bus_input_context_enable (data->context);
|
||||
diff --git a/src/ibusfactory.c b/src/ibusfactory.c
|
||||
index 11d9a6d..f72f51e 100644
|
||||
index 11d9a6d..f28f074 100644
|
||||
--- a/src/ibusfactory.c
|
||||
+++ b/src/ibusfactory.c
|
||||
@@ -21,6 +21,7 @@
|
||||
@ -75,17 +57,82 @@ index 11d9a6d..f72f51e 100644
|
||||
/* functions prototype */
|
||||
static void ibus_factory_destroy (IBusFactory *factory);
|
||||
static void ibus_factory_set_property (IBusFactory *engine,
|
||||
@@ -113,6 +117,17 @@ ibus_factory_class_init (IBusFactoryClass *class)
|
||||
@@ -95,6 +99,47 @@ static const gchar introspection_xml[] =
|
||||
" </interface>"
|
||||
"</node>";
|
||||
|
||||
+static IBusEngine *
|
||||
+_ibus_factory_create_engine (IBusFactory *factory,
|
||||
+ const gchar *engine_name)
|
||||
+{
|
||||
+ GType engine_type;
|
||||
+ gchar *object_path = NULL;
|
||||
+ IBusEngine *engine = NULL;
|
||||
+
|
||||
+ engine_type = (GType) g_hash_table_lookup (factory->priv->engine_table,
|
||||
+ engine_name);
|
||||
+
|
||||
+ g_return_val_if_fail (engine_type != G_TYPE_INVALID, NULL);
|
||||
+
|
||||
+ object_path = g_strdup_printf ("/org/freedesktop/IBus/Engine/%d",
|
||||
+ ++factory->priv->id);
|
||||
+ engine = ibus_engine_new_type (engine_type,
|
||||
+ engine_name,
|
||||
+ object_path,
|
||||
+ ibus_service_get_connection ((IBusService *)factory));
|
||||
+ g_free (object_path);
|
||||
+
|
||||
+ return engine;
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+_ibus_factory_create_engine_accumulator (GSignalInvocationHint *ihint,
|
||||
+ GValue *return_accu,
|
||||
+ const GValue *handler_return,
|
||||
+ gpointer dummy)
|
||||
+{
|
||||
+ gboolean retval = TRUE;
|
||||
+ GObject *object = g_value_get_object (handler_return);
|
||||
+
|
||||
+ if (object != NULL) {
|
||||
+ g_value_copy (handler_return, return_accu);
|
||||
+ retval = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
ibus_factory_class_init (IBusFactoryClass *class)
|
||||
{
|
||||
@@ -109,10 +154,34 @@ 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;
|
||||
|
||||
ibus_service_class_add_interfaces (IBUS_SERVICE_CLASS (class), introspection_xml);
|
||||
|
||||
g_type_class_add_private (class, sizeof (IBusFactoryPrivate));
|
||||
+
|
||||
+ /**
|
||||
+ * IBusFactory::create-engine:
|
||||
+ * @factory: the factory which received the signal
|
||||
+ * @engine_name: the engine_name which received the signal
|
||||
+ * @returns: (transfer none): An IBusEngine
|
||||
+ *
|
||||
+ * The ::create-engine signal is a signal to create IBusEngine
|
||||
+ * with @engine_name, which gets emitted when IBusFactory
|
||||
+ * received CreateEngine dbus method. The callback functions
|
||||
+ * will be called until a callback returns a non-null object
|
||||
+ * of IBusEngine. */
|
||||
+ factory_signals[CREATE_ENGINE] =
|
||||
+ g_signal_new (I_("create-engine"),
|
||||
+ G_TYPE_FROM_CLASS (gobject_class),
|
||||
+ G_SIGNAL_RUN_LAST,
|
||||
+ G_STRUCT_OFFSET (IBusFactoryClass, create_engine),
|
||||
+ NULL, NULL,
|
||||
+ _ibus_factory_create_engine_accumulator,
|
||||
+ NULL,
|
||||
+ _ibus_marshal_OBJECT__STRING,
|
||||
+ IBUS_TYPE_ENGINE,
|
||||
+ 1,
|
||||
@ -93,32 +140,34 @@ index 11d9a6d..f72f51e 100644
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -190,8 +205,20 @@ ibus_factory_service_method_call (IBusService *service,
|
||||
@@ -190,25 +259,23 @@ ibus_factory_service_method_call (IBusService *service,
|
||||
|
||||
if (g_strcmp0 (method_name, "CreateEngine") == 0) {
|
||||
gchar *engine_name = NULL;
|
||||
+ GType engine_type;
|
||||
+ IBusEngine *engine = NULL;
|
||||
+
|
||||
g_variant_get (parameters, "(&s)", &engine_name);
|
||||
- GType engine_type = (GType )g_hash_table_lookup (factory->priv->engine_table, engine_name);
|
||||
+ engine_type = (GType) g_hash_table_lookup (factory->priv->engine_table, engine_name);
|
||||
+ g_signal_emit (factory, factory_signals[CREATE_ENGINE],
|
||||
+ 0, engine_name, &engine);
|
||||
+
|
||||
+ if (engine_type == G_TYPE_INVALID) {
|
||||
+ g_signal_emit (factory, factory_signals[CREATE_ENGINE],
|
||||
+ 0, engine_name, &engine);
|
||||
+ if (engine != NULL) {
|
||||
+ gchar *object_path = NULL;
|
||||
+ GValue value = { 0, };
|
||||
+
|
||||
+ if (engine != NULL && IBUS_IS_ENGINE (engine)) {
|
||||
+ engine_type = G_OBJECT_TYPE (engine);
|
||||
+ }
|
||||
+ }
|
||||
+ g_value_init (&value, G_TYPE_STRING);
|
||||
+ g_object_get_property (G_OBJECT (engine), "object-path", &value);
|
||||
+ object_path = g_value_dup_string (&value);
|
||||
+ g_value_unset (&value);
|
||||
|
||||
if (engine_type == G_TYPE_INVALID) {
|
||||
gchar *error_message = g_strdup_printf ("Can not fond engine %s", engine_name);
|
||||
@@ -201,14 +228,25 @@ ibus_factory_service_method_call (IBusService *service,
|
||||
error_message);
|
||||
g_free (error_message);
|
||||
}
|
||||
- if (engine_type == G_TYPE_INVALID) {
|
||||
- gchar *error_message = g_strdup_printf ("Can not fond engine %s", engine_name);
|
||||
- g_dbus_method_invocation_return_error (invocation,
|
||||
- G_DBUS_ERROR,
|
||||
- G_DBUS_ERROR_FAILED,
|
||||
- error_message);
|
||||
- g_free (error_message);
|
||||
- }
|
||||
- else {
|
||||
- gchar *object_path = g_strdup_printf ("/org/freedesktop/IBus/Engine/%d",
|
||||
- ++factory->priv->id);
|
||||
@ -126,28 +175,26 @@ index 11d9a6d..f72f51e 100644
|
||||
- engine_name,
|
||||
- object_path,
|
||||
- ibus_service_get_connection ((IBusService *)factory));
|
||||
+ else {
|
||||
+ gchar *object_path = NULL;
|
||||
+ if (engine == NULL) {
|
||||
+ object_path = g_strdup_printf ("/org/freedesktop/IBus/Engine/%d",
|
||||
+ ++factory->priv->id);
|
||||
+ engine = ibus_engine_new_type (engine_type,
|
||||
+ engine_name,
|
||||
+ object_path,
|
||||
+ ibus_service_get_connection ((IBusService *)factory));
|
||||
+ } else {
|
||||
+ GValue value = { 0, };
|
||||
+ g_value_init (&value, G_TYPE_STRING);
|
||||
+ g_object_get_property (G_OBJECT (engine), "object-path", &value);
|
||||
+ object_path = g_value_dup_string (&value);
|
||||
+ g_value_unset (&value);
|
||||
+ }
|
||||
+
|
||||
g_assert (engine != NULL);
|
||||
+ g_assert (object_path != NULL);
|
||||
g_object_ref_sink (engine);
|
||||
factory->priv->engine_list = g_list_append (factory->priv->engine_list, engine);
|
||||
g_signal_connect (engine,
|
||||
@@ -219,6 +286,14 @@ ibus_factory_service_method_call (IBusService *service,
|
||||
g_variant_new ("(o)", object_path));
|
||||
g_free (object_path);
|
||||
}
|
||||
+ else {
|
||||
+ gchar *error_message = g_strdup_printf ("Can not fond engine %s", engine_name);
|
||||
+ g_dbus_method_invocation_return_error (invocation,
|
||||
+ G_DBUS_ERROR,
|
||||
+ G_DBUS_ERROR_FAILED,
|
||||
+ error_message);
|
||||
+ g_free (error_message);
|
||||
+ }
|
||||
return;
|
||||
}
|
||||
|
||||
diff --git a/src/ibusfactory.h b/src/ibusfactory.h
|
||||
index 47c06e0..03d1dea 100644
|
||||
--- a/src/ibusfactory.h
|
||||
|
27
ibus.spec
27
ibus.spec
@ -20,7 +20,7 @@
|
||||
|
||||
Name: ibus
|
||||
Version: 1.3.99.20110419
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Summary: Intelligent Input Bus for Linux OS
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
@ -28,7 +28,7 @@ URL: http://code.google.com/p/ibus/
|
||||
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
|
||||
Source1: xinput-ibus
|
||||
%if %have_gjsfile
|
||||
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-1.3.99.20110806.tar.gz
|
||||
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-1.3.99.20110814.tar.gz
|
||||
%endif
|
||||
Source3: https://www.transifex.net/projects/p/ibus/resource/master/l/da/download/ibus_master_da.po
|
||||
Patch0: ibus-HEAD.patch
|
||||
@ -62,6 +62,9 @@ BuildRequires: iso-codes-devel
|
||||
%if %have_libxkbfile
|
||||
BuildRequires: libxkbfile-devel
|
||||
%endif
|
||||
# for ibus-gjs-xx.tar.gz
|
||||
BuildRequires: gjs
|
||||
BuildRequires: gnome-shell
|
||||
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: %{name}-gtk2 = %{version}-%{release}
|
||||
@ -184,14 +187,6 @@ mv data/ibus.schemas.in data/ibus.schemas.in.in
|
||||
%patch91 -p1 -b .fallback-icon
|
||||
|
||||
%build
|
||||
%if %have_gjsfile
|
||||
d=`basename %SOURCE2 .tar.gz`
|
||||
cd $d
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%if %have_libxkbfile
|
||||
aclocal -I m4
|
||||
autoheader
|
||||
@ -214,6 +209,16 @@ automake -a -c -f
|
||||
# make -C po update-gmo
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%if %have_gjsfile
|
||||
d=`basename %SOURCE2 .tar.gz`
|
||||
cd $d
|
||||
export PKG_CONFIG_PATH=..:/usr/lib64/pkgconfig:/usr/lib/pkgconfig
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
@ -364,7 +369,7 @@ fi
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Fri Aug 05 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110419-13
|
||||
* Fri Aug 12 2011 Takao Fujiwara <tfujiwar@redhat.com> - 1.3.99.20110419-14
|
||||
- Updated ibus-HEAD.patch for upstream.
|
||||
- Removed ibus-435880-surrounding-text.patch as upstream.
|
||||
- Added ibus-711632-fedora-fallback-icon.patch
|
||||
|
Loading…
Reference in New Issue
Block a user