Fixed Music Chooser Select ALL functionality 50/70550/2 accepted/tizen/mobile/20160520.004725 submit/tizen_mobile/20160519.153134
authorbhutani.92 <bhutani.92@samsung.com>
Thu, 19 May 2016 11:03:53 +0000 (16:33 +0530)
committerbhutani.92 <bhutani.92@samsung.com>
Thu, 19 May 2016 11:26:11 +0000 (16:56 +0530)
Change-Id: Ib2c18aebe480ea476c7dc70f2c75fc05792871e6
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
music-chooser/src/mc-library-view.c
music-chooser/src/mc-track-list.c

index c448daf6dc0d3b7bd92cc3311387eaa652a6d11c..08f4e53c1dcfe25b2c224923457f91ea4b2853e8 100644 (file)
@@ -54,6 +54,7 @@ static void _all_cb(void *data, Evas_Object *obj, void *event_info)
        startfunc;
        struct app_data *ad = data;
        MP_CHECK(ad);
+       mc_common_obj_domain_text_translate(ad->navi_bar, mc_create_selectioninfo_text_with_count(0));
        Evas_Object *sub_view;
        if (detail_view) {
                elm_naviframe_item_pop(ad->navi_bar);
@@ -84,6 +85,7 @@ static void _playlist_cb(void *data, Evas_Object *obj, void *event_info)
        startfunc;
        struct app_data *ad = data;
        MP_CHECK(ad);
+       mc_common_obj_domain_text_translate(ad->navi_bar, mc_create_selectioninfo_text_with_count(0));
        Evas_Object *sub_view;
        if (detail_view) {
                elm_naviframe_item_pop(ad->navi_bar);
@@ -114,6 +116,7 @@ static void _artist_cb(void *data, Evas_Object *obj, void *event_info)
        startfunc;
        struct app_data *ad = data;
        MP_CHECK(ad);
+       mc_common_obj_domain_text_translate(ad->navi_bar, mc_create_selectioninfo_text_with_count(0));
        Evas_Object *sub_view;
        if (detail_view) {
                elm_naviframe_item_pop(ad->navi_bar);
@@ -142,6 +145,7 @@ static void _album_cb(void *data, Evas_Object *obj, void *event_info)
        startfunc;
        struct app_data *ad = data;
        MP_CHECK(ad);
+       mc_common_obj_domain_text_translate(ad->navi_bar, mc_create_selectioninfo_text_with_count(0));
        Evas_Object *sub_view;
        if (detail_view) {
                elm_naviframe_item_pop(ad->navi_bar);
index 162ff39d5cfdcb331fade4d42a0c74cc7ce4607c..7a7f8ef99266ced9fb8ff5dd2c3d5b1f3f27338c 100755 (executable)
@@ -854,7 +854,10 @@ void _mc_track_list_select_all_selected_item_data_get(void *data, Evas_Object *o
        while (item) {
                list_item_data_t *it_data = elm_object_item_data_get(item);
                it_data->checked = all_selected;
-               elm_genlist_item_fields_update(item, "elm.swallow.end", ELM_GENLIST_ITEM_FIELD_CONTENT);
+               Evas_Object *chk = elm_object_item_part_content_get(item, "elm.swallow.end");
+               if (chk) {
+                       elm_check_state_set(chk, all_selected);
+               }
                item = elm_genlist_item_next_get(item);
        }
 
@@ -882,26 +885,10 @@ void _mc_track_list_select_cb(void *data, Evas_Object *obj, void *event_info)
        item = elm_genlist_first_item_get(ld->genlist);
        Evas_Object *check = elm_object_item_part_content_get(item, "elm.swallow.end");
        Eina_Bool state = elm_check_state_get(check);
-       if (state == EINA_FALSE && ld->ad->max_count <= 0) {
+       if (ld->ad->max_count <= 0) {
                elm_check_state_set(check, !state);
        }
 
-       if ((ld->ad->limitsize > 0) && (_get_total_size(ld) > ld->ad->limitsize)) {
-               char *name = g_strdup(GET_STR(STR_MC_MAX_SIZE_EXCEEDED));
-               mc_post_status_message(name);
-               IF_FREE(name);
-               WARN_TRACE("Exceeded max size by caller");
-               return;
-       }
-
-       if ((ld->ad->max_count > 0) && (_get_media_list_count(ld) > ld->ad->max_count)) {
-               char *name = g_strdup_printf(GET_STR(STR_MC_MAX_COUNT_EXCEEDED), ld->ad->max_count);
-               mc_post_status_message(name);
-               IF_FREE(name);
-               WARN_TRACE("Exceeded max count by caller");
-               return;
-       }
-
        _mc_track_list_select_all_selected_item_data_get(data, obj, event_info);
 
        endfunc;