Updated to 1.4.99.20120203

- Removed ibus-xx-bridge-hotkey.patch
- Updated ibus-541492-xkb.patch to use libgnomekbd.
- Updated ibus-xx-setup-frequent-lang.patch for 1.4.99.20120203
This commit is contained in:
Takao Fujiwara 2012-02-04 10:13:28 +09:00
parent 3b4ca626a5
commit db6c98183c
7 changed files with 2568 additions and 11440 deletions

3
.gitignore vendored
View File

@ -32,3 +32,6 @@ ibus-1.3.6.tar.gz
/ibus-gjs-3.2.1.20111118.tar.gz /ibus-gjs-3.2.1.20111118.tar.gz
/ibus-gjs-3.2.1.20111128.tar.gz /ibus-gjs-3.2.1.20111128.tar.gz
/ibus-gjs-3.2.1.20111230.tar.gz /ibus-gjs-3.2.1.20111230.tar.gz
/ibus-1.4.99.20120203.tar.gz
/ibus-gjs-3.3.3.20120203.tar.gz
/ibus-gsettings-db

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,13 @@
--- ibus-gjs-3.1.4.20110823/configure.ac.orig 2011-09-01 16:03:26.074219971 +0900 --- ibus-gjs/configure.ac.orig 2012-02-03 20:24:22.331320102 +0900
+++ ibus-gjs-3.1.4.20110823/configure.ac 2011-09-01 16:05:31.107012718 +0900 +++ ibus-gjs/configure.ac 2012-02-03 20:31:03.628265181 +0900
@@ -174,8 +174,8 @@ try { @@ -164,8 +164,8 @@ try {
$GREP -v "DEBUG:" $GREP -v "DEBUG:"
} }
-GNOME_SHELL_VERSION=`GET_JS_VERSION 'Config.PACKAGE_VERSION'` -GNOME_SHELL_VERSION=`GET_JS_VERSION 'Config.PACKAGE_VERSION'`
-GJS_VERSION=`GET_JS_VERSION 'Config.GJS_VERSION'` -GJS_VERSION=`GET_JS_VERSION 'Config.GJS_VERSION'`
+GNOME_SHELL_VERSION=3.2 +GNOME_SHELL_VERSION='3.3.4", "3.3.3", "3.2'
+GJS_VERSION=1.30 +GJS_VERSION='1.31.6", "1.31.11", "1.30'
AC_SUBST(GNOME_SHELL_VERSION) AC_SUBST(GNOME_SHELL_VERSION)
AC_SUBST(GJS_VERSION) AC_SUBST(GJS_VERSION)

View File

