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.3.9.tar.gz
/ibus-1.4.0.tar.gz /ibus-1.4.0.tar.gz
/ibus-1.4.1.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.20101028.tar.gz
/ibus-1.3.99.20101118.tar.gz /ibus-1.3.99.20101118.tar.gz
/ibus-1.3.99.20101202.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.20120428.tar.gz
/ibus-gjs-3.4.1.20120518.tar.gz /ibus-gjs-3.4.1.20120518.tar.gz
/ibus-gjs-3.4.1.20120815.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> 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. Subject: [PATCH] Reload preload engines until users customize the list.
The idea is, if users don't customize the preload_engines with ibus-setup, 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(-) 5 files changed, 246 insertions(+), 7 deletions(-)
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in 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 --- a/data/ibus.schemas.in
+++ b/data/ibus.schemas.in +++ b/data/ibus.schemas.in
@@ -2,6 +2,30 @@ @@ -2,6 +2,30 @@
@ -60,10 +60,10 @@ index 1a0e2d2..64f6f33 100644
<applyto>/desktop/ibus/general/preload_engines</applyto> <applyto>/desktop/ibus/general/preload_engines</applyto>
<owner>ibus</owner> <owner>ibus</owner>
diff --git a/setup/main.py b/setup/main.py diff --git a/setup/main.py b/setup/main.py
index c02229b..5da6340 100644 index 707faa4..aae6bb9 100644
--- a/setup/main.py --- a/setup/main.py
+++ b/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.connect("toggled",
self.__checkbutton_use_global_engine_toggled_cb) self.__checkbutton_use_global_engine_toggled_cb)
@ -83,8 +83,8 @@ index c02229b..5da6340 100644
+ +
# init engine page # init engine page
self.__engines = self.__bus.list_engines() self.__engines = self.__bus.list_engines()
value = self.__config.get_value("general", "load_xkb_layouts") self.__combobox = self.__builder.get_object("combobox_engines")
@@ -257,6 +271,7 @@ class Setup(object): @@ -243,6 +257,7 @@ class Setup(object):
self.__checkbutton_auto_start_toggled_cb) self.__checkbutton_auto_start_toggled_cb)
self.__config = self.__bus.get_config() self.__config = self.__bus.get_config()
@ -92,7 +92,7 @@ index c02229b..5da6340 100644
self.__init_hotkey() self.__init_hotkey()
self.__init_panel() 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): def __combobox_notify_active_engine_cb(self, combobox, property):
engine = self.__combobox.get_active_engine() engine = self.__combobox.get_active_engine()
button = self.__builder.get_object("button_engine_add") button = self.__builder.get_object("button_engine_add")
@ -103,7 +103,7 @@ index c02229b..5da6340 100644
def __get_engine_setup_exec_args(self, engine): def __get_engine_setup_exec_args(self, engine):
args = [] args = []
@@ -351,6 +366,34 @@ class Setup(object): @@ -324,6 +339,34 @@ class Setup(object):
del self.__engine_setup_exec_list[name] del self.__engine_setup_exec_list[name]
self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args) self.__engine_setup_exec_list[name] = os.spawnl(os.P_NOWAIT, *args)
@ -138,7 +138,7 @@ index c02229b..5da6340 100644
def __init_bus(self): def __init_bus(self):
self.__bus = IBus.Bus() self.__bus = IBus.Bus()
if self.__bus.is_connected(): 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) value = GLib.Variant.new_boolean(value)
self.__config.set_value("general", "use_global_engine", 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': + if section == 'general' and name == 'preload_engines':
+ value = [] + value = []
+ if variant != None: + if variant != None:
+ value = self.__variant_dup_strv(variant) + value = variant.unpack()
+ engines = self.__get_engine_descs_from_names(value) + engines = self.__get_engine_descs_from_names(value)
+ current_engines = self.__treeview.get_engines() + current_engines = self.__treeview.get_engines()
+ engines_csv = str.join(',', map(lambda e: e.get_name(), 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): def __config_reloaded_cb(self, bus):
pass pass
diff --git a/setup/setup.ui b/setup/setup.ui diff --git a/setup/setup.ui b/setup/setup.ui
index 8121d62..2026172 100644 index e56e917..b3165aa 100644
--- a/setup/setup.ui --- a/setup/setup.ui
+++ b/setup/setup.ui +++ b/setup/setup.ui
@@ -653,7 +653,23 @@ @@ -669,7 +669,23 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
@ -188,7 +188,7 @@ index 8121d62..2026172 100644
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<child> <child>
@@ -842,7 +858,7 @@ @@ -858,7 +874,7 @@
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
@ -197,7 +197,7 @@ index 8121d62..2026172 100644
</packing> </packing>
</child> </child>
<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> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
@ -228,10 +228,10 @@ index 737b3e2..8ce5a16 100644
* @x: x coordinate. * @x: x coordinate.
* @y: y coordinate. * @y: y coordinate.
diff --git a/ui/gtk3/panel.vala b/ui/gtk3/panel.vala 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 --- a/ui/gtk3/panel.vala
+++ b/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) { if (m_config != null) {
m_config.value_changed.connect(config_value_changed_cb); m_config.value_changed.connect(config_value_changed_cb);
m_config.watch("general", "preload_engines"); 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", "preload_engine_mode");
m_config.watch("general", "engines_order"); m_config.watch("general", "engines_order");
m_config.watch("general", "switcher_delay_time"); m_config.watch("general", "switcher_delay_time");
m_config.watch("general/hotkey", "trigger_accel"); m_config.watch("general/hotkey", "triggers");
@@ -425,7 +427,136 @@ class Panel : IBus.PanelService { @@ -358,7 +360,136 @@ class Panel : IBus.PanelService {
init_gkbd(); init_gkbd();
} }
@ -377,7 +377,7 @@ index 63b0cde..c4c8f2c 100644
} }
private void update_xkb_engines() { private void update_xkb_engines() {
@@ -591,6 +722,11 @@ class Panel : IBus.PanelService { @@ -573,6 +704,11 @@ class Panel : IBus.PanelService {
string section, string section,
string name, string name,
Variant variant) { 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> From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Tue, 13 Nov 2012 12:05:07 +0900 Date: Sat, 15 Dec 2012 17:40:18 +0900
Subject: [PATCH] Update simple.xml to enable layout_variant tag. 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 ++++++++++++++++++++++++++++++++++++++++-------- setup/main.py | 2 +-
1 file changed, 93 insertions(+), 19 deletions(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/engine/simple.xml.in.in b/engine/simple.xml.in.in diff --git a/setup/main.py b/setup/main.py
index 25db578..d064ad6 100644 index a8acc7a..707faa4 100644
--- a/engine/simple.xml.in.in --- a/setup/main.py
+++ b/engine/simple.xml.in.in +++ b/setup/main.py
@@ -24,7 +24,8 @@ @@ -87,7 +87,7 @@ class Setup(object):
<language>eng</language> label = 'switch_engine'
<license>GPL</license> variant = self.__config.get_value('general/hotkey', name)
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> if variant != None:
- <layout>us(intl)</layout> - shortcuts = variant.dup_strv()
+ <layout>us</layout> + shortcuts = variant.unpack()
+ <layout_variant>intl</layout_variant> else:
<longname>English (US, international with dead keys)</longname> shortcuts = ['<Control>space']
<description>English (US, international with dead keys)</description>
<icon>ibus-keyboard</icon> --
@@ -35,7 +36,8 @@ 1.7.12.1
<language>eng</language>
<license>GPL</license> From 62cd0492e3459416e1775aedc327bced53f66828 Mon Sep 17 00:00:00 2001
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> From: Rui Matos <tiagomatos@gmail.com>
- <layout>us(colemak)</layout> Date: Wed, 9 Jan 2013 10:14:55 -0500
+ <layout>us</layout> Subject: [PATCH] client: Queue events while the IBus context isn't ready
+ <layout_variant>colemak</layout_variant>
<longname>English (Colemak)</longname> There are actually 3 patches here.
<description>English (Colemak)</description>
<icon>ibus-keyboard</icon> ---
@@ -46,7 +48,8 @@ client: Queue events while the IBus context isn't ready
<language>eng</language>
<license>GPL</license> We may lose events that ought to be processed while the IBus context
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> isn't ready or if the connection to IBus isn't fully established yet.
- <layout>us(dvorak)</layout>
+ <layout>us</layout> To avoid that, enqueue events to be processed later when the IBus
+ <layout_variant>dvorak</layout_variant> context creation finishes.
<longname>English (Dvorak)</longname>
<description>English (Dvorak)</description> ---
<icon>ibus-keyboard</icon> client: Don't cancel an ongoing create input context on another request
@@ -57,20 +60,21 @@
<language>eng</language> This would only add more delays.
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> ---
- <layout>us(altgr-intl)</layout> client: Cancel any ongoing create input context request on finalize
+ <layout>us</layout>
+ <layout_variant>altgr-intl</layout_variant> BUG=
<longname>English (international AltGr dead keys)</longname>
<description>English (international AltGr dead keys)</description> Review URL: https://codereview.appspot.com/6988047
<icon>ibus-keyboard</icon> Patch from Rui Matos <tiagomatos@gmail.com>.
<rank>99</rank> ---
</engine> client/gtk2/ibusimcontext.c | 220 ++++++++++++++++++++++++++------------------
<engine> 1 file changed, 133 insertions(+), 87 deletions(-)
- <name>xkb:us:altgr-intl:eng</name>
- <language>eng</language> diff --git a/client/gtk2/ibusimcontext.c b/client/gtk2/ibusimcontext.c
+ <name>xkb:ara::ara</name> index 011676f..94005b7 100644
+ <language>ara</language> --- a/client/gtk2/ibusimcontext.c
<license>GPL</license> +++ b/client/gtk2/ibusimcontext.c
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> @@ -40,6 +40,8 @@
- <layout>us(altgr-intl)</layout> # define IDEBUG(a...)
- <longname>English (international AltGr dead keys)</longname> #endif
- <description>English (international AltGr dead keys)</description>
+ <layout>ara</layout> +#define MAX_QUEUED_EVENTS 20
+ <longname>Arabic</longname> +
+ <description>Arabic</description> struct _IBusIMContext {
<icon>ibus-keyboard</icon> GtkIMContext parent;
<rank>99</rank>
</engine> @@ -63,6 +65,7 @@ struct _IBusIMContext {
@@ -119,6 +123,18 @@
<rank>99</rank> /* cancellable */
</engine> GCancellable *cancellable;
<engine> + GQueue *events_queue;
+ <name>xkb:br:dvorak:por</name> };
+ <language>por</language>
+ <license>GPL</license> struct _IBusIMContextClass {
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> @@ -154,6 +157,8 @@ static GType _ibus_type_im_context = 0;
+ <layout>br</layout> static GtkIMContextClass *parent_class = NULL;
+ <layout_variant>dvorak</layout_variant>
+ <longname>Portuguese (Brazil, Dvorak)</longname> static IBusBus *_bus = NULL;
+ <description>Portuguese (Brazil, Dvorak)</description> +static guint _daemon_name_watch_id = 0;
+ <icon>ibus-keyboard</icon> +static gboolean _daemon_is_running = FALSE;
+ <rank>99</rank>
+ </engine> void
+ <engine> ibus_im_context_register_type (GTypeModule *type_module)
<name>xkb:bg::bul</name> @@ -261,6 +266,46 @@ _process_key_event_done (GObject *object,
<language>bul</language> gdk_event_free ((GdkEvent *)event);
<license>GPL</license> }
@@ -134,7 +150,8 @@
<language>bul</language> +static gboolean
<license>GPL</license> +_process_key_event (IBusInputContext *context,
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> + GdkEventKey *event)
- <layout>bg(phonetic)</layout> +{
+ <layout>bg</layout> + guint state = event->state;
+ <layout_variant>phonetic</layout_variant> + gboolean retval = FALSE;
<longname>Bulgarian (traditional phonetic)</longname> +
<description>Bulgarian (traditional phonetic)</description> + if (event->type == GDK_KEY_RELEASE) {
<icon>ibus-keyboard</icon> + state |= IBUS_RELEASE_MASK;
@@ -156,7 +173,8 @@ + }
<language>eng</language> +
<license>GPL</license> + if (_use_sync_mode) {
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> + retval = ibus_input_context_process_key_event (context,
- <layout>ca(eng)</layout> + event->keyval,
+ <layout>ca</layout> + event->hardware_keycode - 8,
+ <layout_variant>eng</layout_variant> + state);
<longname>English (Canada)</longname> + }
<description>English (Canada)</description> + else {
<icon>ibus-keyboard</icon> + ibus_input_context_process_key_event_async (context,
@@ -229,6 +247,18 @@ + event->keyval,
<rank>99</rank> + event->hardware_keycode - 8,
</engine> + state,
<engine> + -1,
+ <name>xkb:fr:dvorak:fra</name> + NULL,
+ <language>fra</language> + _process_key_event_done,
+ <license>GPL</license> + gdk_event_copy ((GdkEvent *) event));
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> +
+ <layout>fr</layout> + retval = TRUE;
+ <layout_variant>dvorak</layout_variant> + }
+ <longname>French (Dvorak)</longname> +
+ <description>French (Dvorak)</description> + if (retval) {
+ <icon>ibus-keyboard</icon> + event->state |= IBUS_HANDLED_MASK;
+ <rank>99</rank> + }
+ </engine> + else {
+ <engine> + event->state |= IBUS_IGNORED_MASK;
<name>xkb:de::ger</name> + }
<language>ger</language> +
<license>GPL</license> + return retval;
@@ -240,11 +270,24 @@ +}
<rank>99</rank> +
</engine>
<engine> /* emit "retrieve-surrounding" glib signal of GtkIMContext, if
+ <name>xkb:de:dvorak:ger</name> * context->caps has IBUS_CAP_SURROUNDING_TEXT and the current IBus
+ <language>ger</language> @@ -387,38 +432,7 @@ _key_snooper_cb (GtkWidget *widget,
+ <license>GPL</license> ibusimcontext->time = event->time;
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> }
+ <layout>de</layout>
+ <layout_variant>dvorak</layout_variant> - guint state = event->state;
+ <longname>German (Dvorak)</longname> - if (event->type == GDK_KEY_RELEASE) {
+ <description>German (Dvorak)</description> - state |= IBUS_RELEASE_MASK;
+ <icon>ibus-keyboard</icon> - }
+ <rank>99</rank> -
+ </engine> - if (_use_sync_mode) {
+ <engine> - retval = ibus_input_context_process_key_event (
<name>xkb:de:neo:ger</name> - ibuscontext,
<language>ger</language> - event->keyval,
<license>GPL</license> - event->hardware_keycode - 8,
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> - state);
- <layout>de(neo)</layout> - }
+ <layout>de</layout> - else {
+ <layout_variant>neo</layout_variant> - ibus_input_context_process_key_event_async (
<longname>German (Neo 2)</longname> - ibuscontext,
<description>German (Neo 2)</description> - event->keyval,
<icon>ibus-keyboard</icon> - event->hardware_keycode - 8,
@@ -332,7 +375,8 @@ - state,
<language>lav</language> - -1,
<license>GPL</license> - NULL,
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> - _process_key_event_done,
- <layout>lv(apostrophe)</layout> - gdk_event_copy ((GdkEvent *) event));
+ <layout>lv</layout> - retval = TRUE;
+ <layout_variant>apostrophe</layout_variant> -
<longname>Latvian (apostrophe variant)</longname> - }
<description>Latvian (apostrophe variant)</description> -
<icon>ibus-keyboard</icon> - if (retval) {
@@ -350,6 +394,18 @@ - event->state |= IBUS_HANDLED_MASK;
<rank>99</rank> - }
</engine> - else {
<engine> - event->state |= IBUS_IGNORED_MASK;
+ <name>xkb:pl:dvorak:pol</name> - }
+ <language>pol</language> + retval = _process_key_event (ibuscontext, event);
+ <license>GPL</license>
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> if (ibusimcontext != NULL) {
+ <layout>pl</layout> /* unref ibusimcontext could call ibus_im_context_finalize here
+ <layout_variant>dvorak</layout_variant> @@ -450,6 +464,23 @@ _get_boolean_env(const gchar *name,
+ <longname>Polish (Dvorak)</longname> }
+ <description>Polish (Dvorak)</description>
+ <icon>ibus-keyboard</icon> static void
+ <rank>99</rank> +daemon_name_appeared (GDBusConnection *connection,
+ </engine> + const gchar *name,
+ <engine> + const gchar *owner,
<name>xkb:pt::por</name> + gpointer data)
<language>por</language> +{
<license>GPL</license> + _daemon_is_running = TRUE;
@@ -387,7 +443,8 @@ +}
<language>rus</language> +
<license>GPL</license> +static void
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> +daemon_name_vanished (GDBusConnection *connection,
- <layout>ru(phonetic)</layout> + const gchar *name,
+ <layout>ru</layout> + gpointer data)
+ <layout_variant>phonetic</layout_variant> +{
<longname>Russian (phonetic)</longname> + _daemon_is_running = FALSE;
<description>Russian (phonetic)</description> +}
<icon>ibus-keyboard</icon> +
@@ -442,7 +499,8 @@ +static void
<language>cat</language> ibus_im_context_class_init (IBusIMContextClass *class)
<license>GPL</license> {
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> IDEBUG ("%s", __FUNCTION__);
- <layout>es(cat)</layout> @@ -533,6 +564,14 @@ ibus_im_context_class_init (IBusIMContextClass *class)
+ <layout>es</layout> /* always install snooper */
+ <layout_variant>cat</layout_variant> if (_key_snooper_id == 0)
<longname>Catalan (Spain, with middle-dot L)</longname> _key_snooper_id = gtk_key_snooper_install (_key_snooper_cb, NULL);
<description>Catalan (Spain, with middle-dot L)</description> +
<icon>ibus-keyboard</icon> + _daemon_name_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
@@ -460,6 +518,18 @@ + IBUS_SERVICE_IBUS,
<rank>99</rank> + G_BUS_NAME_WATCHER_FLAGS_NONE,
</engine> + daemon_name_appeared,
<engine> + daemon_name_vanished,
+ <name>xkb:se:dvorak:swe</name> + NULL,
+ <language>swe</language> + NULL);
+ <license>GPL</license> }
+ <author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author>
+ <layout>se</layout> static void
+ <layout_variant>dvorak</layout_variant> @@ -543,6 +582,8 @@ ibus_im_context_class_fini (IBusIMContextClass *class)
+ <longname>Swedish (Dvorak)</longname> gtk_key_snooper_remove (_key_snooper_id);
+ <description>Swedish (Dvorak)</description> _key_snooper_id = 0;
+ <icon>ibus-keyboard</icon> }
+ <rank>99</rank> +
+ </engine> + g_bus_unwatch_name (_daemon_name_watch_id);
+ <engine> }
<name>xkb:ch::ger</name>
<language>ger</language> /* Copied from gtk+2.0-2.20.1/modules/input/imcedilla.c to fix crosbug.com/11421.
<license>GPL</license> @@ -602,6 +643,7 @@ ibus_im_context_init (GObject *obj)
@@ -475,7 +545,8 @@ ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS;
<language>fra</language> #endif
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> + ibusimcontext->events_queue = g_queue_new ();
- <layout>ch(fr)</layout>
+ <layout>ch</layout> // Create slave im context
+ <layout_variant>fr</layout_variant> ibusimcontext->slave = gtk_im_context_simple_new ();
<longname>French (Switzerland)</longname> @@ -651,6 +693,13 @@ ibus_im_context_finalize (GObject *obj)
<description>French (Switzerland)</description>
<icon>ibus-keyboard</icon> g_signal_handlers_disconnect_by_func (_bus, G_CALLBACK (_bus_connected_cb), obj);
@@ -508,7 +579,8 @@
<language>eng</language> + if (ibusimcontext->cancellable != NULL) {
<license>GPL</license> + /* Cancel any ongoing create input context request */
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> + g_cancellable_cancel (ibusimcontext->cancellable);
- <layout>gb(extd)</layout> + g_object_unref (ibusimcontext->cancellable);
+ <layout>gb</layout> + ibusimcontext->cancellable = NULL;
+ <layout_variant>extd</layout_variant> + }
<longname>English (UK, extended WinKeys)</longname> +
<description>English (UK, extended WinKeys)</description> if (ibusimcontext->ibuscontext) {
<icon>ibus-keyboard</icon> ibus_proxy_destroy ((IBusProxy *)ibusimcontext->ibuscontext);
@@ -519,7 +591,8 @@ }
<language>eng</language> @@ -670,6 +719,9 @@ ibus_im_context_finalize (GObject *obj)
<license>GPL</license> pango_attr_list_unref (ibusimcontext->preedit_attrs);
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> }
- <layout>gb(dvorak)</layout>
+ <layout>gb</layout> + g_queue_free_full (ibusimcontext->events_queue,
+ <layout_variant>dvorak</layout_variant> + (GDestroyNotify)gdk_event_free);
<longname>English (UK, Dvorak)</longname> +
<description>English (UK, Dvorak)</description> G_OBJECT_CLASS(parent_class)->finalize (obj);
<icon>ibus-keyboard</icon> }
@@ -530,7 +603,8 @@
<language>kor</language> @@ -681,65 +733,56 @@ ibus_im_context_filter_keypress (GtkIMContext *context,
<license>GPL</license>
<author>Peng Huang &lt;shawn.p.huang@gmail.com&gt;</author> IBusIMContext *ibusimcontext = IBUS_IM_CONTEXT (context);
- <layout>kr(kr104)</layout>
+ <layout>kr</layout> - if (G_LIKELY (ibusimcontext->ibuscontext && ibusimcontext->has_focus)) {
+ <layout_variant>kr104</layout_variant> - /* If context does not have focus, ibus will process key event in sync mode.
<longname>Korean (101/104 key compatible)</longname> - * It is a workaround for increase search in treeview.
<description>Korean (101/104 key compatible)</description> - */
<icon>ibus-keyboard</icon> - gboolean retval = FALSE;
-- -
1.8.0 - if (event->state & IBUS_HANDLED_MASK)
- return TRUE;
From ae98b5a58846e1326550027dc8d2a773ed8a24c5 Mon Sep 17 00:00:00 2001 + if (!_daemon_is_running)
From: fujiwarat <takao.fujiwara1@gmail.com> + return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
Date: Fri, 30 Nov 2012 11:43:43 +0900
Subject: [PATCH] Fix xmllint errors. - if (event->state & IBUS_IGNORED_MASK)
- return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
Review URL: https://codereview.appspot.com/6842115 + /* If context does not have focus, ibus will process key event in
--- + * sync mode. It is a workaround for increase search in treeview.
conf/dconf/dconf.xml.in.in | 2 +- + */
conf/gconf/gconf.xml.in.in | 2 +- + if (!ibusimcontext->has_focus)
conf/memconf/memconf.xml.in.in | 2 +- + return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
ui/gtk3/gtkpanel.xml.in.in | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-) - /* XXX it is a workaround for some applications do not set client window. */
- if (ibusimcontext->client_window == NULL && event->window != NULL)
diff --git a/conf/dconf/dconf.xml.in.in b/conf/dconf/dconf.xml.in.in - gtk_im_context_set_client_window ((GtkIMContext *)ibusimcontext, event->window);
index 0367008..ceb2b0c 100644 + if (event->state & IBUS_HANDLED_MASK)
--- a/conf/dconf/dconf.xml.in.in + return TRUE;
+++ b/conf/dconf/dconf.xml.in.in
@@ -1,4 +1,4 @@ - _request_surrounding_text (ibusimcontext);
-<?xml version="1.0" encoding="utf-8"?> + if (event->state & IBUS_IGNORED_MASK)
+<?xml version=\"1.0\" encoding=\"utf-8\"?> + return gtk_im_context_filter_keypress (ibusimcontext->slave, event);
<!-- filename: dconf.xml -->
<component> - if (ibusimcontext != NULL) {
<name>org.freedesktop.IBus.Config</name> - ibusimcontext->time = event->time;
diff --git a/conf/gconf/gconf.xml.in.in b/conf/gconf/gconf.xml.in.in - }
index 0644d7e..d82179f 100644 + /* XXX it is a workaround for some applications do not set client
--- a/conf/gconf/gconf.xml.in.in + * window. */
+++ b/conf/gconf/gconf.xml.in.in + if (ibusimcontext->client_window == NULL && event->window != NULL)
@@ -1,4 +1,4 @@ + gtk_im_context_set_client_window ((GtkIMContext *)ibusimcontext,
-<?xml version="1.0" encoding="utf-8"?> + event->window);
+<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!-- filename: pinyin.xml --> - guint state = event->state;
<component> - if (event->type == GDK_KEY_RELEASE) {
<name>org.freedesktop.IBus.Config</name> - state |= IBUS_RELEASE_MASK;
diff --git a/conf/memconf/memconf.xml.in.in b/conf/memconf/memconf.xml.in.in - }
index b60dbf2..939e40a 100644 + _request_surrounding_text (ibusimcontext);
--- a/conf/memconf/memconf.xml.in.in
+++ b/conf/memconf/memconf.xml.in.in - if (_use_sync_mode) {
@@ -1,4 +1,4 @@ - retval = ibus_input_context_process_key_event (
-<?xml version="1.0" encoding="utf-8"?> - ibusimcontext->ibuscontext,
+<?xml version=\"1.0\" encoding=\"utf-8\"?> - event->keyval,
<component> - event->hardware_keycode - 8,
<name>org.freedesktop.IBus.Config</name> - state);
<description>On-memory Config Component</description> - }
diff --git a/ui/gtk3/gtkpanel.xml.in.in b/ui/gtk3/gtkpanel.xml.in.in - else {
index c480bcd..1d2cf73 100644 - ibus_input_context_process_key_event_async (
--- a/ui/gtk3/gtkpanel.xml.in.in - ibusimcontext->ibuscontext,
+++ b/ui/gtk3/gtkpanel.xml.in.in - event->keyval,
@@ -1,4 +1,4 @@ - event->hardware_keycode - 8,
-<?xml version="1.0" encoding="utf-8"?> - state,
+<?xml version=\"1.0\" encoding=\"utf-8\"?> - -1,
<!-- filename: gtkpanel.xml --> - NULL,
<component> - _process_key_event_done,
<name>org.freedesktop.IBus.Panel</name> - 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 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 index 584b92d..c4c61d3 100644
--- a/client/gtk2/ibusimcontext.c --- a/client/gtk2/ibusimcontext.c
+++ b/client/gtk2/ibusimcontext.c +++ b/client/gtk2/ibusimcontext.c
@@ -584,6 +584,14 @@ ibus_im_context_init (GObject *obj) @@ -645,6 +645,15 @@ ibus_im_context_init (GObject *obj)
#else
ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS; ibusimcontext->events_queue = g_queue_new ();
#endif
+ if (!g_getenv ("IBUS_GNOME_SHELL_ENABLE_PREEDIT_TEXT")) { + if (!g_getenv ("IBUS_GNOME_SHELL_ENABLE_PREEDIT_TEXT")) {
+ const gchar * prgname = g_get_prgname (); + const gchar * prgname = g_get_prgname ();
+ if (g_strcmp0 (prgname, "gnome-shell") == 0) { + if (g_strcmp0 (prgname, "gnome-shell") == 0) {
@ -24,9 +24,10 @@ index 584b92d..c4c61d3 100644
+ } + }
+ } + }
+ } + }
+
// Create slave im context // 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 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> 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 Subject: [PATCH] Enable ibus-setup to show the frequently used languages
only in IME list. 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(-) 3 files changed, 300 insertions(+), 24 deletions(-)
diff --git a/data/ibus.schemas.in b/data/ibus.schemas.in 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 --- a/data/ibus.schemas.in
+++ b/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> </locale>
</schema> </schema>
<schema> <schema>
@ -190,7 +190,7 @@ index 64f6f33..23739af 100644
<applyto>/desktop/ibus/panel/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 f80b164..578098c 100644 index 0f8a6ae..9828ee6 100644
--- a/setup/enginecombobox.py --- a/setup/enginecombobox.py
+++ b/setup/enginecombobox.py +++ b/setup/enginecombobox.py
@@ -45,6 +45,9 @@ class EngineComboBox(Gtk.ComboBox): @@ -45,6 +45,9 @@ class EngineComboBox(Gtk.ComboBox):
@ -362,7 +362,7 @@ index f80b164..578098c 100644
else: else:
renderer.set_property("visible", True) renderer.set_property("visible", True)
renderer.set_property("sensitive", 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) renderer.set_property("pixbuf", pixbuf)
def __name_cell_data_cb(self, celllayout, renderer, model, iter, data): 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): if isinstance (engine, str) or isinstance (engine, unicode):
renderer.set_property("sensitive", False) 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) 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)
@ -390,7 +390,7 @@ index f80b164..578098c 100644
else: else:
renderer.set_property("sensitive", True) renderer.set_property("sensitive", True)
renderer.set_property("text", engine.get_longname()) 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: if i == 0 or i == -1:
return None return None
iter = self.get_active_iter() iter = self.get_active_iter()
@ -411,17 +411,17 @@ index f80b164..578098c 100644
return self.get_property("active-engine") 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 5da6340..d6fa3ef 100644 index aae6bb9..ded85c0 100644
--- a/setup/main.py --- a/setup/main.py
+++ b/setup/main.py +++ b/setup/main.py
@@ -224,6 +224,7 @@ class Setup(object): @@ -207,6 +207,7 @@ class Setup(object):
engines.append(engine) # init engine page
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(engines) self.__combobox.set_engines(self.__engines)
engine_names = values.get("preload_engines", []) tmp_dict = {}
-- --
1.8.0 1.8.0

