Reduce the duplicated code 92/261492/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 Jul 2021 05:29:08 +0000 (14:29 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 20 Jul 2021 05:29:08 +0000 (14:29 +0900)
Change-Id: If49b8aad299303a5620158b947f5a3457248be84
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/guidepopup.cpp

index 85b923f..692740d 100644 (file)
@@ -48,14 +48,13 @@ Evas_Object *open_message_popup(Evas_Object *parentWnd)
         elm_win_title_set(msg_window, "ISF Popup");
         elm_win_screen_size_get(msg_window, NULL, NULL, &w, &h);
         elm_win_prop_focus_skip_set(msg_window, TRUE);
+
         int rots[4] = {0, 90, 180, 270};
         elm_win_wm_rotation_available_rotations_set(msg_window, rots, 4);
         evas_object_resize(msg_window, w, h);
+        evas_object_show(msg_window);
     }
 
-    int rots[4] = { 0, 90, 180, 270 };
-    elm_win_wm_rotation_available_rotations_set(msg_window, rots, 4);
-    evas_object_show(msg_window);
     return msg_window;
 }
 
@@ -65,6 +64,7 @@ void ise_destroy_popup_space()
         LOGD("destroy space popup iter\n");
         evas_object_del(_guide_popup_space);
         _guide_popup_setting = NULL;
+
         CONFIG_VALUES *config_values = get_config_values();
         if (config_values) {
             config_values->first_guidechange = TRUE;
@@ -79,6 +79,7 @@ void ise_destroy_popup_setting()
         LOGD("destroy setting popup iter\n");
         evas_object_del(_guide_popup_setting);
         _guide_popup_setting = NULL;
+
         CONFIG_VALUES *config_values = get_config_values();
         if (config_values) {
             config_values->first_guideset = TRUE;
@@ -93,6 +94,7 @@ void _guideline_popup_space_cb(void *data, Evas_Object *obj, void *event_info)
     evas_object_del(obj);
     obj = NULL;
     ise_destroy_popup_space();
+
     CONFIG_VALUES *config_values = get_config_values();
     if (config_values) {
         config_values->first_guidechange = TRUE;
@@ -106,6 +108,7 @@ void _guideline_popup_setting_cb(void *data, Evas_Object *obj, void *event_info)
     evas_object_del(obj);
     obj = NULL;
     ise_destroy_popup_setting();
+
     CONFIG_VALUES *config_values = get_config_values();
     if (config_values) {
         config_values->first_guideset = TRUE;
@@ -134,6 +137,7 @@ void ise_show_help_popup(sclulong keyEvent, Evas_Object *win)
             }
             write_ise_config_values();
             ui->get_button_geometry("SPACE_KEY", &rectangle);
+
             _guide_popup_space = open_message_popup(win);
 
             theme = elm_theme_new();
@@ -150,10 +154,13 @@ void ise_show_help_popup(sclulong keyEvent, Evas_Object *win)
             }
             write_ise_config_values();
             ui->get_button_geometry("CM_KEY", &rectangle);
+
             _guide_popup_setting = open_message_popup(win);
+
             theme = elm_theme_new();
             elm_theme_ref_set(theme, NULL);
             elm_theme_extension_add(theme, EDJ_FILE);
+
             ctxpopup = elm_ctxpopup_add(_guide_popup_setting);
             elm_object_theme_set(ctxpopup, theme);
             evas_object_smart_callback_add(ctxpopup, "dismissed", _guideline_popup_setting_cb, (void *)keyEvent);