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

754f3e
Index: ibus-m17n-1.3.4/src/default.xml
754f3e
===================================================================
754f3e
--- ibus-m17n-1.3.4.orig/src/default.xml
754f3e
+++ ibus-m17n-1.3.4/src/default.xml
754f3e
@@ -184,6 +184,15 @@
754f3e
 		<name>m17n:si:samanala</name>
754f3e
 		<rank>0</rank>
754f3e
 	</engine>
754f3e
+	
754f3e
+	<engine>
754f3e
+		<name>m17n:*:inscript*</name>
754f3e
+		<layout>default[lv3:ralt_switch]</layout>
754f3e
+	</engine>
754f3e
+	<engine>
754f3e
+		<name>m17n:si:*</name>
754f3e
+		<layout>default[lv3:ralt_switch]</layout>
754f3e
+	</engine>
754f3e
 	
754f3e
 	<engine>
754f3e
 		<name>m17n:zh:cangjie</name>
754f3e
Index: ibus-m17n-1.3.4/src/m17nutil.c
754f3e
===================================================================
754f3e
--- ibus-m17n-1.3.4.orig/src/m17nutil.c
754f3e
+++ ibus-m17n-1.3.4/src/m17nutil.c
754f3e
@@ -17,7 +17,8 @@ typedef enum {
754f3e
     ENGINE_CONFIG_RANK_MASK = 1 << 0,
754f3e
     ENGINE_CONFIG_SYMBOL_MASK = 1 << 1,
754f3e
     ENGINE_CONFIG_LONGNAME_MASK = 1 << 2,
754f3e
-    ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 3
754f3e
+    ENGINE_CONFIG_LAYOUT_MASK = 1 << 3,
754f3e
+    ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK = 1 << 4
754f3e
 } EngineConfigMask;
754f3e
 
754f3e
 struct _EngineConfigNode {
754f3e
@@ -137,7 +138,7 @@ ibus_m17n_engine_new (MSymbol  lang,
754f3e
                                            "language",    msymbol_name (lang),
754f3e
                                            "license",     "GPL",
754f3e
                                            "icon",        engine_icon ? engine_icon : "",
754f3e
-                                           "layout",      "default",
754f3e
+                                           "layout",      config->layout ? config->layout : "default",
754f3e
                                            "rank",        config->rank,
754f3e
                                            "symbol",      config->symbol ? config->symbol : "",
754f3e
                                            "setup",       engine_setup,
754f3e
@@ -272,6 +273,8 @@ ibus_m17n_get_engine_config (const gchar
754f3e
                 config->symbol = cnode->config.symbol;
754f3e
             if (cnode->mask & ENGINE_CONFIG_LONGNAME_MASK)
754f3e
                 config->longname = cnode->config.longname;
754f3e
+            if (cnode->mask & ENGINE_CONFIG_LAYOUT_MASK)
754f3e
+                config->layout = cnode->config.layout;
754f3e
             if (cnode->mask & ENGINE_CONFIG_PREEDIT_HIGHLIGHT_MASK)
754f3e
                 config->preedit_highlight = cnode->config.preedit_highlight;
754f3e
         }
754f3e
@@ -314,6 +317,12 @@ ibus_m17n_engine_config_parse_xml_node (
754f3e
             cnode->mask |= ENGINE_CONFIG_LONGNAME_MASK;
754f3e
             continue;
754f3e
         }
754f3e
+        if (g_strcmp0 (sub_node->name , "layout") == 0) {
754f3e
+            g_free (cnode->config.layout);
754f3e
+            cnode->config.layout = g_strdup (sub_node->text);
754f3e
+            cnode->mask |= ENGINE_CONFIG_LAYOUT_MASK;
754f3e
+            continue;
754f3e
+        }
754f3e
         if (g_strcmp0 (sub_node->name , "preedit-highlight") == 0) {
754f3e
             if (g_ascii_strcasecmp ("TRUE", sub_node->text) == 0)
754f3e
                 cnode->config.preedit_highlight = TRUE;
754f3e
Index: ibus-m17n-1.3.4/src/m17nutil.h
754f3e
===================================================================
754f3e
--- ibus-m17n-1.3.4.orig/src/m17nutil.h
754f3e
+++ ibus-m17n-1.3.4/src/m17nutil.h
754f3e
@@ -20,6 +20,9 @@ struct _IBusM17NEngineConfig {
754f3e
     /* overridding longname shown on panel */
754f3e
     gchar *longname;
754f3e
 
754f3e
+    /* keyboard layout */
754f3e
+    gchar *layout;
754f3e
+
754f3e
     /* whether to highlight preedit */
754f3e
     gboolean preedit_highlight;
754f3e
 };