seoz pushed a commit to branch master.
commit 588e68b1d01570373fe30b71a3d4ac5ee444a4e5
Author: Jaeun Choi <[email protected]>
Date: Mon Mar 4 17:55:48 2013 +0900
elm_index: set selected item active in smart theme
This patch sets selected item's state active when theme is changed.
---
ChangeLog | 4 ++++
NEWS | 1 +
src/lib/elm_index.c | 26 +++++++++++++++++---------
3 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8d47aee..648352f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1080,3 +1080,7 @@
* Fix the standard of scrollbar-calculation from the scroller's x to
pan's x.
The scrollbar have to sync with pan. if not, the scrollbar doesn't
move even if the position of content moves.
+
+2013-03-04 Jaeun Choi
+
+ * Fix elm_index to send a signal to the selected item in smart theme.
diff --git a/NEWS b/NEWS
index 9ee79d9..7efb1ba 100644
--- a/NEWS
+++ b/NEWS
@@ -164,6 +164,7 @@ Fixes:
* Fix scroller acceleration bug. It was accelerated even it's scrolled
after finishing the previous scroll. This happens with page scroll enabled.
* Fix 1byte invalid read & do memset, rewind if needed.
* Fix the standard of scrollbar-calculation from the scroller's x to pan's
x.
+ * Fix elm_index to send a signal to the selected item in smart theme.
Removals:
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 6b0ce03..597d5b6 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -316,6 +316,8 @@ static void
_elm_index_smart_theme(Eo *obj, void *_pd, va_list *list)
{
Evas_Coord minw = 0, minh = 0;
+ Elm_Index_Item *it;
+
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_FALSE;
Eina_Bool int_ret = EINA_FALSE;
@@ -385,6 +387,15 @@ _elm_index_smart_theme(Eo *obj, void *_pd, va_list *list)
}
else elm_layout_signal_emit(obj, "elm,state,inactive", "elm");
+ it = (Elm_Index_Item *)elm_index_selected_item_get(obj, sd->level);
+ if (it)
+ {
+ if (it->head)
+ edje_object_signal_emit(VIEW(it->head), "elm,state,active", "elm");
+ else
+ edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
+ }
+
if (ret) *ret = EINA_TRUE;
}
@@ -863,21 +874,18 @@ _index_resize_cb(void *data,
if (!sd->omit_enabled) return;
- Eina_List *l;
Elm_Index_Item *it;
_index_box_clear(data, sd->bx[0], 0);
_index_box_auto_fill(data, sd->bx[0], 0);
- EINA_LIST_FOREACH(sd->items, l, it)
+ it = (Elm_Index_Item *)elm_index_selected_item_get(obj, sd->level);
+ if (it)
{
- if (it->selected)
- {
- if (it->head)
- edje_object_signal_emit(VIEW(it->head), "elm,state,active",
"elm");
- else
- edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
- }
+ if (it->head)
+ edje_object_signal_emit(VIEW(it->head), "elm,state,active", "elm");
+ else
+ edje_object_signal_emit(VIEW(it), "elm,state,active", "elm");
}
}
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb