ibus-m17n/ibus-m17n-xkb-options.patch

154 lines
4.9 KiB
Diff
Raw Normal View History

2011-07-07 05:37:21 +00:00
Patch to set certain XKB options when an m17n IME is set.
Index: ibus-m17n-1.3.2/src/default.xml.in.in
===================================================================
--- ibus-m17n-1.3.2.orig/src/default.xml.in.in
+++ ibus-m17n-1.3.2/src/default.xml.in.in
@@ -12,19 +12,22 @@
<preedit-highlight>FALSE</preedit-highlight>
</engine>
<engine>
- <name>m17n:bn:inscript</name>
+ <name>m17n:bn:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
- <name>m17n:gu:inscript</name>
+ <name>m17n:gu:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
- <name>m17n:hi:inscript</name>
+ <name>m17n:hi:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
<name>m17n:kn:kgp</name>
@@ -37,19 +40,22 @@
<preedit-highlight>FALSE</preedit-highlight>
</engine>
<engine>
- <name>m17n:mai:inscript</name>
+ <name>m17n:mai:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
- <name>m17n:ml:inscript</name>
+ <name>m17n:ml:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
- <name>m17n:mr:inscript</name>
+ <name>m17n:mr:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
<name>m17n:ne:rom</name>
@@ -57,14 +63,16 @@
<preedit-highlight>FALSE</preedit-highlight>
</engine>
<engine>
- <name>m17n:or:inscript</name>
+ <name>m17n:or:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
- <name>m17n:pa:inscript</name>
+ <name>m17n:pa:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
<name>m17n:sa:harvard-kyoto</name>
@@ -72,14 +80,16 @@
<preedit-highlight>FALSE</preedit-highlight>
</engine>
<engine>
- <name>m17n:sd:inscript</name>
+ <name>m17n:sd:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
<name>m17n:si:wijesekera</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
<name>m17n:ta:tamil99</name>
@@ -87,9 +97,10 @@
<preedit-highlight>FALSE</preedit-highlight>
</engine>
<engine>
- <name>m17n:te:inscript</name>
+ <name>m17n:te:inscript*</name>
<rank>2</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<!-- Samanala should have lower rank than other Sinhala
engines since it is the only non-keyboard input method in
@@ -226,6 +237,7 @@
<name>m17n:si:*</name>
<rank>1</rank>
<preedit-highlight>FALSE</preedit-highlight>
2011-08-08 01:15:01 +00:00
+ <layout>default[lv3:ralt_switch]</layout>
2011-07-07 05:37:21 +00:00
</engine>
<engine>
<name>m17n:ta:*</name>
Index: ibus-m17n-1.3.2/src/m17nutil.c
===================================================================
--- ibus-m17n-1.3.2.orig/src/m17nutil.c
+++ ibus-m17n-1.3.2/src/m17nutil.c
2011-08-08 01:15:01 +00:00
@@ -120,7 +120,7 @@ ibus_m17n_engine_new (MSymbol lang,
"language", msymbol_name (lang),
"license", "GPL",
"icon", engine_icon ? engine_icon : "",
- "layout", "us",
+ "layout", config->layout ? config->layout : "us",
"rank", config->rank,
NULL);
#else
@@ -282,6 +282,11 @@ ibus_m17n_engine_config_parse_xml_node (
cnode->config.rank = atoi (sub_node->text);
2011-07-07 05:37:21 +00:00
continue;
}
2011-08-08 01:15:01 +00:00
+ if (g_strcmp0 (sub_node->name , "layout") == 0) {
+ g_free (cnode->config.layout);
+ cnode->config.layout = g_strdup (sub_node->text);
2011-07-07 05:37:21 +00:00
+ continue;
+ }
2011-08-08 01:15:01 +00:00
if (g_strcmp0 (sub_node->name , "preedit-highlight") == 0) {
if (g_ascii_strcasecmp ("TRUE", sub_node->text) == 0)
cnode->config.preedit_highlight = TRUE;
2011-07-07 05:37:21 +00:00
Index: ibus-m17n-1.3.2/src/m17nutil.h
===================================================================
--- ibus-m17n-1.3.2.orig/src/m17nutil.h
+++ ibus-m17n-1.3.2/src/m17nutil.h
2011-08-08 01:15:01 +00:00
@@ -14,6 +14,9 @@ struct _IBusM17NEngineConfig {
/* engine rank */
gint rank;
2011-07-07 05:37:21 +00:00
2011-08-08 01:15:01 +00:00
+ /* keyboard layout */
+ gchar *layout;
+
2011-07-07 05:37:21 +00:00
/* whether to highlight preedit */
gboolean preedit_highlight;
};