Implemented details view according to new guideline 31/244231/1 submit/tizen/20200916.111443
authoraman.jeph <aman.jeph@samsung.com>
Wed, 16 Sep 2020 06:45:46 +0000 (12:15 +0530)
committeraman.jeph <aman.jeph@samsung.com>
Wed, 16 Sep 2020 06:45:46 +0000 (12:15 +0530)
Change-Id: If8706137b75309e89c03cffaf0567adf36c47c84
Signed-off-by: aman.jeph <aman.jeph@samsung.com>
common/src/vp-util.c
playview/src/feature/vp-detail.c
playview/src/view/vp-play-normal-view.c
vp-main/res/edje/custom/pv-custom-layout.edc
vp-main/res/po/en.po
vp-main/res/po/en_PH.po
vp-main/res/po/en_US.po

index aa8f99cb5ab25f89ad281f20f29851adb043ddaf..aa343ad31b480770ad3d128310e4b1d6222626d5 100755 (executable)
@@ -22,7 +22,7 @@
 
 #define CLOUD_FOLDER                   "/opt/usr/media/.cloud"
 
-#define OTG_FOLDER                     "/opt/storage/usb"
+#define OTG_FOLDER                     "/opt/media/USBDrive" // as usb are mount to /opt/media/USBDriveXX
 #define PERSONAL_PAGE_FOLDER           "/opt/storage/PersonalStorage"
 #define PKGNAME                        "videos"
 
@@ -146,7 +146,8 @@ static char *__vp_util_get_logic_path(const char *full_path)
                root_len = strlen(MEMORY_FOLDER);
                break;
        case VP_STORAGE_OTG:
-               root_len = strlen(OTG_FOLDER);
+                // as usb is mount on /opt/media/USBDriveXX ..we need to increase size by 2 to compensate for Drive letter like A1, B1 etc
+               root_len = strlen(OTG_FOLDER)+2;
                break;
        case VP_STORAGE_PERSONAL_PAGE:
                root_len = strlen(PERSONAL_PAGE_FOLDER);
index 51bd13e9ee44be0268fe92ada86488eb4da2e814..a38804820762d34239d824846e49b58d9030d0ef 100755 (executable)
@@ -74,7 +74,16 @@ static void _vp_detail_destroy_handle();
 static void __vp_detail_genlist_realized(void *data, Evas_Object * obj,
                                                                                 void *event_info)
 {
-       VP_GENLIST_HIDE_BOTTOMLINE(data, obj, event_info);
+       Elm_Widget_Item *item = (Elm_Widget_Item *)event_info;
+       if(elm_genlist_first_item_get(obj) == item)
+       {
+               elm_object_item_signal_emit(item, "elm,state,group,top", "elm");
+       }
+       else if(elm_genlist_last_item_get(obj) == item)
+       {
+               elm_object_item_signal_emit(item, "elm,state,group,bottom", "elm");
+               elm_object_item_signal_emit(item, "elm,state,bottomline,hide", "elm");
+       }
 }
 
 /**
@@ -84,9 +93,7 @@ static void __vp_detail_genlist_realized(void *data, Evas_Object * obj,
  * @param pPart
  * @return
  */
