ibus/ibus-HEAD.patch

405 lines
17 KiB
Diff
Raw Normal View History

--- ibus-1.3.99.20101028/client/gtk3/Makefile.am.orig 2010-10-29 17:23:56.706717818 +0900
+++ ibus-1.3.99.20101028/client/gtk3/Makefile.am 2010-10-29 17:24:18.236715894 +0900
@@ -20,7 +20,7 @@
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
-libibus = $(top_builddir)/src/libibus-2.0.la
+libibus = $(top_builddir)/src/libibus-@IBUS_API_VERSION@.la
INCLUDES = \
-I$(top_srcdir)/src \
--- ibus-1.3.99.20101028/src/ibusenginedesc.c.orig 2010-10-29 19:27:09.522715859 +0900
+++ ibus-1.3.99.20101028/src/ibusenginedesc.c 2010-10-29 19:28:11.539716134 +0900
@@ -379,8 +379,8 @@ ibus_engine_desc_serialize (IBusEngineDe
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->author));
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->icon));
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->layout));
- g_variant_builder_add (builder, "s", NOTNULL (desc->priv->hotkeys));
g_variant_builder_add (builder, "u", desc->priv->rank);
+ g_variant_builder_add (builder, "s", NOTNULL (desc->priv->hotkeys));
#undef NOTNULL
return TRUE;
}
@@ -402,8 +402,8 @@ ibus_engine_desc_deserialize (IBusEngine
g_variant_get_child (variant, retval++, "s", &desc->priv->author);
g_variant_get_child (variant, retval++, "s", &desc->priv->icon);
g_variant_get_child (variant, retval++, "s", &desc->priv->layout);
- g_variant_get_child (variant, retval++, "s", &desc->priv->hotkeys);
g_variant_get_child (variant, retval++, "u", &desc->priv->rank);
+ g_variant_get_child (variant, retval++, "s", &desc->priv->hotkeys);
return retval;
}
--- ibus-1.3.99.20101028/ibus/common.py.orig 2010-11-01 14:06:59.222958549 +0900
+++ ibus-1.3.99.20101028/ibus/common.py 2010-11-01 14:07:09.253716200 +0900
@@ -120,7 +120,7 @@ IBUS_SERVICE_IBUS = "org.freedesktop.I
IBUS_IFACE_PANEL = "org.freedesktop.IBus.Panel"
IBUS_IFACE_CONFIG = "org.freedesktop.IBus.Config"
IBUS_IFACE_ENGINE = "org.freedesktop.IBus.Engine"
-IBUS_IFACE_ENGINE_FACTORY = "org.freedesktop.IBus.EngineFactory"
+IBUS_IFACE_ENGINE_FACTORY = "org.freedesktop.IBus.Factory"
IBUS_IFACE_INPUT_CONTEXT = "org.freedesktop.IBus.InputContext"
IBUS_IFACE_NOTIFICATIONS = "org.freedesktop.IBus.Notifications"
--- ibus-1.3.99.20101028/ibus/config.py.orig 2010-11-01 17:47:11.241780699 +0900
+++ ibus-1.3.99.20101028/ibus/config.py 2010-11-01 17:47:24.946715350 +0900
@@ -46,7 +46,7 @@ class ConfigBase(object.Object):
def set_value(self, section, name, value):
pass
- def unset(self, section, name):
+ def unset_value(self, section, name):
pass
def value_changed(self, section, name, value):
@@ -65,8 +65,8 @@ class ConfigProxy(interface.IConfig):
def SetValue(self, section, name, value):
return self.__config.set_value(section, name, value)
- def Unset(self, section, name):
- return self.__config.unset(section, name)
+ def UnsetValue(self, section, name):
+ return self.__config.unset_value(section, name)
def Destroy(self):
self.__config.destroy()
@@ -148,8 +148,8 @@ class Config(object.Object):
def set_list(self, section, name, value, signature):
return self.set_value(section, name, dbus.Array(value, signature=signature))
- def unset(self, section, name):
+ def unset_value(self, section, name):
try:
- return self.__config.Unset(section, name)
+ return self.__config.UnsetValue(section, name)
except:
return
--- ibus-1.3.99.20101028/ibus/interface/iconfig.py.orig 2010-11-01 18:08:49.704715614 +0900
+++ ibus-1.3.99.20101028/ibus/interface/iconfig.py 2010-11-01 18:09:10.036715669 +0900
@@ -49,6 +49,9 @@ class IConfig(dbus.service.Object):
@method(in_signature="ssv")
def SetValue(self, section, name, value): pass
+ @method(in_signature="ss")
+ def UnsetValue(self, section, name): pass
+
@method()
def Destroy(self): pass
diff --git a/src/ibuscomponent.c b/src/ibuscomponent.c
index df05727..d016698 100644
--- a/src/ibuscomponent.c
+++ b/src/ibuscomponent.c
@@ -713,20 +713,20 @@ ibus_component_new (const gchar *name,
const gchar *exec,
const gchar *textdomain)
{
- return ibus_component_new2 ("name", name,
- "description", description,
- "version", version,
- "license", license,
- "author", author,
- "homepage", homepage,
- "exec", exec,
- "textdomain", textdomain,
- NULL);
+ return ibus_component_new_varargs ("name", name,
+ "description", description,
+ "version", version,
+ "license", license,
+ "author", author,
+ "homepage", homepage,
+ "exec", exec,
+ "textdomain", textdomain,
+ NULL);
}
IBusComponent *
-ibus_component_new2 (const gchar *first_property_name, ...)
+ibus_component_new_varargs (const gchar *first_property_name, ...)
{
va_list var_args;
IBusComponent *component;
diff --git a/src/ibuscomponent.h b/src/ibuscomponent.h
index 2383de9..c8da80e 100644
--- a/src/ibuscomponent.h
+++ b/src/ibuscomponent.h
@@ -141,18 +141,18 @@ IBusComponent *ibus_component_new (const gchar *name,
const gchar *textdomain);
/**
- * ibus_component_new2:
+ * ibus_component_new_varargs:
* @first_property_name: Name of the first property.
* @Varargs: the NULL-terminated arguments of the properties and values.
*
* New an IBusComponent.
- * ibus_component_new2() supports the va_list format.
+ * ibus_component_new_varargs() supports the va_list format.
* name property is required. e.g.
- * IBusComponent *component = ibus_component_new2 ("name", "ibus-foo",
- * "exec", "/usr/libexec/ibus-engine-foo --ibus",
- * NULL)
+ * IBusComponent *component = ibus_component_new_varargs ("name", "ibus-foo",
+ * "exec", "/usr/libexec/ibus-engine-foo --ibus",
+ * NULL)
*/
-IBusComponent *ibus_component_new2 (const gchar *first_property_name,
+IBusComponent *ibus_component_new_varargs (const gchar *first_property_name,
...);
/**
diff --git a/src/ibusenginedesc.c b/src/ibusenginedesc.c
index 8bcef34..1e6954c 100644
--- a/src/ibusenginedesc.c
+++ b/src/ibusenginedesc.c
@@ -538,19 +538,19 @@ ibus_engine_desc_new (const gchar *name,
const gchar *icon,
const gchar *layout)
{
- return ibus_engine_desc_new2 ("name", name,
- "longname", longname,
- "description", description,
- "language", language,
- "license", license,
- "author", author,
- "icon", icon,
- "layout", layout,
- NULL);
+ return ibus_engine_desc_new_varargs ("name", name,
+ "longname", longname,
+ "description", description,
+ "language", language,
+ "license", license,
+ "author", author,
+ "icon", icon,
+ "layout", layout,
+ NULL);
}
IBusEngineDesc *
-ibus_engine_desc_new2 (const gchar *first_property_name, ...)
+ibus_engine_desc_new_varargs (const gchar *first_property_name, ...)
{
va_list var_args;
IBusEngineDesc *desc;
diff --git a/src/ibusenginedesc.h b/src/ibusenginedesc.h
index d88b35a..c9dd1c2 100644
--- a/src/ibusenginedesc.h
+++ b/src/ibusenginedesc.h
@@ -132,16 +132,16 @@ IBusEngineDesc *ibus_engine_desc_new (const gchar *name,
const gchar *layout);
/**
- * ibus_engine_desc_new2:
+ * ibus_engine_desc_new_varargs:
* @first_property_name: Name of the first property.
* @Varargs: the NULL-terminated arguments of the properties and values.
*
* New a IBusEngineDesc.
- * ibus_engine_desc_new2() supports the va_list format.
+ * ibus_engine_desc_new_varargs() supports the va_list format.
* name property is required. e.g.
- * ibus_engine_desc_new2("name", "ibus-foo", "language", "us", NULL)
+ * ibus_engine_desc_new_varargs("name", "ibus-foo", "language", "us", NULL)
*/
-IBusEngineDesc *ibus_engine_desc_new2 (const gchar *first_property_name,
+IBusEngineDesc *ibus_engine_desc_new_varargs (const gchar *first_property_name,
...);
diff --git a/bus/factoryproxy.c b/bus/factoryproxy.c
index f4e739d..130b881 100644
--- a/bus/factoryproxy.c
+++ b/bus/factoryproxy.c
@@ -176,7 +176,8 @@ bus_factory_proxy_create_engine (BusFactoryProxy *factory,
g_variant_get (retval, "(&o)", &object_path);
GDBusConnection *connection = g_dbus_proxy_get_connection ((GDBusProxy *) factory);
BusEngineProxy *engine = bus_engine_proxy_new (object_path,
- desc, bus_connection_lookup (connection));
+ desc,
+ bus_connection_lookup (connection));
g_variant_unref (retval);
return engine;
}
diff --git a/src/ibusproperty.c b/src/ibusproperty.c
index 52a8210..bb9cc21 100644
--- a/src/ibusproperty.c
+++ b/src/ibusproperty.c
@@ -243,7 +243,7 @@ ibus_property_set_icon (IBusProperty *prop,
g_assert (IBUS_IS_PROPERTY (prop));
g_free (prop->icon);
- prop->icon = g_strdup (icon);
+ prop->icon = g_strdup (icon != NULL ? icon : "");
}
void
diff --git a/ui/gtk/main.py b/ui/gtk/main.py
index 18bb12e..f4c901d 100644
--- a/ui/gtk/main.py
+++ b/ui/gtk/main.py
@@ -56,7 +56,6 @@ class UIApplication:
"Please restart ibus input platform."), \
"ibus")
self.__notify.set_timeout(10 * 1000)
- self.__notify.attach_to_status_icon (self.__panel.get_status_icon())
self.__notify.add_action("restart", _("Restart Now"), self.__restart_cb, None)
self.__notify.add_action("ignore", _("Later"), lambda *args: None, None)
diff --git a/client/x11/main.c b/client/x11/main.c
index c91a6d7..f3c835b 100644
--- a/client/x11/main.c
+++ b/client/x11/main.c
@@ -245,7 +245,9 @@ _xim_preedit_callback_draw (XIMS xims, X11IC *x11ic, const gchar *preedit_string
text.feedback = feedback;
if (len > 0) {
- Xutf8TextListToTextProperty (GDK_DISPLAY (), (char **)&preedit_string, 1, XCompoundTextStyle, &tp);
+ Xutf8TextListToTextProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
+ (char **)&preedit_string,
+ 1, XCompoundTextStyle, &tp);
text.encoding_is_wchar = 0;
text.length = strlen ((char*)tp.value);
text.string.multi_byte = (char*)tp.value;
@@ -583,9 +585,9 @@ _xim_set_cursor_location (X11IC *x11ic)
XWindowAttributes xwa;
Window child;
- XGetWindowAttributes (GDK_DISPLAY(), w, &xwa);
+ XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), w, &xwa);
if (preedit_area.x <= 0 && preedit_area.y <= 0) {
- XTranslateCoordinates (GDK_DISPLAY(), w,
+ XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), w,
xwa.root,
0,
xwa.height,
@@ -594,7 +596,7 @@ _xim_set_cursor_location (X11IC *x11ic)
&child);
}
else {
- XTranslateCoordinates (GDK_DISPLAY(), w,
+ XTranslateCoordinates (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), w,
xwa.root,
preedit_area.x,
preedit_area.y,
@@ -739,11 +741,11 @@ _xim_forward_key_event (X11IC *x11ic,
xkp.xkey.serial = 0L;
xkp.xkey.send_event = False;
xkp.xkey.same_screen = True;
- xkp.xkey.display = GDK_DISPLAY();
+ xkp.xkey.display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
xkp.xkey.window =
x11ic->focus_window ? x11ic->focus_window : x11ic->client_window;
xkp.xkey.subwindow = None;
- xkp.xkey.root = DefaultRootWindow (GDK_DISPLAY());
+ xkp.xkey.root = DefaultRootWindow (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
xkp.xkey.time = 0;
xkp.xkey.state = state;
@@ -781,7 +783,7 @@ _context_commit_text_cb (IBusInputContext *context,
XTextProperty tp;
IMCommitStruct cms = {0};
- Xutf8TextListToTextProperty (GDK_DISPLAY (),
+ Xutf8TextListToTextProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
(gchar **)&(text->text), 1, XCompoundTextStyle, &tp);
cms.major_code = XIM_COMMIT;
@@ -961,7 +963,7 @@ _xim_init_IMdkit ()
sizeof (ims_encodings)/sizeof (XIMEncoding) - 1;
encodings.supported_encodings = ims_encodings;
- _xims = IMOpenIM(GDK_DISPLAY(),
+ _xims = IMOpenIM(GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
IMModifiers, "Xi18n",
IMServerWindow, GDK_WINDOW_XWINDOW(win),
IMServerName, _server_name != NULL ? _server_name : "ibus",
diff --git a/client/gtk3/ibusimcontext.c b/client/gtk3/ibusimcontext.c
index 0bb71b5..c06faaa 100644
--- a/client/gtk3/ibusimcontext.c
+++ b/client/gtk3/ibusimcontext.c
@@ -669,10 +669,15 @@ _set_cursor_location_internal (GtkIMContext *context)
area = ibusimcontext->cursor_area;
if (area.x == -1 && area.y == -1 && area.width == 0 && area.height == 0) {
+#if GTK_CHECK_VERSION (2, 91, 0)
+ area.x = 0;
+ area.y += gdk_window_get_height (ibusimcontext->client_window);
+#else
gint w, h;
gdk_drawable_get_size (ibusimcontext->client_window, &w, &h);
area.y += h;
area.x = 0;
+#endif
}
gdk_window_get_origin (ibusimcontext->client_window, &x, &y);
diff --git a/configure.ac b/configure.ac
index 2c330fa..a9cd908 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,10 +21,6 @@
# Boston, MA 02111-1307 USA
AC_PREFEQ([2.62])
-AC_INIT([ibus], [ibus_version],
- [http://code.google.com/p/ibus/issues/entry],
- [ibus])
-
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
@@ -46,6 +42,10 @@ m4_define([ibus_api_version], [1.0])
m4_define([glib_required_version], [2.26.0])
+AC_INIT([ibus], [ibus_version],
+ [http://code.google.com/p/ibus/issues/entry],
+ [ibus])
+
# Init automake
AM_INIT_AUTOMAKE([1.10])
AM_MAINTAINER_MODE([enable])
diff --git a/setup/main.py b/setup/main.py
index 978b467..98fa1d1 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -69,7 +69,7 @@ class Setup(object):
super(Setup, self).__init__()
gtk_builder_file = path.join(path.dirname(__file__), "./setup.ui")
self.__builder = gtk.Builder()
- self.__builder.set_translation_domain("ibus")
+ self.__builder.set_translation_domain("ibus10")
self.__builder.add_from_file(gtk_builder_file);
self.__bus = None
self.__init_bus()
diff --git a/ui/gtk/engineabout.py b/ui/gtk/engineabout.py
index 3ac853a..a34e930 100644
--- a/ui/gtk/engineabout.py
+++ b/ui/gtk/engineabout.py
@@ -25,7 +25,7 @@ from gtk import gdk
import pango
import ibus
-from i18n import *
+from i18n import _, N_
class EngineAbout(gtk.Dialog):
def __init__(self, enginedesc):
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
index ec72dd1..8af3ccb 100644
--- a/bus/inputcontext.c
+++ b/bus/inputcontext.c
@@ -699,7 +699,7 @@ _ic_process_key_event (BusInputContext *context,
/* workaround: set focus if context does not have focus */
BusInputContext *focused_context = bus_ibus_impl_get_focused_input_context (BUS_DEFAULT_IBUS);
if (context == NULL ||
- focused_context->fake == TRUE ||
+ (focused_context != NULL && focused_context->fake == TRUE) ||
context->fake == FALSE) {
/* grab focus, if context is a real IC or current focused IC is fake */
bus_input_context_focus_in (context);