Permalink
Browse files

Merge remote-tracking branch 'origin/devel'

TEST=Linux Desktop

Review URL: https://codereview.appspot.com/5517048
  • Loading branch information...
2 parents 1b5b406 + 7975fa0 commit 99e4d9d7af0bdeaf396bbd26cac949eca7cdfe1d @phuang committed Feb 26, 2012
Showing with 14,623 additions and 4,528 deletions.
  1. +25 −38 Makefile.am
  2. +1 −1 autogen.sh
  3. +92 −73 bus/Makefile.am
  4. +5 −3 bus/component.c
  5. +1 −2 bus/connection.c
  6. +17 −22 bus/dbusimpl.c
  7. +6 −4 bus/engineproxy.c
  8. +4 −3 bus/factoryproxy.c
  9. +35 −0 bus/global.c
  10. +14 −5 bus/{option.h → global.h}
  11. +69 −1,059 bus/ibusimpl.c
  12. +0 −18 bus/ibusimpl.h
  13. +41 −259 bus/inputcontext.c
  14. +1 −6 bus/inputcontext.h
  15. +10 −18 bus/main.c
  16. +8 −3 bus/matchrule.c
  17. +1 −0 bus/matchrule.h
  18. +3 −4 bus/panelproxy.c
  19. +8 −8 bus/registry.c
  20. +4 −1 bus/server.c
  21. +45 −46 bus/test-client.c
  22. +53 −34 bus/test-matchrule.c
  23. +2 −2 bus/test-stress.c
  24. +27 −81 client/gtk2/ibusimcontext.c
  25. +47 −0 conf/Makefile.am
  26. 0 { → conf}/dconf/Makefile.am
  27. 0 { → conf}/dconf/config.c
  28. 0 { → conf}/dconf/config.h
  29. 0 { → conf}/dconf/dconf.xml.in.in
  30. 0 { → conf}/dconf/main.c
  31. 0 { → conf}/gconf/Makefile.am
  32. 0 { → conf}/gconf/config.c
  33. 0 { → conf}/gconf/config.h
  34. 0 { → conf}/gconf/gconf.xml.in.in
  35. 0 { → conf}/gconf/main.c
  36. 0 { → conf}/memconf/Makefile.am
  37. 0 { → conf}/memconf/config.c
  38. 0 { → conf}/memconf/config.h
  39. 0 { → conf}/memconf/main.c
  40. 0 { → conf}/memconf/memconf.xml.in.in
  41. +37 −25 configure.ac
  42. +100 −0 engine/Makefile.am
  43. +118 −0 engine/gensimple.py
  44. +67 −0 engine/main.vala
  45. +540 −0 engine/simple.xml.in.in
  46. +26 −10 ibus.spec.in
  47. +4 −0 ibus/__init__.py
  48. +4 −0 ibus/bus.py
  49. +0 −31 ibus/inputcontext.py
  50. +3 −0 ibus/interface/iibus.py
  51. +0 −15 ibus/interface/iinputcontext.py
  52. +0 −1 setup/engineabout.py
  53. +114 −0 setup/engineabout.py
  54. +56 −38 setup/enginecombobox.py
  55. +93 −72 setup/enginetreeview.py
  56. +1 −1 setup/i18n.py
  57. +15 −7 setup/icon.py
  58. +77 −70 setup/keyboardshortcut.py
  59. +165 −158 setup/main.py
  60. +4 −4 setup/setup.ui
  61. +8 −4 src/Makefile.am
  62. +4,486 −0 src/gtkimcontextsimpleseqs.h
  63. +6 −0 src/ibus.h
  64. +2 −1 src/ibusattrlist.c
  65. +38 −2 src/ibusbus.c
  66. +13 −0 src/ibusbus.h
  67. +1 −2 src/ibuscomponent.c
  68. +5 −9 src/ibusengine.c
  69. +910 −0 src/ibusenginesimple.c
  70. +119 −0 src/ibusenginesimple.h
  71. +3 −4 src/ibusfactory.c
  72. +24 −24 src/ibushotkey.c
  73. +0 −69 src/ibusinputcontext.c
  74. +0 −67 src/ibusinputcontext.h
  75. +10 −9 src/ibuskeymap.c
  76. +80 −79 src/ibuskeynames.c
  77. +2,099 −0 src/ibuskeysyms-compat.h
  78. +5 −2 src/ibuskeysyms-update.pl
  79. +2,092 −2,069 src/ibuskeysyms.h
  80. +3 −1 src/ibusproplist.c
  81. +19 −11 src/ibusutil.c
  82. +1 −2 src/ibusxml.c
  83. +13 −7 src/tests/Makefile.am
  84. +31 −0 src/tests/ibus-bus.c
  85. +0 −30 src/tests/ibus-inputcontext.c
  86. +2 −2 src/tests/ibus-keynames.c
  87. +18 −0 src/tests/ibus-util.c
  88. +79 −0 tools/Makefile.am
  89. +139 −0 tools/ibus.bash
  90. +159 −0 tools/main.vala
  91. +5 −3 ui/Makefile.am
  92. 0 ui/{gtk → gtk2}/Makefile.am
  93. +0 −1 ui/{gtk → gtk2}/candidatepanel.py
  94. 0 ui/{gtk → gtk2}/engineabout.py
  95. 0 ui/{gtk → gtk2}/gtkpanel.xml.in.in
  96. 0 ui/{gtk → gtk2}/handle.py
  97. 0 ui/{gtk → gtk2}/i18n.py
  98. 0 ui/{gtk → gtk2}/ibus-ui-gtk.in
  99. 0 ui/{gtk → gtk2}/icon.py
  100. +1 −1 ui/{gtk → gtk2}/languagebar.py
  101. 0 ui/{gtk → gtk2}/main.py
  102. 0 ui/{gtk → gtk2}/menu.py
  103. 0 ui/{gtk → gtk2}/notifications.py
  104. +7 −3 ui/{gtk → gtk2}/panel.py
  105. 0 ui/{gtk → gtk2}/propitem.py
  106. 0 ui/{gtk → gtk2}/toolitem.py
  107. +113 −0 ui/gtk3/Makefile.am
  108. +134 −0 ui/gtk3/application.vala
  109. +252 −0 ui/gtk3/candidatearea.vala
  110. +243 −0 ui/gtk3/candidatepanel.vala
  111. +105 −0 ui/gtk3/grabkeycode.c
  112. +12 −0 ui/gtk3/gtkpanel.xml.in.in
  113. +161 −0 ui/gtk3/handle.vala
  114. +56 −0 ui/gtk3/iconwidget.vala
  115. +241 −0 ui/gtk3/keybindingmanager.vala
  116. +422 −0 ui/gtk3/panel.vala
  117. +84 −0 ui/gtk3/pango.vala
  118. +201 −0 ui/gtk3/property.vala
  119. +39 −0 ui/gtk3/separator.vala
  120. +235 −0 ui/gtk3/switcher.vala
  121. +4 −4 xinput-ibus.in → xinput-ibus
