dbg.h file is removed.
[profile/tv/apps/native/filebrowser.git] / src / views / BaseView / FbBaseView.cpp
index bfd7c2c..88393e3 100644 (file)
 * limitations under the License.
 */
 
-#include <Elementary.h>
-#include <Eina.h>
 #include <Ecore.h>
 #include <aul.h>
-#include "i18n.h"
 #include "define.h"
-
-#include "AppCommon.h"
-#include "ExtNameInfo.h"
 #include "common.h"
-#include "dbg.h"
-#include <MediaContentDbListener.h>
-#include <UsbConnectionListener.h>
-#include "SortName.h"
-#include "Popup.h"
-#include "InputHandler.h"
 
-#include <CtxPopup.h>
-
-#include <BaseView.h>
+#include <AppCommon.h>
 #include "FbBaseView.h"
+#include "i18n.h"
 #include "Info.h"
-
+#include "Popup.h"
 #include "SourceCtxPopup.h"
 #include "SortCtxPopup.h"
-
-#include <ViewMgr.h>
-#include <LayoutMgr.h>
-#include <BaseLayout.h>
 #include "FbAllLayout.h"
+#include "FbPhotoLayout.h"
+#include "FbVideoLayout.h"
+#include "FbMusicLayout.h"
 
 #define TOTAL_GROUP_BTNS       4
 #define TOTAL_TOP_BTNS         2
@@ -63,6 +49,13 @@ enum topbtns {
        TOPBTN_SORT,
 };
 
