Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: src/xkbutil.c

Issue 5449001: ibus-xkb-layouts: Support ibus-1.4. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/ibus-xkb-layouts.git@master
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/main.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/xkbutil.c
diff --git a/src/xkbutil.c b/src/xkbutil.c
index 59eb4cd59a26a1b8b7271dc5a6974b5e9e43db07..2bb258a96a79648e245ecdf7ff8601bfc26f075f 100644
--- a/src/xkbutil.c
+++ b/src/xkbutil.c
@@ -33,6 +33,21 @@ ibus_xkb_engine_new (gchar *layout,
engine_hotkeys = "Muhenkan";
}
+ /* set default rank to 0 */
+ gint rank = 0;
+ if (g_strcmp0(layout, "us") == 0 && (!variant || !*variant)) {
+ rank = 100;
+ }
+
+#if IBUS_CHECK_VERSION(1, 3, 99)
+ engine = ibus_engine_desc_new_varargs("name", engine_name,
+ "longname", (engine_longname ? engine_longname : layout_desc),
+ "language", language,
+ "layout", (engine_layout ? engine_layout : layout),
+ "hotkeys", engine_hotkeys,
+ "rank", rank,
+ NULL);
+#else
engine = ibus_engine_desc_new2(engine_name,
engine_longname ? engine_longname : layout_desc,
"",
@@ -42,13 +57,8 @@ ibus_xkb_engine_new (gchar *layout,
"",
engine_layout ? engine_layout : layout,
engine_hotkeys);
-
- /* set default rank to 0 */
- engine->rank = 0;
-
- if (g_strcmp0(layout, "us") == 0 && (!variant || !*variant)) {
- engine->rank = 100;
- }
+ engine->rank = rank;
+#endif
g_free (engine_name);
g_free (engine_longname);
« no previous file with comments | « src/main.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698