summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-10-24 03:40:54 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-10-24 03:40:54 +0000
commitf7aaa3aeff4749c1919d7a7e474f605a25f5477e (patch)
treed84a5d01ae2df7e251e889514e32252f908470ab /legacy
parent484d2f953b29195919435a88373683666e747f4b (diff)
better use of internal variables
SVN revision: 64352
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/lib/elm_genlist.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c
index ad13d92217..a64e843194 100644
--- a/legacy/elementary/src/lib/elm_genlist.c
+++ b/legacy/elementary/src/lib/elm_genlist.c
@@ -997,7 +997,7 @@ _long_press(void *data)
997 return ECORE_CALLBACK_CANCEL; 997 return ECORE_CALLBACK_CANCEL;
998 it->wd->longpressed = EINA_TRUE; 998 it->wd->longpressed = EINA_TRUE;
999 evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it); 999 evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, it);
1000 if ((it->wd->reorder_mode) && (it->item->flags != ELM_GENLIST_ITEM_GROUP)) 1000 if ((it->wd->reorder_mode) && (!it->group))
1001 { 1001 {
1002 it->wd->reorder_it = it; 1002 it->wd->reorder_it = it;
1003 it->wd->reorder_start_y = 0; 1003 it->wd->reorder_start_y = 0;
@@ -1836,7 +1836,7 @@ _item_realize(Elm_Gen_Item *it,
1836 1836
1837 for (it2 = it, depth = 0; it2->parent; it2 = it2->parent) 1837 for (it2 = it, depth = 0; it2->parent; it2 = it2->parent)
1838 { 1838 {
1839 if (it2->parent->item->flags != ELM_GENLIST_ITEM_GROUP) depth += 1; 1839 if (!it2->parent->group) depth += 1;
1840 } 1840 }
1841 it->item->expanded_depth = depth; 1841 it->item->expanded_depth = depth;
1842 treesize = edje_object_data_get(VIEW(it), "treesize"); 1842 treesize = edje_object_data_get(VIEW(it), "treesize");
@@ -1876,7 +1876,7 @@ _item_realize(Elm_Gen_Item *it,
1876 /* homogenous genlist shortcut */ 1876 /* homogenous genlist shortcut */
1877 if (!it->item->mincalcd) 1877 if (!it->item->mincalcd)
1878 { 1878 {
1879 if (it->item->flags & ELM_GENLIST_ITEM_GROUP) 1879 if (it->group)
1880 { 1880 {
1881 it->item->w = it->item->minw = it->wd->group_item_width; 1881 it->item->w = it->item->minw = it->wd->group_item_width;
1882 it->item->h = it->item->minh = it->wd->group_item_height; 1882 it->item->h = it->item->minh = it->wd->group_item_height;
@@ -1914,7 +1914,7 @@ _item_realize(Elm_Gen_Item *it,
1914 it->item->h = it->item->minh = mh; 1914 it->item->h = it->item->minh = mh;
1915 it->item->mincalcd = EINA_TRUE; 1915 it->item->mincalcd = EINA_TRUE;
1916 1916
1917 if ((!it->wd->group_item_width) && (it->item->flags == ELM_GENLIST_ITEM_GROUP)) 1917 if ((!it->wd->group_item_width) && (it->group))
1918 { 1918 {
1919 it->wd->group_item_width = mw; 1919 it->wd->group_item_width = mw;
1920 it->wd->group_item_height = mh; 1920 it->wd->group_item_height = mh;
@@ -2047,7 +2047,7 @@ _item_block_unrealize(Item_Block *itb)
2047 evas_event_freeze(evas_object_evas_get(itb->wd->obj)); 2047 evas_event_freeze(evas_object_evas_get(itb->wd->obj));
2048 EINA_LIST_FOREACH(itb->items, l, it) 2048 EINA_LIST_FOREACH(itb->items, l, it)
2049 { 2049 {
2050 if (it->item->flags != ELM_GENLIST_ITEM_GROUP) 2050 if (!it->group)
2051 { 2051 {
2052 if (it->dragging) 2052 if (it->dragging)
2053 { 2053 {
@@ -2193,7 +2193,7 @@ _item_block_position(Item_Block *itb,
2193 2193
2194 vis = (ELM_RECTS_INTERSECT(it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h, 2194 vis = (ELM_RECTS_INTERSECT(it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
2195 cvx, cvy, cvw, cvh)); 2195 cvx, cvy, cvw, cvh));
2196 if (it->item->flags != ELM_GENLIST_ITEM_GROUP) 2196 if (!it->group)
2197 { 2197 {
2198 if ((itb->realized) && (!it->realized)) 2198 if ((itb->realized) && (!it->realized))
2199 { 2199 {
@@ -3423,7 +3423,7 @@ elm_genlist_item_append(Evas_Object *obj,
3423 if (!it) return NULL; 3423 if (!it) return NULL;
3424 if (!it->parent) 3424 if (!it->parent)
3425 { 3425 {
3426 if (flags & ELM_GENLIST_ITEM_GROUP) 3426 if (it->group)
3427 wd->group_items = eina_list_append(wd->group_items, it); 3427 wd->group_items = eina_list_append(wd->group_items, it);
3428 wd->items = eina_inlist_append(wd->items, EINA_INLIST_GET(it)); 3428 wd->items = eina_inlist_append(wd->items, EINA_INLIST_GET(it));
3429 it->item->rel = NULL; 3429 it->item->rel = NULL;
@@ -3463,7 +3463,7 @@ elm_genlist_item_prepend(Evas_Object *obj,
3463 if (!it) return NULL; 3463 if (!it) return NULL;
3464 if (!it->parent) 3464 if (!it->parent)
3465 { 3465 {
3466 if (flags & ELM_GENLIST_ITEM_GROUP) 3466 if (it->group)
3467 wd->group_items = eina_list_prepend(wd->group_items, it); 3467 wd->group_items = eina_list_prepend(wd->group_items, it);
3468 wd->items = eina_inlist_prepend(wd->items, EINA_INLIST_GET(it)); 3468 wd->items = eina_inlist_prepend(wd->items, EINA_INLIST_GET(it));
3469 it->item->rel = NULL; 3469 it->item->rel = NULL;
@@ -3508,8 +3508,8 @@ elm_genlist_item_insert_after(Evas_Object *obj,
3508 3508
3509 if (!it->parent) 3509 if (!it->parent)
3510 { 3510 {
3511 if ((flags & ELM_GENLIST_ITEM_GROUP) && 3511 if ((it->group) &&
3512 (after->item->flags & ELM_GENLIST_ITEM_GROUP)) 3512 (after->group))
3513 wd->group_items = eina_list_append_relative(wd->group_items, it, 3513 wd->group_items = eina_list_append_relative(wd->group_items, it,
3514 after); 3514 after);
3515 } 3515 }
@@ -3549,8 +3549,7 @@ elm_genlist_item_insert_before(Evas_Object *obj,
3549 3549
3550 if (!it->parent) 3550 if (!it->parent)
3551 { 3551 {
3552 if ((flags & ELM_GENLIST_ITEM_GROUP) && 3552 if (it->group && before->group)
3553 (before->item->flags & ELM_GENLIST_ITEM_GROUP))
3554 wd->group_items = eina_list_prepend_relative(wd->group_items, it, 3553 wd->group_items = eina_list_prepend_relative(wd->group_items, it,
3555 before); 3554 before);
3556 } 3555 }
@@ -3621,7 +3620,7 @@ elm_genlist_item_direct_sorted_insert(Evas_Object *obj,
3621 wd->state = eina_inlist_sorted_state_new(); 3620 wd->state = eina_inlist_sorted_state_new();
3622 } 3621 }
3623 3622
3624 if (flags & ELM_GENLIST_ITEM_GROUP) 3623 if (it->group)
3625 wd->group_items = eina_list_append(wd->group_items, it); 3624 wd->group_items = eina_list_append(wd->group_items, it);
3626 3625
3627 wd->items = eina_inlist_sorted_state_insert(wd->items, EINA_INLIST_GET(it), 3626 wd->items = eina_inlist_sorted_state_insert(wd->items, EINA_INLIST_GET(it),