+enum layoutId {
+       ALL_LAYOUT,
+       PHOTO_LAYOUT,
+       VIDEO_LAYOUT,
+       MUSIC_LAYOUT
+};
+
 const char *source_arg[] = {
        "all",
        "tv",
@@ -77,6 +70,21 @@ const char *linked_app[] = {
        N_(""),
 };
 
+const char* _get_layout_id(int curLayoutId){
+       switch(curLayoutId)
+       {
+               case ALL_LAYOUT:
+                       return FB_ALL_LAYOUT;
+               case PHOTO_LAYOUT:
+                       return FB_PHOTO_LAYOUT;
+               case VIDEO_LAYOUT:
+                       return FB_VIDEO_LAYOUT;
+               case MUSIC_LAYOUT:
+                       return FB_MUSIC_LAYOUT;
+       }
+       return FB_ALL_LAYOUT; // default
+}
+
 struct SFbBaseView {
        Evas_Object *eoWin;
        Evas_Object *eoBase;
@@ -85,12 +93,16 @@ struct SFbBaseView {
        Evas_Object *eoBtnSource;
        Evas_Object *eoBtnSort;
 
-       CCtxPopup   *pCtxPopup;
-
+       CContextPopup   *pCtxPopup;
        CPopup      *pPopup;
 
-       CLayoutMgr    *pLayoutMgr;
-       CFbAllLayout *pFbAllLayout;
+       CLayoutMgr     *pLayoutMgr;
+
+       int            curLayoutId;
+       CFbAllLayout   *pFbAllLayout;
+       CFbPhotoLayout *pFbPhotoLayout;
+       CFbVideoLayout *pFbVideoLayout;
+       CFbMusicLayout *pFbMusicLayout;
 
        SFbBaseView() {
                int a;
@@ -112,21 +124,41 @@ struct SFbBaseView {
                for (a = 0; a < TOTAL_GROUP_BTNS; a++)
                        delete pHandlerGroup[a];
        }
-       
-       class CHandlerBase : public CListenerMgr, public IKeyDownListener {
+
+       class CHandlerBase : public CListenerMgr, public IKeyDownListener, public IKeyUpListener{
                SFbBaseView *m;
 
        public:
-               CHandlerBase(SFbBaseView *ins) : IKeyDownListener(this) { m = ins; }
+               CHandlerBase(SFbBaseView *ins) : IKeyDownListener(this), IKeyUpListener(this) { m = ins; }
 
                virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) {
+                       _DBG("m->curLayoutId = %d",m->curLayoutId);
                        if (!strcmp(ev->keyname, KEY_EXIT))
                                elm_exit();
-                       else if (!strcmp(ev->keyname, KEY_ENTER)) {
+               }
+               virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev)
+               {
+                       _DBG("m->curLayoutId = %d",m->curLayoutId);
+                       if (!strcmp(ev->keyname, KEY_ENTER) || !strcmp(ev->keyname, KEY_ENTER_REMOTE)) {
                                if (elm_object_focus_get(m->eoSelectedBtnGroup)) {
-                                       m->pFbAllLayout->SetFocus(EINA_TRUE);
+                                       switch(m->curLayoutId)
+                                       {
+                                               case ALL_LAYOUT:
+                                                       m->pFbAllLayout->SetFocus(EINA_TRUE);
+                                                       break;
+                                               case PHOTO_LAYOUT:
+                                                       m->pFbPhotoLayout->SetFocus(EINA_TRUE);
+                                                       break;
+                                               case VIDEO_LAYOUT:
+                                                       m->pFbVideoLayout->SetFocus(EINA_TRUE);
+                                                       break;
+                                               case MUSIC_LAYOUT:
+                                                       m->pFbMusicLayout->SetFocus(EINA_TRUE);
+                                                       break;
+                                       }
                                }
                        }
+
                }
        } *pHandlerBase;
 
@@ -134,7 +166,7 @@ struct SFbBaseView {
        private:
                SFbBaseView *m;
        private:
-               static void sm_CbCtxPopupSelected(void* cookie, CCtxPopup* instance, const char* text)
+               static void sm_CbCtxPopupSelected(void* cookie, CContextPopup* instance, const char* text)
                {
                        SFbBaseView* m = (SFbBaseView*)cookie;
                        if (!m)
@@ -142,14 +174,44 @@ struct SFbBaseView {
 
                        _DBG(" instance->Type(): %d", instance->Type());
                        switch (instance->Type()) {
-                       case CCtxPopup::TOPBTN_SORT:
+                       case CContextPopup::TOPBTN_SORT:
                                elm_object_text_set(m->eoBtnSort, text);
-                               m->pFbAllLayout->Update(true);
+                               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:
+                       case CContextPopup::TOPBTN_SOURCE:
                                elm_object_text_set(m->eoBtnSource, text);
-                               m->pFbAllLayout->Update(false);
+                               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;
 
                        default:
@@ -161,14 +223,17 @@ struct SFbBaseView {
                CHandlerButton(SFbBaseView *ins) : IKeyDownListener(this), IMouseMoveListener(this), IMouseClickedListener(this) { m = ins; }
 
                virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) {
-                       if (!strcmp(ev->keyname, KEY_BACK))
+                       _DBG("id = %d", id);
+                       if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_REMOTE))
                                elm_object_focus_set(m->eoSelectedBtnGroup, EINA_TRUE);
                }
                virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) {
+                       _DBG("id = %d", id);
                        if (!elm_object_focus_get(obj))
                                elm_object_focus_set(obj, EINA_TRUE);
                }
                virtual void OnMouseClicked(int id, Evas_Object *obj) {
+                       _DBG("id = %d", id);
                        CSourceCtxPopup::SCallback cb;
                        cb.cookie = m;
                        cb.onSelected = sm_CbCtxPopupSelected;
@@ -196,11 +261,13 @@ struct SFbBaseView {
                        IMouseClickedListener(this) { m = ins; }
 
                virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) {
+                       _DBG("id = %d", id);
                        if (!elm_object_focus_get(obj))
                                elm_object_focus_set(obj, EINA_TRUE);
                }
                virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) {
-                       if (!strcmp(ev->keyname, KEY_BACK))
+                       _DBG("id = %d", id);
+                       if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_REMOTE))
                                elm_exit();
                }
                virtual void OnMouseClicked(int id, Evas_Object *obj) {
@@ -211,13 +278,32 @@ struct SFbBaseView {
                        m->eoSelectedBtnGroup = obj;
                        elm_object_signal_emit(m->eoSelectedBtnGroup, FBR_SIGNAL_GROUP_SELECTED, "");
 
-                       m->pFbAllLayout->Update(false);
+                       switch(id)
+                       {
+                               case E_GRP_ALL:
+                                       m->curLayoutId = ALL_LAYOUT;
+                                       break;
+                               case E_GRP_PHOTO:
+                                       m->curLayoutId = PHOTO_LAYOUT;
+                                       break;
+                               case E_GRP_VIDEO:
+                                       m->curLayoutId = VIDEO_LAYOUT;
+                                       break;
+                               case E_GRP_MUSIC:
+                                       m->curLayoutId = MUSIC_LAYOUT;
+                                       break;
+                               default:
+                                       _ERR("Fix it: it can not make it , MouseClicked");
+                                       m->curLayoutId = ALL_LAYOUT; // default
+                                       break;
+                       }
+                       _DBG("id = %d, m->curLayoutId = %d", id, m->curLayoutId);
+                       m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
                }
        } *pHandlerGroup[TOTAL_GROUP_BTNS];
 };
 
 
-
 Evas_Object *_add_button(Evas_Object *box)
 {
        Evas_Object *button;
@@ -238,16 +324,8 @@ Evas_Object *_add_button(Evas_Object *box)
 
 void CFbBaseView::UpdateEmptyFocusSequence(void)
 {
-       int i;
        _DBG("");
 
-       for (i = 0; i < TOTAL_GROUP_BTNS; i++)
-               elm_object_focus_next_object_set(m->eoBtnGroup[i], m->eoBtnSort, ELM_FOCUS_RIGHT);
-
-       elm_object_focus_next_object_set(m->eoBtnGroup[E_GRP_ALL], m->eoBtnSort,              ELM_FOCUS_UP);
-       elm_object_focus_next_object_set(m->eoBtnSort,              m->eoBtnGroup[E_GRP_ALL], ELM_FOCUS_DOWN);
-       elm_object_focus_next_object_set(m->eoBtnSource,               m->eoBtnGroup[E_GRP_ALL], ELM_FOCUS_DOWN);
-
        if (t_SelectedGroupButton() == m->eoBtnGroup[E_GRP_ALL]) {
                elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT,     _(NO_FILE_MESSAGE));
                elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, _(NO_FILE_MESSAGE_SUB));
@@ -298,21 +376,6 @@ void CFbBaseView::CbLinkApp(int type, int source_type, char *path)
 
 void CFbBaseView::UpdatedGrid(void)
 {
-       int i;
-
-       for (i = 0; i < TOTAL_GROUP_BTNS; i++)
-               elm_object_focus_next_object_set(m->eoBtnGroup[i],
-               m->pFbAllLayout->Grid(), ELM_FOCUS_RIGHT);
-
-       elm_object_focus_next_object_set(m->eoBtnGroup[E_GRP_ALL],
-               m->eoBtnSort, ELM_FOCUS_UP);
-       elm_object_focus_next_object_set(m->eoBtnSort,
-               m->eoBtnGroup[E_GRP_ALL], ELM_FOCUS_LEFT);
-       elm_object_focus_next_object_set(m->eoBtnSort,
-               m->pFbAllLayout->Grid(), ELM_FOCUS_DOWN);
-       elm_object_focus_next_object_set(m->eoBtnSource,
-               m->pFbAllLayout->Grid(), ELM_FOCUS_DOWN);
-
        elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT, "");
        elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, "");
 }
@@ -325,7 +388,7 @@ void CFbBaseView::t_CreateTopSession(void)
        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;
 
@@ -387,12 +450,12 @@ void CFbBaseView::t_CreateLeftSession(void)
                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]);
