Fix build error due to changing app-common
[profile/tv/apps/native/filebrowser.git] / src / layouts / FbPhotoLayout.cpp
index 5e55159..55a7814 100644 (file)
@@ -1,17 +1,12 @@
 #include <Elementary.h>
-#include <AppCommon.h>
-#include <BaseView.h>
-#include <ViewMgr.h>
-#include <BaseLayout.h>
-#include <LayoutMgr.h>
-
 #include "dbg.h"
+#include <AppCommon.h>
 #include "define.h"
 #include "FileGrid.h"
-
-#include <CtxPopup.h>
 #include "FbBaseView.h"
 #include "FbPhotoLayout.h"
+#include "../views/BaseView/Info.h"
+#include "common.h"
 
 
 struct SFbPhotoLayout {
@@ -21,6 +16,8 @@ struct SFbPhotoLayout {
 
        CLayoutMgr *pLayoutMgr;
        CViewMgr   *pViewMgr;
+
+       bool       updateFlag;
 };
 
 
@@ -117,7 +114,9 @@ void CFbPhotoLayout::t_OnShow(void)
 {
        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);
+       CInfo::SetGroupIndex(E_GRP_PHOTO);
+       m->pFileGrid->Update(m->updateFlag);
+       m->updateFlag = false; // set default
        CBaseLayout::t_OnShow();
 }
 
@@ -138,9 +137,10 @@ bool CFbPhotoLayout::Create(CLayoutMgr *mgr, void *data)
                _CHECK(layout = elm_layout_add(m->eoBase))
                _CHECK(elm_layout_file_set(layout, EDJEFILE, FB_PHOTO_LAYOUT))
                _CHECK(t_CreateFileGrid(layout))
-               _COMMAND{ 
+               _COMMAND{
+                       m->updateFlag = false;
                        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_set(m->eoBase, FBR_PART_CONTENT, layout);
                }
                _CHECK(CBaseLayout::Create(layout))
 
@@ -184,6 +184,14 @@ void CFbPhotoLayout::SetFocus(Eina_Bool flag)
 void CFbPhotoLayout::Action(void)
 {
        ASSERT(m);
-       
+
        return m->pFileGrid->Action();
 }
+
+
+void CFbPhotoLayout::SetUpdateFlag(bool flag)
+{
+       ASSERT(m);
+
+       m->updateFlag = flag;
+}