diff --git a/configure.ac b/configure.ac index 3f5c7baf..9f897f6c 100644 --- a/configure.ac +++ b/configure.ac @@ -327,9 +327,10 @@ AM_CONDITIONAL([ENABLE_PYTHON_LIBRARY], [test x"$enable_python_library" = x"yes" AM_CONDITIONAL([ENABLE_SETUP], [test x"$enable_setup" = x"yes"]) AM_CONDITIONAL([ENABLE_DAEMON], [true]) +AM_PATH_PYTHON([2.5]) + if test x"$enable_python_library" = x"yes"; then # Check python. - AM_PATH_PYTHON([2.5]) AC_PATH_PROG(PYTHON_CONFIG, python$PYTHON_VERSION-config) if test x"$PYTHON_CONFIG" = x""; then AC_PATH_PROG(PYTHON_CONFIG, python-config) diff --git a/engine/gensimple.py b/engine/gensimple.py index eed9581f..4a14052e 100644 --- a/engine/gensimple.py +++ b/engine/gensimple.py @@ -65,9 +65,9 @@ def gen_xml(): """ footer = u"""\t """ - + print header - + for name, vname, sdesc, desc, languages in parse_xml(): if vname: ibus_name = "xkb:layout:%s-%s" % (name, vname) @@ -79,7 +79,7 @@ def gen_xml(): desc = cgi.escape(desc) out = engine % (ibus_name + u"-" + l, l, layout, desc, desc, 99) print out.encode("utf8") - + print footer if __name__ == "__main__": diff --git a/src/ibusutil.c b/src/ibusutil.c index ddb6b9e8..b0f1c91a 100644 --- a/src/ibusutil.c +++ b/src/ibusutil.c @@ -57,7 +57,6 @@ _iso_codes_parse_xml_node (XMLNode *node) { "iso_639_2B_code", NULL }, { "iso_639_2T_code", NULL }, { "iso_639_1_code", NULL }, - { NULL, NULL }, }; @@ -65,9 +64,9 @@ _iso_codes_parse_xml_node (XMLNode *node) continue; } attributes = sub_node->attributes; - for (i = 0; attributes[i]; i+=2) { + for (i = 0; attributes[i]; i += 2) { if (g_strcmp0 (attributes[i], "name") == 0) { - for (j = 0; entries[j].key; j++) { + for (j = 0; i < G_N_ELEMENTS (entries); j++) { if (entries[j].value == NULL) { continue; } @@ -77,7 +76,7 @@ _iso_codes_parse_xml_node (XMLNode *node) entries[j].value = NULL; } } else { - for (j = 0; entries[j].key; j++) { + for (j = 0; j < G_N_ELEMENTS (entries); j++) { if (g_strcmp0 (attributes[i], entries[j].key) == 0 && attributes[i + 1] != NULL) { entries[j].value = g_strdup (attributes[i + 1]); diff --git a/ui/gtk3/gtkpanel.xml.in b/ui/gtk3/gtkpanel.xml.in deleted file mode 100644 index e721846e..00000000 --- a/ui/gtk3/gtkpanel.xml.in +++ /dev/null @@ -1,12 +0,0 @@ - - - - org.freedesktop.IBus.Panel - Gtk Panel Component - ${libexecdir}/ibus-ui-gtk3 - 1.4.99.20120104 - Peng Huang <shawn.p.huang@gmail.com> - GPL - http://code.google.com/p/ibus - ibus - diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala index 53b883b3..da122b79 100644 --- a/ui/gtk3/panel.vala +++ b/ui/gtk3/panel.vala @@ -310,9 +310,10 @@ class Panel : IBus.PanelService { // Append IMEs foreach (var engine in m_engines) { - var lang = engine.get_language(); - var name = engine.get_name(); - var item = new Gtk.ImageMenuItem.with_label(lang + " - " + name); + // var lang = engine.get_language(); + // var name = engine.get_name(); + var desc = engine.get_description(); + var item = new Gtk.ImageMenuItem.with_label(desc); if (engine.get_icon() != "") { var icon = new IconWidget(engine.get_icon(), width); item.set_image(icon);