[TSAM-8328] Enabled label in no content view 14/90714/1
authorRahul Dadhich <r.dadhich@samsung.com>
Tue, 4 Oct 2016 05:02:32 +0000 (10:32 +0530)
committerRahul Dadhich <r.dadhich@samsung.com>
Tue, 4 Oct 2016 05:02:32 +0000 (10:32 +0530)
Change-Id: I735beb80cf8627966a3d7ab604baf06fc29c5c03
Signed-off-by: Rahul Dadhich <r.dadhich@samsung.com>
inc/features/gl-thumbs-sel.h
src/2dview/gl-timeline.c
src/features/gl-albums.c
src/features/gl-thumbs-sel.c

index b8b1a45..b64e4ac 100755 (executable)
@@ -22,7 +22,6 @@
 #include "gallery.h"
 
 int _gl_thumbs_sel_create_view(void *data, gl_cluster *album_item);
-int _gl_thumbs_sel_pop_view(void *data, bool b_pop);
 int _gl_thumbs_sel_update_lang(void *data);
 int _gl_thumbs_sel_disable_btns(void *data, bool b_disabled);
 
index feb58da..baa95b3 100644 (file)
@@ -1385,7 +1385,7 @@ int _gl_timeline_create_grid_view(gl_timeline_s *timeline_d, Evas_Object *genlis
 
        if (list == NULL) {
                __gl_timelne_show_nocontents(timeline_d);
-               elm_naviframe_item_title_enabled_set(timeline_d->nf_it, EINA_FALSE, EINA_FALSE);
+               elm_naviframe_item_title_enabled_set(timeline_d->nf_it, EINA_TRUE, EINA_TRUE);
                return -1;
        } else {
                __gl_timelne_del_nocontents(timeline_d);
@@ -2358,6 +2358,11 @@ int _gl_timeline_update_view(void *data)
        }
        ad->tlinfo->view = view;
        elm_object_part_content_set(ad->tlinfo->layout, "elm.swallow", view);
+
+       if (ad->tlinfo->nocontents) {
+               if (ad->tlinfo->view_m != GL_TL_VIEW_NORMAL)
+                       __gl_timeline_change_mode(data, GL_TL_VIEW_NORMAL);
+       }
        /* Update buttons state */
        __gl_timeline_reset_btns(data);
        /* Update naviframe item title */
index 4245ab8..d3b7cef 100644 (file)
@@ -832,7 +832,7 @@ GL_ALBUMS_SHOW_NOCONTENTS:
                ad->albuminfo.view = noc;
                evas_object_show(noc);
 
-               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_FALSE, EINA_FALSE);
+               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_TRUE, EINA_TRUE);
                Evas_Object *old_view = NULL;
                old_view = elm_object_part_content_unset(ad->ctrlinfo.ctrlbar_view_ly,
                           "elm.swallow.view");
@@ -930,13 +930,19 @@ int gl_albums_change_to_view(void *data)
                        }
                        evas_object_del(ad->albuminfo.view);
                }
+               _gl_ui_change_navi_title(ad->ctrlinfo.nf_it, GL_STR_ID_ALBUM, true);
+               elm_object_signal_emit(ad->ctrlinfo.ctrlbar_view_ly, "elm,selectall,state,default", "elm");
+               Evas_Object * btn = elm_object_item_part_content_unset(ad->ctrlinfo.nf_it, GL_NAVIFRAME_TITLE_LEFT_BTN);
+               evas_object_del(btn);
+               btn = elm_object_item_part_content_unset(ad->ctrlinfo.nf_it, GL_NAVIFRAME_TITLE_RIGHT_BTN);
+               evas_object_del(btn);
 
                Evas_Object *noc = _gl_nocontents_create(ad->ctrlinfo.ctrlbar_view_ly);
                ad->albuminfo.nocontents = noc;
                ad->albuminfo.view = noc;
                evas_object_show(noc);
 
-               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_FALSE, EINA_FALSE);
+               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_TRUE, EINA_TRUE);
                Evas_Object *old_view = NULL;
                old_view = elm_object_part_content_unset(ad->ctrlinfo.ctrlbar_view_ly,
                           "elm.swallow.view");
@@ -1346,7 +1352,7 @@ Evas_Object *_gl_albums_sel_add_view(void *data, Evas_Object *parent)
                Evas_Object *noc = _gl_nocontents_create(ad->ctrlinfo.ctrlbar_view_ly);
                evas_object_show(noc);
                ad->albuminfo.nocontents = noc;
-               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_FALSE, EINA_FALSE);
+               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_TRUE, EINA_TRUE);
 
                return noc;
        } else {
@@ -1395,7 +1401,7 @@ Evas_Object *_gl_albums_add_view(void *data, Evas_Object *parent)
                Evas_Object *noc = _gl_nocontents_create(ad->ctrlinfo.ctrlbar_view_ly);
                evas_object_show(noc);
                ad->albuminfo.nocontents = noc;
-               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_FALSE, EINA_FALSE);
+               elm_naviframe_item_title_enabled_set(ad->ctrlinfo.nf_it, EINA_TRUE, EINA_TRUE);
 
                return noc;
        } else {
index c650fea..65777e5 100644 (file)
@@ -343,22 +343,6 @@ int _gl_thumbs_sel_create_view(void *data, gl_cluster *album_item)
        return 0;
 }
 
-int _gl_thumbs_sel_pop_view(void *data, bool b_pop)
-{
-       GL_CHECK_VAL(data, -1);
-       gl_appdata *ad = (gl_appdata *)data;
-
-       if (b_pop) {
-               /* Pop naviframe item*/
-               elm_naviframe_item_pop(ad->maininfo.naviframe);
-       }
-       /* Reset view mode */
-       gl_set_view_mode(data, GL_VIEW_ALBUMS_SELECT);
-       /* Update view */
-       _gl_albums_sel_update_view(data);
-       return 0;
-}
-
 int _gl_thumbs_sel_update_lang(void *data)
 {
        GL_CHECK_VAL(data, -1);