_DBG("");
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));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT, _(NO_FILE_MESSAGE));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT_SUB, _(NO_FILE_MESSAGE_SUB));
}
else if (t_SelectedGroupButton() == m->eoBtnGroup[E_GRP_PHOTO]) {
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT, _(NO_PHOTO_MESSAGE));
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, _(NO_PHOTO_MESSAGE_SUB));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT, _(NO_PHOTO_MESSAGE));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT_SUB, _(NO_PHOTO_MESSAGE_SUB));
}
else if (t_SelectedGroupButton() == m->eoBtnGroup[E_GRP_VIDEO]) {
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT, _(NO_VIDEO_MESSAGE));
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, _(NO_VIDEO_MESSAGE_SUB));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT, _(NO_VIDEO_MESSAGE));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT_SUB, _(NO_VIDEO_MESSAGE_SUB));
}
else if (t_SelectedGroupButton() == m->eoBtnGroup[E_GRP_MUSIC]) {
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT, _(NO_MUSIC_MESSAGE));
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, _(NO_MUSIC_MESSAGE_SUB));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT, _(NO_MUSIC_MESSAGE));
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT_SUB, _(NO_MUSIC_MESSAGE_SUB));
}
}
void CFbBaseView::UpdatedGrid(void)
{
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT, "");
- elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, "");
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT, "");
+ elm_object_part_text_set(Base(), FBR_PART_NO_CONTENT_SUB, "");
}
void CFbBaseView::t_CreateTopSession(void)
btninfo[TOPBTN_SORT].style = FBR_STYLE_SORT_BTN;
btninfo[TOPBTN_SORT].part = FBR_PART_SORT_HOVERSEL;
- elm_object_part_text_set(m->eoBase, FBR_PART_TITLE,
+ elm_object_part_text_set(Base(), FBR_PART_TITLE,
_(FBR_TEXT_TITLE));
for (i = 0; i < TOTAL_TOP_BTNS; i++) {
- btn = _add_button(m->eoBase);
+ btn = _add_button(Base());
if (!btn) {
_ERR(" Adding btn failed ");
return;
}
elm_object_style_set(btn, btninfo[i].style);
- elm_object_part_content_set(m->eoBase, btninfo[i].part, btn);
+ elm_object_part_content_set(Base(), btninfo[i].part, btn);
m->pHandlerButton[i]->Connect(btn);
btninfo[E_GRP_MUSIC].txt = N_("MUSIC");
btninfo[E_GRP_MUSIC].icon_path = FBR_IMAGE_GRPBTN_MUSIC;
- box = elm_box_add(m->eoBase);
+ box = elm_box_add(Base());
if (!box)
return;
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
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_part_content_set(Base(), 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);
{
_DBG();
- evas_object_show(m->eoBase);
+ evas_object_show(Base());
CBaseView::t_OnShow();
}
void CFbBaseView::t_OnHide(void)
{
- evas_object_hide(m->eoBase);
+ evas_object_hide(Base());
CBaseView::t_OnHide();
}
-bool CFbBaseView::Create(void *data)
+bool CFbBaseView::Create(void *data, Evas_Object *base)
{
ASSERT(!m);
} _CREATE_END_AND_CATCH{ return false; }
+ CBaseView::Create(NULL, eoBase);
+
// original create grid
CInfo::SetSortType(0/*CSort::SORT_NAME_AZ*/);
evas_object_data_set(eoBase, BASE_VIEW_DATA, this);
t_CreateFullView();
elm_object_focus_allow_set(eoBase, EINA_FALSE);
m->pHandlerBase->Connect(eoBase);
- CBaseView::Create(NULL);
return true;
}
{
ASSERT(m);
+ m->pHandlerBase->Disconnect(Base());
+
+ evas_object_del(Base());
+
CBaseView::Destroy();
if(CMediaContentListener::FlagCreate())
m->pLayoutMgr->Destroy();
delete m->pLayoutMgr;
- evas_object_del(m->eoBase);
-
delete m;
m = NULL;
}
-Evas_Object* CFbBaseView::Base(void)
-{
- ASSERT(m);
-
- return m->eoBase;
-}
-
-
void CFbBaseView::OnStatusChanged(SUsbHostDeviceInfo *changedDevice, SUsbHostDeviceStatus status)
{
if(status == USB_HOST_DEV_CONNECTED) {
m->pPopup = new CPopup;
if (!m->pPopup)
return;
- if (!m->pPopup->Create(m->eoBase)) {
+ if (!m->pPopup->Create(Base())) {
delete m->pPopup;
m->pPopup = NULL;
return;
struct SContextView {
Evas_Object *eoWin;
- Evas_Object *eoBase;
Evas_Object *eoBtnOpen;
Evas_Object *rel_first[TABLE_MAX_COL];
Evas_Object *rel_last[TABLE_MAX_COL];
SContextView() {
eoWin = NULL;
- eoBase = NULL;
eoBtnOpen = NULL;
int a;
for (a = 0; a < TABLE_MAX_COL; a++) {
Evas_Object *scroller, *table;
int r;
- scroller = _add_scroller(m->eoBase);
+ scroller = _add_scroller(Base());
if (!scroller) {
_ERR("_add_scroller failed.");
return false;
elm_object_content_set(scroller, table);
if (type == APP_LINKED)
- elm_object_part_content_set(m->eoBase, FBR_PART_CTXT_LINK_AREA,
+ elm_object_part_content_set(Base(), FBR_PART_CTXT_LINK_AREA,
scroller);
else
- elm_object_part_content_set(m->eoBase, FBR_PART_CTXT_REL_AREA,
+ elm_object_part_content_set(Base(), FBR_PART_CTXT_REL_AREA,
scroller);
return true;
bool CContextView::m_CreateBtnsPart(void)
{
Evas_Object *btn, *box;
- box = _add_btnbox(m->eoBase);
+ box = _add_btnbox(Base());
if (!box)
return false;
m->pHandlerButton->Connect(m->eoBtnOpen);
- elm_object_part_content_set(m->eoBase, FBR_PART_CTXT_BTNAREA, box);
+ elm_object_part_content_set(Base(), FBR_PART_CTXT_BTNAREA, box);
return true;
}
type = m->finfo->Type();
if (!path) {
if (type == E_GRP_PHOTO) {
- img = _get_icon(m->eoBase, m->finfo);
+ img = _get_icon(Base(), m->finfo);
if (!img)
goto finish;
} else {
- img = elm_image_add(m->eoBase);
+ img = elm_image_add(Base());
if (!img)
goto finish;
_set_default_thumb(img, type);
}
} else {
- img = elm_image_add(m->eoBase);
+ img = elm_image_add(Base());
if (!img)
goto finish;
elm_image_file_set(img, path, NULL);
elm_image_aspect_fixed_set(img, EINA_FALSE);
}
- elm_object_part_content_set(m->eoBase, FBR_PART_CTXT_ICON, img);
+ elm_object_part_content_set(Base(), FBR_PART_CTXT_ICON, img);
- lbl = _create_lbl(m->eoBase, title);
+ lbl = _create_lbl(Base(), title);
if (lbl) {
- elm_object_part_content_set(m->eoBase, FBR_PART_CTXT_TITLE, lbl);
+ elm_object_part_content_set(Base(), FBR_PART_CTXT_TITLE, lbl);
_lbl_start_slide(lbl);
}
- elm_object_part_text_set(m->eoBase, FBR_PART_CTXT_SUBTITLE, subtitle);
- elm_object_part_text_set(m->eoBase, FBR_PART_CTXT_SUBTITLE2, subtitle2);
+ elm_object_part_text_set(Base(), FBR_PART_CTXT_SUBTITLE, subtitle);
+ elm_object_part_text_set(Base(), FBR_PART_CTXT_SUBTITLE2, subtitle2);
- elm_object_part_text_set(m->eoBase, FBR_PART_CTXT_LINK_TEXT, _(FBR_TEXT_LINK));
+ elm_object_part_text_set(Base(), FBR_PART_CTXT_LINK_TEXT, _(FBR_TEXT_LINK));
linkapplist = CDummyContent::ListLinkApp(type);
if (linkapplist)
m_CreateContentApps(linkapplist, APP_LINKED);
- elm_object_part_text_set(m->eoBase, FBR_PART_CTXT_REL_TEXT, _(FBR_TEXT_REL));
+ elm_object_part_text_set(Base(), FBR_PART_CTXT_REL_TEXT, _(FBR_TEXT_REL));
rltvlist = CDummyContent::ListRelative(type);
if (rltvlist)
m_CreateContentApps(rltvlist, APP_OTHER);
void CContextView::t_OnShow(void)
{
- evas_object_show(m->eoBase);
+ evas_object_show(Base());
}
void CContextView::t_OnHide(void)
{
- evas_object_hide(m->eoBase);
+ evas_object_hide(Base());
}
-bool CContextView::Create(void *data)
+bool CContextView::Create(void *data, Evas_Object *base)
{
ASSERT(!m);
_CHECK(m = new SContextView)
_CHECK(eoBase = elm_layout_add(eoWin))
_CHECK(elm_layout_file_set(eoBase, EDJEFILE, FBR_CONTEXT_VIEW))
- _COMMAND{ m->eoWin = eoWin; m->eoBase = eoBase; m->finfo = (CExtNameInfo*)data; }
+ _COMMAND{ m->eoWin = eoWin; m->finfo = (CExtNameInfo*)data; }
+ _CHECK(CBaseView::Create(NULL, eoBase))
_CHECK(m_CreateInfoPart())
_CHECK(m_CreateBtnsPart())
_CHECK_FAIL{ /* m_CreateBtnsPart */ }
_CHECK_FAIL{ /* m_CreateInfoPart */ }
+ _CHECK_FAIL{ CBaseView::Destroy(); }
_CHECK_FAIL{}
_CHECK_FAIL{ evas_object_del(eoBase); }
_CHECK_FAIL{ delete m; m = NULL; }
{
ASSERT(m);
- evas_object_del(m->eoBase);
- delete m;
- m = NULL;
-}
+ evas_object_del(Base());
-Evas_Object* CContextView::Base(void)
-{
- ASSERT(m);
+ CBaseView::Destroy();
- return m->eoBase;
+ delete m;
+ m = NULL;
}