Bumped to 1.5.1

This commit is contained in:
Takao Fujiwara 2013-01-15 19:02:41 +09:00
parent 8e7bad238d
commit ecac051715
10 changed files with 669 additions and 2797 deletions

3
.gitignore vendored
View File

@ -5,6 +5,7 @@ ibus-1.3.6.tar.gz
/ibus-1.3.9.tar.gz
/ibus-1.4.0.tar.gz
/ibus-1.4.1.tar.gz
/ibus-1.5.1.tar.gz
/ibus-1.3.99.20101028.tar.gz
/ibus-1.3.99.20101118.tar.gz
/ibus-1.3.99.20101202.tar.gz
@ -49,4 +50,4 @@ ibus-1.3.6.tar.gz
/ibus-gjs-3.4.1.20120428.tar.gz
/ibus-gjs-3.4.1.20120518.tar.gz
/ibus-gjs-3.4.1.20120815.tar.gz
/ibus-po-1.4.99.20121207.tar.gz
/ibus-gjs-3.4.1.20130115.tar.gz

View File

@ -1,6 +1,6 @@
From dfe858f7ba476aa878c5d60a7480a03def558463 Mon Sep 17 00:00:00 2001
From f209d4c3430df3707c432ddfcfc184b791bb50fd Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 27 Nov 2012 15:53:27 +0900
Date: Fri, 11 Jan 2013 23:03:19 +0900
Subject: [PATCH] Reload preload engines until users customize the list.
The idea is, if users don't customize the preload_engines with ibus-setup,
@ -25,7 +25,7 @@ IBUS_PRELOAD_ENGINE_MODE_USER and users can customize the value
5 files changed, 246 insertions(+), 7 deletions(-)
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
index 1a0e2d2..64f6f33 100644
index 70bf9ca..7833959 100644
--- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in
@@ -2,6 +2,30 @@
@ -60,10 +60,10 @@ index 1a0e2d2..64f6f33 100644
<applyto>/desktop/ibus/general/preload_engines</applyto>
<owner>ibus</owner>
diff --git a/setup/main.py b/setup/main.py
index c02229b..5da6340 100644
index 707faa4..aae6bb9 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -196,6 +196,20 @@ class Setup(object):
@@ -190,6 +190,20 @@ class Setup(object):
self.__checkbutton_use_global_engine.connect("toggled",
self.__checkbutton_use_global_engine_toggled_cb)
@ -83,8 +83,8 @@ index c02229b..5da6340 100644
+
# init engine page
self.__engines = self.__bus.list_engines()
value = self.__config.get_value("general", "load_xkb_layouts")
@@ -257,6 +271,7 @@ class Setup(object):
self.__combobox = self.__builder.get_object("combobox_engines")
@@ -243,6 +257,7 @@ class Setup(object):
self.__checkbutton_auto_start_toggled_cb)
self.__config = self.__bus.get_config()
@ -92,7 +92,7 @@ index c02229b..5da6340 100644
self.__init_hotkey()
self.__init_panel()
@@ -271,8 +286,8 @@ class Setup(object):
@@ -251,8 +266,8 @@ class Setup(object):
def __combobox_notify_active_engine_cb(self, combobox, property):
engine = self.__combobox.get_active_engine()
button = self.__builder.get_object("button_engine_add")
@ -103,7 +103,7 @@ index c02229b..5da6340 100644
def __get_engine_setup_exec_args(self, engine):
args = []
@@ -351,6 +366,34 @@ class Setup(object):
@@ -324,6 +339,34 @@ class Setup(object):
del self.__engine_setup_exec_list[name]
self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args)
@ -138,7 +138,7 @@ index c02229b..5da6340 100644
def __init_bus(self):
self.__bus = IBus.Bus()
if self.__bus.is_connected():
@@ -562,8 +605,18 @@ class Setup(object):
@@ -538,8 +581,18 @@ class Setup(object):
value = GLib.Variant.new_boolean(value)
self.__config.set_value("general", "use_global_engine", value)
@ -148,7 +148,7 @@ index c02229b..5da6340 100644
+ if section == 'general' and name == 'preload_engines':
+ value = []
+ if variant != None:
+ value = self.__variant_dup_strv(variant)
+ value = variant.unpack()
+ engines = self.__get_engine_descs_from_names(value)
+ current_engines = self.__treeview.get_engines()
+ engines_csv = str.join(',', map(lambda e: e.get_name(), engines))
@ -160,10 +160,10 @@ index c02229b..5da6340 100644
def __config_reloaded_cb(self, bus):
pass
diff --git a/setup/setup.ui b/setup/setup.ui
index 8121d62..2026172 100644
index e56e917..b3165aa 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
@@ -653,7 +653,23 @@
@@ -669,7 +669,23 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@ -188,7 +188,7 @@ index 8121d62..2026172 100644
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -842,7 +858,7 @@
@@ -858,7 +874,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
@ -197,7 +197,7 @@ index 8121d62..2026172 100644
</packing>
</child>
<child>
@@ -889,7 +905,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
@@ -905,7 +921,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
@ -228,10 +228,10 @@ index 737b3e2..8ce5a16 100644
* @x: x coordinate.
* @y: y coordinate.
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala
index 63b0cde..c4c8f2c 100644
index 55b63ce..4717431 100644
--- a/ui/gtk3/panel.vala
+++ b/ui/gtk3/panel.vala
@@ -313,6 +313,8 @@ class Panel : IBus.PanelService {
@@ -291,6 +291,8 @@ class Panel : IBus.PanelService {
if (m_config != null) {
m_config.value_changed.connect(config_value_changed_cb);
m_config.watch("general", "preload_engines");
@ -239,8 +239,8 @@ index 63b0cde..c4c8f2c 100644
+ m_config.watch("general", "preload_engine_mode");
m_config.watch("general", "engines_order");
m_config.watch("general", "switcher_delay_time");
m_config.watch("general/hotkey", "trigger_accel");
@@ -425,7 +427,136 @@ class Panel : IBus.PanelService {
m_config.watch("general/hotkey", "triggers");
@@ -358,7 +360,136 @@ class Panel : IBus.PanelService {
init_gkbd();
}
@ -377,7 +377,7 @@ index 63b0cde..c4c8f2c 100644
}
private void update_xkb_engines() {
@@ -591,6 +722,11 @@ class Panel : IBus.PanelService {
@@ -573,6 +704,11 @@ class Panel : IBus.PanelService {
string section,
string name,
Variant variant) {

File diff suppressed because it is too large Load Diff

View File

@ -1,323 +1,397 @@
From 15f3ccb38474c6bb206a2158d86171c93d6ec6a5 Mon Sep 17 00:00:00 2001
From 8ac534fc002356b93e2015a8866f1ea89e3895f9 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 13 Nov 2012 12:05:07 +0900
Subject: [PATCH] Update simple.xml to enable layout_variant tag.
Date: Sat, 15 Dec 2012 17:40:18 +0900
Subject: [PATCH] Use Variant.unpack() instead of Variant.dup_strv().
Review URL: https://codereview.appspot.com/6820129
Variant.dup_strv() returns a tuple in pygobject 3.2, e.g. (['<Control>space'], 1L), and a list in pygobject 3.4, e.g. ['<Control>space'] .
BUG=RH#887153
Review URL: https://codereview.appspot.com/6941051
---
engine/simple.xml.in.in | 112 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 93 insertions(+), 19 deletions(-)
setup/main.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/engine/simple.xml.in.in b/engine/simple.xml.in.in
index 25db578..d064ad6 100644
--- a/engine/simple.xml.in.in
+++ b/engine/simple.xml.in.in
@@ -24,7 +24,8 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>us(intl)</layout>
+ <layout>us</layout>
+ <layout_variant>intl</layout_variant>
<longname>English (US, international with dead keys)</longname>
<description>English (US, international with dead keys)</description>
<icon>ibus-keyboard</icon>
@@ -35,7 +36,8 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>us(colemak)</layout>
+ <layout>us</layout>
+ <layout_variant>colemak</layout_variant>
<longname>English (Colemak)</longname>
<description>English (Colemak)</description>
<icon>ibus-keyboard</icon>
@@ -46,7 +48,8 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>us(dvorak)</layout>
+ <layout>us</layout>
+ <layout_variant>dvorak</layout_variant>
<longname>English (Dvorak)</longname>
<description>English (Dvorak)</description>
<icon>ibus-keyboard</icon>
@@ -57,20 +60,21 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>us(altgr-intl)</layout>
+ <layout>us</layout>
+ <layout_variant>altgr-intl</layout_variant>
<longname>English (international AltGr dead keys)</longname>
<description>English (international AltGr dead keys)</description>
<icon>ibus-keyboard</icon>
<rank>99</rank>
</engine>
<engine>
- <name>xkb:us:altgr-intl:eng</name>
- <language>eng</language>
+ <name>xkb:ara::ara</name>
+ <language>ara</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>us(altgr-intl)</layout>
- <longname>English (international AltGr dead keys)</longname>
- <description>English (international AltGr dead keys)</description>
+ <layout>ara</layout>
+ <longname>Arabic</longname>
+ <description>Arabic</description>
<icon>ibus-keyboard</icon>
<rank>99</rank>
</engine>
@@ -119,6 +123,18 @@
<rank>99</rank>
</engine>
<engine>
+ <name>xkb:br:dvorak:por</name>
+ <language>por</language>
+ <license>GPL</license>
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
+ <layout>br</layout>
+ <layout_variant>dvorak</layout_variant>
+ <longname>Portuguese (Brazil, Dvorak)</longname>
+ <description>Portuguese (Brazil, Dvorak)</description>
+ <icon>ibus-keyboard</icon>
+ <rank>99</rank>
+ </engine>
+ <engine>
<name>xkb:bg::bul</name>
<language>bul</language>
<license>GPL</license>
@@ -134,7 +150,8 @@
<language>bul</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>bg(phonetic)</layout>
+ <layout>bg</layout>
+ <layout_variant>phonetic</layout_variant>
<longname>Bulgarian (traditional phonetic)</longname>
<description>Bulgarian (traditional phonetic)</description>
<icon>ibus-keyboard</icon>
@@ -156,7 +173,8 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>ca(eng)</layout>
+ <layout>ca</layout>
+ <layout_variant>eng</layout_variant>
<longname>English (Canada)</longname>
<description>English (Canada)</description>
<icon>ibus-keyboard</icon>
@@ -229,6 +247,18 @@
<rank>99</rank>
</engine>
<engine>
+ <name>xkb:fr:dvorak:fra</name>
+ <language>fra</language>
+ <license>GPL</license>
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
+ <layout>fr</layout>
+ <layout_variant>dvorak</layout_variant>
+ <longname>French (Dvorak)</longname>
+ <description>French (Dvorak)</description>
+ <icon>ibus-keyboard</icon>
+ <rank>99</rank>
+ </engine>
+ <engine>
<name>xkb:de::ger</name>
<language>ger</language>
<license>GPL</license>
@@ -240,11 +270,24 @@
<rank>99</rank>
</engine>
<engine>
+ <name>xkb:de:dvorak:ger</name>
+ <language>ger</language>
+ <license>GPL</license>
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
+ <layout>de</layout>
+ <layout_variant>dvorak</layout_variant>
+ <longname>German (Dvorak)</longname>
+ <description>German (Dvorak)</description>
+ <icon>ibus-keyboard</icon>
+ <rank>99</rank>
+ </engine>
+ <engine>
<name>xkb:de:neo:ger</name>
<language>ger</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>de(neo)</layout>
+ <layout>de</layout>
+ <layout_variant>neo</layout_variant>
<longname>German (Neo 2)</longname>
<description>German (Neo 2)</description>
<icon>ibus-keyboard</icon>
@@ -332,7 +375,8 @@
<language>lav</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>lv(apostrophe)</layout>
+ <layout>lv</layout>
+ <layout_variant>apostrophe</layout_variant>
<longname>Latvian (apostrophe variant)</longname>
<description>Latvian (apostrophe variant)</description>
<icon>ibus-keyboard</icon>
@@ -350,6 +394,18 @@
<rank>99</rank>
</engine>
<engine>
+ <name>xkb:pl:dvorak:pol</name>
+ <language>pol</language>
+ <license>GPL</license>
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
+ <layout>pl</layout>
+ <layout_variant>dvorak</layout_variant>
+ <longname>Polish (Dvorak)</longname>
+ <description>Polish (Dvorak)</description>
+ <icon>ibus-keyboard</icon>
+ <rank>99</rank>
+ </engine>
+ <engine>
<name>xkb:pt::por</name>
<language>por</language>
<license>GPL</license>
@@ -387,7 +443,8 @@
<language>rus</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>ru(phonetic)</layout>
+ <layout>ru</layout>
+ <layout_variant>phonetic</layout_variant>
<longname>Russian (phonetic)</longname>
<description>Russian (phonetic)</description>
<icon>ibus-keyboard</icon>
@@ -442,7 +499,8 @@
<language>cat</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>es(cat)</layout>
+ <layout>es</layout>
+ <layout_variant>cat</layout_variant>
<longname>Catalan (Spain, with middle-dot L)</longname>
<description>Catalan (Spain, with middle-dot L)</description>
<icon>ibus-keyboard</icon>
@@ -460,6 +518,18 @@
<rank>99</rank>
</engine>
<engine>
+ <name>xkb:se:dvorak:swe</name>
+ <language>swe</language>
+ <license>GPL</license>
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
+ <layout>se</layout>
+ <layout_variant>dvorak</layout_variant>
+ <longname>Swedish (Dvorak)</longname>
+ <description>Swedish (Dvorak)</description>
+ <icon>ibus-keyboard</icon>
+ <rank>99</rank>
+ </engine>
+ <engine>
<name>xkb:ch::ger</name>
<language>ger</language>
<license>GPL</license>
@@ -475,7 +545,8 @@
<language>fra</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>ch(fr)</layout>
+ <layout>ch</layout>
+ <layout_variant>fr</layout_variant>
<longname>French (Switzerland)</longname>
<description>French (Switzerland)</description>
<icon>ibus-keyboard</icon>
@@ -508,7 +579,8 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>gb(extd)</layout>
+ <layout>gb</layout>
+ <layout_variant>extd</layout_variant>
<longname>English (UK, extended WinKeys)</longname>
<description>English (UK, extended WinKeys)</description>
<icon>ibus-keyboard</icon>
@@ -519,7 +591,8 @@
<language>eng</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>gb(dvorak)</layout>
+ <layout>gb</layout>
+ <layout_variant>dvorak</layout_variant>
<longname>English (UK, Dvorak)</longname>
<description>English (UK, Dvorak)</description>
<icon>ibus-keyboard</icon>
@@ -530,7 +603,8 @@
<language>kor</language>
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
- <layout>kr(kr104)</layout>
+ <layout>kr</layout>
+ <layout_variant>kr104</layout_variant>
<longname>Korean (101/104 key compatible)</longname>
<description>Korean (101/104 key compatible)</description>
<icon>ibus-keyboard</icon>
--
1.8.0
From ae98b5a58846e1326550027dc8d2a773ed8a24c5 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 30 Nov 2012 11:43:43 +0900
Subject: [PATCH] Fix xmllint errors.
Review URL: https://codereview.appspot.com/6842115
---
conf/dconf/dconf.xml.in.in | 2 +-
conf/gconf/gconf.xml.in.in | 2 +-
conf/memconf/memconf.xml.in.in | 2 +-
ui/gtk3/gtkpanel.xml.in.in | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/conf/dconf/dconf.xml.in.in b/conf/dconf/dconf.xml.in.in
index 0367008..ceb2b0c 100644
--- a/conf/dconf/dconf.xml.in.in
+++ b/conf/dconf/dconf.xml.in.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!-- filename: dconf.xml -->
<component>
<name>org.freedesktop.IBus.Config</name>
diff --git a/conf/gconf/gconf.xml.in.in b/conf/gconf/gconf.xml.in.in
index 0644d7e..d82179f 100644
--- a/conf/gconf/gconf.xml.in.in
+++ b/conf/gconf/gconf.xml.in.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!-- filename: pinyin.xml -->
<component>
<name>org.freedesktop.IBus.Config</name>
diff --git a/conf/memconf/memconf.xml.in.in b/conf/memconf/memconf.xml.in.in
index b60dbf2..939e40a 100644
--- a/conf/memconf/memconf.xml.in.in
+++ b/conf/memconf/memconf.xml.in.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version=\"1.0\" encoding=\"utf-8\"?>
<component>
<name>org.freedesktop.IBus.Config</name>
<description>On-memory Config Component</description>
diff --git a/ui/gtk3/gtkpanel.xml.in.in b/ui/gtk3/gtkpanel.xml.in.in
index c480bcd..1d2cf73 100644
--- a/ui/gtk3/gtkpanel.xml.in.in
+++ b/ui/gtk3/gtkpanel.xml.in.in
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!-- filename: gtkpanel.xml -->
<component>
<name>org.freedesktop.IBus.Panel</name>
diff --git a/setup/main.py b/setup/main.py
index a8acc7a..707faa4 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -87,7 +87,7 @@ class Setup(object):
label = 'switch_engine'
variant = self.__config.get_value('general/hotkey', name)
if variant != None:
- shortcuts = variant.dup_strv()
+ shortcuts = variant.unpack()
else:
shortcuts = ['<Control>space']
--
1.7.12.1
From 62cd0492e3459416e1775aedc327bced53f66828 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Wed, 9 Jan 2013 10:14:55 -0500
Subject: [PATCH] client: Queue events while the IBus context isn't ready
There are actually 3 patches here.
---
client: Queue events while the IBus context isn't ready
We may lose events that ought to be processed while the IBus context
isn't ready or if the connection to IBus isn't fully established yet.
To avoid that, enqueue events to be processed later when the IBus
context creation finishes.
---
client: Don't cancel an ongoing create input context on another request
This would only add more delays.
---
client: Cancel any ongoing create input context request on finalize
BUG=
Review URL: https://codereview.appspot.com/6988047
Patch from Rui Matos <tiagomatos@gmail.com>.
---
client/gtk2/ibusimcontext.c | 220 ++++++++++++++++++++++++++------------------
1 file changed, 133 insertions(+), 87 deletions(-)
diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 011676f..94005b7 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -40,6 +40,8 @@
# define IDEBUG(a...)
#endif
+#define MAX_QUEUED_EVENTS 20
+
struct _IBusIMContext {
GtkIMContext parent;
@@ -63,6 +65,7 @@ struct _IBusIMContext {
/* cancellable */
GCancellable *cancellable;
+ GQueue *events_queue;
};
struct _IBusIMContextClass {
@@ -154,6 +157,8 @@ static GType _ibus_type_im_context = 0;
static GtkIMContextClass *parent_class = NULL;
static IBusBus *_bus = NULL;
+static guint _daemon_name_watch_id = 0;
+static gboolean _daemon_is_running = FALSE;
void
ibus_im_context_register_type (GTypeModule *type_module)
@@ -261,6 +266,46 @@ _process_key_event_done (GObject *object,
gdk_event_free ((GdkEvent *)event);
}
+static gboolean
+_process_key_event (IBusInputContext *context,
+ GdkEventKey *event)
+{
+ guint state = event->state;
+ gboolean retval = FALSE;
+
+ if (event->type == GDK_KEY_RELEASE) {
+ state |= IBUS_RELEASE_MASK;
+ }
+
+ if (_use_sync_mode) {
+ retval = ibus_input_context_process_key_event (context,
+ event->keyval,
+ event->hardware_keycode - 8,
+ state);
+ }
+ else {
+ ibus_input_context_process_key_event_async (context,
+ event->keyval,
+ event->hardware_keycode - 8,
+ state,
+ -1,
+ NULL,
+ _process_key_event_done,
+ gdk_event_copy ((GdkEvent *) event));
+
+ retval = TRUE;
+ }
+
+ if (retval) {
+ event->state |= IBUS_HANDLED_MASK;
+ }
+ else {
+ event->state |= IBUS_IGNORED_MASK;
+ }
+
+ return retval;
+}
+
/* emit "retrieve-surrounding" glib signal of GtkIMContext, if
* context->caps has IBUS_CAP_SURROUNDING_TEXT and the current IBus
@@ -387,38 +432,7 @@ _key_snooper_cb (GtkWidget *widget,
ibusimcontext->time = event->time;
}
- guint state = event->state;
- if (event->type == GDK_KEY_RELEASE) {
- state |= IBUS_RELEASE_MASK;
- }
-
- if (_use_sync_mode) {
- retval = ibus_input_context_process_key_event (
- ibuscontext,
- event->keyval,
- event->hardware_keycode - 8,
- state);
- }
- else {
- ibus_input_context_process_key_event_async (
- ibuscontext,
- event->keyval,
- event->hardware_keycode - 8,
- state,
- -1,
- NULL,
- _process_key_event_done,
- gdk_event_copy ((GdkEvent *) event));
- retval = TRUE;
-
- }
-
- if (retval) {
- event->state |= IBUS_HANDLED_MASK;
- }
- else {
- event->state |= IBUS_IGNORED_MASK;
- }
+ retval = _process_key_event (ibuscontext, event);
if (ibusimcontext != NULL) {
/* unref ibusimcontext could call ibus_im_context_finalize here
@@ -450,6 +464,23 @@ _get_boolean_env(const gchar *name,
}
static void
+daemon_name_appeared (GDBusConnection *connection,
+ const gchar *name,
+ const gchar *owner,
+ gpointer data)
+{
+ _daemon_is_running = TRUE;
+}
+
+static void
+daemon_name_vanished (GDBusConnection *connection,
+ const gchar *name,
+ gpointer data)
+{
+ _daemon_is_running = FALSE;
+}
+
+static void
ibus_im_context_class_init (IBusIMContextClass *class)
{
IDEBUG ("%s", __FUNCTION__);
@@ -533,6 +564,14 @@ ibus_im_context_class_init (IBusIMContextClass *class)
/* always install snooper */
if (_key_snooper_id == 0)
_key_snooper_id = gtk_key_snooper_install (_key_snooper_cb, NULL);
+
+ _daemon_name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
+ IBUS_SERVICE_IBUS,
+ G_BUS_NAME_WATCHER_FLAGS_NONE,
+ daemon_name_appeared,
+ daemon_name_vanished,
+ NULL,
+ NULL);
}
static void
@@ -543,6 +582,8 @@ ibus_im_context_class_fini (IBusIMContextClass *class)
gtk_key_snooper_remove (_key_snooper_id);
_key_snooper_id = 0;
}
+
+ g_bus_unwatch_name (_daemon_name_watch_id);
}
/* Copied from gtk+2.0-2.20.1/modules/input/imcedilla.c to fix crosbug.com/11421.
@@ -602,6 +643,7 @@ ibus_im_context_init (GObject *obj)
ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS;
#endif
+ ibusimcontext->events_queue = g_queue_new ();
// Create slave im context
ibusimcontext->slave = gtk_im_context_simple_new ();
@@ -651,6 +693,13 @@ ibus_im_context_finalize (GObject *obj)
g_signal_handlers_disconnect_by_func (_bus, G_CALLBACK (_bus_connected_cb), obj);
+ if (ibusimcontext->cancellable != NULL) {
+ /* Cancel any ongoing create input context request */
+ g_cancellable_cancel (ibusimcontext->cancellable);
+ g_object_unref (ibusimcontext->cancellable);
+ ibusimcontext->cancellable = NULL;
+ }
+
if (ibusimcontext->ibuscontext) {
ibus_proxy_destroy ((IBusProxy *)ibusimcontext->ibuscontext);
}
@@ -670,6 +719,9 @@ ibus_im_context_finalize (GObject *obj)
pango_attr_list_unref (ibusimcontext->preedit_attrs);
}
+ g_queue_free_full (ibusimcontext->events_queue,
+ (GDestroyNotify)gdk_event_free);
+
G_OBJECT_CLASS(parent_class)->finalize (obj);
}
@@ -681,65 +733,56 @@ ibus_im_context_filter_keypress (GtkIMContext *context,
IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context);
- if (G_LIKELY (ibusimcontext->ibuscontext && ibusimcontext->has_focus)) {
- /* If context does not have focus, ibus will process key event in sync mode.
- * It is a workaround for increase search in treeview.
- */
- gboolean retval = FALSE;
-
- if (event->state & IBUS_HANDLED_MASK)
- return TRUE;
+ if (!_daemon_is_running)
+ return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
- if (event->state & IBUS_IGNORED_MASK)
- return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
+ /* If context does not have focus, ibus will process key event in
+ * sync mode. It is a workaround for increase search in treeview.
+ */
+ if (!ibusimcontext->has_focus)
+ return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
- /* XXX it is a workaround for some applications do not set client window. */
- if (ibusimcontext->client_window == NULL && event->window != NULL)
- gtk_im_context_set_client_window ((GtkIMContext *)ibusimcontext, event->window);
+ if (event->state & IBUS_HANDLED_MASK)
+ return TRUE;
- _request_surrounding_text (ibusimcontext);
+ if (event->state & IBUS_IGNORED_MASK)
+ return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
- if (ibusimcontext != NULL) {
- ibusimcontext->time = event->time;
- }
+ /* XXX it is a workaround for some applications do not set client
+ * window. */
+ if (ibusimcontext->client_window == NULL && event->window != NULL)
+ gtk_im_context_set_client_window ((GtkIMContext *)ibusimcontext,
+ event->window);
- guint state = event->state;
- if (event->type == GDK_KEY_RELEASE) {
- state |= IBUS_RELEASE_MASK;
- }
+ _request_surrounding_text (ibusimcontext);
- if (_use_sync_mode) {
- retval = ibus_input_context_process_key_event (
- ibusimcontext->ibuscontext,
- event->keyval,
- event->hardware_keycode - 8,
- state);
- }
- else {
- ibus_input_context_process_key_event_async (
- ibusimcontext->ibuscontext,
- event->keyval,
- event->hardware_keycode - 8,
- state,
- -1,
- NULL,
- _process_key_event_done,
- gdk_event_copy ((GdkEvent *) event));
- retval = TRUE;
- }
+ ibusimcontext->time = event->time;
- if (retval) {
- event->state |= IBUS_HANDLED_MASK;
+ if (ibusimcontext->ibuscontext) {
+ if (_process_key_event (ibusimcontext->ibuscontext, event))
return TRUE;
- }
- else {
- event->state |= IBUS_IGNORED_MASK;
- return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
- }
+ else
+ return gtk_im_context_filter_keypress (ibusimcontext->slave,
+ event);
}
- else {
- return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
+
+ /* At this point we _should_ be waiting for the IBus context to be
+ * created or the connection to IBus to be established. If that's
+ * the case we queue events to be processed when the IBus context
+ * is ready. */
+ g_return_val_if_fail (ibusimcontext->cancellable != NULL ||
+ ibus_bus_is_connected (_bus) == FALSE,
+ FALSE);
+ g_queue_push_tail (ibusimcontext->events_queue,
+ gdk_event_copy ((GdkEvent *)event));
+
+ if (g_queue_get_length (ibusimcontext->events_queue) > MAX_QUEUED_EVENTS) {
+ g_warning ("Events queue growing too big, will start to drop.");
+ gdk_event_free ((GdkEvent *)
+ g_queue_pop_head (ibusimcontext->events_queue));
}
+
+ return TRUE;
}
static void
@@ -1482,6 +1525,14 @@ _create_input_context_done (IBusBus *bus,
ibus_input_context_focus_in (ibusimcontext->ibuscontext);
_set_cursor_location_internal (ibusimcontext);
}
+
+ if (!g_queue_is_empty (ibusimcontext->events_queue)) {
+ GdkEventKey *event;
+ while (event = g_queue_pop_head (ibusimcontext->events_queue)) {
+ _process_key_event (context, event);
+ gdk_event_free ((GdkEvent *)event);
+ }
+ }
}
g_object_unref (ibusimcontext);
@@ -1494,12 +1545,7 @@ _create_input_context (IBusIMContext *ibusimcontext)
g_assert (ibusimcontext->ibuscontext == NULL);
- if (ibusimcontext->cancellable != NULL) {
- /* Cancel previous create input context request */
- g_cancellable_cancel (ibusimcontext->cancellable);
- g_object_unref (ibusimcontext->cancellable);
- ibusimcontext->cancellable = NULL;
- }
+ g_return_if_fail (ibusimcontext->cancellable == NULL);
ibusimcontext->cancellable = g_cancellable_new ();
--
1.8.0

91
ibus-xx-f17.patch Normal file
View File

@ -0,0 +1,91 @@
--- ibus-1.5.1/bindings/vala/Makefile.am.orig 2013-01-15 16:58:25.571433690 +0900
+++ ibus-1.5.1/bindings/vala/Makefile.am 2013-01-15 16:58:46.983455158 +0900
@@ -20,17 +20,38 @@
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
--include $(VAPIGEN_MAKEFILE)
+vapidir = $(datadir)/vala/vapi
+dist_vapi_DATA = \
+ ibus-@IBUS_API_VERSION@.vapi \
+ ibus-@IBUS_API_VERSION@.deps \
+ $(NULL)
+# Don't rebuild vapi every time gir is updated.
+if ENABLE_LIBGNOMEKBD
vapi_deps = \
- IBus-1.0.metadata \
- IBus-1.0-custom.vala \
- $(top_builddir)/src/IBus-1.0.gir \
+ $(srcdir)/IBus-1.0.metadata \
+ $(srcdir)/IBus-1.0-custom.vala \
+ | \
+ $(builddir)/gkbd.vapi \
+ $(top_srcdir)/src/IBus-@IBUS_API_VERSION@.gir \
$(NULL)
+else
+vapi_deps = \
+ $(srcdir)/IBus-1.0.metadata \
+ $(srcdir)/IBus-1.0-custom.vala \
+ | \
+ $(top_srcdir)/src/IBus-@IBUS_API_VERSION@.gir \
+ $(NULL)
+endif
-if ENABLE_LIBGNOMEKBD
-vapi_deps += $(builddir)/gkbd.vapi
+ibus-@IBUS_API_VERSION@.vapi: $(vapi_deps)
+ $(AM_V_GEN) $(VAPIGEN) --library ibus-@IBUS_API_VERSION@ \
+ --pkg gio-2.0 \
+ --metadatadir=$(srcdir) \
+ $(top_srcdir)/src/IBus-@IBUS_API_VERSION@.gir \
+ $(srcdir)/IBus-1.0-custom.vala
+if ENABLE_LIBGNOMEKBD
$(builddir)/gkbd.vapi:
$(AM_V_GEN) $(VAPIGEN) --library gkbd \
--metadatadir $(srcdir) \
@@ -39,25 +60,10 @@ $(builddir)/gkbd.vapi:
$(NULL)
endif
-ibus-1.0.vapi: $(vapi_deps)
-
-VAPIGEN_VAPIS = ibus-1.0.vapi
-
-ibus_1_0_vapi_DEPS = gio-2.0
-ibus_1_0_vapi_METADATADIRS = $(srcdir)
-ibus_1_0_vapi_FILES = \
- $(top_builddir)/src/IBus-1.0.gir \
- $(srcdir)/IBus-1.0-custom.vala \
- $(NULL)
-
-vapidir = $(datadir)/vala/vapi
-vapi_DATA = $(VAPIGEN_VAPIS) $(VAPIGEN_VAPIS:.vapi=.deps)
-
EXTRA_DIST = \
Gkbd-3.0.metadata \
IBus-1.0.metadata \
IBus-1.0-custom.vala \
- ibus-1.0.deps \
config.vapi \
xi.vapi \
Xkl-1.0.metadata \
@@ -65,4 +71,6 @@ EXTRA_DIST = \
CLEANFILES = gkbd.vapi
+MAINTAINERCLEANFILES = ibus-@IBUS_API_VERSION@.vapi
+
-include $(top_srcdir)/git.mk
--- ibus-1.5.1/setup/keyboardshortcut.py.orig 2013-01-15 17:00:05.093191054 +0900
+++ ibus-1.5.1/setup/keyboardshortcut.py 2013-01-15 17:00:18.034160760 +0900
@@ -207,7 +207,7 @@ class KeyboardShortcutSelection(Gtk.VBox
def __set_selected_shortcut(self, shortcut):
model = self.__shortcut_view.get_model()
path, column = self.__shortcut_view.get_cursor()
- model[path[0]][0] = shortcut
+ model[path][0] = shortcut
self.__update_add_and_apply_buttons()
def __del_selected_shortcut(self):

View File

@ -12,10 +12,10 @@ diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
index 584b92d..c4c61d3 100644
--- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c
@@ -584,6 +584,14 @@ ibus_im_context_init (GObject *obj)
#else
ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS;
#endif
@@ -645,6 +645,15 @@ ibus_im_context_init (GObject *obj)
ibusimcontext->events_queue = g_queue_new ();
+ if (!g_getenv ("IBUS_GNOME_SHELL_ENABLE_PREEDIT_TEXT")) {
+ const gchar * prgname = g_get_prgname ();
+ if (g_strcmp0 (prgname, "gnome-shell") == 0) {
@ -24,9 +24,10 @@ index 584b92d..c4c61d3 100644
+ }
+ }
+ }
+
// Create slave im context
ibusimcontext->slave = gtk_im_context_simple_new ();
gtk_im_context_simple_add_table (GTK_IM_CONTEXT_SIMPLE (ibusimcontext->slave),
--
1.7.10.4

View File

@ -1,484 +0,0 @@
From fdec59545fb94f768c847730854ca03c5af2f652 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Fri, 7 Dec 2012 17:59:49 +0900
Subject: [PATCH] Disabled to show non-used GUI.
---
setup/keyboardshortcut.py | 90 ++++++++++++++++++++++++-----------------------
setup/main.py | 45 +++++++++++++-----------
setup/setup.ui | 51 +++++++++++++++++----------
3 files changed, 103 insertions(+), 83 deletions(-)
diff --git a/setup/keyboardshortcut.py b/setup/keyboardshortcut.py
index 3861d2f..9349e42 100644
--- a/setup/keyboardshortcut.py
+++ b/setup/keyboardshortcut.py
@@ -103,9 +103,8 @@ class KeyboardShortcutSelection(Gtk.VBox):
self.__modifier_buttons.append(("Hyper",
Gtk.CheckButton.new_with_mnemonic("_Hyper"),
Gdk.ModifierType.HYPER_MASK))
- self.__modifier_buttons.append(("Capslock",
- Gtk.CheckButton.new_with_mnemonic("Capsloc_k"),
- Gdk.ModifierType.LOCK_MASK))
+ # <CapsLock> is not parsed by gtk_accelerator_parse()
+ # FIXME: Need to check if ibus gtk panel can enable <Release>.
self.__modifier_buttons.append(("Release",
Gtk.CheckButton.new_with_mnemonic("_Release"),
Gdk.ModifierType.RELEASE_MASK))
@@ -119,7 +118,6 @@ class KeyboardShortcutSelection(Gtk.VBox):
table.attach(self.__modifier_buttons[4][1], 0, 1, 1, 2)
table.attach(self.__modifier_buttons[5][1], 1, 2, 1, 2)
table.attach(self.__modifier_buttons[6][1], 2, 3, 1, 2)
- table.attach(self.__modifier_buttons[7][1], 3, 4, 1, 2)
hbox.pack_start(table, True, True, 4)
self.pack_start(hbox, False, True, 4)
@@ -185,19 +183,20 @@ class KeyboardShortcutSelection(Gtk.VBox):
modifiers.append(name)
if keycode.startswith("_"):
keycode = keycode[1:]
- keys = modifiers + [keycode]
- shortcut = "+".join(keys)
+ shortcut = "".join(map(lambda m: '<' + m + '>', modifiers))
+ shortcut += keycode
return shortcut
def __set_shortcut_to_buttons(self, shortcut):
- keys = shortcut.split("+")
- mods = keys[:-1]
+ (keyval, state) = Gtk.accelerator_parse(shortcut)
+ if keyval == 0 and state == 0:
+ return
for name, button, mask in self.__modifier_buttons:
- if name in mods:
+ if state & mask:
button.set_active(True)
else:
button.set_active(False)
- self.__keycode_entry.set_text(keys[-1])
+ self.__keycode_entry.set_text(shortcut.rsplit('>', 1)[-1])
def __get_selected_shortcut(self):
model = self.__shortcut_view.get_model()
@@ -252,49 +251,52 @@ class KeyboardShortcutSelection(Gtk.VBox):
message = _("Please press a key (or a key combination).\nThe dialog will be closed when the key is released.")
dlg.set_markup(message)
dlg.set_title(_("Please press a key (or a key combination)"))
-
- def __key_press_event(d, k, out):
- out.append(k.copy())
-
- def __key_release_event(d, k, out):
- d.response(Gtk.ResponseType.OK)
-
- dlg.connect("key-press-event", __key_press_event, out)
- dlg.connect("key-release-event", __key_release_event, None)
+ sw = Gtk.ScrolledWindow()
+
+ def __accel_edited_cb(c, path, keyval, state, keycode):
+ out.append(keyval)
+ out.append(state)
+ out.append(keycode)
+ dlg.response(Gtk.ResponseType.OK)
+
+ model = Gtk.ListStore(GObject.TYPE_INT,
+ GObject.TYPE_UINT,
+ GObject.TYPE_UINT)
+ accel_view = Gtk.TreeView(model)
+ sw.add(accel_view)
+ column = Gtk.TreeViewColumn()
+ renderer = Gtk.CellRendererAccel(accel_mode=Gtk.CellRendererAccelMode.OTHER,
+ editable=True)
+ renderer.connect('accel-edited', __accel_edited_cb)
+ column.pack_start(renderer, True)
+ column.add_attribute(renderer, 'accel-mods', 0)
+ column.add_attribute(renderer, 'accel-key', 1)
+ column.add_attribute(renderer, 'keycode', 2)
+ accel_view.append_column(column)
+ it = model.append(None)
+ area = dlg.get_message_area()
+ area.pack_end(sw, True, True, 0)
+ sw.show_all()
id = dlg.run()
dlg.destroy()
- if id != Gtk.ResponseType.OK or not out:
+ if id != Gtk.ResponseType.OK or len(out) < 3:
return
- keyevent = out[len(out) - 1]
- state = keyevent.state & (Gdk.ModifierType.CONTROL_MASK | \
- Gdk.ModifierType.SHIFT_MASK | \
- Gdk.ModifierType.MOD1_MASK | \
- Gdk.ModifierType.META_MASK | \
- Gdk.ModifierType.SUPER_MASK | \
- Gdk.ModifierType.HYPER_MASK)
-
-
- if state == 0:
- state = state | Gdk.ModifierType.RELEASE_MASK
- elif keyevent.keyval in (Gdk.KEY_Control_L, Gdk.KEY_Control_R) and state == Gdk.ModifierType.CONTROL_MASK:
- state = state | Gdk.ModifierType.RELEASE_MASK
- elif keyevent.keyval in (Gdk.KEY_Shift_L, Gdk.KEY_Shift_R) and state == Gdk.ModifierType.SHIFT_MASK:
- state = state | Gdk.ModifierType.RELEASE_MASK
- elif keyevent.keyval in (Gdk.KEY_Alt_L, Gdk.KEY_Alt_R) and state == Gdk.ModifierType.MOD1_MASK:
- state = state | Gdk.ModifierType.RELEASE_MASK
- elif keyevent.keyval in (Gdk.KEY_Meta_L, Gdk.KEY_Meta_R) and state == Gdk.ModifierType.META_MASK:
- state = state | Gdk.ModifierType.RELEASE_MASK
- elif keyevent.keyval in (Gdk.KEY_Super_L, Gdk.KEY_Super_R) and state == Gdk.ModifierType.SUPER_MASK:
- state = state | Gdk.ModifierType.RELEASE_MASK
- elif keyevent.keyval in (Gdk.KEY_Hyper_L, Gdk.KEY_Hyper_R) and state == Gdk.ModifierType.HYPER_MASK:
- state = state | Gdk.ModifierType.RELEASE_MASK
+ keyval = out[0]
+ state = out[1]
+ keycode = out[2]
for name, button, mask in self.__modifier_buttons:
if state & mask:
button.set_active(True)
else:
button.set_active(False)
- self.__keycode_entry.set_text(Gdk.keyval_name(keyevent.keyval))
+
+ shortcut = Gtk.accelerator_name_with_keycode(None,
+ keyval,
+ keycode,
+ state)
+ shortcut = shortcut.replace('<Primary>', '<Control>')
+ self.__keycode_entry.set_text(shortcut.rsplit('>', 1)[-1])
def __add_button_clicked_cb(self, button):
shortcut = self.__get_shortcut_from_buttons()
diff --git a/setup/main.py b/setup/main.py
index 46209b6..aa8e935 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -92,22 +92,24 @@ class Setup(object):
self.__init_ui()
def __init_hotkey(self):
- default_values = {
- "trigger" : (N_("trigger"), ["Control+space"]),
- "enable_unconditional" : (N_("enable"), []),
- "disable_unconditional" : (N_("disable"), [])
- }
-
- values = dict(self.__config.get_values("general/hotkey"))
-
- for name, (label, shortcuts) in default_values.items():
- shortcuts = values.get(name, shortcuts)
- button = self.__builder.get_object("button_%s" % name)
- entry = self.__builder.get_object("entry_%s" % name)
- entry.set_text("; ".join(shortcuts))
- entry.set_tooltip_text("\n".join(shortcuts))
- button.connect("clicked", self.__shortcut_button_clicked_cb,
- label, "general/hotkey", name, entry)
+ name = 'trigger_accel'
+ label = 'switch_engine'
+ variant = self.__config.get_value('general/hotkey', name)
+ if variant != None:
+ shortcuts = variant.unpack()
+ else:
+ shortcuts = ['<Control>space']
+
+ button = self.__builder.get_object("button_%s" % label)
+ entry = self.__builder.get_object("entry_%s" % label)
+ entry.set_text("; ".join(shortcuts))
+ tooltip = "\n".join(shortcuts)
+ tooltip += "\n" + \
+ _("Use shortcut with shift to switch to the previous input method")
+
+ entry.set_tooltip_text(tooltip)
+ button.connect("clicked", self.__shortcut_button_clicked_cb,
+ name, "general/hotkey", label, entry)
def __init_panel(self):
values = dict(self.__config.get_values("panel"))
@@ -449,7 +451,8 @@ class Setup(object):
def __shortcut_button_clicked_cb(self, button, name, section, _name, entry):
buttons = (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
Gtk.STOCK_OK, Gtk.ResponseType.OK)
- title = _("Select keyboard shortcut for %s") % _(name)
+ title = _("Select keyboard shortcut for %s") % \
+ _("switching input methods")
dialog = keyboardshortcut.KeyboardShortcutSelectionDialog(buttons = buttons, title = title)
text = entry.get_text()
if text:
@@ -462,11 +465,13 @@ class Setup(object):
dialog.destroy()
if id != Gtk.ResponseType.OK:
return
- self.__config.set_value(section, _name, GLib.Variant.new_strv(shortcuts))
+ self.__config.set_value(section, name, GLib.Variant.new_strv(shortcuts))
text = "; ".join(shortcuts)
entry.set_text(text)
- entry.set_tooltip_text(text)
-
+ tooltip = "\n".join(shortcuts)
+ tooltip += "\n" + \
+ _("Use shortcut with shift to switch to the previous input method")
+ entry.set_tooltip_text(tooltip)
def __item_started_column_toggled_cb(self, cell, path_str, model):
diff --git a/setup/setup.ui b/setup/setup.ui
index 2026172..aa41453 100644
--- a/setup/setup.ui
+++ b/setup/setup.ui
@@ -121,8 +121,7 @@
</child>
<child>
<object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">The shortcut keys for switching to previous input method in the list</property>
<property name="xalign">0</property>
@@ -137,7 +136,7 @@
</child>
<child>
<object class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
@@ -172,6 +171,7 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -180,7 +180,7 @@
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkEntry" id="entry_next_engine">
+ <object class="GtkEntry" id="entry_switch_engine">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
@@ -192,7 +192,7 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="button_next_engine">
+ <object class="GtkButton" id="button_switch_engine">
<property name="label" translatable="yes">...</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
@@ -213,17 +213,17 @@
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkEntry" id="entry_prev_engine">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">True</property>
<property name="editable">False</property>
</object>
@@ -237,8 +237,7 @@
<object class="GtkButton" id="button_prev_engine">
<property name="label" translatable="yes">...</property>
<property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_action_appearance">False</property>
@@ -256,11 +255,12 @@
<property name="right_attach">2</property>
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">The shortcut keys for turning input method on or off</property>
<property name="xalign">0</property>
@@ -273,7 +273,7 @@
</child>
<child>
<object class="GtkLabel" id="label18">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Enable:</property>
@@ -287,7 +287,7 @@
</child>
<child>
<object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
@@ -324,11 +324,12 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label19">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Disable:</property>
@@ -342,7 +343,7 @@
</child>
<child>
<object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
@@ -379,6 +380,7 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -431,6 +433,7 @@
</object>
<packing>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -448,11 +451,12 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label10">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Set the behavior of ibus how to show or hide language bar</property>
<property name="xalign">0</property>
@@ -463,6 +467,7 @@
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -477,11 +482,12 @@
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_panel_show">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="model">model_panel_show_mode</property>
<child>
@@ -496,6 +502,7 @@
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -515,6 +522,7 @@
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -534,13 +542,14 @@
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="checkbutton_show_im_name">
<property name="label" translatable="yes">Show input method name on language bar</property>
<property name="use_action_appearance">False</property>
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="tooltip_text" translatable="yes">Show input method's name on language bar when check the checkbox</property>
@@ -553,6 +562,7 @@
<property name="top_attach">4</property>
<property name="bottom_attach">5</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -572,6 +582,7 @@
<property name="top_attach">5</property>
<property name="bottom_attach">6</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -590,6 +601,7 @@
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
<property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -605,6 +617,7 @@
<property name="right_attach">2</property>
<property name="top_attach">6</property>
<property name="bottom_attach">7</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
</object>
@@ -1001,7 +1014,7 @@ You may use up/down buttons to change it.&lt;/i&gt;&lt;/small&gt;</property>
</child>
<child>
<object class="GtkFrame" id="frame5">
- <property name="visible">True</property>
+ <property name="no_show_all">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
--
1.8.0

View File

@ -1,6 +1,6 @@
From 58d4c946db3396897f36f71d33e939dfbbf0ebed Mon Sep 17 00:00:00 2001
From 7c4c048bd5aceb15d44042c72ff931d0c05d440f Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 27 Nov 2012 15:53:34 +0900
Date: Fri, 11 Jan 2013 23:04:53 +0900
Subject: [PATCH] Enable ibus-setup to show the frequently used languages
only in IME list.
@ -11,10 +11,10 @@ Subject: [PATCH] Enable ibus-setup to show the frequently used languages
3 files changed, 300 insertions(+), 24 deletions(-)
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in
index 64f6f33..23739af 100644
index 7833959..72bcc72 100644
--- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in
@@ -348,6 +348,174 @@ se,si,sk,sy,sy(ku),th,tj,tr,ua,uz,vn
@@ -325,6 +325,174 @@ se,si,sk,sy,sy(ku),th,tj,tr,ua,uz,vn
</locale>
</schema>
<schema>
@ -190,7 +190,7 @@ index 64f6f33..23739af 100644
<applyto>/desktop/ibus/panel/custom_font</applyto>
<owner>ibus</owner>
diff --git a/setup/enginecombobox.py b/setup/enginecombobox.py
index f80b164..578098c 100644
index 0f8a6ae..9828ee6 100644
--- a/setup/enginecombobox.py
+++ b/setup/enginecombobox.py
@@ -45,6 +45,9 @@ class EngineComboBox(Gtk.ComboBox):
@ -362,7 +362,7 @@ index f80b164..578098c 100644
else:
renderer.set_property("visible", True)
renderer.set_property("sensitive", True)
@@ -124,7 +215,8 @@ class EngineComboBox(Gtk.ComboBox):
@@ -119,7 +210,8 @@ class EngineComboBox(Gtk.ComboBox):
renderer.set_property("pixbuf", pixbuf)
def __name_cell_data_cb(self, celllayout, renderer, model, iter, data):
@ -372,7 +372,7 @@ index f80b164..578098c 100644
if isinstance (engine, str) or isinstance (engine, unicode):
renderer.set_property("sensitive", False)
@@ -132,8 +224,15 @@ class EngineComboBox(Gtk.ComboBox):
@@ -127,8 +219,15 @@ class EngineComboBox(Gtk.ComboBox):
renderer.set_property("weight", Pango.Weight.NORMAL)
elif isinstance(engine, int):
renderer.set_property("sensitive", True)
@ -390,7 +390,7 @@ index f80b164..578098c 100644
else:
renderer.set_property("sensitive", True)
renderer.set_property("text", engine.get_longname())
@@ -149,10 +248,18 @@ class EngineComboBox(Gtk.ComboBox):
@@ -144,10 +243,18 @@ class EngineComboBox(Gtk.ComboBox):
if i == 0 or i == -1:
return None
iter = self.get_active_iter()
@ -411,17 +411,17 @@ index f80b164..578098c 100644
return self.get_property("active-engine")
diff --git a/setup/main.py b/setup/main.py
index 5da6340..d6fa3ef 100644
index aae6bb9..ded85c0 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -224,6 +224,7 @@ class Setup(object):
engines.append(engine)
@@ -207,6 +207,7 @@ class Setup(object):
# init engine page
self.__engines = self.__bus.list_engines()
self.__combobox = self.__builder.get_object("combobox_engines")
+ self.__combobox.set_config(self.__config)
self.__combobox.set_engines(engines)
self.__combobox.set_engines(self.__engines)
engine_names = values.get("preload_engines", [])
tmp_dict = {}
--
1.8.0

View File

@ -17,7 +17,7 @@
%global with_gkbd 1
%endif
%global ibus_gjs_version 3.4.1.20120815
%global ibus_gjs_version 3.4.1.20130115
%global ibus_api_version 1.0
@ -32,12 +32,10 @@
%endif
%global dbus_python_version 0.83.0
# FIXME: It's better to use the new icon names
%global gnome_icon_theme_legacy_version 2.91.6
Name: ibus
Version: 1.4.99.20121109
Release: 9%{?dist}
Version: 1.5.1
Release: 1%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
Group: System Environment/Libraries
@ -48,10 +46,6 @@ Source1: %{name}-xinput
# ibus-gjs
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/%{name}-gjs-%{ibus_gjs_version}.tar.gz
%endif
%if (0%{?fedora} < 19 && 0%{?rhel} < 7)
# Upstreamed translations.
Source3: http://fujiwara.fedorapeople.org/ibus/po/%{name}-po-1.4.99.20121207.tar.gz
%endif
# Upstreamed patches.
Patch0: %{name}-HEAD.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=810211
@ -68,8 +62,10 @@ Patch4: %{name}-xx-setup-frequent-lang.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=658420
Patch92: %{name}-xx-g-s-disable-preedit.patch
%endif
# Hide no nused properties in f17.
Patch94: %{name}-xx-no-use.diff
%if (0%{?fedora} < 18 && 0%{?rhel} < 7)
# The patch enables to build on fedora 17.
Patch93: %{name}-xx-f17.patch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -91,6 +87,7 @@ BuildRequires: vala-tools
BuildRequires: GConf2-devel
%if %with_pygobject3
BuildRequires: gobject-introspection-devel
BuildRequires: pygobject3-devel
%endif
BuildRequires: intltool
BuildRequires: iso-codes-devel
@ -132,7 +129,6 @@ Requires: notify-python
Requires: libgnomekbd
%endif
Requires: librsvg2
Requires: gnome-icon-theme-legacy >= %{gnome_icon_theme_legacy_version}
%if (0%{?fedora} <= 17 && 0%{?rhel} < 7)
Requires: gnome-icon-theme-symbolic
%endif
@ -230,9 +226,6 @@ The ibus-devel-docs package contains developer documentation for ibus
%if %with_gjs
gzip -dc %SOURCE2 | tar xf -
%endif
%if (0%{?fedora} < 19 && 0%{?rhel} < 7)
gzip -dc %SOURCE3 | tar xf -
%endif
# home [dot] corp [dot] redhat [dot] com/wiki/rpmdiff-multilib
# Update timestamps on the files touched by a patch, to avoid non-equal
@ -270,8 +263,10 @@ UpdateTimestamps -p1 %{PATCH3}
%patch4 -p1 -b .setup-frequent-lang
UpdateTimestamps -p1 %{PATCH4}
%patch94 -p1 -b .no-used
UpdateTimestamps -p1 %{PATCH94}
%if (0%{?fedora} < 18 && 0%{?rhel} < 7)
%patch93 -p1 -b .f17
UpdateTimestamps -p1 %{PATCH93}
%endif
%build
%if %with_xkbfile
@ -285,17 +280,12 @@ autoreconf -f -i
--enable-gtk-doc \
--with-no-snooper-apps='gnome-do,Do.*,firefox.*,.*chrome.*,.*chromium.*' \
--enable-surrounding-text \
%if (0%{?fedora} > 17 || 0%{?rhel} > 6)
--with-panel-icon-keyboard=legacy \
%endif
%if %with_xkbfile
--with-xkb-command=ibus-xkb \
%if (0%{?fedora} <= 17 && 0%{?rhel} < 7)
--with-panel-icon-keyboard=yes \
%endif
%if %with_gkbd
--enable-libgnomekbd \
%endif
--enable-dconf \
--disable-gconf \
%if %with_pygobject2
--enable-python-library \
%endif
@ -448,10 +438,8 @@ fi
%{_sysconfdir}/bash_completion.d/ibus.bash
%{_sysconfdir}/dconf/db/ibus.d
%{_sysconfdir}/dconf/profile/ibus
%python2_sitearch/gi/overrides/IBus.py*
%config %{_xinputconf}
%if %with_xkbfile
%{_libexecdir}/ibus-xkb
%endif
%files libs
%{_libdir}/libibus-%{ibus_api_version}.so.*
@ -483,6 +471,11 @@ fi
%{_datadir}/gtk-doc/html/*
%changelog
* Tue Jan 08 2013 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.1-1
- Bumped to 1.5.1
- Bumped to ibus-gjs 3.4.1.20130115 for f17
- Removed ibus-xx-no-use.diff
* Fri Dec 14 2012 Takao Fujiwara <tfujiwar@redhat.com> - 1.4.99.20121109-9
- Updated ibus-xx-no-use.diff not to use variant.dup_strv()

View File

@ -1,4 +1,3 @@
be482479357210283e91a47f43a0a0fe ibus-1.4.99.20121109.tar.gz
f0103201249c657712f5f4d9a36923ed ibus-1.5.1.tar.gz
2d2ad58e3e41429dbd883ba7e501c9b2 ibus-gjs-3.2.1.20111230.tar.gz
8acf4ac4d1a7dfb9a0af9e755a8e7dba ibus-gjs-3.4.1.20120815.tar.gz
e2a13c45eea2cdb86572bbccec7a2e16 ibus-po-1.4.99.20121207.tar.gz
da9a22c82ab33423d7afeb3da4146fa8 ibus-gjs-3.4.1.20130115.tar.gz