-static char *__vp_detail_genlist_text_get_cb(const void *pUserData,
-                                                                                        Evas_Object * pObj,
-                                                                                        const char *pPart)
+static char *__vp_detail_genlist_text_get_cb(void *pUserData, Evas_Object * pObj, const char *pPart)
 {
        if (pUserData == NULL) {
                VideoLogError("pUserData is NULL");
@@ -97,9 +104,9 @@ static char *__vp_detail_genlist_text_get_cb(const void *pUserData,
 
        VideoLogWarning("%s : %s", pPart, szTxt);
 
-       if (!strcmp(pPart, "elm.text")) {
+       if (!strcmp(pPart, "elm.text.sub")) {
                return strdup(szTxt);
-       } else if (!strcmp(pPart, "elm.text.sub")) {
+       } else if (!strcmp(pPart, "elm.text")) {
 
                DetailView *pDetailPopup =
                        (DetailView *) evas_object_data_get(pObj,
@@ -259,9 +266,8 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
        }
 
        pDetailPopup->st_Detail_Itc->version = ELM_GENLIST_ITEM_CLASS_VERSION;
-       pDetailPopup->st_Detail_Itc->item_style = "type1";
-       pDetailPopup->st_Detail_Itc->func.text_get =
-               (void *) __vp_detail_genlist_text_get_cb;
+       pDetailPopup->st_Detail_Itc->item_style = "2line_reversed";
+       pDetailPopup->st_Detail_Itc->func.text_get =  __vp_detail_genlist_text_get_cb;
        pDetailPopup->st_Detail_Itc->func.content_get = NULL;
        pDetailPopup->st_Detail_Itc->func.state_get = NULL;
        pDetailPopup->st_Detail_Itc->func.del = NULL;
@@ -273,8 +279,7 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
                                                                (void *) VP_PLAY_STRING_DETAIL_TITLE,
                                                                NULL, ELM_GENLIST_ITEM_NONE, NULL,
                                                                (void *) pDetailPopup);
-       elm_genlist_item_select_mode_set(pItem,
-                                                                        ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        item_cnt++;
 
        pItem =
@@ -282,11 +287,10 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
                                                                (void *) VP_PLAY_STRING_DETAIL_SIZE, NULL,
                                                                ELM_GENLIST_ITEM_NONE, NULL,
                                                                (void *) pDetailPopup);
-       elm_genlist_item_select_mode_set(pItem,
-                                                                        ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        item_cnt++;
 
-       if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
+        /* if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
                pItem =
                        elm_genlist_item_append(pObj, pDetailPopup->st_Detail_Itc,
                                                                        (void *) VP_PLAY_STRING_DETAIL_FORMAT,
@@ -295,7 +299,7 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
                elm_genlist_item_select_mode_set(pItem,
                                                                                 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                item_cnt++;
-       }
+       } */
 
 
        if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
@@ -305,8 +309,7 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
                                                                        VP_PLAY_STRING_DETAIL_RESOLUTION,
                                                                        NULL, ELM_GENLIST_ITEM_NONE, NULL,
                                                                        (void *) pDetailPopup);
-               elm_genlist_item_select_mode_set(pItem,
-                                                                                ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                item_cnt++;
        }
 
@@ -315,8 +318,7 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
                                                                VP_PLAY_STRING_DETAIL_LAST_MODIFIED, NULL,
                                                                ELM_GENLIST_ITEM_NONE, NULL,
                                                                (void *) pDetailPopup);
-       elm_genlist_item_select_mode_set(pItem,
-                                                                        ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+       elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        item_cnt++;
 
        if (pDetailPopup->pDetailInfo->bPlayready == FALSE) {
@@ -326,8 +328,7 @@ static bool _vp_detail_add_genlist_item(Evas_Object * pObj,
                                                                        VP_PLAY_STRING_DETAIL_LOCATION, NULL,
                                                                        ELM_GENLIST_ITEM_NONE, NULL,
                                                                        (void *) pDetailPopup);
-               elm_genlist_item_select_mode_set(pItem,
-                                                                                ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+               elm_genlist_item_select_mode_set(pItem, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
                item_cnt++;
 
        }
index c05f515768a88998102da6b10a0fda9c6a345bab..6435f2ee259a032a13e9c056c50cf61ade6eabce 100755 (executable)
@@ -10929,18 +10929,17 @@ static void _vp_play_normal_view_on_detail_popup(NormalView * pNormalView)
                                                                                   &dLongitude, &szModifiedTime);
                if (szTitle) {
                        pDetailInfo->szTitle =
-                               vp_play_util_get_title_from_path(szTitle);
+                               vp_play_util_get_filename_from_path(szTitle);
                } else {
                        pDetailInfo->szTitle =
-                               vp_play_util_get_title_from_path(pNormalView->szMediaURL);
+                               vp_play_util_get_filename_from_path(pNormalView->szMediaURL);
                }
 
                if (nWidth == 0) {
                        vp_media_metadata_get_width(pNormalView->szMediaURL, &nWidth);
                }
                if (nHeight == 0) {
-                       vp_media_metadata_get_height(pNormalView->szMediaURL,
-                                                                                &nHeight);
+                       vp_media_metadata_get_height(pNormalView->szMediaURL, &nHeight);
                }
        } else {
                pDetailInfo->szTitle =
@@ -10986,7 +10985,6 @@ static void _vp_play_normal_view_on_detail_popup(NormalView * pNormalView)
                VP_FREE(pDetailInfo->szLatitude);
                VP_FREE(pDetailInfo->szLongitude);
                VP_FREE(pDetailInfo->szLocation);
-               VP_FREE(pDetailInfo->szLastModified);
                VP_FREE(pDetailInfo);
                return;
        }
index 6622704d0091fbba585cc461f7f006b39e5586ae..5dc4030fee907c53a29dc78188d317b93ce2cc1e 100755 (executable)
 group {
        name: "elm/layout/application/detail_view";
        parts {
+               part { name: "base";
+                       type: SPACER;
+                       scale: 1;
+                       description { state: "default" 0.0;
+                       }
+               }
                part {
                        name: "elm.swallow.bg";
                        type: SWALLOW;
@@ -85,6 +91,38 @@ group {
                                color: 0 0 0 255;
                        }
                }
+               part { name: "left_padding";
+                       type: SPACER;
+                       scale: 1;
+                       description { state: "default" 0.0;
+                               min: 40 0;
+                               max: 40 -1;
+                               fixed: 1 0;
+                               align: 0.0 0.0;
+                               rel1 {
+                                       to: "base"; relative: 0.0 0.0;
+                               }
+                               rel2 {
+                                       to: "base"; relative: 0.0 1.0;
+                               }
+                       }
+               }
+               part { name: "right_padding";
+                       type: SPACER;
+                       scale: 1;
+                       description { state: "default" 0.0;
+                               min: 40 0;
+                               max: 40 -1;
+                               fixed: 1 0;
+                               align: 1.0 0.0;
+                               rel1 {
+                                       to: "base"; relative: 1.0 0.0;
+                               }
+                               rel2 {
+                                       to: "base"; relative: 1.0 1.0;
+                               }
+                       }
+               }
                part {
                        name: "elm.swallow.event";
                        type: SWALLOW;
@@ -92,8 +130,8 @@ group {
                        scale: 1;
                        description {
                                state: "default" 0.0;
-                               rel1 { relative: 0.0 0.0; }
-                               rel2 { relative: 1.0 1.0; }
+                               rel1 { to: "left_padding"; relative: 1.0 0.0; }
+                               rel2 { to: "right_padding"; relative: 0.0 1.0; }
                        }
                }
                part {
@@ -103,6 +141,8 @@ group {
                        scale: 1;
                        description {
                                state: "default" 0.0;
+                               rel1 { to: "left_padding"; relative: 1.0 0.0; }
+                               rel2 { to: "right_padding"; relative: 0.0 1.0; }
                        }
                }
        } /* parts */
index fd491f8b40d8157f81918b07f29c2ae735db5ed3..79bd999d650c4ef220cd3b200c50d4fcf8e7d35e 100755 (executable)
@@ -17,7 +17,7 @@ msgid "IDS_VIDEO_BODY_KB"
 msgstr "KB"
 
 msgid "IDS_VIDEO_BODY_LOCATION"
-msgstr "Location"
+msgstr "Path"
 
 msgid "IDS_VIDEO_BODY_MB"
 msgstr "MB"
@@ -47,7 +47,7 @@ msgid "IDS_VIDEO_OPT_DETAILS"
 msgstr "Details"
 
 msgid "IDS_VIDEO_OPT_TITLE"
-msgstr "Title"
+msgstr "File Name"
 
 msgid "IDS_VIDEO_POP_THIS_VIDEO_WILL_BE_DELETED"
 msgstr "This video will be deleted."
index f7ba7db979cf041532df1dac5b5c4afeb89ef665..54780f1f3c50541b6fc1a58ff18d39b4146304a1 100755 (executable)
@@ -17,7 +17,7 @@ msgid "IDS_VIDEO_BODY_KB"
 msgstr "KB"
 
 msgid "IDS_VIDEO_BODY_LOCATION"
-msgstr "Location"
+msgstr "Path"
 
 msgid "IDS_VIDEO_BODY_MB"
 msgstr "MB"
@@ -47,7 +47,7 @@ msgid "IDS_VIDEO_OPT_DETAILS"
 msgstr "Details"
 
 msgid "IDS_VIDEO_OPT_TITLE"
-msgstr "Title"
+msgstr "File Name"
 
 msgid "IDS_VIDEO_POP_THIS_VIDEO_WILL_BE_DELETED"
 msgstr "This video will be deleted."
index 57605daf460cf1074ba13dfeff365431de548d6d..df1516eb73621c7bbed273404159a3262374cf94 100755 (executable)
@@ -17,7 +17,7 @@ msgid "IDS_VIDEO_BODY_KB"
 msgstr "KB"
 
 msgid "IDS_VIDEO_BODY_LOCATION"
-msgstr "Location"
+msgstr "Path"
 
 msgid "IDS_VIDEO_BODY_MB"
 msgstr "MB"
@@ -47,7 +47,7 @@ msgid "IDS_VIDEO_OPT_DETAILS"
 msgstr "Details"
 
 msgid "IDS_VIDEO_OPT_TITLE"
-msgstr "Title"
+msgstr "File Name"
 
 msgid "IDS_VIDEO_POP_THIS_VIDEO_WILL_BE_DELETED"
 msgstr "This video will be deleted."