[TSAM-12442] Correct title when deleting images 93/108993/1
authorRavi Kiran K N <ravi.kiran@samsung.com>
Fri, 6 Jan 2017 08:58:10 +0000 (14:28 +0530)
committerRavi kiran K N <ravi.kiran@samsung.com>
Fri, 6 Jan 2017 11:24:57 +0000 (03:24 -0800)
Change-Id: Iad1954cc090a73ddc7234dc35d856f0752ec87d7
Signed-off-by: Ravi Kiran K N <ravi.kiran@samsung.com>
(cherry picked from commit 2f1a7b04ca92f6167d86e2907a0063ade4aec60b)

src/common/mf-callback.c
src/widget/mf-category-view.c

index da4d970..9cdf7fc 100644 (file)
@@ -898,13 +898,25 @@ void mf_callback_cancel_cb(void *data, Evas_Object * obj, void *event_info)
        }
 
        if (ap->mf_Status.view_type != mf_view_root) {
-               mf_navi_add_back_button(ap,
-                                                               mf_callback_navi_backbutton_clicked_cb);
+               if (!ap->launch_as_ug) {
+                       mf_navi_add_back_button(ap,
+                                       mf_callback_navi_backbutton_clicked_cb);
+               }
        }
 
        if (ap->mf_Status.more == MORE_DEFAULT) {
                if (ap->mf_Status.view_type == mf_view_root_category) {
-                       mf_navi_bar_title_content_set(ap, LABEL_MYFILE_CHAP);
+                       if (ap->launch_as_ug) {
+                               if (ap->mf_Status.category_type == 1) {
+                                       mf_navi_bar_title_content_set(ap, MF_LABEL_IMAGES);
+                               } else if (ap->mf_Status.category_type == 2) {
+                                       mf_navi_bar_title_content_set(ap, MF_LABEL_VIDEOS);
+                               } else {
+                                       mf_navi_bar_title_content_set(ap, MF_LABEL_AUDIOS);
+                               }
+                       } else {
+                               mf_navi_bar_title_content_set(ap, LABEL_MYFILE_CHAP);
+                       }
                } else if (ap->mf_Status.view_type == mf_view_recent) {
                        mf_navi_bar_title_content_set(ap, MF_LABEL_RECTENT_FILES);
                } else {
@@ -5110,6 +5122,10 @@ void mf_callback_backbutton_clicked_cb(void *data, Evas_Object * obj,
        mf_debug("back button cb called");
        struct appdata *ap = (struct appdata *) data;
 
+       if (ap->launch_as_ug) {
+               ui_app_exit();
+               return;
+       }
        if (ap->mf_Status.more == MORE_DEFAULT) {
                if (ap->mf_Status.entry_path) {
                        if (ap->mf_Status.entry_more == MORE_SEARCH) {
index dfea7e7..d0f97a0 100644 (file)
@@ -1264,11 +1264,19 @@ void mf_category_view_create(void *data, bool flag_show)
 
        if (ap->launch_as_ug != EINA_TRUE) {
                mf_navi_add_back_button(ap, mf_category_view_navi_back_cb);
+               mf_navi_bar_title_content_set(ap, LABEL_MYFILE_CHAP);
        } else {
                elm_naviframe_prev_btn_auto_pushed_set(ap->mf_MainWindow.pNaviBar,
                                                                                           EINA_FALSE);
                elm_naviframe_item_pop_cb_set(ap->mf_MainWindow.pNaviItem,
-                                                                         mf_category_view_navi_back_cb, ap);
+                               mf_category_view_navi_back_cb, ap);
+               if (ap->mf_Status.category_type == 1) {
+                       mf_navi_bar_title_content_set(ap, MF_LABEL_IMAGES);
+               } else if (ap->mf_Status.category_type == 2) {
+                       mf_navi_bar_title_content_set(ap, MF_LABEL_VIDEOS);
+               } else {
+                       mf_navi_bar_title_content_set(ap, MF_LABEL_AUDIOS);
+               }
        }
        mf_category_view_set_ctrl_button(ap);
 
@@ -1299,11 +1307,7 @@ void mf_category_view_create(void *data, bool flag_show)
                }
 
        }
-       //Evas_Object *pathinfo = mf_genlist_create_path_info(ap->mf_MainWindow.pNaviLayout, ap->mf_Status.categorytitle, EINA_FALSE);
 
-       //elm_object_part_content_set(ap->mf_MainWindow.pNaviLayout, "pathinfo", pathinfo);
-       //elm_naviframe_item_title_enabled_set(ap->mf_MainWindow.pNaviItem, EINA_FALSE, EINA_FALSE);
-       mf_navi_bar_title_content_set(ap, LABEL_MYFILE_CHAP);
        ap->mf_Status.flagViewAsRefreshView = EINA_FALSE;
        if (ap->mf_Status.more == MORE_EDIT_RENAME) {
                elm_naviframe_item_title_enabled_set(ap->mf_MainWindow.pNaviItem,