thanks!
1. no whitespace change this time
2. include a backport to stable 1.7 branch
--
Jaeun Choi
-----Original Message-----
From: "Carsten Haitzler"<ras...@rasterman.com>
To: "Enlightenment developer
list"<enlightenment-devel@lists.sourceforge.net>;
Cc: "Jaeun Choi"<jaeun_c...@naver.com>;
Sent: 2013-01-12 (토) 17:55:02
Subject: Re: [E-devel] [PATCH] elm_index: removed unnecessary lines
On Sat, 12 Jan 2013 17:30:34 +0900 (KST) Jaeun Choi
<jaeun_choi>@naver.com> said:
> 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.
tanks!
a few comments. :)
1. can you avoid whitespace changes in patches where possible - they just
clutter them. if you want to fix whitespace issues split them of in another
patch
2. can you also provide a backport to stable 1.7 branch? (look at evn branches
- we maintan a stable 1.7 branch for elementary in order to release bugfix
releases? since this is... a bug fix :)
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) ras...@rasterman.com
Index: src/lib/elm_index.c
===================================================================
--- src/lib/elm_index.c (revision 82689)
+++ src/lib/elm_index.c (working copy)
@@ -171,16 +171,6 @@ _index_box_auto_fill(Evas_Object *obj,
evas_object_show(o);
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
if ((it->level == 0) &&
@@ -510,7 +500,6 @@ _on_mouse_down(void *data,
if (!sd->autohide_disabled)
{
_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");
}
_sel_eval(data, ev->canvas.x, ev->canvas.y);
@@ -615,7 +604,6 @@ _on_mouse_in_access(void *data,
if (!sd->autohide_disabled)
{
_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");
}
}
@@ -926,7 +914,6 @@ _autohide_disabled_set(Eo *obj, void *_pd, va_list
if (sd->autohide_disabled)
{
_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");
}
else
@@ -1330,8 +1317,13 @@ _level_go(Eo *obj, void *_pd, va_list *list)
int level = va_arg(*list, int);
(void) level;
Elm_Index_Smart_Data *sd = _pd;
+ _index_box_clear(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
Index: src/lib/elm_index.c
===================================================================
--- src/lib/elm_index.c (revision 82692)
+++ src/lib/elm_index.c (working copy)
@@ -142,16 +142,6 @@ _index_box_auto_fill(Evas_Object *obj,
evas_object_show(o);
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
- }
- }
}
evas_object_smart_calculate(box);
@@ -452,7 +442,6 @@ _on_mouse_down(void *data,
if (!sd->autohide_disabled)
{
_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");
}
_sel_eval(data, ev->canvas.x, ev->canvas.y);
@@ -693,7 +682,6 @@ elm_index_autohide_disabled_set(Evas_Object *obj,
if (sd->autohide_disabled)
{
_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");
}
else
@@ -948,8 +936,13 @@ elm_index_level_go(Evas_Object *obj,
ELM_INDEX_CHECK(obj);
ELM_INDEX_DATA_GET(obj, sd);
+ _index_box_clear(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
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel