2013-04-26 08:08:37 +00:00
|
|
|
Index: ibus-m17n-1.3.4/src/default.xml
|
|
|
|
===================================================================
|
|
|
|
--- ibus-m17n-1.3.4.orig/src/default.xml
|
|
|
|
+++ ibus-m17n-1.3.4/src/default.xml
|
|
|
|
@@ -184,6 +184,15 @@
|
2011-09-01 10:18:22 +00:00
|
|
|
<name>m17n:si:samanala</name>
|
|
|
|
<rank>0</rank>
|
|
|
|
</engine>
|
|
|
|
+ <!-- Some Indic engines expect AltGr is automatically mapped -->
|
|
|
|
+ <engine>
|
2013-05-01 07:29:40 +00:00
|
|
|
+ <name>m17n:*:inscript*</name>
|
2011-08-08 01:15:01 +00:00
|
|
|
+ <layout>default[lv3:ralt_switch]</layout>
|
2011-09-01 10:18:22 +00:00
|
|
|
+ </engine>
|
|
|
|
+ <engine>
|
|
|
|
+ <name>m17n:si:*</name>
|
2011-08-08 01:15:01 +00:00
|
|
|
+ <layout>default[lv3:ralt_switch]</layout>
|
2011-09-01 10:18:22 +00:00
|
|
|
+ </engine>
|
|
|
|
<!-- Some CJK engines use preedit. -->
|
|
|
|
<engine>
|
|
|
|
<name>m17n:zh:cangjie</name>
|
2013-04-26 08:08:37 +00:00
|
|
|
Index: ibus-m17n-1.3.4/src/m17nutil.c
|
|
|
|
===================================================================
|
|
|
|
--- ibus-m17n-1.3.4.orig/src/m17nutil.c
|
|
|
|
+++ ibus-m17n-1.3.4/src/m17nutil.c
|
2012-03-30 09:05:56 +00:00
|
|
|
@@ -17,7 +17,8 @@ typedef enum {
|
2011-09-01 10:18:22 +00:00
|
|
|
ENGINE_CONFIG_RANK_MASK = 1 << 0,
|
2012-03-30 09:05:56 +00:00
|
|
|
ENGINE_CONFIG_SYMBOL_MASK = 1 << 1,
|
|
|
|
ENGINE_CONFIG_LONGNAME_MASK = 1 << 2,
|
|
|
|
- ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 3
|
|
|
|
+ ENGINE_CONFIG_LAYOUT_MASK = 1 << 3,
|
|
|
|
+ ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 4
|
2011-09-01 10:18:22 +00:00
|
|
|
} EngineConfigMask;
|
|
|
|
|
|
|
|
struct _EngineConfigNode {
|
2013-04-26 08:08:37 +00:00
|
|
|
@@ -137,7 +138,7 @@ ibus_m17n_engine_new (MSymbol lang,
|
2011-08-08 01:15:01 +00:00
|
|
|
"language", msymbol_name (lang),
|
|
|
|
"license", "GPL",
|
|
|
|
"icon", engine_icon ? engine_icon : "",
|
2013-04-26 08:08:37 +00:00
|
|
|
- "layout", "default",
|
|
|
|
+ "layout", config->layout ? config->layout : "default",
|
2011-08-08 01:15:01 +00:00
|
|
|
"rank", config->rank,
|
2012-03-30 09:05:56 +00:00
|
|
|
"symbol", config->symbol ? config->symbol : "",
|
|
|
|
"setup", engine_setup,
|
2013-04-26 08:08:37 +00:00
|
|
|
@@ -272,6 +273,8 @@ ibus_m17n_get_engine_config (const gchar
|
|
|
|
config->symbol = cnode->config.symbol;
|
|
|
|
if (cnode->mask & ENGINE_CONFIG_LONGNAME_MASK)
|
2012-03-30 09:05:56 +00:00
|
|
|
config->longname = cnode->config.longname;
|
|
|
|
+ if (cnode->mask & ENGINE_CONFIG_LAYOUT_MASK)
|
|
|
|
+ config->layout = cnode->config.layout;
|
2013-04-26 08:08:37 +00:00
|
|
|
if (cnode->mask & ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK)
|
|
|
|
config->preedit_highlight = cnode->config.preedit_highlight;
|
2011-09-01 10:18:22 +00:00
|
|
|
}
|
2013-04-26 08:08:37 +00:00
|
|
|
@@ -314,6 +317,12 @@ ibus_m17n_engine_config_parse_xml_node (
|
2012-03-30 09:05:56 +00:00
|
|
|
cnode->mask |= ENGINE_CONFIG_LONGNAME_MASK;
|
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-09-01 10:18:22 +00:00
|
|
|
+ cnode->mask |= ENGINE_CONFIG_LAYOUT_MASK;
|
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;
|
2013-04-26 08:08:37 +00:00
|
|
|
Index: ibus-m17n-1.3.4/src/m17nutil.h
|
|
|
|
===================================================================
|
|
|
|
--- ibus-m17n-1.3.4.orig/src/m17nutil.h
|
|
|
|
+++ ibus-m17n-1.3.4/src/m17nutil.h
|
2012-03-30 09:05:56 +00:00
|
|
|
@@ -20,6 +20,9 @@ struct _IBusM17NEngineConfig {
|
|
|
|
/* overridding longname shown on panel */
|
|
|
|
gchar *longname;
|
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;
|
|
|
|
};
|