summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangpyo Kim <sangpyo7.kim@samsung.com>2012-09-07 01:19:11 +0900
committerSangpyo Kim <sangpyo7.kim@samsung.com>2012-09-07 11:16:05 +0900
commit3876391d50a57b476e70577c4de005db7a5fdc10 (patch)
treec7ae84a647da5b2552d360b9bdf15c9b2b225f7f
parent7f3aceb1b7cf38dcda6c59884b6a14401ad42526 (diff)
downloadbrowser-3876391d50a57b476e70577c4de005db7a5fdc10.tar.gz
browser-3876391d50a57b476e70577c4de005db7a5fdc10.tar.bz2
browser-3876391d50a57b476e70577c4de005db7a5fdc10.zip
[Title] recovering sweeped item whem genlist go into edit mode.
[Issue#] N_SE-9364 [Problem] list layout is broken [Cause] sweeped item on the genlist should be recovered before edit mode changed. [Solution] recovering sweeped item whem genlist go into edit mode. [Team] Browser UI [Developer] sangpyo7.kim [Request] N/A Change-Id: Idb4ea3b0473aae17702d670222e2e28fe9341b1e
-rwxr-xr-xsrc/browser-bookmark/browser-bookmark-view.cpp6
-rwxr-xr-xsrc/browser-history/browser-history-layout.cpp3
-rwxr-xr-xsrc/browser-utility.cpp19
-rwxr-xr-xsrc/browser-utility.h4
4 files changed, 32 insertions, 0 deletions
diff --git a/src/browser-bookmark/browser-bookmark-view.cpp b/src/browser-bookmark/browser-bookmark-view.cpp
index dac73ff1..bc9625bd 100755
--- a/src/browser-bookmark/browser-bookmark-view.cpp
+++ b/src/browser-bookmark/browser-bookmark-view.cpp
@@ -936,6 +936,12 @@ void Browser_Bookmark_View::_set_edit_mode(Eina_Bool edit_mode)
hide_notify_popup_layout(m_sub_main_layout);
if (edit_mode) {
+#if defined(GENLIST_SWEEP)
+ if (m_current_folder_id = BROWSER_BOOKMARK_MAIN_FOLDER_ID)
+ br_elm_genlist_sweep_item_recover(m_main_folder_genlist);
+ else
+ br_elm_genlist_sweep_item_recover(m_sub_folder_genlist);
+#endif
elm_object_style_set(m_bg, "edit_mode");
m_edit_mode_select_all_layout = elm_layout_add(m_genlist_content_box);
diff --git a/src/browser-history/browser-history-layout.cpp b/src/browser-history/browser-history-layout.cpp
index 58463981..b24c5221 100755
--- a/src/browser-history/browser-history-layout.cpp
+++ b/src/browser-history/browser-history-layout.cpp
@@ -338,6 +338,9 @@ void Browser_History_Layout::_set_edit_mode(Eina_Bool edit_mode)
_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);
diff --git a/src/browser-utility.cpp b/src/browser-utility.cpp
index bcc66b71..58893fb6 100755
--- a/src/browser-utility.cpp
+++ b/src/browser-utility.cpp
@@ -343,6 +343,25 @@ Evas_Object *br_elm_searchbar_entry_get(Evas_Object *obj)
return elm_object_part_content_get(obj, "elm.swallow.content");
}
+#if defined(GENLIST_SWEEP)
+void br_elm_genlist_sweep_item_recover(Evas_Object *obj)
+{
+ if (obj == NULL) {
+ BROWSER_LOGD("obj is NULL");
+ return;
+ }
+
+ Elm_Object_Item *it = (Elm_Object_Item *) elm_genlist_decorated_item_get(obj);
+
+ /* Finish genlist sweep*/
+ if (it) {
+ elm_genlist_item_decorate_mode_set(it, "slide", EINA_FALSE);
+ elm_genlist_item_select_mode_set(it, ELM_OBJECT_SELECT_MODE_DEFAULT);
+ elm_genlist_item_update(it);
+ }
+}
+#endif
+
bool br_preference_set_bool(const char *key, bool value)
{
int ret;
diff --git a/src/browser-utility.h b/src/browser-utility.h
index 7d5a3f18..19ac7612 100755
--- a/src/browser-utility.h
+++ b/src/browser-utility.h
@@ -39,6 +39,10 @@ char *br_elm_searchbar_text_get(Evas_Object *obj);
Evas_Object *br_elm_searchbar_entry_get(Evas_Object *obj);
Evas_Object *br_elm_find_word_editfield_add(Evas_Object *parent);
+#if defined(GENLIST_SWEEP)
+void br_elm_genlist_sweep_item_recover(Evas_Object *obj);
+#endif
+
/* preference APIs */
bool br_preference_set_bool(const char *key, bool value);
bool br_preference_get_bool(const char *key, bool *value);