+
+               m->pHandlerGroup[i]->Connect(m->eoBtnGroup[i], i);
+
                ic = elm_image_add(m->eoBtnGroup[i]);
                if (!ic)
                        continue;
-               _DBG("");
 
                snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR,
                        btninfo[i].icon_path);
@@ -400,36 +463,36 @@ void CFbBaseView::t_CreateLeftSession(void)
                elm_object_part_content_set(m->eoBtnGroup[i],
                        FBR_PART_ELM_SWALLOWICON, ic);
        }
-       _DBG("");
 
        t_SetSelectedGroupButton(m->eoBtnGroup[E_GRP_ALL]);
-       _DBG("");
 
-       elm_object_signal_emit(m->eoBtnGroup[E_GRP_ALL],
-               FBR_SIGNAL_GROUP_SELECTED, "");
+       elm_object_signal_emit(m->eoBtnGroup[E_GRP_ALL], FBR_SIGNAL_GROUP_SELECTED, "");
        elm_object_focus_set(m->eoBtnGroup[E_GRP_ALL], EINA_TRUE);
        elm_object_part_content_set(m->eoBase, FBR_PART_GROUPBTN_BOX, box);
+
+       elm_object_focus_next_object_set(m->eoBtnGroup[E_GRP_ALL], m->eoBtnGroup[E_GRP_MUSIC], ELM_FOCUS_UP);
+       elm_object_focus_next_object_set(m->eoBtnGroup[E_GRP_MUSIC], m->eoBtnGroup[E_GRP_ALL], ELM_FOCUS_DOWN);
 }
 
 void CFbBaseView::t_CreateFullView(void)
 {
+       _DBG();
        t_CreateTopSession();
        t_CreateLeftSession();
-       _DBG("UpdateLayout");
-       m->pFbAllLayout->Update(false);
+       m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
 }
 
 void CFbBaseView::t_SetSelectedGroupButton(Evas_Object* obj)
 {
-       m->eoSelectedBtnGroup = obj;
-       int idx = -1;
 
-       int a;
-       for (a = 0; a < TOTAL_GROUP_BTNS; a++) {
+       for (int a = 0; a < TOTAL_GROUP_BTNS; a++) {
                if (m->eoBtnGroup[a] == obj)
-                       idx = a;
+               {
+                       m->eoSelectedBtnGroup = obj;
+                       CInfo::SetGroupIndex(a);
+                       break;
+               }
        }
-       CInfo::SetGroupIndex(idx);
 }
 
 Evas_Object* CFbBaseView::t_SelectedGroupButton(void)
@@ -448,8 +511,21 @@ void CFbBaseView::t_OnShow(void)
 
 void CFbBaseView::t_OnUpdate(void *data)
 {
-       _DBG();
-       m->pFbAllLayout->Action();
+       switch(m->curLayoutId)
+       {
+               case ALL_LAYOUT:
+                       m->pFbAllLayout->Action();
+                       break;
+               case PHOTO_LAYOUT:
+                       m->pFbPhotoLayout->Action();
+                       break;
+               case VIDEO_LAYOUT:
+                       m->pFbVideoLayout->Action();
+                       break;
+               case MUSIC_LAYOUT:
+                       m->pFbMusicLayout->Action();
+                       break;
+       }
 }
 
 void CFbBaseView::t_OnHide(void)
@@ -496,16 +572,37 @@ bool CFbBaseView::Create(void *data)
                }
                _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->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->pLayoutMgr->AddLayout(m->pFbAllLayout))
