This commit is contained in:
Peng Huang 2012-01-05 14:59:35 -05:00
Родитель 369a7906fb
Коммит 866efc43a4
5 изменённых файлов: 12 добавлений и 23 удалений

Просмотреть файл

@ -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)

Просмотреть файл

@ -65,9 +65,9 @@ def gen_xml():
</engine>"""
footer = u"""\t</engines>
</component>"""
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__":

Просмотреть файл

@ -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]);

Просмотреть файл

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- filename: gtkpanel.xml -->
<component>
<name>org.freedesktop.IBus.Panel</name>
<description>Gtk Panel Component</description>
<exec>${libexecdir}/ibus-ui-gtk3</exec>
<version>1.4.99.20120104</version>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
<license>GPL</license>
<homepage>http://code.google.com/p/ibus</homepage>
<textdomain>ibus</textdomain>
</component>

Просмотреть файл

@ -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);