_CHECK(m->eoBase = m->pLayoutMgr->Base())
_CHECK(m->eoWin = m->pViewMgr->Window())
_CHECK(layout = elm_layout_add(m->eoBase))
- _CHECK(elm_layout_file_set(layout, EDJEFILE, FB_BASE_LAYOUT))
+ _CHECK(elm_layout_file_set(layout, EDJEFILE, FB_ALL_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{ elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout); }
_CHECK(CBaseLayout::Create(layout))
#include "dbg.h"
#include <MediaContentDbListener.h>
#include <UsbConnectionListener.h>
-#include "SortName.h"
#include "Popup.h"
#include "InputHandler.h"
CLayoutMgr *pLayoutMgr;
CFbAllLayout *pFbAllLayout;
+#if 0
+ CBaseLayout *pCurrentLayout;
+ CFbPhotoLayout *pFbPhotoLayout;
+ CFbMusicLayout *pFbMusicLayout;
+ CFbVideoLayout *pFbVideoLayout;
+#endif
SFbBaseView() {
int a;
else if (!strcmp(ev->keyname, KEY_ENTER)) {
if (elm_object_focus_get(m->eoSelectedBtnGroup)) {
m->pFbAllLayout->SetFocus(EINA_TRUE);
+ // TODO: Each layout SetFocus???
}
}
}
switch (instance->Type()) {
case CCtxPopup::TOPBTN_SORT:
elm_object_text_set(m->eoBtnSort, text);
+#if 1
m->pFbAllLayout->Update(true);
+#else
+ m->pCurrentLayout->Update(true);
+#endif
break;
case CCtxPopup::TOPBTN_SOURCE:
elm_object_text_set(m->eoBtnSource, text);
+#if 1
m->pFbAllLayout->Update(false);
+#else
+ m->pCurrentLayout->Update(true);
+#endif
break;
default:
m->eoSelectedBtnGroup = obj;
elm_object_signal_emit(m->eoSelectedBtnGroup, FBR_SIGNAL_GROUP_SELECTED, "");
+#if 1
m->pFbAllLayout->Update(false);
+ // TODO: not update, it should be "Show" as each layout
+#else
+ switch(id)
+ {
+ case E_GRP_ALL:
+ m->pFbAllLayout->Update(false);
+ break;
+ case E_GRP_PHOTO:
+ m->pFbPhotoLayout->Update(false);
+ break;
+ case E_GRP_VIDEO:
+ m->pFbVideoLayout->Update(false);
+ break;
+ case E_GRP_MUSIC:
+ m->pFbMusicLayout->Update(false);
+ break;
+ default:
+ _DBG("Fix it: it can not make it , MouseClicked");
+ break;
+
+ }
+#endif
}
} *pHandlerGroup[TOTAL_GROUP_BTNS];
};
elm_object_style_set(m->eoBtnGroup[i], FBR_STYLE_GROUPBTN);
elm_object_text_set(m->eoBtnGroup[i], _(btninfo[i].txt));
- m->pHandlerGroup[i]->Connect(m->eoBtnGroup[i]);
+ m->pHandlerGroup[i]->Connect(m->eoBtnGroup[i], i);
+
ic = elm_image_add(m->eoBtnGroup[i]);
if (!ic)
continue;
}
_CHECK(m->pLayoutMgr = new CLayoutMgr)
_CHECK(m->pLayoutMgr->Create(eoBase, NULL))
- _CHECK(m->pFbAllLayout = new CFbAllLayout(FB_BASE_LAYOUT))
+ _CHECK(m->pFbAllLayout = new CFbAllLayout(FB_ALL_LAYOUT))
_CHECK(m->pFbAllLayout->Create(m->pLayoutMgr, NULL))
_CHECK(m->pLayoutMgr->AddLayout(m->pFbAllLayout))
_CHECK(CUsbConnectionListener::Create())
// original create grid
- m->pLayoutMgr->Show(FB_BASE_LAYOUT);
+ m->pLayoutMgr->Show(FB_ALL_LAYOUT);
CInfo::SetSortType(0/*CSort::SORT_NAME_AZ*/);
evas_object_data_set(eoBase, BASE_VIEW_DATA, this);
t_CreateFullView();
#include <AppCommon.h>
#include "Mediadata.h"
#include "ExtNameInfo.h"
-#include "SortName.h"
+#include <Sort.h>
+#include <SortMgr.h>
#include "GengridItemClass.h"
#include "InputHandler.h"
#include "FileGrid.h"
else
m_GetFolderList();
}
- m->elFile = CSortName::Sort(m->elFile, (CSortName::ESort)CInfo::SortType());
+
+ const char* sortType;
+ switch(CInfo::SortType())
+ {
+ case 0:
+ sortType = SORT_BY_NAME_AZ;
+ break;
+ case 1:
+ sortType = SORT_BY_NAME_ZA;
+ break;
+ case 2:
+ sortType = SORT_BY_DATE_ASC;
+ break;
+ case 3:
+ sortType = SORT_BY_DATE_DES;
+ break;
+ case 4:
+ sortType = SORT_BY_SIZE_ASC;
+ break;
+ case 5:
+ sortType = SORT_BY_SIZE_DES;
+ break;
+ default:
+ _DBG("Fix your code : sortType is invalid");
+ sortType = SORT_BY_NAME_AZ;
+ break;
+ }
+ m->elFile = CSort::Sort(m->elFile, sortType);
t_Fill();
if (fid) // folder