,m_processing_popup_layout(NULL)
,m_processing_progress_bar(NULL)
,m_select_all_check_value(EINA_FALSE)
+ ,m_sub_main_history_layout(NULL)
,m_searchbar_layout(NULL)
,m_searched_history_genlist(NULL)
,m_no_content_search_result(NULL)
Browser_History_Layout::~Browser_History_Layout(void)
{
BROWSER_LOGD("[%s]", __func__);
- hide_notify_popup();
+ hide_notify_popup_layout(m_sub_main_history_layout);
for(int i = 0 ; i < m_history_list.size() ; i++ ) {
if (m_history_list[i])
return;
Browser_History_Layout *history_layout = (Browser_History_Layout *)data;
+ if (!elm_entry_is_empty(obj))
+ elm_object_signal_emit(history_layout->m_searchbar, "elm,state,guidetext,hide", "elm");
if (!history_layout->_show_searched_history(utf8_text))
BROWSER_LOGE("_show_searched_history failed");
BROWSER_LOGD("[%s]", __func__);
Browser_Bookmark_View *bookmark_view = m_data_manager->get_bookmark_view();
- hide_notify_popup();
+ hide_notify_popup_layout(m_sub_main_history_layout);
_enable_searchbar_layout(!edit_mode);
if (edit_mode) {
+#if defined(GENLIST_SWEEP)
+ br_elm_genlist_sweep_item_recover(m_history_genlist);
+#endif
elm_object_style_set(m_bg, "edit_mode");
m_edit_mode_select_all_layout = elm_layout_add(m_content_box);
if (selected_count == 0) {
elm_object_item_disabled_set(m_data_manager->get_bookmark_view()->m_bookmark_delete_controlbar_item, EINA_TRUE);
- hide_notify_popup();
+ hide_notify_popup_layout(m_sub_main_history_layout);
return;
} else
elm_object_item_disabled_set(m_data_manager->get_bookmark_view()->m_bookmark_delete_controlbar_item, EINA_FALSE);
if (selected_count == 1) {
- show_notify_popup(BR_STRING_ONE_ITEM_SELECTED, 0, EINA_TRUE);
+ show_notify_popup_layout(BR_STRING_ONE_ITEM_SELECTED, 0, m_sub_main_history_layout);
} else if (selected_count > 1) {
char *small_popup_text = NULL;
int string_len = strlen(BR_STRING_ITEMS_SELECTED) + 1;
memset(small_popup_text, 0x00, string_len);
snprintf(small_popup_text, string_len, BR_STRING_ITEMS_SELECTED, selected_count);
- show_notify_popup(small_popup_text, 0, EINA_TRUE);
+ show_notify_popup_layout(small_popup_text, 0, m_sub_main_history_layout);
if (small_popup_text)
free(small_popup_text);
BROWSER_LOGD("[%s]", __func__);
elm_object_style_set(m_bg, "default");
- m_searchbar_layout = elm_layout_add(m_navi_bar);
+ m_sub_main_history_layout = elm_layout_add(m_navi_bar);
+ if (!m_sub_main_history_layout) {
+ BROWSER_LOGE("elm_layout_add failed");
+ return EINA_FALSE;
+ }
+ elm_layout_file_set(m_sub_main_history_layout,
+ BROWSER_EDJE_DIR"/browser-bookmark-view.edj",
+ "browser/selectioninfo");
+ evas_object_size_hint_weight_set(
+ m_sub_main_history_layout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(
+ m_sub_main_history_layout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ m_searchbar_layout = elm_layout_add(m_sub_main_history_layout);
if (!m_searchbar_layout) {
BROWSER_LOGE("elm_layout_add failed");
return EINA_FALSE;
}
m_history_genlist_item_class.decorate_item_style = "mode/slide2";
- m_history_genlist_item_class.item_style = "2text.2icon.4";
- m_history_genlist_item_class.decorate_all_item_style = "edit_default";
+ m_history_genlist_item_class.item_style = "dialogue/2text.2icon.3";
+ m_history_genlist_item_class.decorate_all_item_style = "dialogue/edit";
m_history_genlist_item_class.func.text_get = __genlist_label_get_cb;
m_history_genlist_item_class.func.content_get = __genlist_icon_get_cb;
m_history_genlist_item_class.func.state_get = NULL;
m_history_genlist_item_class.func.del = NULL;
- m_history_group_title_class.item_style = "grouptitle";
+ m_history_group_title_class.item_style = "dialogue/title";
m_history_group_title_class.func.text_get = __genlist_date_label_get_cb;
m_history_group_title_class.func.content_get = NULL;
m_history_group_title_class.func.state_get = NULL;
evas_object_show(m_content_box);
elm_object_part_content_set(m_searchbar_layout, "elm.swallow.content", m_content_box);
+ elm_object_part_content_set(m_sub_main_history_layout, "genlist.swallow.contents", m_searchbar_layout);
return EINA_TRUE;
}
}
}
+void Browser_History_Layout::__slide_share_button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ BROWSER_LOGD("[%s]", __func__);
+ if (!data)
+ return;
+
+ Browser_History_DB::history_item *item = (Browser_History_DB::history_item *)data;
+ Browser_History_Layout *history_layout = (Browser_History_Layout *)item->user_data;
+ if (!history_layout->_show_share_popup(item->url.c_str()))
+ BROWSER_LOGE("_show_share_popup failed");
+}
+
void Browser_History_Layout::_delete_history_item_by_slide_button(Browser_History_DB::history_item *item)
{
BROWSER_LOGD("[%s]", __func__);
int bookmark_id = -1;
if (m_data_manager->get_history_db()->is_in_bookmark(item->url.c_str(), &bookmark_id)) {
- evas_object_image_file_set(obj, BROWSER_IMAGE_DIR"/I01_icon_bookmark_off.png", NULL);
+ if (!elm_icon_file_set(obj, BROWSER_IMAGE_DIR"/I01_icon_bookmark_off.png", NULL)) {
+ BROWSER_LOGE("elm_icon_file_set is failed.\n");
+ }
m_data_manager->get_bookmark_view()->delete_bookmark_item(bookmark_id);
} else {
- evas_object_image_file_set(obj, BROWSER_IMAGE_DIR"/I01_icon_bookmark_on.png", NULL);
+ if (!elm_icon_file_set(obj, BROWSER_IMAGE_DIR"/I01_icon_bookmark_on.png", NULL)) {
+ BROWSER_LOGE("elm_icon_file_set is failed.\n");
+ }
m_data_manager->get_bookmark_view()->append_bookmark_item(item->title.c_str(), item->url.c_str());
}
}
return default_favicon;
}
} else if (!strncmp(part, "elm.icon.2", strlen("elm.icon.2"))) {
- Evas_Object *bookmark_icon = evas_object_image_add(evas_object_evas_get(obj));
- evas_object_image_load_size_set(bookmark_icon, 64 * elm_scale_get(), 64 * elm_scale_get());
- evas_object_image_fill_set(bookmark_icon, 0, 0, 64 * elm_scale_get(), 64 * elm_scale_get());
-
- if (m_data_manager->get_history_db()->is_in_bookmark(item->url.c_str(), NULL))
- evas_object_image_file_set(bookmark_icon, BROWSER_IMAGE_DIR"/I01_icon_bookmark_on.png", NULL);
- else
- evas_object_image_file_set(bookmark_icon, BROWSER_IMAGE_DIR"/I01_icon_bookmark_off.png", NULL);
-
+ Evas_Object *bookmark_icon = elm_icon_add(obj);
+ if (m_data_manager->get_history_db()->is_in_bookmark(item->url.c_str(), NULL)) {
+ if (!elm_icon_file_set(bookmark_icon, BROWSER_IMAGE_DIR"/I01_icon_bookmark_on.png", NULL)) {
+ BROWSER_LOGE("elm_icon_file_set is failed.\n");
+ return NULL;
+ }
+ } else {
+ if (!elm_icon_file_set(bookmark_icon, BROWSER_IMAGE_DIR"/I01_icon_bookmark_off.png", NULL)) {
+ BROWSER_LOGE("elm_icon_file_set is failed.\n");
+ return NULL;
+ }
+ }
+ evas_object_size_hint_aspect_set(bookmark_icon, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
evas_object_propagate_events_set(bookmark_icon, EINA_FALSE);
evas_object_repeat_events_set(bookmark_icon, EINA_FALSE);