forked from enlightenment/efl
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->level_active[level] is false (line 116). if sd->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
This commit is contained in:
parent
a9cb727876
commit
43a6486eb2
|
@ -910,7 +910,8 @@
|
||||||
2013-01-16 WooHyun Jung
|
2013-01-16 WooHyun Jung
|
||||||
|
|
||||||
* elm_plug should call elm_widget_can_focus_set after adding parent class.
|
* elm_plug should call elm_widget_can_focus_set after adding parent class.
|
||||||
|
|
||||||
2013-01-16 WooHyun Jung
|
|
||||||
|
|
||||||
* 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.
|
* 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.
|
||||||
|
|
||||||
|
2013-01-16 Jaeun Choi
|
||||||
|
|
||||||
|
* Fix bug where index is not re-filled if autohide disabled
|
||||||
|
|
|
@ -122,6 +122,7 @@ Fixes:
|
||||||
* Added the min_year and max_year in the standard profile config.
|
* Added the min_year and max_year in the standard profile config.
|
||||||
* Fix omitting signal emission when customized text parts change the text.
|
* Fix omitting signal emission when customized text parts change the text.
|
||||||
* Fix "changed" signal being sent twice in case of toggle style when check is clicked.
|
* Fix "changed" signal being sent twice in case of toggle style when check is clicked.
|
||||||
|
* Fix index refill bug when autohide disabled.
|
||||||
|
|
||||||
Removals:
|
Removals:
|
||||||
|
|
||||||
|
|
|
@ -171,16 +171,6 @@ _index_box_auto_fill(Evas_Object *obj,
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
i++;
|
i++;
|
||||||
evas_object_smart_calculate(box); // force a calc so we know the size
|
|
||||||
evas_object_size_hint_min_get(box, &mw, &mh);
|
|
||||||
if (mh > h)
|
|
||||||
{
|
|
||||||
_index_box_clear(obj, box, level);
|
|
||||||
if (i > 0)
|
|
||||||
{
|
|
||||||
// FIXME: only i objects fit! try again. overflows right now
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ACCESS
|
// ACCESS
|
||||||
if ((it->level == 0) &&
|
if ((it->level == 0) &&
|
||||||
|
@ -510,7 +500,6 @@ _on_mouse_down(void *data,
|
||||||
if (!sd->autohide_disabled)
|
if (!sd->autohide_disabled)
|
||||||
{
|
{
|
||||||
_index_box_clear(data, sd->bx[1], 1);
|
_index_box_clear(data, sd->bx[1], 1);
|
||||||
_index_box_auto_fill(data, sd->bx[0], 0);
|
|
||||||
elm_layout_signal_emit(data, "elm,state,active", "elm");
|
elm_layout_signal_emit(data, "elm,state,active", "elm");
|
||||||
}
|
}
|
||||||
_sel_eval(data, ev->canvas.x, ev->canvas.y);
|
_sel_eval(data, ev->canvas.x, ev->canvas.y);
|
||||||
|
@ -615,7 +604,6 @@ _on_mouse_in_access(void *data,
|
||||||
if (!sd->autohide_disabled)
|
if (!sd->autohide_disabled)
|
||||||
{
|
{
|
||||||
_index_box_clear(data, sd->bx[1], 1);
|
_index_box_clear(data, sd->bx[1], 1);
|
||||||
_index_box_auto_fill(data, sd->bx[0], 0);
|
|
||||||
elm_layout_signal_emit(data, "elm,state,active", "elm");
|
elm_layout_signal_emit(data, "elm,state,active", "elm");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -926,7 +914,6 @@ _autohide_disabled_set(Eo *obj, void *_pd, va_list *list)
|
||||||
if (sd->autohide_disabled)
|
if (sd->autohide_disabled)
|
||||||
{
|
{
|
||||||
_index_box_clear(obj, sd->bx[1], 1);
|
_index_box_clear(obj, sd->bx[1], 1);
|
||||||
_index_box_auto_fill(obj, sd->bx[0], 0);
|
|
||||||
elm_layout_signal_emit(obj, "elm,state,active", "elm");
|
elm_layout_signal_emit(obj, "elm,state,active", "elm");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1330,8 +1317,13 @@ _level_go(Eo *obj, void *_pd, va_list *list)
|
||||||
int level = va_arg(*list, int);
|
int level = va_arg(*list, int);
|
||||||
(void) level;
|
(void) level;
|
||||||
Elm_Index_Smart_Data *sd = _pd;
|
Elm_Index_Smart_Data *sd = _pd;
|
||||||
|
_index_box_clear(obj, sd->bx[0], 0);
|
||||||
_index_box_auto_fill(obj, sd->bx[0], 0);
|
_index_box_auto_fill(obj, sd->bx[0], 0);
|
||||||
if (sd->level == 1) _index_box_auto_fill(obj, sd->bx[1], 1);
|
if (sd->level == 1)
|
||||||
|
{
|
||||||
|
_index_box_clear(obj, sd->bx[1], 1);
|
||||||
|
_index_box_auto_fill(obj, sd->bx[1], 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
|
Loading…
Reference in New Issue