@ -1,40 +1,40 @@
From 6937ff7453a352dc63a6487c7726acdb8942f8c9 Mon Sep 17 00:00:00 2001 From 6e9cdc7d5b10cb043e8709670ea5ad487ab3d937 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com> From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 5 Aug 2011 20:23:07 +0900 Date: Fri, 3 Feb 2012 19:20:27 +0900
Subject: [PATCH] Enable ibus-setup to show the frequently used languages Subject: [PATCH] Enable ibus-setup to show the frequently used languages only
only in IME list. in IME list.
--- ---
data/ibus.schemas.in.in | 168 +++++++++++++++++++++++++++++++++++++++++++++++ data/ibus.schemas.in | 168 +++++++++++++++++++++++++++++++++++++++++++++++
setup/enginecombobox.py | 153 ++++++++++++++++++++++++++++++++++++------ setup/enginecombobox.py | 156 ++++++++++++++++++++++++++++++++++++-------
setup/main.py | 1 + setup/main.py | 1 +
3 files changed, 300 insertions(+), 22 deletions(-) 3 files changed, 300 insertions(+), 25 deletions(-)
diff --git a/data/ibus.schemas.in.in b/data/ibus.schemas.in.in diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
index 2df4f19..692664b 100644 index 34de9b4..bf50645 100644
--- a/data/ibus.schemas.in.in --- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in.in +++ b/data/ibus.schemas.in
@@ -240,6 +240,174 @@ @@ -260,6 +260,174 @@ se,si,sk,sy,sy(ku),th,tj,tr,ua,uz,vn
</locale> </locale>
</schema> </schema>
<schema> <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/group_list</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/group_list</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/group_list</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/group_list</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
+ <default>[west_europe,south_europe,east_europe,north_europe,west_asia,center_asia,east_asia,india,australia]</default> + <default>[west_europe,south_europe,east_europe,north_europe,west_asia,center_asia,east_asia,india,australia]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of system keyboard layout groups on ibus-setup</short> + <short>List of system keyboard layout groups on ibus-setup</short>
+ <long>The group list is used not to show all the system + <long>The group list is used not to show all the system
+ keyboard layouts by default. The list item will be + keyboard layouts by default. The list item will be
+ appended at the end of gconf key. e.g. + appended at the end of gconf key. e.g.
+ .../xkblayoutconfig/system/item1</long> + .../xkblayoutconfig/item1</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/west_europe</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/west_europe</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/west_europe</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/west_europe</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -44,14 +44,14 @@ index 2df4f19..692664b 100644
+ <default>[ca,cs,de,en,es,fr,gd,hu,it,nl,pt,sk,sl]</default> + <default>[ca,cs,de,en,es,fr,gd,hu,it,nl,pt,sk,sl]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of European languages on ibus-setup</short> + <short>List of European languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/south_europe</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/south_europe</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/south_europe</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/south_europe</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -61,14 +61,14 @@ index 2df4f19..692664b 100644
+ <default>[bg,bs,el,mk,mt,ro,sq,sr]</default> + <default>[bg,bs,el,mk,mt,ro,sq,sr]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of European languages on ibus-setup</short> + <short>List of European languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/east_europe</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/east_europe</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/east_europe</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/east_europe</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -78,14 +78,14 @@ index 2df4f19..692664b 100644
+ <default>[be,csb,cv,et,ka,kk,ky,lt,lv,pl,ru,tt,uk,uz]</default> + <default>[be,csb,cv,et,ka,kk,ky,lt,lv,pl,ru,tt,uk,uz]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of European languages on ibus-setup</short> + <short>List of European languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/north_europe</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/north_europe</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/north_europe</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/north_europe</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -95,14 +95,14 @@ index 2df4f19..692664b 100644
+ <default>[da,fi,fo,is,no,se,sv]</default> + <default>[da,fi,fo,is,no,se,sv]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of European languages on ibus-setup</short> + <short>List of European languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/west_asia</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/west_asia</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/west_asia</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/west_asia</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -112,14 +112,14 @@ index 2df4f19..692664b 100644
+ <default>[am,ar,az,ber,fa,ha,he,hy,ig,ku,tg,tr,yo]</default> + <default>[am,ar,az,ber,fa,ha,he,hy,ig,ku,tg,tr,yo]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of Asian languages on ibus-setup</short> + <short>List of Asian languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/center_asia</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/center_asia</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/center_asia</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/center_asia</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -129,14 +129,14 @@ index 2df4f19..692664b 100644
+ <default>[bo,zh]</default> + <default>[bo,zh]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of Asian languages on ibus-setup</short> + <short>List of Asian languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/east_asia</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/east_asia</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/east_asia</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/east_asia</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -146,14 +146,14 @@ index 2df4f19..692664b 100644
+ <default>[dz,km,lo,my,th,vi]</default> + <default>[dz,km,lo,my,th,vi]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of Asian languages on ibus-setup</short> + <short>List of Asian languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/india</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/india</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/india</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/india</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -163,14 +163,14 @@ index 2df4f19..692664b 100644
+ <default>[bn,dv,gu,hi,kn,ml,ne,or,pa,si,ta,te,ur]</default> + <default>[bn,dv,gu,hi,kn,ml,ne,or,pa,si,ta,te,ur]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of Asian languages on ibus-setup</short> + <short>List of Asian languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
+ <key>/schemas/desktop/ibus/general/xkblayoutconfig/system/australia</key> + <key>/schemas/desktop/ibus/general/xkblayoutconfig/australia</key>
+ <applyto>/desktop/ibus/general/xkblayoutconfig/system/australia</applyto> + <applyto>/desktop/ibus/general/xkblayoutconfig/australia</applyto>
+ <owner>ibus</owner> + <owner>ibus</owner>
+ <type>list</type> + <type>list</type>
+ <list_type>string</list_type> + <list_type>string</list_type>
@ -180,63 +180,62 @@ index 2df4f19..692664b 100644
+ <default>[mi]</default> + <default>[mi]</default>
+ <locale name="C"> + <locale name="C">
+ <short>List of Asian languages on ibus-setup</short> + <short>List of Asian languages on ibus-setup</short>
+ <long>ibus-setup shows the languages only in input method list + <long>ibus-setup shows the languages only in input method list
+ when you run ibus-setup on one of the languages. + when you run ibus-setup on one of the languages.
+ Other languages are hidden under an extended button.</long> + Other languages are hidden under an extended button.</long>
+ </locale> + </locale>
+ </schema> + </schema>
+ <schema> + <schema>
<key>/schemas/desktop/ibus/panel/use_custom_font</key> <key>/schemas/desktop/ibus/panel/custom_font</key>
<applyto>/desktop/ibus/panel/use_custom_font</applyto> <applyto>/desktop/ibus/panel/custom_font</applyto>
<owner>ibus</owner> <owner>ibus</owner>
diff --git a/setup/enginecombobox.py b/setup/enginecombobox.py diff --git a/setup/enginecombobox.py b/setup/enginecombobox.py
index 7383177..bff2407 100644 index 8d1424b..9fbe476 100644
--- a/setup/enginecombobox.py --- a/setup/enginecombobox.py
+++ b/setup/enginecombobox.py +++ b/setup/enginecombobox.py
@@ -43,7 +43,10 @@ class EngineComboBox(gtk.ComboBox): @@ -45,6 +45,9 @@ class EngineComboBox(Gtk.ComboBox):
self.connect("notify::active", self.__notify_active_cb) self.connect("notify::active", self.__notify_active_cb)
self.__model = None self.__model = None
+ self.__all_model = None + self.__all_model = None
+ self.__config = None + self.__config = None
self.__title = _("Select an input method")
+ self.__show_sub_lang = False + self.__show_sub_lang = False
renderer = gtk.CellRendererPixbuf() renderer = Gtk.CellRendererPixbuf()
renderer.set_property("xalign", 0) renderer.set_property("xalign", 0)
@@ -57,21 +60,51 @@ class EngineComboBox(gtk.ComboBox): @@ -58,21 +61,51 @@ class EngineComboBox(Gtk.ComboBox):
self.pack_start(renderer, True) self.pack_start(renderer, True)
self.set_cell_data_func(renderer, self.__name_cell_data_cb) self.set_cell_data_func(renderer, self.__name_cell_data_cb, None)
- def set_engines(self, engines): - def set_engines(self, engines):
- self.__model = gtk.TreeStore(gobject.TYPE_PYOBJECT) - self.__model = Gtk.TreeStore(object)
+ def __gconf_get_lang_list_from_locale(self): + def __gconf_get_lang_list_from_locale(self):
+ common_list = ['en', 'Other'] + common_list = ['en', 'Other']
+ if self.__config == None: + if self.__config == None:
+ return None + return None
+ loc = None + loc = None
+ try: + try:
+ loc = locale.setlocale (locale.LC_ALL) + loc = locale.setlocale (locale.LC_ALL)
+ except: + except:
+ pass + pass
+ if loc == None: + if loc == None:
+ return common_list + return common_list
+ current_lang = ibus.get_language_name(loc) + current_lang = IBus.get_language_name(loc)
+ if current_lang == None: + if current_lang == None:
+ return common_list + return common_list
+ group_list = self.__config.get_value("general/xkblayoutconfig/system", + group_list = self.__config.get_value("general/xkblayoutconfig",
+ "group_list", None) + "group_list")
+ if group_list == None: + if group_list == None:
+ return [loc] + common_list + return [loc] + common_list
+ group_list = list(group_list) + group_list = list(group_list)
+ lang_list = None + lang_list = None
+ for group in group_list: + for group in group_list:
+ group = str(group) + group = str(group)
+ langs = self.__config.get_value("general/xkblayoutconfig/system", + langs = list(self.__config.get_value("general/xkblayoutconfig",
+ group, []) + group))
+ for lang in langs: + for lang in langs:
+ lang = str(lang) + lang = str(lang)
+ if current_lang == ibus.get_language_name(lang): + if current_lang == IBus.get_language_name(lang):
+ lang_list = langs + lang_list = langs
+ break + break
+ if lang_list != None: + if lang_list != None:
@ -247,49 +246,49 @@ index 7383177..bff2407 100644
- iter1 = self.__model.append(None) - iter1 = self.__model.append(None)
- self.__model.set(iter1, 0, 0) - self.__model.set(iter1, 0, 0)
- lang = {} - langs = {}
- for e in engines: - for e in engines:
- if ibus.use_bridge_hotkey() and \ - print e.get_language()
- e.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME): - l = IBus.get_language_name(e.get_language())
- continue - if l == None:
- l = ibus.get_language_name(e.language) - l = ""
- if l not in lang: - if l not in langs:
- lang[l] = [] - langs[l] = []
- lang[l].append(e) - langs[l].append(e)
+ def __has_engine_in_lang_list(self, engine, lang_list): + def __has_engine_in_lang_list(self, engine, lang_list):
+ retval = False + retval = False
+ for lang in lang_list: + for lang in lang_list:
+ if ibus.get_language_name(lang) == \ + if IBus.get_language_name(lang) == \
+ ibus.get_language_name(engine.language): + IBus.get_language_name(engine.props.language):
+ retval = True + retval = True
+ break + break
+ return retval + return retval
+ def __model_append_langs(self, model, lang, visible): + def __model_append_langs(self, model, langs, visible):
keys = lang.keys() keys = langs.keys()
keys.sort(locale.strcoll) keys.sort(locale.strcoll)
#add "Others" to the end of the combo box current_lang = IBus.get_language_name(locale.getlocale()[0])
@@ -76,29 +112,89 @@ class EngineComboBox(gtk.ComboBox): @@ -86,29 +119,86 @@ class EngineComboBox(Gtk.ComboBox):
keys.remove(ibus.get_language_name("Other")) keys.remove(IBus.get_language_name("Other"))
keys += [ibus.get_language_name("Other")] keys += [IBus.get_language_name("Other")]
for l in keys: for l in keys:
- iter1 = self.__model.append(None) - iter1 = self.__model.append(None)
- self.__model.set(iter1, 0, l) - self.__model.set(iter1, 0, l)
+ iter1 = model.append(None) + iter1 = model.append(None)
+ model.set(iter1, 0, l) + model.set(iter1, 0, l)
def cmp_engine(a, b): def cmp_engine(a, b):
if a.rank == b.rank: if a.get_rank() == b.get_rank():
return locale.strcoll(a.longname, b.longname) return locale.strcoll(a.get_longname(), b.get_longname())
return int(b.rank - a.rank) return int(b.get_rank() - a.get_rank())
lang[l].sort(cmp_engine) langs[l].sort(cmp_engine)
for e in lang[l]: for e in langs[l]:
- iter2 = self.__model.append(iter1) - iter2 = self.__model.append(iter1)
- self.__model.set(iter2, 0, e) - self.__model.set(iter2, 0, e)
+ iter2 = model.append(iter1) + iter2 = model.append(iter1)
+ model.set(iter2, 0, e) + model.set(iter2, 0, e)
+ +
+ def set_engines(self, engines): + def set_engines(self, engines):
+ self.__model = gtk.TreeStore(gobject.TYPE_PYOBJECT) + self.__model = Gtk.TreeStore(object)
+ +
+ iter1 = self.__model.append(None) + iter1 = self.__model.append(None)
+ self.__model.set(iter1, 0, 0) + self.__model.set(iter1, 0, 0)
@ -297,10 +296,7 @@ index 7383177..bff2407 100644
+ lang = {} + lang = {}
+ sub_lang = {} + sub_lang = {}
+ for e in engines: + for e in engines:
+ if ibus.use_bridge_hotkey() and \ + l = IBus.get_language_name(e.props.language)
+ e.name.startswith(ibus.DEFAULT_BRIDGE_ENGINE_NAME):
+ continue
+ l = ibus.get_language_name(e.language)
+ if lang_list == None or \ + if lang_list == None or \
+ self.__has_engine_in_lang_list(e, lang_list): + self.__has_engine_in_lang_list(e, lang_list):
+ if l not in lang: + if l not in lang:
@ -314,8 +310,9 @@ index 7383177..bff2407 100644
+ self.__model_append_langs(self.__model, lang, True) + self.__model_append_langs(self.__model, lang, True)
+ iter1 = self.__model.append(None) + iter1 = self.__model.append(None)
+ self.__model.set(iter1, 0, -1) + self.__model.set(iter1, 0, -1)
+
+ self.__all_model = gtk.TreeStore(gobject.TYPE_PYOBJECT) - self.set_model(self.__model)
+ self.__all_model = Gtk.TreeStore(object)
+ iter1 = self.__all_model.append(None) + iter1 = self.__all_model.append(None)
+ self.__all_model.set(iter1, 0, 0) + self.__all_model.set(iter1, 0, 0)
+ self.__model_append_langs(self.__all_model, lang, False) + self.__model_append_langs(self.__all_model, lang, False)
@ -324,8 +321,7 @@ index 7383177..bff2407 100644
+ self.__model_append_langs(self.__all_model, sub_lang, False) + self.__model_append_langs(self.__all_model, sub_lang, False)
+ +
+ self.__toggle_sub_lang() + self.__toggle_sub_lang()
+
- self.set_model(self.__model)
+ def __toggle_sub_lang(self): + def __toggle_sub_lang(self):
+ self.set_model(None) + self.set_model(None)
+ if self.__show_sub_lang: + if self.__show_sub_lang:
@ -334,7 +330,7 @@ index 7383177..bff2407 100644
+ self.set_model(self.__model) + self.set_model(self.__model)
self.set_active(0) self.set_active(0)
def __icon_cell_data_cb(self, celllayout, renderer, model, iter): def __icon_cell_data_cb(self, celllayout, renderer, model, iter, data):
- engine = self.__model.get_value(iter, 0) - engine = self.__model.get_value(iter, 0)
+ model = self.get_model() + model = self.get_model()
+ engine = model.get_value(iter, 0) + engine = model.get_value(iter, 0)
@ -351,12 +347,12 @@ index 7383177..bff2407 100644
+ renderer.set_property("pixbuf", None) + renderer.set_property("pixbuf", None)
+ elif engine < 0: + elif engine < 0:
+ if not self.__show_sub_lang: + if not self.__show_sub_lang:
+ pixbuf = load_icon("list-add", gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon("list-add", Gtk.IconSize.LARGE_TOOLBAR)
+ else: + else:
+ pixbuf = load_icon("list-remove", gtk.ICON_SIZE_LARGE_TOOLBAR) + pixbuf = load_icon("list-remove", Gtk.IconSize.LARGE_TOOLBAR)
+ if pixbuf == None: + if pixbuf == None:
+ pixbuf = load_icon("gtk-missing-image", + pixbuf = load_icon(Gtk.STOCK_MISSING_IMAGE,
+ gtk.ICON_SIZE_LARGE_TOOLBAR) + Gtk.IconSize.LARGE_TOOLBAR)
+ if pixbuf == None: + if pixbuf == None:
+ renderer.set_property("visible", False) + renderer.set_property("visible", False)
+ renderer.set_property("sensitive", False) + renderer.set_property("sensitive", False)
@ -367,35 +363,35 @@ index 7383177..bff2407 100644
else: else:
renderer.set_property("visible", True) renderer.set_property("visible", True)
renderer.set_property("sensitive", True) renderer.set_property("sensitive", True)
@@ -110,7 +203,8 @@ class EngineComboBox(gtk.ComboBox): @@ -121,7 +211,8 @@ class EngineComboBox(Gtk.ComboBox):
renderer.set_property("pixbuf", pixbuf) renderer.set_property("pixbuf", pixbuf)
def __name_cell_data_cb(self, celllayout, renderer, model, iter): def __name_cell_data_cb(self, celllayout, renderer, model, iter, data):
- engine = self.__model.get_value(iter, 0) - engine = self.__model.get_value(iter, 0)
+ model = self.get_model() + model = self.get_model()
+ engine = model.get_value(iter, 0) + engine = model.get_value(iter, 0)
if isinstance (engine, str) or isinstance (engine, unicode): if isinstance (engine, str) or isinstance (engine, unicode):
renderer.set_property("sensitive", False) renderer.set_property("sensitive", False)
@@ -118,8 +212,15 @@ class EngineComboBox(gtk.ComboBox): @@ -129,8 +220,15 @@ class EngineComboBox(Gtk.ComboBox):
renderer.set_property("weight", pango.WEIGHT_NORMAL) renderer.set_property("weight", Pango.Weight.NORMAL)
elif isinstance(engine, int): elif isinstance(engine, int):
renderer.set_property("sensitive", True) renderer.set_property("sensitive", True)
- renderer.set_property("text", self.__title) - renderer.set_property("text", _("Select an input method"))
- renderer.set_property("weight", pango.WEIGHT_NORMAL) - renderer.set_property("weight", Pango.Weight.NORMAL)
+ if engine == 0: + if engine == 0:
+ renderer.set_property("text", self.__title) + renderer.set_property("text", _("Select an input method"))
+ renderer.set_property("weight", pango.WEIGHT_NORMAL) + renderer.set_property("weight", Pango.Weight.NORMAL)
+ elif engine < 0: + elif engine < 0:
+ if not self.__show_sub_lang: + if not self.__show_sub_lang:
+ renderer.set_property("text", _("Show all input methods")) + renderer.set_property("text", _("Show all input methods"))
+ else: + else:
+ renderer.set_property("text", _("Show only input methods for your region")) + renderer.set_property("text", _("Show only input methods for your region"))
+ renderer.set_property("weight", pango.WEIGHT_BOLD) + renderer.set_property("weight", Pango.Weight.BOLD)
else: else:
renderer.set_property("sensitive", True) renderer.set_property("sensitive", True)
renderer.set_property("text", engine.longname) renderer.set_property("text", engine.get_longname())
@@ -134,13 +235,21 @@ class EngineComboBox(gtk.ComboBox): @@ -146,10 +244,18 @@ class EngineComboBox(Gtk.ComboBox):
if i == 0 or i == -1: if i == 0 or i == -1:
return None return None
iter = self.get_active_iter() iter = self.get_active_iter()
@ -409,27 +405,24 @@ index 7383177..bff2407 100644
else: else:
raise AttributeError, 'unknown property %s' % property.name raise AttributeError, 'unknown property %s' % property.name
def get_active_engine(self):
return self.get_property("active-engine")
+ def set_config(self, config): + def set_config(self, config):
+ self.__config = config + self.__config = config
+ +
def get_title(self): def get_active_engine(self):
return self.__title return self.get_property("active-engine")
diff --git a/setup/main.py b/setup/main.py diff --git a/setup/main.py b/setup/main.py
index 192fb88..5a0170d 100644 index 47a34e3..16bfeea 100644
--- a/setup/main.py --- a/setup/main.py
+++ b/setup/main.py +++ b/setup/main.py
@@ -227,6 +227,7 @@ class Setup(object): @@ -197,6 +197,7 @@ class Setup(object):
button.connect("toggled", self.__checkbutton_preload_engine_mode_toggled_cb) self.__engines.append(engine)
self.__engines = self.__bus.list_engines()
self.__combobox = self.__builder.get_object("combobox_engines") self.__combobox = self.__builder.get_object("combobox_engines")
+ self.__combobox.set_config(self.__config) + self.__combobox.set_config(self.__config)
self.__combobox.set_engines(self.__engines) self.__combobox.set_engines(self.__engines)
engines = self.__bus.list_active_engines() tmp_dict = {}
-- --
1.7.5.4 1.7.7.4

View File

@ -4,24 +4,14 @@
%define have_libxkbfile 1 %define have_libxkbfile 1
%define have_gjsfile 1 %define have_gjsfile 1
%define have_dconf 1
%if 0%{?fedora} > 16 %if 0%{?fedora} > 16
%define have_bridge_hotkey 1 %define ibus_gjs_version 3.3.3.20120203
%define ibus_gjs_version 3.2.1.20111230
%define ibus_gjs_build_failure 1 %define ibus_gjs_build_failure 1
%define have_dconf 1
%else %else
%if 0%{?fedora} > 15
%define have_bridge_hotkey 1
%define ibus_gjs_version 3.2.1.20111230 %define ibus_gjs_version 3.2.1.20111230
%define ibus_gjs_build_failure 0 %define ibus_gjs_build_failure 0
%define have_dconf 1
%else
%define have_bridge_hotkey 0
%define ibus_gjs_version 3.0.2.20111118
%define ibus_gjs_build_failure 0
%define have_dconf 0
%endif
%endif %endif
%define ibus_api_version 1.0 %define ibus_api_version 1.0
@ -32,22 +22,25 @@
%define gnome_icon_theme_legacy_version 2.91.6 %define gnome_icon_theme_legacy_version 2.91.6
Name: ibus Name: ibus
Version: 1.4.0 Version: 1.4.99.20120203
Release: 17%{?dist} Release: 1%{?dist}
Summary: Intelligent Input Bus for Linux OS Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+ License: LGPLv2+
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://code.google.com/p/ibus/ URL: http://code.google.com/p/ibus/
Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz # Source0: http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
Source0: http://fujiwara.fedorapeople.org/ibus/gnome-shell/%{name}-%{version}.tar.gz
Source1: xinput-ibus Source1: xinput-ibus
%if %have_gjsfile %if %have_gjsfile
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/ibus-gjs-%{ibus_gjs_version}.tar.gz
# Workaround for glib2 bug:
# https://bugzilla.gnome.org/show_bug.cgi?id=669253
Source3: ibus-gsettings-db
%endif %endif
Patch0: ibus-HEAD.patch Patch0: ibus-HEAD.patch
Patch1: ibus-530711-preload-sys.patch Patch1: ibus-541492-xkb.patch
Patch2: ibus-541492-xkb.patch Patch2: ibus-xx-setup-frequent-lang.patch
Patch3: ibus-xx-bridge-hotkey.patch # Patch3: ibus-530711-preload-sys.patch
Patch4: ibus-xx-setup-frequent-lang.patch
# Workaround gnome-shell build failure # Workaround gnome-shell build failure
# http://koji.fedoraproject.org/koji/getfile?taskID=3317917&name=root.log # http://koji.fedoraproject.org/koji/getfile?taskID=3317917&name=root.log
@ -74,6 +67,8 @@ BuildRequires: gtk-doc
%if %have_dconf %if %have_dconf
BuildRequires: dconf-devel BuildRequires: dconf-devel
BuildRequires: dbus-x11 BuildRequires: dbus-x11
BuildRequires: vala
BuildRequires: vala-tools
%endif %endif
# for AM_GCONF_SOURCE_2 in configure.ac # for AM_GCONF_SOURCE_2 in configure.ac
BuildRequires: GConf2-devel BuildRequires: GConf2-devel
@ -82,6 +77,7 @@ BuildRequires: intltool
BuildRequires: iso-codes-devel BuildRequires: iso-codes-devel
%if %have_libxkbfile %if %have_libxkbfile
BuildRequires: libxkbfile-devel BuildRequires: libxkbfile-devel
BuildRequires: libgnomekbd-devel
%endif %endif
# for ibus-gjs-xx.tar.gz # for ibus-gjs-xx.tar.gz
BuildRequires: gjs BuildRequires: gjs
@ -107,6 +103,7 @@ Requires: dconf
Requires: GConf2 Requires: GConf2
%endif %endif
Requires: notify-python Requires: notify-python
Requires: libgnomekbd
Requires: librsvg2 Requires: librsvg2
Requires: gnome-icon-theme-legacy >= %{gnome_icon_theme_legacy_version} Requires: gnome-icon-theme-legacy >= %{gnome_icon_theme_legacy_version}
Requires: gnome-icon-theme-symbolic Requires: gnome-icon-theme-symbolic
@ -206,14 +203,12 @@ cd ..
%endif %endif
%patch0 -p1 %patch0 -p1
%patch92 -p1 -b .g-s-preedit %patch92 -p1 -b .g-s-preedit
cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c cp client/gtk2/ibusimcontext.c client/gtk3/ibusimcontext.c ||
%patch1 -p1 -b .preload-sys
%if %have_libxkbfile %if %have_libxkbfile
%patch2 -p1 -b .xkb %patch1 -p1 -b .xkb
%endif %endif
mv data/ibus.schemas.in data/ibus.schemas.in.in %patch2 -p1 -b .setup-frequent-lang
%patch3 -p1 -b .bridge-key # %patch3 -p1 -b .preload-sys
%patch4 -p1 -b .setup-frequent-lang
%if 0%{?fedora} <= 16 %if 0%{?fedora} <= 16
%patch93 -p1 -b .compat %patch93 -p1 -b .compat
@ -227,7 +222,7 @@ XKB_PRELOAD_LAYOUTS=\
"gb,ge,ge(dsb),ge(ru),ge(os),gh,gh(akan),gh(ewe),gh(fula),gh(ga),gh(hausa),"\ "gb,ge,ge(dsb),ge(ru),ge(os),gh,gh(akan),gh(ewe),gh(fula),gh(ga),gh(hausa),"\
"gn,gr,hu,hr,ie,ie(CloGaelach),il,"\ "gn,gr,hu,hr,ie,ie(CloGaelach),il,"\
"in,"\ "in,"\
"in(tel),in(bolnagri),iq,iq(ku),ir,ir(ku),is,it,"\ "in(tel),in(bolnagri),iq,iq(ku),ir,ir(ku),is,it,jp,"\
"kg,kh,kz,la,latam,lk,lk(tam_unicode),lt,lv,ma,ma(tifinagh),mal,mao,"\ "kg,kh,kz,la,latam,lk,lk(tam_unicode),lt,lv,ma,ma(tifinagh),mal,mao,"\
"me,mk,mm,mt,mv,ng,ng(hausa),ng,ng(igbo),ng(yoruba),nl,no,no(smi),np,"\ "me,mk,mm,mt,mv,ng,ng(hausa),ng,ng(igbo),ng(yoruba),nl,no,no(smi),np,"\
"pk,pl,pl(csb),pt,ro,rs,ru,ru(cv),ru(kom),ru(sah),ru(tt),ru(xal),"\ "pk,pl,pl(csb),pt,ro,rs,ru,ru(cv),ru(kom),ru(sah),ru(tt),ru(xal),"\
@ -242,24 +237,32 @@ automake -a -c -f
--enable-gtk2 \ --enable-gtk2 \
--enable-gtk3 \ --enable-gtk3 \
--enable-xim \ --enable-xim \
--disable-gtk-doc \ --enable-gtk-doc \
--with-no-snooper-apps='gnome-do,Do.*,firefox.*,.*chrome.*,.*chromium.*' \ --with-no-snooper-apps='gnome-do,Do.*,firefox.*,.*chrome.*,.*chromium.*' \
--enable-surrounding-text \ --enable-surrounding-text \
%if %have_libxkbfile %if %have_libxkbfile
--with-xkb-preload-layouts=$XKB_PRELOAD_LAYOUTS \ --with-xkb-preload-layouts=$XKB_PRELOAD_LAYOUTS \
%endif --enable-xkb \
%if %have_bridge_hotkey --enable-libgnomekbd \
--enable-bridge-hotkey \
%endif %endif
%if %have_dconf %if %have_dconf
--enable-dconf \ --enable-dconf \
--disable-gconf \ --disable-gconf \
%endif %endif
--enable-python-library \
--enable-introspection --enable-introspection
# make -C po update-gmo # Workaround for glib2 bug:
make %{?_smp_mflags} # https://bugzilla.gnome.org/show_bug.cgi?id=669253
cd data/dconf
make org.freedesktop.ibus.gschema.valid
mkdir db
cp %SOURCE3 db/ibus
cd ../..
# make -C po update-gmo
make %{?_smp_mflags} \
PKG_CONFIG_PATH=..:/usr/lib64/pkgconfig:/usr/lib/pkgconfig
%if %have_gjsfile %if %have_gjsfile
d=`basename %SOURCE2 .tar.gz` d=`basename %SOURCE2 .tar.gz`
@ -357,6 +360,18 @@ if [ "$1" = "0" ]; then
# if alternative was set to manual, reset to auto # if alternative was set to manual, reset to auto
[ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || : [ -L %{_sysconfdir}/alternatives/xinputrc -a "`readlink %{_sysconfdir}/alternatives/xinputrc`" = "%{_xinputconf}" ] && %{_sbindir}/alternatives --auto xinputrc || :
fi fi
%if %have_dconf
if [ $1 -eq 0 ]; then
glib-compile-schemas %{_datadir}/glib-2.0/schemas
fi
%endif
%posttrans
%if %have_dconf
if [ $1 -eq 0 ]; then
glib-compile-schemas %{_datadir}/glib-2.0/schemas
fi
%endif
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
@ -381,6 +396,7 @@ fi
%dir %{python_sitelib}/ibus %dir %{python_sitelib}/ibus
%{python_sitelib}/ibus/* %{python_sitelib}/ibus/*
%dir %{_datadir}/ibus/ %dir %{_datadir}/ibus/
%{_bindir}/ibus
%{_bindir}/ibus-daemon %{_bindir}/ibus-daemon
%{_bindir}/ibus-setup %{_bindir}/ibus-setup
%{_datadir}/ibus/* %{_datadir}/ibus/*
@ -389,13 +405,15 @@ fi
%if %have_dconf %if %have_dconf
%{_datadir}/GConf/gsettings/* %{_datadir}/GConf/gsettings/*
%{_datadir}/glib-2.0/schemas/*.xml %{_datadir}/glib-2.0/schemas/*.xml
%{_libexecdir}/ibus-engine-simple
%{_libexecdir}/ibus-dconf %{_libexecdir}/ibus-dconf
%else %else
%{_libexecdir}/ibus-gconf %{_libexecdir}/ibus-gconf
%endif %endif
%{_libexecdir}/ibus-ui-gtk %{_libexecdir}/ibus-ui-gtk3
%{_libexecdir}/ibus-x11 %{_libexecdir}/ibus-x11
# %{_sysconfdir}/xdg/autostart/ibus.desktop # %{_sysconfdir}/xdg/autostart/ibus.desktop
%{_sysconfdir}/bash_completion.d/ibus.bash
%if %have_dconf %if %have_dconf
%{_sysconfdir}/dconf/db/ibus %{_sysconfdir}/dconf/db/ibus
%{_sysconfdir}/dconf/profile/ibus %{_sysconfdir}/dconf/profile/ibus
@ -404,7 +422,6 @@ fi
%endif %endif
%config %{_xinputconf} %config %{_xinputconf}
%if %have_libxkbfile %if %have_libxkbfile
%{_libexecdir}/ibus-engine-xkb
%{_libexecdir}/ibus-xkb %{_libexecdir}/ibus-xkb
%endif %endif
@ -440,6 +457,12 @@ fi
%{_datadir}/gtk-doc/html/* %{_datadir}/gtk-doc/html/*
%changelog %changelog
* Fri Feb 03 2021 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.99.20120203-1
- Updated to 1.4.99.20120203
- Removed ibus-xx-bridge-hotkey.patch
- Updated ibus-541492-xkb.patch to use libgnomekbd.
- Updated ibus-xx-setup-frequent-lang.patch for 1.4.99.20120203
* Wed Jan 04 2012 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.0-17 * Wed Jan 04 2012 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.0-17
- Added ibus-771115-property-compatible.patch for f16 - Added ibus-771115-property-compatible.patch for f16
Fixed Bug 771115 - IBusProperty back compatibility. Fixed Bug 771115 - IBusProperty back compatibility.

View File

@ -1,3 +1,4 @@
b4f063794e89c71eb1f8cb543210da30 ibus-1.4.0.tar.gz 675136bba0b04c922cca44eecd0bc421 ibus-1.4.99.20120203.tar.gz
4257048de65ea404389bb941a51db667 ibus-gjs-3.0.2.20111118.tar.gz 8c713e47d403482cdd8b851dda3d0713 ibus-gjs-3.3.3.20120203.tar.gz
2d2ad58e3e41429dbd883ba7e501c9b2 ibus-gjs-3.2.1.20111230.tar.gz 2d2ad58e3e41429dbd883ba7e501c9b2 ibus-gjs-3.2.1.20111230.tar.gz
dbdf603f6897df8b894960249cf21909 ibus-gsettings-db