View File

@ -17,7 +17,7 @@
%global with_gkbd 1 %global with_gkbd 1
%endif %endif
%global ibus_gjs_version 3.4.1.20120815 %global ibus_gjs_version 3.4.1.20130115
%global ibus_api_version 1.0 %global ibus_api_version 1.0
@ -32,12 +32,10 @@
%endif %endif
%global dbus_python_version 0.83.0 %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 Name: ibus
Version: 1.4.99.20121109 Version: 1.5.1
Release: 9%{?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
@ -48,10 +46,6 @@ Source1: %{name}-xinput
# ibus-gjs # ibus-gjs
Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/%{name}-gjs-%{ibus_gjs_version}.tar.gz Source2: http://fujiwara.fedorapeople.org/ibus/gnome-shell/%{name}-gjs-%{ibus_gjs_version}.tar.gz
%endif %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. # Upstreamed patches.
Patch0: %{name}-HEAD.patch Patch0: %{name}-HEAD.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=810211 # 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 # https://bugzilla.gnome.org/show_bug.cgi?id=658420
Patch92: %{name}-xx-g-s-disable-preedit.patch Patch92: %{name}-xx-g-s-disable-preedit.patch
%endif %endif
# Hide no nused properties in f17. %if (0%{?fedora} < 18 && 0%{?rhel} < 7)
Patch94: %{name}-xx-no-use.diff # The patch enables to build on fedora 17.
Patch93: %{name}-xx-f17.patch
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -91,6 +87,7 @@ BuildRequires: vala-tools
BuildRequires: GConf2-devel BuildRequires: GConf2-devel
%if %with_pygobject3 %if %with_pygobject3
BuildRequires: gobject-introspection-devel BuildRequires: gobject-introspection-devel
BuildRequires: pygobject3-devel
%endif %endif
BuildRequires: intltool BuildRequires: intltool
BuildRequires: iso-codes-devel BuildRequires: iso-codes-devel
@ -132,7 +129,6 @@ Requires: notify-python
Requires: libgnomekbd Requires: libgnomekbd
%endif %endif
Requires: librsvg2 Requires: librsvg2
Requires: gnome-icon-theme-legacy >= %{gnome_icon_theme_legacy_version}
%if (0%{?fedora} <= 17 && 0%{?rhel} < 7) %if (0%{?fedora} <= 17 && 0%{?rhel} < 7)
Requires: gnome-icon-theme-symbolic Requires: gnome-icon-theme-symbolic
%endif %endif
@ -230,9 +226,6 @@ The ibus-devel-docs package contains developer documentation for ibus
%if %with_gjs %if %with_gjs
gzip -dc %SOURCE2 | tar xf - gzip -dc %SOURCE2 | tar xf -
%endif %endif
%if (0%{?fedora} < 19 && 0%{?rhel} < 7)
gzip -dc %SOURCE3 | tar xf -
%endif
# home [dot] corp [dot] redhat [dot] com/wiki/rpmdiff-multilib # home [dot] corp [dot] redhat [dot] com/wiki/rpmdiff-multilib
# Update timestamps on the files touched by a patch, to avoid non-equal # 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 %patch4 -p1 -b .setup-frequent-lang
UpdateTimestamps -p1 %{PATCH4} UpdateTimestamps -p1 %{PATCH4}
%patch94 -p1 -b .no-used %if (0%{?fedora} < 18 && 0%{?rhel} < 7)
UpdateTimestamps -p1 %{PATCH94} %patch93 -p1 -b .f17
UpdateTimestamps -p1 %{PATCH93}
%endif
%build %build
%if %with_xkbfile %if %with_xkbfile
@ -285,17 +280,12 @@ autoreconf -f -i
--enable-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 (0%{?fedora} > 17 || 0%{?rhel} > 6) %if (0%{?fedora} <= 17 && 0%{?rhel} < 7)
--with-panel-icon-keyboard=legacy \ --with-panel-icon-keyboard=yes \
%endif
%if %with_xkbfile
--with-xkb-command=ibus-xkb \
%endif %endif
%if %with_gkbd %if %with_gkbd
--enable-libgnomekbd \ --enable-libgnomekbd \
%endif %endif
--enable-dconf \
--disable-gconf \
%if %with_pygobject2 %if %with_pygobject2
--enable-python-library \ --enable-python-library \
%endif %endif
@ -448,10 +438,8 @@ fi
%{_sysconfdir}/bash_completion.d/ibus.bash %{_sysconfdir}/bash_completion.d/ibus.bash
%{_sysconfdir}/dconf/db/ibus.d %{_sysconfdir}/dconf/db/ibus.d
%{_sysconfdir}/dconf/profile/ibus %{_sysconfdir}/dconf/profile/ibus
%python2_sitearch/gi/overrides/IBus.py*
%config %{_xinputconf} %config %{_xinputconf}
%if %with_xkbfile
%{_libexecdir}/ibus-xkb
%endif
%files libs %files libs
%{_libdir}/libibus-%{ibus_api_version}.so.* %{_libdir}/libibus-%{ibus_api_version}.so.*
@ -483,6 +471,11 @@ fi
%{_datadir}/gtk-doc/html/* %{_datadir}/gtk-doc/html/*
%changelog %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 * 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() - 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 2d2ad58e3e41429dbd883ba7e501c9b2 ibus-gjs-3.2.1.20111230.tar.gz
8acf4ac4d1a7dfb9a0af9e755a8e7dba ibus-gjs-3.4.1.20120815.tar.gz da9a22c82ab33423d7afeb3da4146fa8 ibus-gjs-3.4.1.20130115.tar.gz
e2a13c45eea2cdb86572bbccec7a2e16 ibus-po-1.4.99.20121207.tar.gz