addItems();
evas_object_show(m_actionBar);
evas_object_show(m_history_layout);
+ elm_object_focus_set(elm_object_part_content_get(m_actionBar, "close_click"), EINA_TRUE);
}
void HistoryUI::hideUI()
m_gengrid = nullptr;
evas_object_hide(m_actionBar);
evas_object_hide(m_history_layout);
+ elm_object_focus_custom_chain_unset(m_history_layout);
}
// TODO: Remove this function when proper view handling will be introduced
elm_object_style_set(button, "history_button");
evas_object_smart_callback_add(button, "clicked", HistoryUI::_clearHistory_clicked, this);
elm_object_part_content_set(actionBar, "clearhistory_click", button);
+ elm_object_focus_custom_chain_append(history_layout, button, nullptr);
button = elm_button_add(actionBar);
elm_object_style_set(button, "history_button");
evas_object_smart_callback_add(button, "clicked", HistoryUI::_close_clicked_cb, this);
elm_object_part_content_set(actionBar, "close_click", button);
+ elm_object_focus_custom_chain_append(history_layout, button, nullptr);
return actionBar;
}
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
if (data) {
HistoryUI *historyUI = static_cast<HistoryUI*>(data);
- historyUI->closeHistoryUIClicked(std::string());
+ historyUI->closeHistoryUIClicked();
historyUI->clearItems();
}
}
Elm_Object_Item* historyView = elm_genlist_item_append(id->historyUI->m_genListToday, id->historyUI->m_itemClassToday, *it, nullptr, ELM_GENLIST_ITEM_NONE, _history_item_clicked_cb, (*it));
id->historyUI->m_map_history_views.insert(std::pair<std::string,Elm_Object_Item*>((*it)->item->getUrl(), historyView));
}
+ elm_object_focus_custom_chain_append(id->historyUI->m_history_layout, id->historyUI->m_genListToday, nullptr);
return id->historyUI->m_genListToday;
}
Evas_Object* createActionBar(Evas_Object* history_layout);
void show(Evas_Object *main_layout);
void addItems();
- boost::signals2::signal<void (const std::string&)> closeHistoryUIClicked;
+ boost::signals2::signal<void ()> closeHistoryUIClicked;
boost::signals2::signal<void (const std::string&)> clearHistoryClicked;
boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>)> historyItemClicked;
boost::signals2::signal<void (std::shared_ptr<tizen_browser::services::HistoryItem>)> historyDeleteClicked;
m_gengrid=createGengrid(getContent());
addItems();
elm_object_part_content_set(getContent(), "elm.swallow.grid", m_gengrid);
+ setFocus(EINA_TRUE);
}
void MoreMenuUI::hideUI()
elm_object_style_set(button, "hidden_button");
evas_object_smart_callback_add(button, "clicked", _close_clicked, this);
elm_object_part_content_set(m_current_tab_bar, "close_click", button);
+ evas_object_show(button);
+ elm_object_focus_set(button, EINA_TRUE);
button = elm_button_add(m_mm_layout);
elm_object_style_set(button, "hidden_button");
BROWSER_LOGD("type: %d", itemData->item);
switch (itemData->item) {
case HISTORY:
+ itemData->moreMenuUI->setFocus(EINA_FALSE);
itemData->moreMenuUI->historyUIClicked(std::string());
break;
case SETTINGS:
+ itemData->moreMenuUI->setFocus(EINA_FALSE);
itemData->moreMenuUI->settingsClicked(std::string());
break;
case BOOKMARK_MANAGER:
+ itemData->moreMenuUI->setFocus(EINA_FALSE);
itemData->moreMenuUI->bookmarkManagerClicked(std::string());
break;
#ifdef READER_MODE_ENABLED
hide();
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
elm_gengrid_clear(m_gengrid);
+ elm_object_tree_focus_allow_set(getContent(), EINA_FALSE);
m_map_menu_views.clear();
evas_object_del(m_current_tab_bar);
elm_theme_extension_del(NULL, m_edjFilePath.c_str());
elm_exit();
}
+void MoreMenuUI::setFocus(Eina_Bool focusable)
+{
+ BROWSER_LOGD("[%s:%d]", __PRETTY_FUNCTION__, __LINE__);
+ elm_object_tree_focus_allow_set(getContent(), focusable);
+ if (focusable == EINA_TRUE)
+ elm_object_focus_set(elm_object_part_content_get(m_current_tab_bar, "close_click"), focusable);
+}
+
}
}
void setURL(const std::string& url);
void changeBookmarkStatus(bool data);
void createToastPopup(const char* text);
+ void setFocus(Eina_Bool focusable);
boost::signals2::signal<void (int)> addToBookmarkClicked;
//TODO: remove redundant argument from this signal.
evas_object_show(m_items_layout);
evas_object_show(m_settings_layout);
evas_object_show(m_actionBar);
+ elm_object_focus_set(elm_object_part_content_get(m_actionBar, "close_click"), EINA_TRUE);
}
void SettingsUI::hideUI()
std::string historyAddress = historyItem->getUrl();
if(m_historyUI) { // TODO: remove this section when naviframes will be available
m_historyUI->clearItems();
- closeHistoryUI(std::string());
+ closeHistoryUI();
}
if(m_moreMenuUI) { // TODO: remove this section when naviframes will be available
(tizen_browser::core::ServiceManager::getInstance().getService("org.tizen.browser.historyui"));
M_ASSERT(m_historyUI);
m_historyUI->clearHistoryClicked.connect(boost::bind(&SimpleUI::onClearHistoryClicked, this,_1));
- m_historyUI->closeHistoryUIClicked.connect(boost::bind(&SimpleUI::closeHistoryUI, this,_1));
+ m_historyUI->closeHistoryUIClicked.connect(boost::bind(&SimpleUI::closeHistoryUI, this));
m_historyUI->historyItemClicked.connect(boost::bind(&SimpleUI::onOpenURLInNewTab, this, _1, true)); // desktop mode as default
m_historyUI->addHistoryItems(getHistory());
m_historyUI->show(m_window.get());
}
}
-void SimpleUI::closeHistoryUI(const std::string& str)
+void SimpleUI::closeHistoryUI()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
m_historyUI->clearHistoryClicked.disconnect(boost::bind(&SimpleUI::onClearHistoryClicked, this,_1));
- m_historyUI->closeHistoryUIClicked.disconnect(boost::bind(&SimpleUI::closeHistoryUI, this,_1));
+ m_historyUI->closeHistoryUIClicked.disconnect(boost::bind(&SimpleUI::closeHistoryUI, this));
m_historyUI->historyItemClicked.disconnect(boost::bind(&SimpleUI::onOpenURLInNewTab, this, _1, true)); // desktop mode as default
m_historyUI.reset();
+ m_moreMenuUI->setFocus(EINA_TRUE);
}
void SimpleUI::showSettingsUI(const std::string& str)
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
m_settingsUI.reset();
+ m_moreMenuUI->setFocus(EINA_TRUE);
}
void SimpleUI::showMoreMenu()
if(m_mainUI) {
m_mainUI->showBookmarks(getBookmarks());
}
+ m_moreMenuUI->setFocus(EINA_TRUE);
}
void SimpleUI::hideHistory()
void switchToMobileMode();
void switchToDesktopMode();
void showHistoryUI(const std::string& str);
- void closeHistoryUI(const std::string&);
+ void closeHistoryUI();
void showURIBar();
void hideURIBar();
void hideSettingsMenu();