From: Huang Peng Date: Sat, 28 Feb 2009 11:15:49 +0000 (+0800) Subject: Sort the languages in input methods combobox. X-Git-Tag: 1.1.0.20090306~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ff6035410d535ec17e5049be43c09dcd229e7b9;p=platform%2Fupstream%2Fibus.git Sort the languages in input methods combobox. --- diff --git a/setup/enginecombobox.py b/setup/enginecombobox.py index 6db543a..e018973 100644 --- a/setup/enginecombobox.py +++ b/setup/enginecombobox.py @@ -25,7 +25,7 @@ import ibus import gettext from icon import load_icon -_ = lambda a : gettext.dgettext("ibus", a) +_ = lambda a : gettext.dgettext("ibus", a) class EngineComboBox(gtk.ComboBox): def __init__(self, engines): @@ -42,7 +42,12 @@ class EngineComboBox(gtk.ComboBox): lang[l] = [] lang[l].append(e) - for l in lang.keys(): + keys = lang.keys() + keys.sort() + if ibus.get_language_name("Other") in keys: + keys.remove( ibus.get_language_name("Other")) + keys += [ibus.get_language_name("Other")] + for l in keys: iter1 = self.__model.append(None) self.__model.set(iter1, 0, l) for e in lang[l]: