Fix UI issue / Launch issue / Mediadata issue 05/35505/1 master
authorJuWan Kim <juwan.kim@samsung.com>
Tue, 17 Feb 2015 01:51:09 +0000 (10:51 +0900)
committerJuWan Kim <juwan.kim@samsung.com>
Tue, 17 Feb 2015 01:51:09 +0000 (10:51 +0900)
Change-Id: I166f5b08115e36eaccefc6bfba638faedf54ee6e
Signed-off-by: JuWan Kim <juwan.kim@samsung.com>
include/define.h
res/edc/views/base-layout.edc
res/edc/widgets/button.edc
res/edc/widgets/gengrid.edc
src/data/FileInfo.cpp
src/data/MediadataImpl.cpp
src/layouts/FbAllLayout.cpp
src/main.cpp
src/views/BaseView/FbBaseView.cpp
src/views/BaseView/FileGrid.cpp

index 1bc938d..3a09f3f 100644 (file)
 
 /* KEY DEFINES */
 #define KEY_ENTER "Return"
-#define KEY_EXIT  "XF86Close"
-#define KEY_BACK  "XF86Stop"
-#define KEY_MENU  "XF86Send"
+#define KEY_EXIT  "Exit"
+#define KEY_BACK  "Escape"
+#define KEY_MENU  "Super_L"
 
 /* CTXPOPUP POSITION */
 #define POSITION_SORT_POPUP_X 1344
index 71fda16..f8b68a9 100644 (file)
@@ -1,5 +1,5 @@
 group {
-       name: FB_BASE_LAYOUT;
+       name: FB_ALL_LAYOUT;
        parts {
                part {
                        name: "bg";
index aed31bb..3105c06 100644 (file)
@@ -3,6 +3,7 @@
 
 group {
        name: "elm/button/base/fbr_hover_entry";
+       data.item: "focus_highlight" "on";
        images {
                image: FBR_IMAGE_TICK COMP;
        }
@@ -269,6 +270,7 @@ group {
 
 group {
        name: "elm/button/base/fbr_sourcebtn";
+       data.item: "focus_highlight" "on";
        images {
                image: FBR_IMAGE_PULLDOWN_ARROW COMP;
                image: FBR_IMAGE_ROUND_ICON COMP;
@@ -613,6 +615,7 @@ group {
 
 group {
        name: "elm/button/base/fbr_menubtn";
+       data.item: "focus_highlight" "on";
        images {
                image: FBR_GROUPBTN_BG COMP;
        }
index 7c22131..eb1c290 100644 (file)
@@ -3,6 +3,7 @@ group {
        data.item: "selectraise" "on";
        data.item: "texts" "elm.text elm.text1";
        data.item: "contents" "elm.swallow.icon elm.swallow.icon1";
+       data.item: "focus_highlight" "on";
        parts {
                part {
                        name: "bg_with_border";
index 155f567..b50a98c 100644 (file)
@@ -158,10 +158,13 @@ bool CFileInfo::Load(void)
                if(str == NULL)
                {
                        _ERR("Fail to get string by media_info_get_thumbnail_path");
-                       break;
+                       //break;
+               }
+               else
+               {
+                       SetThumbnailPath(str);
+                       free(str);
                }
-               SetThumbnailPath(str);
-               free(str);
 
                TTime time;
                if (media_info_get_modified_time(m->handle, &time) != MEDIA_CONTENT_ERROR_NONE) {
index 5305e92..1539e2c 100644 (file)
@@ -183,11 +183,11 @@ bool CMediadataImpl::m_GetMediaList(const char *folderid)
 void CMediadataImpl::m_GetFolderList(void)
 {
        int r;
-       _DBG("this: 0x%x", this);
+       _DBG("START: this: 0x%x", this);
        r = media_folder_foreach_folder_from_db(m->filter, sm_CbFolderInfo, this);
-       _DBG("");
        if (r != MEDIA_CONTENT_ERROR_NONE)
                _ERR("Media folder foreach folder from db failed");
+       _DBG("END");
 }
 
 void CMediadataImpl::m_UpdateFolderLists(void)
@@ -197,6 +197,7 @@ void CMediadataImpl::m_UpdateFolderLists(void)
        RemoveAll();
 
        for (type = E_GRP_ALL; type <= E_GRP_MUSIC; type++) {
+               _DBG("==================================================");
                m->media_type = type;
 
                bool r = m_CreateFilter(m->source_type, m->media_type);
@@ -209,6 +210,7 @@ void CMediadataImpl::m_UpdateFolderLists(void)
 
                m_DestroyFilter(m->filter);
                m->filter = NULL;
+               _DBG("==================================================");
        }
 }
 
@@ -270,7 +272,6 @@ bool CMediadataImpl::GetMediaList(const char* folderid, int media_type, int sour
                return false;
        }
 
-       // Æ¯Á¤ Æú´õ ³»¿¡ Àִ ÆÄÀϵéÀ» »Ì¾Æ m->filelist¿¡ ³ÖÀ½.
        r = m_GetMediaList(folderid);
 
        m_DestroyFilter(m->filter);
index 0db2b59..773ad04 100644 (file)
@@ -116,7 +116,7 @@ void CFbAllLayout::t_OnShow(void)
 {
        _DBG();
 
-       m->pFileGrid->Update(false);
+//m->pFileGrid->Update(false);
 //     CBaseLayout::t_OnShow();
        return;
 }
index c12e309..2cfa360 100644 (file)
@@ -31,6 +31,8 @@
 #include <ExtNameInfo.h>
 #include "FbContextView.h"
 
+#include <SortMgr.h>
+
 #define PARAM_SOURCE "source"
 #define FBR_WIN_TITLE "File Browser"
 
@@ -38,7 +40,8 @@ Evas_Object *_add_win(const char *name)
 {
        Evas_Object *win;
 
-       win = elm_win_add(NULL, name, ELM_WIN_BASIC);
+       //win = elm_win_add(NULL, name, ELM_WIN_BASIC);
+       win = elm_win_util_standard_add(name, NULL);
        if (!win)
                return NULL;
 
@@ -110,6 +113,8 @@ protected:
                        ad.source = strdup("all");
                }
 
+               CSortMgr::Initialize();
+
                CViewMgr::Initialize(ad.win,NULL);
                viewmgr = CViewMgr::GetInstance();
                if(!viewmgr) {
index 53fcecb..1fde9b6 100644 (file)
@@ -94,9 +94,9 @@ struct SFbBaseView {
 
        char*          *pCurrentLayoutId;
        CFbAllLayout   *pFbAllLayout;
-       CFbPhotoLayout *pFbPhotoLayout;
-       CFbMusicLayout *pFbMusicLayout;
-       CFbVideoLayout *pFbVideoLayout;
+       //CFbPhotoLayout *pFbPhotoLayout;
+       //CFbMusicLayout *pFbMusicLayout;
+       //CFbVideoLayout *pFbVideoLayout;
 
        SFbBaseView() {
                int a;
@@ -541,17 +541,17 @@ bool CFbBaseView::Create(void *data)
                _CHECK(m->pLayoutMgr = new CLayoutMgr)
                _CHECK(m->pLayoutMgr->Create(eoBase, NULL))
                _CHECK(m->pFbAllLayout = new CFbAllLayout(FB_ALL_LAYOUT))
-               _CHECK(m->pFbPhotoLayout = new CFbPhotoLayout(FB_PHOTO_LAYOUT))
-               _CHECK(m->pFbVideoLayout = new CFbVideoLayout(FB_VIDEO_LAYOUT))
-               _CHECK(m->pFbMusicLayout = new CFbMusicLayout(FB_MUSIC_LAYOUT))
+               //_CHECK(m->pFbPhotoLayout = new CFbPhotoLayout(FB_PHOTO_LAYOUT))
+               //_CHECK(m->pFbVideoLayout = new CFbVideoLayout(FB_VIDEO_LAYOUT))
+               //_CHECK(m->pFbMusicLayout = new CFbMusicLayout(FB_MUSIC_LAYOUT))
                _CHECK(m->pFbAllLayout->Create(m->pLayoutMgr, NULL))
-               _CHECK(m->pFbPhotoLayout->Create(m->pLayoutMgr, NULL))
-               _CHECK(m->pFbVideoLayout->Create(m->pLayoutMgr, NULL))
-               _CHECK(m->pFbMusicLayout->Create(m->pLayoutMgr, NULL))
+               //_CHECK(m->pFbPhotoLayout->Create(m->pLayoutMgr, NULL))
+               //_CHECK(m->pFbVideoLayout->Create(m->pLayoutMgr, NULL))
+               //_CHECK(m->pFbMusicLayout->Create(m->pLayoutMgr, NULL))
                _CHECK(m->pLayoutMgr->AddLayout(m->pFbAllLayout))
-               _CHECK(m->pLayoutMgr->AddLayout(m->pFbPhotoLayout))
-               _CHECK(m->pLayoutMgr->AddLayout(m->pFbVideoLayout))
-               _CHECK(m->pLayoutMgr->AddLayout(m->pFbMusicLayout))
+               //_CHECK(m->pLayoutMgr->AddLayout(m->pFbPhotoLayout))
+               //_CHECK(m->pLayoutMgr->AddLayout(m->pFbVideoLayout))
+               //_CHECK(m->pLayoutMgr->AddLayout(m->pFbMusicLayout))
                _CHECK(CUsbConnectionListener::Create())
                _CHECK(CMediaContentDbUpdateListener::Create())
 
@@ -559,17 +559,17 @@ bool CFbBaseView::Create(void *data)
 
                _CHECK_FAIL{ CMediaContentDbUpdateListener::Destroy(); }
                _CHECK_FAIL{ CUsbConnectionListener::Destroy(); }
-               _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout); }
-               _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout); }
-               _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbPhotoLayout); }
+               //_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout); }
+               //_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout); }
+               //_CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbPhotoLayout); }
                _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbAllLayout); }
-               _CHECK_FAIL{ m->pFbMusicLayout->Destroy(); }
-               _CHECK_FAIL{ m->pFbVideoLayout->Destroy(); }
-               _CHECK_FAIL{ m->pFbPhotoLayout->Destroy(); }
+               //_CHECK_FAIL{ m->pFbMusicLayout->Destroy(); }
+               //_CHECK_FAIL{ m->pFbVideoLayout->Destroy(); }
+               //_CHECK_FAIL{ m->pFbPhotoLayout->Destroy(); }
                _CHECK_FAIL{ m->pFbAllLayout->Destroy(); }
-               _CHECK_FAIL{ delete m->pFbMusicLayout; m->pFbMusicLayout = NULL; }
-               _CHECK_FAIL{ delete m->pFbVideoLayout; m->pFbVideoLayout = NULL; }
-               _CHECK_FAIL{ delete m->pFbPhotoLayout; m->pFbPhotoLayout = NULL; }
+               //_CHECK_FAIL{ delete m->pFbMusicLayout; m->pFbMusicLayout = NULL; }
+               //_CHECK_FAIL{ delete m->pFbVideoLayout; m->pFbVideoLayout = NULL; }
+               //_CHECK_FAIL{ delete m->pFbPhotoLayout; m->pFbPhotoLayout = NULL; }
                _CHECK_FAIL{ delete m->pFbAllLayout; m->pFbAllLayout = NULL; }
                _CHECK_FAIL{ m->pLayoutMgr->Destroy(); }
                _CHECK_FAIL{ delete m->pLayoutMgr; m->pLayoutMgr = NULL; }
@@ -580,9 +580,9 @@ bool CFbBaseView::Create(void *data)
 
 
        // original create grid
-       m->pLayoutMgr->Show(FB_ALL_LAYOUT);
        CInfo::SetSortType(0/*CSort::SORT_NAME_AZ*/);
        evas_object_data_set(eoBase, BASE_VIEW_DATA, this);
+       m->pLayoutMgr->Show(FB_ALL_LAYOUT);
        t_CreateFullView();
        elm_object_focus_allow_set(eoBase, EINA_FALSE);
        m->pHandlerBase->Connect(eoBase);
@@ -598,6 +598,7 @@ void CFbBaseView::Destroy(void)
        CMediaContentDbUpdateListener::Destroy();
        CUsbConnectionListener::Destroy();
 
+#if 0
        m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout);
        m->pFbMusicLayout->Destroy();
        delete m->pFbMusicLayout;
@@ -609,6 +610,7 @@ void CFbBaseView::Destroy(void)
        m->pLayoutMgr->RemoveLayout(m->pFbPhotoLayout);
        m->pFbPhotoLayout->Destroy();
        delete m->pFbPhotoLayout;
+#endif
 
        m->pLayoutMgr->RemoveLayout(m->pFbAllLayout);
        m->pFbAllLayout->Destroy();
@@ -655,6 +657,7 @@ void CFbBaseView::OnConnect(void)
 
 void CFbBaseView::OnUpdated(const SEntity *entity)
 {
+       _DBG();
        m->pPopup->Destroy();
        delete m->pPopup;
        m->pPopup = NULL;
index 438e119..d331e4d 100644 (file)
@@ -125,6 +125,7 @@ void CFileGrid::sm_CbUnrealized(void *data, Evas_Object *obj, void *event_info)
 
 void CFileGrid::Action(void)
 {
+       _DBG();
        m->handle_itinfo = m->ctxt_itinfo;
        m_HandleSelection();
        m_DeleteContextView();
@@ -138,6 +139,7 @@ void CFileGrid::m_DeleteContextView(void)
 
 void CFileGrid::sm_CbSelectItem(void *data, Elm_Object_Item *it, const char *emission, const char *source)
 {
+       _DBG();
        CFileGrid* root = (CFileGrid*)data;
        SItemInfo *pItemInfo;
 
@@ -315,6 +317,9 @@ void CFileGrid::t_Update(char *fid, bool sort_flag)
                        sortType = SORT_BY_NAME_AZ;
                        break;
        }
+
+       //ASSERT(m->elFile);
+
        m->elFile = CSort::Sort(m->elFile, sortType);
        t_Fill();
 
@@ -433,9 +438,11 @@ Evas_Object* CFileGrid::Grid(void)
 
 
 void CFileGrid::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev) {
-       _DBG();
        Elm_Object_Item *it;
        SItemInfo *pItemInfo;
+       
+       if(ev->keyname)
+               _DBG("%s", ev->keyname);
 
        if (strcmp(ev->keyname, KEY_BACK) == 0) {
                if (m->depth == 0) {