View
@@ -22,52 +22,38 @@
NULL =
-if ENABLE_PYTHON
-PYTHON_DIRS = \
- ibus \
- ui \
- setup \
- $(NULL)
-endif
+UI_DIR = ui
-if ENABLE_GCONF
-GCONF_DIRS = \
- gconf \
- $(NULL)
+if ENABLE_SETUP
+SETUP_DIR = setup
endif
-if ENABLE_DAEMON
-DAEMON_DIRS = \
- bus \
- $(NULL)
+if ENABLE_PYTHON_LIBRARY
+PYTHON_LIB_DIRS = ibus
endif
-if ENABLE_MEMCONF
-MEMCONF_DIRS = \
- memconf \
- $(NULL)
-endif
-
-if ENABLE_DCONF
-DCONF_DIRS = \
- dconf \
+if ENABLE_DAEMON
+DAEMON_DIR = \
+ bus \
$(NULL)
endif
-SUBDIRS = \
- src \
- util \
- client \
- data \
- m4 \
- po \
- docs \
- bindings \
- $(DAEMON_DIRS) \
- $(PYTHON_DIRS) \
- $(GCONF_DIRS) \
- $(MEMCONF_DIRS) \
- $(DCONF_DIRS) \
+SUBDIRS = \
+ src \
+ util \
+ conf \
+ client \
+ engine \
+ tools \
+ data \
+ m4 \
+ po \
+ docs \
+ bindings \
+ $(UI_DIR) \
+ $(DAEMON_DIR) \
+ $(PYTHON_LIB_DIRS) \
+ $(SETUP_DIR) \
$(NULL)
ACLOCAL_AMFLAGS = -I m4
@@ -81,6 +67,7 @@ EXTRA_DIST = \
$(ibus_pc_in) \
ibus.spec.in \
python-config.py \
+ xinput-ibus \
$(NULL)
noinst_DIST = \
View
@@ -22,4 +22,4 @@ which gnome-autogen.sh || {
touch $srcdir/ChangeLog
}
-ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.10 CFLAGS="-Wall -Werror $CFLAGS" . gnome-autogen.sh
+ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" REQUIRED_AUTOMAKE_VERSION=1.10 CFLAGS="-Wall $CFLAGS" . gnome-autogen.sh
View
@@ -29,95 +29,75 @@ INCLUDES = \
-I$(top_builddir)/src \
$(NULL)
-AM_CFLAGS = \
- @GLIB2_CFLAGS@ \
- @GIO2_CFLAGS@ \
- @GTHREAD2_CFLAGS@ \
- -DG_LOG_DOMAIN=\"IBUS\" \
+AM_CFLAGS = \
+ @GLIB2_CFLAGS@ \
+ @GIO2_CFLAGS@ \
+ @GTHREAD2_CFLAGS@ \
+ -DG_LOG_DOMAIN=\"IBUS\" \
-DPKGDATADIR=\"$(pkgdatadir)\" \
-DLIBEXECDIR=\"$(libexecdir)\" \
- -DBINDIR=\"@bindir@\" \
- $(INCLUDES) \
+ -DBINDIR=\"@bindir@\" \
+ -DIBUS_DISABLE_DEPRECATED \
+ $(INCLUDES) \
$(NULL)
-AM_LDADD = \
- @GOBJECT2_LIBS@ \
- @GLIB2_LIBS@ \
- @GIO2_LIBS@ \
- @GTHREAD2_LIBS@ \
- $(libibus) \
+AM_LDADD = \
+ @GOBJECT2_LIBS@ \
+ @GLIB2_LIBS@ \
+ @GIO2_LIBS@ \
+ @GTHREAD2_LIBS@ \
+ $(libibus) \
$(NULL)
-desktopdir = $(datadir)/applications
-desktop_in_files = ibus.desktop.in
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
+commonsrc = \
+ component.c \
+ component.h \
+ dbusimpl.c \
+ dbusimpl.h \
+ ibusimpl.c \
+ ibusimpl.h \
+ inputcontext.c \
+ inputcontext.h \
+ engineproxy.c \
+ engineproxy.h \
+ panelproxy.c \
+ panelproxy.h \
+ factoryproxy.c \
+ factoryproxy.h \
+ global.c \
+ global.h \
+ server.c \
+ server.h \
+ connection.c \
+ connection.h \
+ matchrule.c \
+ matchrule.h \
+ registry.c \
+ registry.h \
+ marshalers.c \
+ marshalers.h \
+ types.h \
+ $(NULL)
-noinst_PROGRAMS = $(TESTS)
bin_PROGRAMS = ibus-daemon
-ibus_daemon_DEPENDENCIES = \
- $(libibus) \
- $(NULL)
-ibus_daemon_SOURCES = \
- main.c \
- component.c \
- component.h \
- dbusimpl.c \
- dbusimpl.h \
- ibusimpl.c \
- ibusimpl.h \
- inputcontext.c \
- inputcontext.h \
- engineproxy.c \
- engineproxy.h \
- panelproxy.c \
- panelproxy.h \
- factoryproxy.c \
- factoryproxy.h \
- server.c \
- server.h \
- connection.c \
- connection.h \
- matchrule.c \
- matchrule.h \
- registry.c \
- registry.h \
- option.h \
- marshalers.c \
- marshalers.h \
- types.h \
+ibus_daemon_DEPENDENCIES = \
+ $(libibus) \
+ $(NULL)
+ibus_daemon_SOURCES = \
+ $(commonsrc) \
+ main.c \
$(NULL)
-ibus_daemon_CFLAGS = \
- $(AM_CFLAGS) \
+ibus_daemon_CFLAGS = \
+ $(AM_CFLAGS) \
$(NULL)
-ibus_daemon_LDADD = \
- $(AM_LDADD) \
+ibus_daemon_LDADD = \
+ $(AM_LDADD) \
$(NULL)
BUILT_SOURCES = \
marshalers.h \
marshalers.c \
$(NULL)
-# test_registry_SOURCES = \
-# registry.c \
-# registry.h \
-# factoryproxy.c \
-# factoryproxy.h \
-# test-registry.c \
-# $(NULL)
-#
-# test_matchrule_SOURCES = \
-# connection.c \
-# matchrule.c \
-# test-matchrule.c \
-# $(NULL)
-# test_matchrule_CFLAGS = \
-# $(AM_CFLAGS) \
-# $(NULL)
-# test_matchrule_LDADD = \
-# $(AM_LDADD) \
-# $(NULL)
-
# gen marshal
marshalers.h: marshalers.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --header --internal > $@.tmp && \
@@ -128,6 +108,40 @@ marshalers.c: marshalers.h marshalers.list
$(GLIB_GENMARSHAL) --prefix=bus_marshal $(srcdir)/marshalers.list --body --internal) > $@.tmp && \
mv $@.tmp $@
+
+TESTS = \
+ test-matchrule \
+ test-registry \
+ test-stress \
+ $(NULL)
+
+noinst_PROGRAMS = $(TESTS)
+
+test_registry_SOURCES = \
+ $(commonsrc) \
+ test-registry.c \
+ $(NULL)
+test_registry_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(NULL)
+test_registry_LDADD = \
+ $(AM_LDADD) \
+ $(NULL)
+
+test_matchrule_DEPENDENCIES = \
+ $(libibus) \
+ $(NULL)
+test_matchrule_SOURCES = \
+ $(commonsrc) \
+ test-matchrule.c \
+ $(NULL)
+test_matchrule_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(NULL)
+test_matchrule_LDADD = \
+ $(AM_LDADD) \
+ $(NULL)
+
test_stress_SOURCES = \
test-client.c \
test-client.h \
@@ -161,4 +175,9 @@ test: ibus-daemon
G_DEBUG=fatal_warnings \
$(builddir)/ibus-daemon -v
+desktopdir = $(datadir)/applications
+desktop_in_files = ibus.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+@INTLTOOL_DESKTOP_RULE@
+
-include $(top_srcdir)/git.mk
View
@@ -20,13 +20,15 @@
* Boston, MA 02111-1307, USA.
*/
#include "component.h"
-#include <glib/gstdio.h>
+
#include <gio/gio.h>
+#include <glib/gstdio.h>
#include <stdlib.h>
#include <string.h>
-#include "types.h"
-#include "option.h"
+
+#include "global.h"
#include "marshalers.h"
+#include "types.h"
enum {
LAST_SIGNAL,
View
@@ -101,8 +101,7 @@ bus_connection_destroy (BusConnection *connection)
connection->unique_name = NULL;
}
- g_list_foreach (connection->names, (GFunc) g_free, NULL);
- g_list_free (connection->names);
+ g_list_free_full (connection->names, g_free);
connection->names = NULL;
IBUS_OBJECT_CLASS(bus_connection_parent_class)->destroy (IBUS_OBJECT (connection));
View
@@ -19,14 +19,17 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
#include "dbusimpl.h"
-#include "ibusimpl.h"
-#include "registry.h"
-#include "option.h"
+
#include <string.h>
-#include "types.h"
+
+#include "global.h"
+#include "ibusimpl.h"
#include "marshalers.h"
#include "matchrule.h"
+#include "registry.h"
+#include "types.h"
enum {
NAME_OWNER_CHANGED,
@@ -331,17 +334,9 @@ bus_name_service_free (BusNameService *service)
g_assert (service != NULL);
- list = service->owners;
-
- while (list) {
- bus_connection_owner_free ((BusConnectionOwner *) list->data);
- list->data = NULL;
- list = list->next;
- }
- if (service->owners) {
- g_slist_free (service->owners);
- service->owners = NULL;
- }
+ g_slist_free_full (service->owners,
+ (GDestroyNotify) bus_connection_owner_free);
+ service->owners = NULL;
g_free (service->name);
g_slice_free (BusNameService, service);
@@ -636,9 +631,8 @@ bus_dbus_impl_destroy (BusDBusImpl *dbus)
dbus->unique_names = NULL;
dbus->names = NULL;
- g_list_foreach (dbus->start_service_calls,
- (GFunc) bus_method_call_free, NULL);
- g_list_free (dbus->start_service_calls);
+ g_list_free_full (dbus->start_service_calls,
+ (GDestroyNotify) bus_method_call_free);
dbus->start_service_calls = NULL;
/* FIXME destruct _lock and _queue members. */
@@ -1796,8 +1790,9 @@ bus_dbus_impl_forward_message (BusDBusImpl *dbus,
g_mutex_unlock (dbus->forward_lock);
if (!is_running) {
- g_idle_add_full (G_PRIORITY_DEFAULT, (GSourceFunc) bus_dbus_impl_forward_message_idle_cb,
- g_object_ref (dbus), (GDestroyNotify) g_object_unref);
+ g_idle_add_full (G_PRIORITY_DEFAULT,
+ (GSourceFunc) bus_dbus_impl_forward_message_idle_cb,
+ g_object_ref (dbus), (GDestroyNotify) g_object_unref);
/* the idle callback function will be called from the ibus's main thread. */
}
}
@@ -1840,8 +1835,8 @@ bus_dbus_impl_dispatch_message_by_rule_idle_cb (BusDBusImpl *dbus)
if (G_UNLIKELY (IBUS_OBJECT_DESTROYED (dbus))) {
/* dbus was destryed */
g_mutex_lock (dbus->dispatch_lock);
- g_list_foreach (dbus->dispatch_queue, (GFunc) bus_dispatch_data_free, NULL);
- g_list_free (dbus->dispatch_queue);
+ g_list_free_full (dbus->dispatch_queue,
+ (GDestroyNotify) bus_dispatch_data_free);
dbus->dispatch_queue = NULL;
g_mutex_unlock (dbus->dispatch_lock);
return FALSE; /* return FALSE to prevent this callback to be called again. */
Oops, something went wrong.

0 comments on commit 99e4d9d

Please sign in to comment.