summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xedc/browser-bookmark-view.edc43
-rwxr-xr-xsrc/browser-bookmark/browser-bookmark-view.cpp39
-rwxr-xr-xsrc/browser-bookmark/browser-bookmark-view.h1
-rwxr-xr-xsrc/browser-common-view.cpp42
-rwxr-xr-xsrc/browser-common-view.h3
-rwxr-xr-xsrc/browser-history/browser-history-layout.cpp29
-rwxr-xr-xsrc/browser-history/browser-history-layout.h3
7 files changed, 142 insertions, 18 deletions
diff --git a/edc/browser-bookmark-view.edc b/edc/browser-bookmark-view.edc
index 7be944e..4b3ca32 100755
--- a/edc/browser-bookmark-view.edc
+++ b/edc/browser-bookmark-view.edc
@@ -453,5 +453,48 @@ group {
}
}
+ group { name: "browser/selectioninfo";
+ parts {
+ part {
+ name: "genlist.swallow.contents";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ align: 0.5 0.0;
+ }
+ }
+ part {
+ name: "selinfo.swallow.contents";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ fixed: 0 1;
+ align: 0.5 1.0;
+ rel1 {
+ relative: 0.0 1.0;
+ to:"genlist.swallow.contents";
+ }
+ }
+ description { state: "hide" 0.0;
+ inherit: "default" 0.0;
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ name: "show";
+ signal: "show,selection,info";
+ source: "elm";
+ action: STATE_SET "default" 0.0;
+ target: "selinfo.swallow.contents";
+ }
+ program {
+ name: "hide";
+ signal: "hide,selection,info";
+ source: "elm";
+ action: STATE_SET "hide" 0.0;
+ target: "selinfo.swallow.contents";
+ }
+ }
+ }
}
diff --git a/src/browser-bookmark/browser-bookmark-view.cpp b/src/browser-bookmark/browser-bookmark-view.cpp
index b5265d7..dac73ff 100755
--- a/src/browser-bookmark/browser-bookmark-view.cpp
+++ b/src/browser-bookmark/browser-bookmark-view.cpp
@@ -30,6 +30,7 @@ Browser_Bookmark_View::Browser_Bookmark_View(void)
,m_top_control_bar(NULL)
,m_conformant(NULL)
,m_content_layout(NULL)
+ ,m_sub_main_layout(NULL)
,m_genlist_content_layout(NULL)
,m_genlist_content_box(NULL)
,m_main_folder_genlist(NULL)
@@ -68,7 +69,7 @@ Browser_Bookmark_View::Browser_Bookmark_View(void)
Browser_Bookmark_View::~Browser_Bookmark_View(void)
{
BROWSER_LOGD("[%s]", __func__);
- hide_notify_popup();
+ hide_notify_popup_layout(m_sub_main_layout);
for(int i = 0 ; i < m_sub_folder_list.size() ; i++ ) {
if (m_sub_folder_list[i]) {
@@ -906,13 +907,13 @@ void Browser_Bookmark_View::_show_selection_info(void)
if (editable_folder_count == 0 && editable_item_count == 0) {
elm_object_item_disabled_set(m_bookmark_delete_controlbar_item, EINA_TRUE);
- hide_notify_popup();
+ hide_notify_popup_layout(m_sub_main_layout);
return;
} else
elm_object_item_disabled_set(m_bookmark_delete_controlbar_item, EINA_FALSE);
if (editable_folder_count + editable_item_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_layout);
} else if (editable_folder_count + editable_item_count > 1) {
char *small_popup_text = NULL;
int string_len = strlen(BR_STRING_ITEMS_SELECTED) + 4; /* 4 : reserved for maximun count */
@@ -921,7 +922,7 @@ void Browser_Bookmark_View::_show_selection_info(void)
memset(small_popup_text, 0x00, string_len);
snprintf(small_popup_text, string_len, BR_STRING_ITEMS_SELECTED, editable_folder_count + editable_item_count);
- show_notify_popup(small_popup_text, 0, EINA_TRUE);
+ show_notify_popup_layout(small_popup_text, 0, m_sub_main_layout);
if (small_popup_text)
free(small_popup_text);
@@ -932,7 +933,7 @@ void Browser_Bookmark_View::_show_selection_info(void)
void Browser_Bookmark_View::_set_edit_mode(Eina_Bool edit_mode)
{
BROWSER_LOGD("[%s]", __func__);
- hide_notify_popup();
+ hide_notify_popup_layout(m_sub_main_layout);
if (edit_mode) {
elm_object_style_set(m_bg, "edit_mode");
@@ -1101,13 +1102,14 @@ void Browser_Bookmark_View::__controlbar_tab_changed_cb(void *data, Evas_Object
}
}
- bookmark_view->hide_notify_popup();
+ bookmark_view->hide_notify_popup_layout(bookmark_view->m_sub_main_layout);
bookmark_view->_set_view_mode(HISTORY_VIEW);
} else {
BROWSER_LOGD("tab bookmark");
if (m_data_manager->get_history_layout()) {
- m_data_manager->get_history_layout()->hide_notify_popup();
+ m_data_manager->get_history_layout()->hide_notify_popup_layout(
+ m_data_manager->get_history_layout()->m_sub_main_history_layout);
bookmark_view->_set_view_mode(BOOKMARK_VIEW);
}
}
@@ -1128,7 +1130,7 @@ void Browser_Bookmark_View::__edit_bookmark_item_button_clicked_cb(void *data, E
elm_check_state_set(bookmark_view->m_edit_mode_select_all_check_button, EINA_FALSE);
- bookmark_view->hide_notify_popup();
+ bookmark_view->hide_notify_popup_layout(bookmark_view->m_sub_main_layout);
bookmark_view->_set_edit_mode(EINA_FALSE);
@@ -2419,8 +2421,22 @@ Eina_Bool Browser_Bookmark_View::_create_main_layout(void)
evas_object_show(m_conformant);
elm_object_style_set(m_bg, "default");
-
- m_genlist_content_layout = elm_layout_add(m_main_layout);
+ m_sub_main_layout = elm_layout_add(m_main_layout);
+ if (!m_sub_main_layout) {
+ BROWSER_LOGE("elm_layout_add failed");
+ return EINA_FALSE;
+ }
+ elm_layout_file_set(m_sub_main_layout,
+ BROWSER_EDJE_DIR"/browser-bookmark-view.edj",
+ "browser/selectioninfo");
+ evas_object_size_hint_weight_set(
+ m_sub_main_layout,
+ EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(
+ m_sub_main_layout,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ m_genlist_content_layout = elm_layout_add(m_sub_main_layout);
if (!m_genlist_content_layout) {
BROWSER_LOGE("elm_layout_add failed");
return EINA_FALSE;
@@ -2461,7 +2477,8 @@ Eina_Bool Browser_Bookmark_View::_create_main_layout(void)
evas_object_smart_callback_add(m_back_button, "clicked", __back_button_clicked_cb, this);
evas_object_show(m_back_button);
- elm_object_part_content_set(m_main_layout, "elm.swallow.content", m_genlist_content_layout);
+ elm_object_part_content_set(m_sub_main_layout, "genlist.swallow.contents", m_genlist_content_layout);
+ elm_object_part_content_set(m_main_layout, "elm.swallow.content", m_sub_main_layout);
m_top_control_bar = elm_toolbar_add(m_main_layout);
if (!m_top_control_bar) {
diff --git a/src/browser-bookmark/browser-bookmark-view.h b/src/browser-bookmark/browser-bookmark-view.h
index 4036325..2e4ee7d 100755
--- a/src/browser-bookmark/browser-bookmark-view.h
+++ b/src/browser-bookmark/browser-bookmark-view.h
@@ -124,6 +124,7 @@ private:
Evas_Object *m_sub_folder_genlist;
Evas_Object *m_content_layout;
Evas_Object *m_main_layout;
+ Evas_Object *m_sub_main_layout;
Evas_Object *m_genlist_content_layout;
Evas_Object *m_genlist_content_box;
Evas_Object *m_top_control_bar;
diff --git a/src/browser-common-view.cpp b/src/browser-common-view.cpp
index 3fe7b69..197a163 100755
--- a/src/browser-common-view.cpp
+++ b/src/browser-common-view.cpp
@@ -31,6 +31,7 @@ Browser_Common_View::Browser_Common_View(void)
:
m_selection_info(NULL)
,m_selection_info_layout(NULL)
+ ,m_selinfo_layout(NULL)
,m_popup(NULL)
,m_ug(NULL)
,m_share_popup(NULL)
@@ -177,6 +178,47 @@ void Browser_Common_View::show_notify_popup(const char *msg, int timeout, Eina_B
evas_object_show(m_selection_info);
}
+void Browser_Common_View::show_notify_popup_layout(const char *msg, int timeout, Evas_Object *parent)
+{
+ if (m_selinfo_layout) {
+ evas_object_del(m_selinfo_layout);
+ m_selinfo_layout = NULL;
+ }
+
+ m_selinfo_layout = elm_layout_add(parent);
+ if (!m_selinfo_layout) {
+ BROWSER_LOGD("elm_layout_add failed");
+ return;
+ }
+ elm_object_part_content_set(parent,
+ "selinfo.swallow.contents",
+ m_selinfo_layout);
+ evas_object_size_hint_weight_set(m_selinfo_layout,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(m_selinfo_layout,
+ EVAS_HINT_FILL,
+ EVAS_HINT_FILL);
+
+ elm_object_content_set(m_selection_info, m_selection_info_layout);
+
+ /* Set the layout theme */
+ elm_layout_theme_set(m_selinfo_layout, "standard", "selectioninfo", "default");
+ /* Set the text */
+ elm_object_part_text_set(m_selinfo_layout, "elm.text", msg);
+ elm_object_signal_emit(parent, "show,selection,info", "elm");
+}
+
+void Browser_Common_View::hide_notify_popup_layout(Evas_Object *parent)
+{
+ if (m_selinfo_layout) {
+ evas_object_del(m_selinfo_layout);
+ m_selinfo_layout = NULL;
+ }
+
+ elm_object_signal_emit(parent, "hide,selection,info", "elm");
+}
+
Eina_Bool Browser_Common_View::find_word_with_text(const char *text_to_find)
{
BROWSER_LOGD("[%s], text_to_find[%s]", __func__, text_to_find);
diff --git a/src/browser-common-view.h b/src/browser-common-view.h
index 80cfa14..cbb96dd 100755
--- a/src/browser-common-view.h
+++ b/src/browser-common-view.h
@@ -49,6 +49,8 @@ public:
void show_msg_popup(const char *title, const char *msg, int timeout);
void show_notify_popup(const char *msg, int timeout = 0, Eina_Bool has_control_bar = EINA_FALSE);
void hide_notify_popup(void);
+ void show_notify_popup_layout(const char *msg, int timeout, Evas_Object *parent);
+ void hide_notify_popup_layout(Evas_Object *parent);
Eina_Bool find_word_with_text(const char *text_to_find);
protected:
Evas_Object *_capture_snapshot(Browser_Window *window, float scale);
@@ -97,6 +99,7 @@ private:
Evas_Object *m_popup;
Evas_Object *m_selection_info;
Evas_Object *m_selection_info_layout;
+ Evas_Object *m_selinfo_layout;
Evas_Object *m_share_popup;
Evas_Object *m_share_list;
Evas_Object *m_call_confirm_popup;
diff --git a/src/browser-history/browser-history-layout.cpp b/src/browser-history/browser-history-layout.cpp
index a593bd3..5846398 100755
--- a/src/browser-history/browser-history-layout.cpp
+++ b/src/browser-history/browser-history-layout.cpp
@@ -61,6 +61,7 @@ Browser_History_Layout::Browser_History_Layout(void)
,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)
@@ -74,7 +75,7 @@ Browser_History_Layout::Browser_History_Layout(void)
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])
@@ -332,7 +333,7 @@ void Browser_History_Layout::_set_edit_mode(Eina_Bool edit_mode)
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);
@@ -455,13 +456,13 @@ void Browser_History_Layout::_show_selection_info(void)
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;
@@ -470,7 +471,7 @@ void Browser_History_Layout::_show_selection_info(void)
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);
@@ -1139,7 +1140,22 @@ Eina_Bool Browser_History_Layout::_create_main_layout(void)
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;
@@ -1179,6 +1195,7 @@ Eina_Bool Browser_History_Layout::_create_main_layout(void)
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;
}
diff --git a/src/browser-history/browser-history-layout.h b/src/browser-history/browser-history-layout.h
index 0cd901b..109deeb 100755
--- a/src/browser-history/browser-history-layout.h
+++ b/src/browser-history/browser-history-layout.h
@@ -44,7 +44,7 @@ public:
~Browser_History_Layout(void);
Eina_Bool init(void);
- Evas_Object *get_main_layout(void) { return m_searchbar_layout; }
+ Evas_Object *get_main_layout(void) { return m_sub_main_history_layout; }
protected:
void _set_edit_mode(Eina_Bool edit_mode);
@@ -106,6 +106,7 @@ private:
Elm_Object_Item *m_current_sweep_item;
+ Evas_Object *m_sub_main_history_layout;
Evas_Object *m_searchbar_layout;
Evas_Object *m_searchbar;
Evas_Object *m_history_genlist;