-               _CHECK(CUsbConnectionListener::Create())
-
+               _CHECK(m->pLayoutMgr->AddLayout(m->pFbPhotoLayout))
+               _CHECK(m->pLayoutMgr->AddLayout(m->pFbVideoLayout))
+               _CHECK(m->pLayoutMgr->AddLayout(m->pFbMusicLayout))
+               _COMMAND{
+                       if(!CUsbListener::Create())
+                               _ERR("Fail to create CUsbListener()");
+                       if(!CMediaContentListener::Create())
+                               _ERR("Fail to create CMediaContentListener()");
+               }
                _WHEN_SUCCESS{}
 
-               _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->pFbAllLayout); }
+               _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->pFbAllLayout; m->pFbAllLayout = NULL; }
                _CHECK_FAIL{ m->pLayoutMgr->Destroy(); }
                _CHECK_FAIL{ delete m->pLayoutMgr; m->pLayoutMgr = NULL; }
@@ -516,9 +613,10 @@ bool CFbBaseView::Create(void *data)
 
 
        // original create grid
-       m->pLayoutMgr->Show(FB_BASE_LAYOUT);
        CInfo::SetSortType(0/*CSort::SORT_NAME_AZ*/);
        evas_object_data_set(eoBase, BASE_VIEW_DATA, this);
