{
addHistoryItems(vec);
showHistory();
+ // update focus chain
+ elm_object_focus_custom_chain_append(m_parent, m_mostVisitedButton, NULL);
+ elm_object_focus_custom_chain_append(m_parent, m_bookmarksButton, NULL);
}
void MainUI::showBookmarks(std::vector< std::shared_ptr< tizen_browser::services::BookmarkItem > > vec)
evas_object_smart_callback_add(mostVisitedButton, "clicked", _mostVisited_clicked, this);
evas_object_show(mostVisitedButton);
elm_layout_content_set(layoutTop, "mostvisited_click", mostVisitedButton);
-
m_mostVisitedButton = mostVisitedButton;
Evas_Object *bookmarksButton = elm_button_add(layoutTop);
evas_object_smart_callback_add(bookmarksButton, "clicked", _bookmark_clicked, this);
evas_object_show(bookmarksButton);
elm_layout_content_set(layoutTop, "bookmark_click", bookmarksButton);
-
m_bookmarksButton = bookmarksButton;
return layoutTop;
itemData->item = hi;
itemData->mainUI = std::shared_ptr<MainUI>(this);
- Evas_Object* tile = elm_layout_add(m_mostVisitedView);
+ Evas_Object* tile = elm_button_add(m_mostVisitedView);
if (tileNumber == BIG_TILE_INDEX)
- elm_layout_file_set(tile, edjFilePath.c_str(), "big_tile");
+ elm_object_style_set(tile, "big_tile");
else
- elm_layout_file_set(tile, edjFilePath.c_str(), "small_tile");
+ elm_object_style_set(tile, "small_tile");
evas_object_size_hint_weight_set(tile, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set (tile, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(tile);
elm_layout_text_set(tile, "page_url", hi->getUrl().c_str());
Evas_Object * thumb = tizen_browser::tools::EflTools::getEvasImage(hi->getThumbnail(), m_parent);
elm_object_part_content_set(tile, "elm.thumbnail", thumb);
- edje_object_signal_callback_add(elm_layout_edje_get(tile), "mouse,clicked,1", "over", _thumbClicked, itemData);
+ evas_object_smart_callback_add(tile, "clicked", _thumbClicked, itemData);
+ elm_object_focus_custom_chain_append(m_parent, tile, NULL);
m_historyItems.push_back(hi);
}
itemData->mainUI->openURLInNewTab(itemData->item, itemData->mainUI->isDesktopMode());
}
-void MainUI::_thumbClicked(void* data, Evas_Object *, const char *, const char *)
+void MainUI::_thumbClicked(void* data, Evas_Object*, void*)
{
BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
HistoryItemData * itemData = reinterpret_cast<HistoryItemData *>(data);
BROWSER_LOGD("%s:%d %s", __FILE__, __LINE__, __func__);
for (auto it = m_tiles.begin(); it != m_tiles.end(); ++it) {
- edje_object_signal_callback_del(elm_layout_edje_get(*it), "mouse,clicked,1", "over", _thumbClicked);
+ evas_object_smart_callback_del(*it, "clicked", _thumbClicked);
evas_object_del(*it);
}
static char* _grid_bookmark_text_get(void *data, Evas_Object *obj, const char *part);
static Evas_Object * _grid_bookmark_content_get(void *data, Evas_Object *obj, const char *part);
static void _thumbBookmarkClicked(void * data, Evas_Object * obj, void * event_info);
- static void _thumbClicked(void *data, Evas_Object *obj, const char *emission, const char *source);
+ static void _thumbClicked(void * data, Evas_Object * obj, void * event_info);
void setEmptyView(bool empty);
void showNoHistoryLabel();
}
}
-group { name: "big_tile";
+group { name: "elm/button/base/big_tile";
data.item: "texts" "page_title page_url";
data.item: "contents" "elm.thumbnail";
min: 600 614;
target: "border_left";
target: "border_right";
}
+ program {
+ name: "mouse_click";
+ signal: "mouse,clicked,1";
+ source: "over";
+ script {
+ emit("elm,action,click", "");
+ }
+ }
}
}
-group { name: "small_tile";
+group { name: "elm/button/base/small_tile";
data.item: "texts" "page_title page_url";
data.item: "contents" "elm.thumbnail";
images {
target: "border_left";
target: "border_right";
}
+ program {
+ name: "mouse_click";
+ signal: "mouse,clicked,1";
+ source: "over";
+ script {
+ emit("elm,action,click", "");
+ }
+ }
}
}
m_moreMenuUI->isBookmark.disconnect(boost::bind(&SimpleUI::checkBookmark, this));
m_moreMenuUI->deleteBookmark.disconnect(boost::bind(&SimpleUI::deleteBookmark, this));
m_moreMenuUI.reset();
+
+ // TODO: temporary showing proper view untin VieManger will be available
+ if (m_webPageUI->isHomePageActive()) {
+ m_webPageUI->switchViewToQuickAccess(m_mainUI->getContent());
+ m_webEngine->disconnectCurrentWebViewSignals();
+ m_mainUI->showMostVisited(getMostVisitedItems());
+ }
+ else {
+ switchViewToWebPage();
+ }
}
void SimpleUI::switchToMobileMode()
void WebPageUI::hideUI()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
+ elm_object_focus_custom_chain_unset(m_mainLayout);
}
void WebPageUI::loadStarted()
hideWebView();
elm_object_part_content_set(m_mainLayout, "web_view", content);
evas_object_show(content);
+
+ // set custom focus chain
+ elm_object_focus_custom_chain_unset(m_mainLayout);
+ elm_object_focus_custom_chain_append(m_mainLayout, m_rightButtonBar->getContent(), NULL);
+ if (!isHomePageActive())
+ elm_object_focus_custom_chain_append(m_mainLayout, m_leftButtonBar->getContent(), NULL);
+ elm_object_focus_custom_chain_append(m_mainLayout, m_URIEntry->getContent(), NULL);
}
void WebPageUI::switchViewToErrorPage()
setMainContent(content);
evas_object_show(m_leftButtonBar->getContent());
updateURIBar(uri);
+ elm_object_focus_custom_chain_append(m_mainLayout, content, NULL);
}
void WebPageUI::switchViewToQuickAccess(Evas_Object* content)
return std::string(EDJE_DIR) + file;
}
-
+void WebPageUI::showTabUIConnect()
+{
+ hideUI();
+ showTabUI();
+}
+void WebPageUI::showMoreMenuConnect()
+{
+ hideUI();
+ showMoreMenu();
+}
} // namespace tizen_browser
} // namespace base_ui
\ No newline at end of file
void forwardPageConnect() { forwardPage(); }
void stopLoadingPageConnect() { stopLoadingPage(); }
void reloadPageConnect() { reloadPage(); }
- void showTabUIConnect() { showTabUI(); }
- void showMoreMenuConnect() { showMoreMenu(); }
+ void showTabUIConnect();
+ void showMoreMenuConnect();
Evas_Object* m_parent;
Evas_Object* m_mainLayout;