From: shubham kumar Date: Fri, 4 Aug 2017 08:52:50 +0000 (+0530) Subject: Resolved issue with selection in edit view X-Git-Tag: submit/tizen/20170905.031838~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F142561%2F2;p=profile%2Fmobile%2Fapps%2Fnative%2Fmyfiles.git Resolved issue with selection in edit view Change-Id: I72fa0801de09b25e8498c3d90cfabed31b887896 Signed-off-by: shubham kumar --- diff --git a/src/widget/mf-edit-view.c b/src/widget/mf-edit-view.c index 2b87844..00ed8db 100644 --- a/src/widget/mf-edit-view.c +++ b/src/widget/mf-edit-view.c @@ -972,10 +972,13 @@ void mf_edit_view_list_update(void *data) } } } - elm_genlist_realized_items_update(ap->mf_MainWindow. pNaviGenlist); - edit_count = mf_search_list_count(); + if (ap->mf_Status.search_view) { + edit_count = mf_search_list_count(); + } else { + edit_count = elm_genlist_items_count(ap->mf_MainWindow.pNaviGenlist); + } selected_all = EINA_FALSE; } } else { @@ -1311,8 +1314,11 @@ void mf_edit_view_refresh(void *data, Eina_List ** file_list, it = elm_genlist_item_next_get(it); } } - edit_count = - mf_search_list_count(); + if (ap->mf_Status.search_view) { + edit_count = mf_search_list_count(); + } else { + edit_count = elm_genlist_items_count(ap->mf_MainWindow.pNaviGenlist); + } } else { Evas_Object *gengrid = ap->mf_MainWindow.pNaviGengrid;; mfItemData_s *itemData = NULL; @@ -1479,8 +1485,6 @@ void mf_edit_download_view_create(void *data) mf_navi_bar_title_content_set(ap, title); //mf_edit_view_title_btn_add(ap); mf_edit_view_title_button_set(ap); - - mf_navi_bar_set_ctrlbar_item_disable(ap->mf_MainWindow.pNaviItem, CTRL_DISABLE_EDIT_ALL, TRUE); MF_TRACE_END; diff --git a/src/widget/mf-search-bar.c b/src/widget/mf-search-bar.c index 98e1278..1319fe5 100644 --- a/src/widget/mf-search-bar.c +++ b/src/widget/mf-search-bar.c @@ -201,6 +201,7 @@ static void __mf_search_bar_item_sel(void *data, Evas_Object * obj, mfItemData_s *selected = (mfItemData_s *) elm_object_item_data_get(item); struct appdata *ap = (struct appdata *) selected->ap; + int view_style = mf_view_style_get(ap); mf_debug("ap->mf_Status.more = %d", ap->mf_Status.more); //fix P131209-00523 by wangyan,search -> longpress searched file-> back, highlight should be released ap->mf_Status.search_filter = NULL; @@ -219,8 +220,7 @@ static void __mf_search_bar_item_sel(void *data, Evas_Object * obj, || ap->mf_Status.more == MORE_EDIT_COPY || ap->mf_Status.more == MORE_EDIT_MOVE || ap->mf_Status.more == MORE_EDIT_DETAIL - || ap->mf_Status.more == MORE_EDIT_DELETE - || ap->mf_Status.more == MORE_SHARE_EDIT) { + || ap->mf_Status.more == MORE_EDIT_DELETE) { if (selected->file_type == FILE_TYPE_DIR) { mf_info("select type is DIR"); if (mf_edit_folder_list_item_exists(selected->item)) { @@ -254,6 +254,19 @@ static void __mf_search_bar_item_sel(void *data, Evas_Object * obj, mf_debug("detail callback"); mf_callback_details_cb(ap, NULL, NULL); } + if (view_style != MF_VIEW_STYLE_THUMBNAIL) { + elm_genlist_item_fields_update(selected->item, "elm.icon.2", + ELM_GENLIST_ITEM_FIELD_CONTENT); + } else { + if (selected->pCheckBox) { + selected->m_checked = + !(elm_check_state_get(selected->pCheckBox)); + elm_check_state_set(selected->pCheckBox, + selected->m_checked); + } + elm_gengrid_item_selected_set(selected->item, + selected->m_checked); + } } else { __mf_search_bar_click_item(selected); }