summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun_choi@naver.com>2013-01-16 08:20:47 +0000
committerCarsten Haitzler <raster@rasterman.com>2013-01-16 08:20:47 +0000
commitbd50e6da217822289e66330940b9be5c3f2abc81 (patch)
treeaa3a3342553a60e3a2cdc5316d9ee7796a805878
parentb47f140be267dcde6212dfa913e7e90a55fc287b (diff)
From: Jaeun Choi <jaeun_choi@naver.com>
Subject: [E-devel] [PATCH] elm_index: removed unnecessary lines I removed some unnecessary lines from elm_index.c 1. in _index_box_auto_fill _index_box_clear(line 178) does nothing: if _index_box_clear is called, it means sd-&gt;level_active[level] is false (line 116). if sd-&gt;level_active[level] is false, _index_box_clear returns immediately (line 60). 2. in _on_mouse_down 3. in _on_mouse_in_access 4. in _autohide_disabled_set Signal emit is enough. Filling the box and displaying the box are separated jobs. I think it's logically consistent to fill the box only when 1) elm_index_level_go is called 2) theme is changed 5. in _level_go Always clear the box before fill the box. SVN revision: 82864
-rw-r--r--ChangeLog5
-rw-r--r--NEWS1
-rw-r--r--src/lib/elm_index.c20
3 files changed, 10 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 026b6d831..629396894 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -910,7 +910,8 @@
9102013-01-16 WooHyun Jung 9102013-01-16 WooHyun Jung
911 911
912 * elm_plug should call elm_widget_can_focus_set after adding parent class. 912 * elm_plug should call elm_widget_can_focus_set after adding parent class.
913 * Now, widget itself is the object which gets mouse_up event for stealing focus from another object. By this change, a widget with scroller interface can change its focus state before mouse_up of hit_rect.
913 914
9142013-01-16 WooHyun Jung 9152013-01-16 Jaeun Choi
915 916
916 * Now, widget itself is the object which gets mouse_up event for stealing focus from another object. By this change, a widget with scroller interface can change its focus state before mouse_up of hit_rect. 917 * Fix bug where index is not re-filled if autohide disabled
diff --git a/NEWS b/NEWS
index 95c4beecf..d5fd296e3 100644
--- a/NEWS
+++ b/NEWS
@@ -122,6 +122,7 @@ Fixes:
122 * Added the min_year and max_year in the standard profile config. 122 * Added the min_year and max_year in the standard profile config.
123 * Fix omitting signal emission when customized text parts change the text. 123 * Fix omitting signal emission when customized text parts change the text.
124 * Fix "changed" signal being sent twice in case of toggle style when check is clicked. 124 * Fix "changed" signal being sent twice in case of toggle style when check is clicked.
125 * Fix index refill bug when autohide disabled.
125 126
126Removals: 127Removals:
127 128
diff --git a/src/lib/elm_index.c b/src/lib/elm_index.c
index 018b6d747..ead396419 100644
--- a/src/lib/elm_index.c
+++ b/src/lib/elm_index.c
@@ -171,16 +171,6 @@ _index_box_auto_fill(Evas_Object *obj,
171 evas_object_show(o); 171 evas_object_show(o);
172 172
173 i++; 173 i++;
174 evas_object_smart_calculate(box); // force a calc so we know the size
175 evas_object_size_hint_min_get(box, &mw, &mh);
176 if (mh > h)
177 {
178 _index_box_clear(obj, box, level);
179 if (i > 0)
180 {
181 // FIXME: only i objects fit! try again. overflows right now
182 }
183 }
184 174
185 // ACCESS 175 // ACCESS
186 if ((it->level == 0) && 176 if ((it->level == 0) &&
@@ -510,7 +500,6 @@ _on_mouse_down(void *data,
510 if (!sd->autohide_disabled) 500 if (!sd->autohide_disabled)
511 { 501 {
512 _index_box_clear(data, sd->bx[1], 1); 502 _index_box_clear(data, sd->bx[1], 1);
513 _index_box_auto_fill(data, sd->bx[0], 0);
514 elm_layout_signal_emit(data, "elm,state,active", "elm"); 503 elm_layout_signal_emit(data, "elm,state,active", "elm");
515 } 504 }
516 _sel_eval(data, ev->canvas.x, ev->canvas.y); 505 _sel_eval(data, ev->canvas.x, ev->canvas.y);
@@ -615,7 +604,6 @@ _on_mouse_in_access(void *data,
615 if (!sd->autohide_disabled) 604 if (!sd->autohide_disabled)
616 { 605 {
617 _index_box_clear(data, sd->bx[1], 1); 606 _index_box_clear(data, sd->bx[1], 1);
618 _index_box_auto_fill(data, sd->bx[0], 0);
619 elm_layout_signal_emit(data, "elm,state,active", "elm"); 607 elm_layout_signal_emit(data, "elm,state,active", "elm");
620 } 608 }
621} 609}
@@ -926,7 +914,6 @@ _autohide_disabled_set(Eo *obj, void *_pd, va_list *list)
926 if (sd->autohide_disabled) 914 if (sd->autohide_disabled)
927 { 915 {
928 _index_box_clear(obj, sd->bx[1], 1); 916 _index_box_clear(obj, sd->bx[1], 1);
929 _index_box_auto_fill(obj, sd->bx[0], 0);
930 elm_layout_signal_emit(obj, "elm,state,active", "elm"); 917 elm_layout_signal_emit(obj, "elm,state,active", "elm");
931 } 918 }
932 else 919 else
@@ -1330,8 +1317,13 @@ _level_go(Eo *obj, void *_pd, va_list *list)
1330 int level = va_arg(*list, int); 1317 int level = va_arg(*list, int);
1331 (void) level; 1318 (void) level;
1332 Elm_Index_Smart_Data *sd = _pd; 1319 Elm_Index_Smart_Data *sd = _pd;
1320 _index_box_clear(obj, sd->bx[0], 0);
1333 _index_box_auto_fill(obj, sd->bx[0], 0); 1321 _index_box_auto_fill(obj, sd->bx[0], 0);
1334 if (sd->level == 1) _index_box_auto_fill(obj, sd->bx[1], 1); 1322 if (sd->level == 1)
1323 {
1324 _index_box_clear(obj, sd->bx[1], 1);
1325 _index_box_auto_fill(obj, sd->bx[1], 1);
1326 }
1335} 1327}
1336 1328
1337EAPI void 1329EAPI void