From: Ravi Kiran K N Date: Mon, 17 Oct 2016 08:54:22 +0000 (+0530) Subject: [TSAM-8979] Fix context menu order X-Git-Tag: submit/tizen_3.0/20161028.062323~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F92530%2F1;p=profile%2Fmobile%2Fapps%2Fnative%2Fvideo-player.git [TSAM-8979] Fix context menu order Reorder the context menu list according to UI spec Change-Id: I40023e7f4ab83b86e1acd4215bdfb89761fe0edf Signed-off-by: Ravi Kiran K N --- diff --git a/src/view/mp-video-list-view-item-of-folder.c b/src/view/mp-video-list-view-item-of-folder.c index f6a2d24..c8a88f5 100644 --- a/src/view/mp-video-list-view-item-of-folder.c +++ b/src/view/mp-video-list-view-item-of-folder.c @@ -1223,6 +1223,23 @@ static void __mp_folder_item_view_sort_item_cb(void *pUserData, Evas_Object *pOb mp_sort_ctrl_show(__mp_folder_item_view_db_result_data_update_cb); } + +void __mp_folder_item_view_auto_play_cb(void *pUserData, Evas_Object *pObject, + void *pEventInfo) +{ + + mp_ft_ctrl_hide_more_popup(); + + MpFooterLibraryMainListTabType footerTabType = + (MpFooterLibraryMainListTabType) pUserData; + if (FOOTER_TAB_TYPE_PERSONAL == footerTabType) { + mp_auto_play_ctrl_show(); + } else { + VideoLogError("invalid footer type"); + } +} + + void __mp_folder_item_view_rename_cb(void *pUserData, Evas_Object *pObject, void *pEventInfo) { if (!g_pFolderViewHandle) @@ -1778,6 +1795,7 @@ void mp_folder_item_view_check_more_button_of_toolbar(void) pRegisteCbFunc->DeleteCb = (void*)__mp_folder_item_view_delete_cb; pRegisteCbFunc->SortItemCb = (void*)__mp_folder_item_view_sort_item_cb; pRegisteCbFunc->RenameCb = (void*)__mp_folder_item_view_rename_cb; + pRegisteCbFunc->AutoPlayCb = (void*)__mp_folder_item_view_auto_play_cb; // pRegisteCbFunc->DetailsCb= (void*)__mp_folder_item_view_details_cb; #ifdef ENABLE_PRIVATE_MODE pRegisteCbFunc->AddToPersonalCB = (void*)__mp_folder_item_view_add_personal_cb; diff --git a/src/view/mp-video-list-view-main.c b/src/view/mp-video-list-view-main.c index 1ac0829..d805935 100644 --- a/src/view/mp-video-list-view-main.c +++ b/src/view/mp-video-list-view-main.c @@ -394,7 +394,6 @@ void mp_list_view_check_more_button_of_toolbar(void) (void *) mp_list_view_search_item_cb; pRegisteCbFunc->DeleteCb = (void *) mp_list_view_delete_cb; pRegisteCbFunc->ViewAsCb = (void *) mp_list_view_view_as_cb; - pRegisteCbFunc->AutoPlayCb = (void *) mp_list_view_auto_play_cb; if (mp_view_as_ctrl_get_type() != MP_LIST_VIEW_AS_FOLDER_LIST) { pRegisteCbFunc->SortItemCb = (void *) mp_list_view_sort_item_cb; @@ -403,6 +402,8 @@ void mp_list_view_check_more_button_of_toolbar(void) /*pRegisteCbFunc->DetailsCb= (void*)mp_list_view_details_cb;*/ pRegisteCbFunc->ShareViaCb = (void *) mp_list_view_share_via_cb; + pRegisteCbFunc->AutoPlayCb = + (void *) mp_list_view_auto_play_cb; } pRegisteCbFunc->SignInCb = (void *) mp_list_view_sign_in_cb; diff --git a/src/widget/mp-footer-toolbar.c b/src/widget/mp-footer-toolbar.c index 2922234..b485fce 100644 --- a/src/widget/mp-footer-toolbar.c +++ b/src/widget/mp-footer-toolbar.c @@ -272,6 +272,17 @@ void mp_ft_ctrl_create_more_btn_of_personal(void *pUserData, EINA_TRUE); nItemCount++; } + if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.DeleteCb) { + item = + elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup, + VIDEOS_CTXPOP_MENU_DELETE_IDS, NULL, + g_pToolbarWidget->ToolbarCbFunc. + DeleteCb, + (void *) FOOTER_TAB_TYPE_PERSONAL); + elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING, + EINA_TRUE); + nItemCount++; + } if (g_pToolbarWidget->ToolbarCbFunc.ShareViaCb) { item = elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup, @@ -282,23 +293,23 @@ void mp_ft_ctrl_create_more_btn_of_personal(void *pUserData, EINA_TRUE); nItemCount++; } - if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.DeleteCb) { + if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.ViewAsCb) { item = elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup, - VIDEOS_CTXPOP_MENU_DELETE_IDS, NULL, + VIDEOS_CTXPOP_MENU_VIEW_AS_IDS, NULL, g_pToolbarWidget->ToolbarCbFunc. - DeleteCb, + ViewAsCb, (void *) FOOTER_TAB_TYPE_PERSONAL); elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING, EINA_TRUE); nItemCount++; } - if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.ViewAsCb) { + if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.SortItemCb) { item = elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup, - VIDEOS_CTXPOP_MENU_VIEW_AS_IDS, NULL, + VIDEOS_CTXPOP_MENU_SORT_BY_IDS, NULL, g_pToolbarWidget->ToolbarCbFunc. - ViewAsCb, + SortItemCb, (void *) FOOTER_TAB_TYPE_PERSONAL); elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING, EINA_TRUE); @@ -315,17 +326,6 @@ void mp_ft_ctrl_create_more_btn_of_personal(void *pUserData, EINA_TRUE); nItemCount++; } - if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.SortItemCb) { - item = - elm_ctxpopup_item_append(g_pToolbarWidget->pMoreCtxPopup, - VIDEOS_CTXPOP_MENU_SORT_BY_IDS, NULL, - g_pToolbarWidget->ToolbarCbFunc. - SortItemCb, - (void *) FOOTER_TAB_TYPE_PERSONAL); - elm_object_item_domain_text_translatable_set(item, VIDEOS_STRING, - EINA_TRUE); - nItemCount++; - } if (nVideoListSize > 0 && g_pToolbarWidget->ToolbarCbFunc.RenameCb) { item =