Launch IME setting as group 92/193392/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 Nov 2018 06:40:58 +0000 (15:40 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 Nov 2018 06:45:25 +0000 (15:45 +0900)
Change-Id: Ic4238f0ec9a2fcfce0eca1c7c36a07f85a2c67a4
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ise-default.xml
src/ise.cpp
src/option.cpp

index 30b6098..e2dedb4 100644 (file)
@@ -90,7 +90,7 @@
     <label xml:lang="zh-tw">Tizen 鍵盤</label>
     <icon/>
 </ui-application>
-<ui-application appid="org.tizen.ise-default-setting" exec="ise-default-setting" launch_mode="single" mainapp="true" nodisplay="true" taskmanage="false" multiple="true" type="capp" hw-acceleration="use-GL">
+<ui-application appid="org.tizen.ise-default-setting" exec="ise-default-setting" launch_mode="caller" mainapp="true" nodisplay="true" taskmanage="false" multiple="true" type="capp" hw-acceleration="use-GL">
     <category name="http://tizen.org/category/ime-setting"/>
     <label>Tizen keyboard setting</label>
     <icon/>
index 3cc7af0..d240d3f 100644 (file)
@@ -956,6 +956,9 @@ static void launch_option()
         goto end;
     }
 
+    app_control_add_extra_data(app_control, "caller", "ise-default");
+    app_control_set_launch_mode(app_control, APP_CONTROL_LAUNCH_MODE_GROUP);
+
     ret = app_control_send_launch_request(app_control, NULL, NULL);
     if (ret != APP_CONTROL_ERROR_NONE) {
         goto end;
index c3d1096..c5c0165 100644 (file)
@@ -58,6 +58,11 @@ static ISELanguageManager _language_manager;
 #define CHECK_STATE "check_state"
 #endif
 
+enum LAUNCH_MODE {
+    LAUNCH_MODE_IME,
+    LAUNCH_MODE_OTHER
+};
+
 enum SETTING_ITEM_ID {
     SETTING_ITEM_ID_INPUT_LANGUAGE_TITLE,
     SETTING_ITEM_ID_CUR_LANGUAGE,
@@ -151,6 +156,7 @@ struct OPTION_ELEMENTS
 #endif
 };
 
+static LAUNCH_MODE g_launch_mode = LAUNCH_MODE_OTHER;
 static OPTION_ELEMENTS option_elements[OPTION_WINDOW_TYPE_MAX];
 extern CONFIG_VALUES g_config_values;
 
@@ -1685,6 +1691,8 @@ static void
 app_control(app_control_h app_control, void *data)
 {
     /* Handle the launch request. */
+    char *caller = NULL;
+    g_launch_mode = LAUNCH_MODE_OTHER;
     Evas_Object *window = elm_win_util_standard_add("Option window", "Option window");
     if (!window) return;
 
@@ -1692,6 +1700,15 @@ app_control(app_control_h app_control, void *data)
     elm_win_wm_rotation_available_rotations_set(window, rots, (sizeof(rots) / sizeof(int)));
     elm_win_indicator_mode_set(window, ELM_WIN_INDICATOR_SHOW);
 
+    app_control_get_extra_data(app_control, "caller", &caller);
+
+    if (caller) {
+        if (strcmp(caller, "ise-default") == 0)
+            g_launch_mode = LAUNCH_MODE_IME;
+
+        free(caller);
+    }
+
     option_window_created(window, OPTION_WINDOW_TYPE_SETTING_APPLICATION);
 }
 
@@ -1700,6 +1717,9 @@ app_pause(void *data)
 {
     LOGD("");
     /* Take necessary actions when application becomes invisible. */
+    if (g_launch_mode == LAUNCH_MODE_IME) {
+        ui_app_exit();
+    }
 }
 
 static void