+       m->curLayoutId = ALL_LAYOUT;
+       _DBG("curLayoutId = %s", _get_layout_id(m->curLayoutId));
        t_CreateFullView();
        elm_object_focus_allow_set(eoBase, EINA_FALSE);
        m->pHandlerBase->Connect(eoBase);
@@ -531,7 +629,23 @@ void CFbBaseView::Destroy(void)
        ASSERT(m);
 
        CBaseView::Destroy();
-       CUsbConnectionListener::Destroy();
+
+       if(CMediaContentListener::FlagCreate())
+               CMediaContentListener::Destroy();
+       if(CUsbListener::FlagCreate())
+               CUsbListener::Destroy();
+
+       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->pFbPhotoLayout);
+       m->pFbPhotoLayout->Destroy();
+       delete m->pFbPhotoLayout;
 
        m->pLayoutMgr->RemoveLayout(m->pFbAllLayout);
        m->pFbAllLayout->Destroy();
@@ -555,29 +669,33 @@ Evas_Object* CFbBaseView::Base(void)
 }
 
 
-void CFbBaseView::OnConnect(void)
+void CFbBaseView::OnStatusChanged(SUsbHostDeviceInfo *changedDevice, SUsbHostDeviceStatus status)
 {
-       m->pPopup = new CPopup;
-       if (!m->pPopup)
-               return;
-       if (!m->pPopup->Create(m->eoBase)) {
-               delete m->pPopup;
-               m->pPopup = NULL;
-               return;
-       }
+       if(status == USB_HOST_DEV_CONNECTED) {
+               m->pPopup = new CPopup;
+               if (!m->pPopup)
+                       return;
+               if (!m->pPopup->Create(m->eoBase)) {
+                       delete m->pPopup;
+                       m->pPopup = NULL;
+                       return;
+               }
 
-       if (CInfo::SourceType() == E_USB) {
-               if (!FlagConnected()) {
-                       CInfo::SetSourceType(E_ALL);
-                       elm_object_text_set(m->eoBtnSource,
-                               _(CSourceCtxPopup::SourceText(CInfo::SourceType())));
+               if (CInfo::SourceType() == E_USB) {
+                       if (!FlagConnected()) {
+                               CInfo::SetSourceType(E_ALL);
+                               elm_object_text_set(m->eoBtnSource,
+                                               _(CSourceCtxPopup::SourceText(CInfo::SourceType())));
+                       }
                }
        }
+       /* FIXME: should add disconnected flow */
 }
 
 
-void CFbBaseView::OnUpdated(const SEntity *entity)
+void CFbBaseView::OnDbUpdated(const SEntity *entity)
 {
+       _DBG();
        m->pPopup->Destroy();
        delete m->pPopup;
        m->pPopup = NULL;
@@ -588,7 +706,7 @@ void CFbBaseView::OnUpdated(const SEntity *entity)
                m->pCtxPopup = NULL;
        }
        if (CInfo::SourceType() != E_TV) {
-               m->pFbAllLayout->Update(false);
+               m->pLayoutMgr->Show(_get_layout_id(m->curLayoutId));
                elm_object_focus_set(t_SelectedGroupButton(), EINA_TRUE);
        }
 }