* When ctxpopup is clicked, grid item is refreshed totally.
* But, the folder depth should be maintained
Change-Id: I763286575fc0ab23f7060a3df4d02a41e2fdbf77
Signed-off-by: JuWan Kim <juwan.kim@samsung.com>
static void sm_CbUpdatedGrid(void* cookie);
static void sm_CbUnsetFocus(void* cookie);
static void sm_CbLinkApp(void* cookie, int type, int source_type, char *path);
static void sm_CbUpdatedGrid(void* cookie);
static void sm_CbUnsetFocus(void* cookie);
static void sm_CbLinkApp(void* cookie, int type, int source_type, char *path);
bool t_CreateFileGrid(Evas_Object *layout);
void t_DestroyFileGrid(void);
bool t_CreateFileGrid(Evas_Object *layout);
void t_DestroyFileGrid(void);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
- void SetFocus(Eina_Bool flag);
+ void SetFocus(bool flag);
+ void SetUpdateFlag(bool flag);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
- void SetFocus(Eina_Bool flag);
+ void SetFocus(bool flag);
+ void SetUpdateFlag(bool flag);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
- void SetFocus(Eina_Bool flag);
+ void SetFocus(bool flag);
+ void SetUpdateFlag(bool flag);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
bool Create(CLayoutMgr *mgr, void *data);
virtual void Destroy(void);
- void SetFocus(Eina_Bool flag);
+ void SetFocus(bool flag);
+ void SetUpdateFlag(bool flag);
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
- m->pFileGrid->Update(false);
+ m->pFileGrid->Update(m->updateFlag);
+ m->updateFlag = false; // set default
CBaseLayout::t_OnShow();
}
CBaseLayout::t_OnShow();
}
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_ALL_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_ALL_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
-void CFbAllLayout::SetFocus(Eina_Bool flag)
+void CFbAllLayout::SetFocus(bool flag)
return m->pFileGrid->Action();
}
return m->pFileGrid->Action();
}
+
+
+void CFbAllLayout::SetUpdateFlag(bool flag)
+{
+ ASSERT(m);
+
+ m->updateFlag = flag;
+}
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
- m->pFileGrid->Update(false);
+ m->pFileGrid->Update(m->updateFlag);
+ m->updateFlag = false; // set default
CBaseLayout::t_OnShow();
}
CBaseLayout::t_OnShow();
}
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_MUSIC_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_MUSIC_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
-void CFbMusicLayout::SetFocus(Eina_Bool flag)
+void CFbMusicLayout::SetFocus(bool flag)
return m->pFileGrid->Action();
}
return m->pFileGrid->Action();
}
+
+
+void CFbMusicLayout::SetUpdateFlag(bool flag)
+{
+ ASSERT(m);
+
+ m->updateFlag = flag;
+}
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
- m->pFileGrid->Update(false);
+ m->pFileGrid->Update(m->updateFlag);
+ m->updateFlag = false; // set default
CBaseLayout::t_OnShow();
}
CBaseLayout::t_OnShow();
}
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_PHOTO_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_PHOTO_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
-void CFbPhotoLayout::SetFocus(Eina_Bool flag)
+void CFbPhotoLayout::SetFocus(bool flag)
return m->pFileGrid->Action();
}
return m->pFileGrid->Action();
}
+
+
+void CFbPhotoLayout::SetUpdateFlag(bool flag)
+{
+ ASSERT(m);
+
+ m->updateFlag = flag;
+}
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
CLayoutMgr *pLayoutMgr;
CViewMgr *pViewMgr;
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, Layout());
- m->pFileGrid->Update(false);
+ m->pFileGrid->Update(m->updateFlag);
+ m->updateFlag = false; // set default
CBaseLayout::t_OnShow();
}
CBaseLayout::t_OnShow();
}
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_VIDEO_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
_CHECK(elm_layout_file_set(layout, EDJEFILE, FB_VIDEO_LAYOUT))
_CHECK(t_CreateFileGrid(layout))
_COMMAND{
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
elm_object_part_content_unset(m->eoBase, FBR_PART_CONTENT);
elm_object_part_content_set(m->eoBase, FBR_PART_CONTENT, layout);
}
-void CFbVideoLayout::SetFocus(Eina_Bool flag)
+void CFbVideoLayout::SetFocus(bool flag)
return m->pFileGrid->Action();
}
return m->pFileGrid->Action();
}
+
+
+void CFbVideoLayout::SetUpdateFlag(bool flag)
+{
+ ASSERT(m);
+
+ m->updateFlag = flag;
+}
for (a = 0; a < TOTAL_GROUP_BTNS; a++)
delete pHandlerGroup[a];
}
for (a = 0; a < TOTAL_GROUP_BTNS; a++)
delete pHandlerGroup[a];
}
class CHandlerBase : public CListenerMgr, public IKeyDownListener {
SFbBaseView *m;
class CHandlerBase : public CListenerMgr, public IKeyDownListener {
SFbBaseView *m;
switch (instance->Type()) {
case CCtxPopup::TOPBTN_SORT:
elm_object_text_set(m->eoBtnSort, text);
switch (instance->Type()) {
case CCtxPopup::TOPBTN_SORT:
elm_object_text_set(m->eoBtnSort, text);
+ switch(m->curLayoutId)
+ {
+ case ALL_LAYOUT:
+ m->pFbAllLayout->SetUpdateFlag(true);
+ break;
+ case PHOTO_LAYOUT:
+ m->pFbPhotoLayout->SetUpdateFlag(true);
+ break;
+ case VIDEO_LAYOUT:
+ m->pFbVideoLayout->SetUpdateFlag(true);
+ break;
+ case MUSIC_LAYOUT:
+ m->pFbMusicLayout->SetUpdateFlag(true);
+ break;
+ }
m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
break;
case CCtxPopup::TOPBTN_SOURCE:
elm_object_text_set(m->eoBtnSource, text);
m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
break;
case CCtxPopup::TOPBTN_SOURCE:
elm_object_text_set(m->eoBtnSource, text);
+ switch(m->curLayoutId)
+ {
+ case ALL_LAYOUT:
+ m->pFbAllLayout->SetUpdateFlag(true);
+ break;
+ case PHOTO_LAYOUT:
+ m->pFbPhotoLayout->SetUpdateFlag(true);
+ break;
+ case VIDEO_LAYOUT:
+ m->pFbVideoLayout->SetUpdateFlag(true);
+ break;
+ case MUSIC_LAYOUT:
+ m->pFbMusicLayout->SetUpdateFlag(true);
+ break;
+ }
m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
break;
m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
break;
struct _btn_info btninfo[TOTAL_TOP_BTNS];
btninfo[TOPBTN_SOURCE].style = FBR_STYLE_SOURCE_BTN;
btninfo[TOPBTN_SOURCE].part = FBR_PART_SOURCE_HOVERSEL;
struct _btn_info btninfo[TOTAL_TOP_BTNS];
btninfo[TOPBTN_SOURCE].style = FBR_STYLE_SOURCE_BTN;
btninfo[TOPBTN_SOURCE].part = FBR_PART_SOURCE_HOVERSEL;
btninfo[TOPBTN_SORT].style = FBR_STYLE_SORT_BTN;
btninfo[TOPBTN_SORT].part = FBR_PART_SORT_HOVERSEL;
btninfo[TOPBTN_SORT].style = FBR_STYLE_SORT_BTN;
btninfo[TOPBTN_SORT].part = FBR_PART_SORT_HOVERSEL;
elm_box_pack_end(box, m->eoBtnGroup[i]);
elm_object_style_set(m->eoBtnGroup[i], FBR_STYLE_GROUPBTN);
elm_object_text_set(m->eoBtnGroup[i], _(btninfo[i].txt));
elm_box_pack_end(box, m->eoBtnGroup[i]);
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], i);
ic = elm_image_add(m->eoBtnGroup[i]);
m->pHandlerGroup[i]->Connect(m->eoBtnGroup[i], i);
ic = elm_image_add(m->eoBtnGroup[i]);
// original create grid
CInfo::SetSortType(0/*CSort::SORT_NAME_AZ*/);
evas_object_data_set(eoBase, BASE_VIEW_DATA, this);
// original create grid
CInfo::SetSortType(0/*CSort::SORT_NAME_AZ*/);
evas_object_data_set(eoBase, BASE_VIEW_DATA, this);
- m->curLayoutId = ALL_LAYOUT;
+ m->curLayoutId = ALL_LAYOUT;
_DBG("curLayoutId = %s", _get_layout_id(m->curLayoutId));
t_CreateFullView();
elm_object_focus_allow_set(eoBase, EINA_FALSE);
_DBG("curLayoutId = %s", _get_layout_id(m->curLayoutId));
t_CreateFullView();
elm_object_focus_allow_set(eoBase, EINA_FALSE);
m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout);
m->pFbMusicLayout->Destroy();
delete m->pFbMusicLayout;
m->pLayoutMgr->RemoveLayout(m->pFbMusicLayout);
m->pFbMusicLayout->Destroy();
delete m->pFbMusicLayout;
m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout);
m->pFbVideoLayout->Destroy();
delete m->pFbVideoLayout;
m->pLayoutMgr->RemoveLayout(m->pFbVideoLayout);
m->pFbVideoLayout->Destroy();
delete m->pFbVideoLayout;