fix N_SE-25242, N_SE-25243, N_SE-25248. show normal view on horizontal edit mode
authoryumi82.ko <yumi82.ko@samsung.com>
Thu, 14 Feb 2013 08:30:08 +0000 (17:30 +0900)
committeryumi82.ko <yumi82.ko@samsung.com>
Thu, 14 Feb 2013 08:30:08 +0000 (17:30 +0900)
Change-Id: I3cad352710f3f93c10975ca5f28e57a01675e1a3

main/message.c
thread/src/msg-ui-thread-callback.c
thread/src/msg-ui-thread-main.c
thread/src/msg-ui-thread-util.c

index 661040d..119637d 100755 (executable)
@@ -694,6 +694,7 @@ void result_cb(ui_gadget_h ug, service_h result, void *priv)
        pListData = msg_ui_thread_get_current_list();
 
        if (!g_strcmp0(str_result, MSG_BUNDLE_VALUE_DEL_ALL)) {
+               elm_object_focus_set(pListData->genlist, EINA_TRUE);
                ug_destroy(ug);
 
                if (pListData) {
@@ -763,8 +764,14 @@ void destroy_cb(ui_gadget_h ug, void *priv)
 
        struct appdata *ad = (struct appdata *)priv;
        int ug_type = ad->ug_type;
+       PMSG_THREAD_LIST_DATA pListData = NULL;
+
+       pListData = msg_ui_thread_get_current_list();
 
        if (ug == ad->composer_ug) {
+               if (pListData && pListData->genlist)
+                       elm_object_focus_set(pListData->genlist, EINA_TRUE);
+
                ug_destroy(ug);
                ad->composer_ug = NULL;
                ad->ug_type = MSG_COMPOSER_UG_TYPE_NONE;
@@ -772,9 +779,6 @@ void destroy_cb(ui_gadget_h ug, void *priv)
 
        if (ad->layout_main) {
                PMSG_THREAD_DATA pData = (PMSG_THREAD_DATA)ad->thread_data;
-               PMSG_THREAD_LIST_DATA pListData = NULL;
-
-               pListData = msg_ui_thread_get_current_list();
                if (pListData == NULL) {
                        elm_exit();
                        return;
index 5ac529c..98c46ab 100755 (executable)
@@ -352,8 +352,6 @@ static void __msg_ui_thread_multi_action_finish(PMSG_THREAD_LIST_DATA pListData)
        pListData->action_type = THREAD_ACTION_NONE;
        pListData->include_protected_msg = false;
 
-       msg_ui_thread_show_normal_mode(pListData);
-
        if (pListData->list_type == THREAD_NORMAL_LIST_TYPE) {
                msg_ui_thread_list_load(pListData, FALSE);
        } else {
@@ -364,6 +362,8 @@ static void __msg_ui_thread_multi_action_finish(PMSG_THREAD_LIST_DATA pListData)
                if (pDefaultListData)
                        msg_ui_thread_list_load(pDefaultListData, FALSE); //might be changed
        }
+
+       msg_ui_thread_show_normal_mode(pListData);
 }
 
 void msg_ui_thread_ctlbar_checkbox_cb(void *data, Evas_Object *obj, void *event_info)
index b786349..e89d534 100755 (executable)
@@ -957,10 +957,12 @@ void msg_ui_thread_split_view_show(PMSG_THREAD_DATA pData)
 
        PMSG_THREAD_LIST_DATA pListData = msg_ui_thread_get_current_list();
 
-       elm_panes_content_left_size_set(pData->panes, 0.4);
+       if (pListData && pListData->view_mode == THREAD_NORMAL_VIEW) {
+               elm_panes_content_left_size_set(pData->panes, 0.4);
+               elm_object_signal_emit(pData->panes, "elm,panes,pair", "");
 
-       if (pListData) {
-               if (pListData->view_mode == THREAD_NORMAL_VIEW && pListData->item_cnt > 0) {
+
+               if (pListData->item_cnt > 0) {
                        edje_object_signal_emit(_EDJ(pListData->content_ly), "show_searchbar", "sel_all");
                        evas_object_show(pListData->searchbar);
                        elm_object_part_content_set(pListData->content_ly, "sel_all", pListData->searchbar);
@@ -988,15 +990,14 @@ void msg_ui_thread_split_view_show(PMSG_THREAD_DATA pData)
                        }
 
                        if (pData->detail_layout) {
-                               elm_naviframe_item_pop(pData->navi_frame);
+                               elm_object_item_del(elm_naviframe_top_item_get(pData->navi_frame));
                                pData->detail_layout = NULL;
                                if (pListData->sel_gen_item > 0)
                                        msg_ui_thread_launch_msg_detail_view(pListData, elm_object_item_data_get(pListData->sel_gen_item));
                        }
                }
        }
-
-       elm_object_signal_emit(pData->panes, "elm,panes,pair", "");
+       D_LEAVE;
 }
 
 void msg_ui_thread_split_view_hide(PMSG_THREAD_DATA pData)
@@ -1005,29 +1006,31 @@ void msg_ui_thread_split_view_hide(PMSG_THREAD_DATA pData)
 
        PMSG_THREAD_LIST_DATA pListData = msg_ui_thread_get_current_list();
 
-       elm_object_part_content_set(pData->panes, "left", pData->layout_main);
-       elm_panes_content_left_size_set(pData->panes, 1.0);
-       if (pData->split_data) {
-               elm_object_part_content_unset(pData->panes, "right");
-               msg_ui_thread_destroy_split_data(pData->split_data);
-       }
+       if (pListData && pListData->view_mode == THREAD_NORMAL_VIEW) {
+               elm_object_part_content_set(pData->panes, "left", pData->layout_main);
+               elm_panes_content_left_size_set(pData->panes, 1.0);
+               if (pData->split_data) {
+                       elm_object_part_content_unset(pData->panes, "right");
+                       msg_ui_thread_destroy_split_data(pData->split_data);
+               }
 
-       if (pListData) {
                if (pListData->search_mode == THREAD_SEARCH_OFF) {
+                       edje_object_signal_emit(_EDJ(pListData->content_ly), "hide_searchbar", "sel_all");
+                       elm_object_part_content_unset(pListData->content_ly, "sel_all");
+                       evas_object_hide(pListData->searchbar);
                        msg_ui_thread_show_toolbar(pListData);
-
-                       if (pListData->view_mode == THREAD_NORMAL_VIEW) {
-                               edje_object_signal_emit(_EDJ(pListData->content_ly), "hide_searchbar", "sel_all");
-                               elm_object_part_content_unset(pListData->content_ly, "sel_all");
-                               evas_object_hide(pListData->searchbar);
-                       }
+               } else {
+                       Evas_Object *entry = NULL;
+                       entry = elm_object_part_content_get(pListData->searchbar, "elm.swallow.content");
+                       if (entry && elm_object_focus_get(entry) == EINA_FALSE)
+                               msg_ui_thread_show_toolbar(pListData);
                }
+
                elm_naviframe_item_title_visible_set(pListData->nf_it, EINA_TRUE);
 
                Evas_Object * layout = msg_ui_get_composer_ug_viewer_layout();
                if (layout) {
                        elm_object_part_content_set(pData->panes, "right", layout);
-                       elm_object_part_content_unset(pData->panes, "left");
                        elm_panes_content_left_size_set(pData->panes, 0.0);
                        evas_object_hide(pData->layout_main);
                } else if (pData->detail_layout) {
@@ -1035,6 +1038,8 @@ void msg_ui_thread_split_view_hide(PMSG_THREAD_DATA pData)
                        if (pListData->sel_gen_item > 0)
                                msg_ui_thread_launch_msg_detail_view(pListData, elm_object_item_data_get(pListData->sel_gen_item));
                }
+
+               elm_object_signal_emit(pData->panes, "elm,panes,unpair", "");
        }
-       elm_object_signal_emit(pData->panes, "elm,panes,unpair", "");
+       D_LEAVE;
 }
index 4eae014..533b456 100755 (executable)
@@ -556,7 +556,6 @@ void msg_ui_thread_cancel_edit_mode(PMSG_THREAD_LIST_DATA pListData)
 
        elm_object_part_content_unset(pListData->content_ly, "sel_all");
        evas_object_hide(pListData->sel_all_ly);
-       elm_object_part_content_set(pListData->content_ly, "sel_all", pListData->searchbar);
        if (msg_ui_thread_rotation_get() == false)
                edje_object_signal_emit(_EDJ(pListData->content_ly), "hide_searchbar", "sel_all");
        else
@@ -585,8 +584,6 @@ void msg_ui_thread_show_normal_mode(PMSG_THREAD_LIST_DATA pListData)
                pListData->select_info = NULL;
        }
 
-       msg_ui_thread_set_navi_toolbar_item(pListData);
-
        if (pListData->list_type == THREAD_NORMAL_LIST_TYPE)
                elm_object_item_text_set(pListData->nf_it, dgettext("sys_string", "IDS_COM_BODY_MESSAGES"));
        else if (pListData->list_type == THREAD_SPAM_LIST_TYPE)
@@ -604,8 +601,7 @@ void msg_ui_thread_show_normal_mode(PMSG_THREAD_LIST_DATA pListData)
                elm_naviframe_item_title_visible_set(pListData->nf_it, EINA_TRUE);
                msg_ui_thread_show_toolbar(pListData);
        } else {
-               elm_naviframe_item_title_visible_set(pListData->nf_it, EINA_FALSE);
-               msg_ui_thread_hide_toolbar(pListData, true);
+               msg_ui_thread_split_view_show(msg_ui_thread_get_data());
        }
 
        D_LEAVE;