summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2015-01-10 16:44:38 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-01-10 16:44:38 +0900
commited3cddac97e75781a20022461993c502e493b841 (patch)
tree42f65d333f8fad25288e29ac8c80c3c131a4e93e
parent12c9f25336d015f36c513e359d6d69a2c76ba82f (diff)
genlist: fix regression bug. (T1986)
newly added in 2955ebc5dd01fbfb5a3286b724c8a40915864ad8
-rw-r--r--src/lib/elm_genlist.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index 1c5ee9620..4e82beb0e 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -619,7 +619,7 @@ _item_block_unrealize(Item_Block *itb)
619 619
620 EINA_LIST_FOREACH(itb->items, l, it) 620 EINA_LIST_FOREACH(itb->items, l, it)
621 { 621 {
622 if (itb->must_recalc || (GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP)) 622 if (itb->must_recalc || !(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
623 { 623 {
624 if (it->dragging) 624 if (it->dragging)
625 { 625 {
@@ -1705,10 +1705,10 @@ _item_realize(Elm_Gen_Item *it,
1705 1705
1706 /* homogeneous genlist shortcut */ 1706 /* homogeneous genlist shortcut */
1707 if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) && 1707 if ((calc) && (sd->homogeneous) && (!it->item->mincalcd) &&
1708 (((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) && sd->group_item_width) || 1708 (((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) && sd->group_item_width) ||
1709 ((GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP) && sd->item_width))) 1709 (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) && sd->item_width)))
1710 { 1710 {
1711 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 1711 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
1712 { 1712 {
1713 it->item->w = it->item->minw = sd->group_item_width; 1713 it->item->w = it->item->minw = sd->group_item_width;
1714 it->item->h = it->item->minh = sd->group_item_height; 1714 it->item->h = it->item->minh = sd->group_item_height;
@@ -1757,7 +1757,7 @@ _item_realize(Elm_Gen_Item *it,
1757 it->item->mincalcd = EINA_TRUE; 1757 it->item->mincalcd = EINA_TRUE;
1758 1758
1759 if ((!sd->group_item_width) && 1759 if ((!sd->group_item_width) &&
1760 (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP)) 1760 (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
1761 { 1761 {
1762 sd->group_item_width = mw; 1762 sd->group_item_width = mw;
1763 sd->group_item_height = mh; 1763 sd->group_item_height = mh;
@@ -2168,7 +2168,7 @@ _item_block_position(Item_Block *itb,
2168 vis = (ELM_RECTS_INTERSECT 2168 vis = (ELM_RECTS_INTERSECT
2169 (it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h, 2169 (it->item->scrl_x, it->item->scrl_y, it->item->w, it->item->h,
2170 cvx, cvy, cvw, cvh)); 2170 cvx, cvy, cvw, cvh));
2171 if (GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP) 2171 if (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
2172 { 2172 {
2173 if ((itb->realized) && (!it->realized)) 2173 if ((itb->realized) && (!it->realized))
2174 { 2174 {
@@ -3566,7 +3566,7 @@ _elm_genlist_item_del_serious(Elm_Gen_Item *it)
3566 if (it->tooltip.del_cb) 3566 if (it->tooltip.del_cb)
3567 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it); 3567 it->tooltip.del_cb((void *)it->tooltip.data, WIDGET(it), it);
3568 ELM_SAFE_FREE(it->long_timer, ecore_timer_del); 3568 ELM_SAFE_FREE(it->long_timer, ecore_timer_del);
3569 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 3569 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
3570 sd->group_items = eina_list_remove(sd->group_items, it); 3570 sd->group_items = eina_list_remove(sd->group_items, it);
3571 3571
3572 ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free); 3572 ELM_SAFE_FREE(sd->state, eina_inlist_sorted_state_free);
@@ -3830,7 +3830,7 @@ _long_press_cb(void *data)
3830 3830
3831 sd->longpressed = EINA_TRUE; 3831 sd->longpressed = EINA_TRUE;
3832 evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, EO_OBJ(it)); 3832 evas_object_smart_callback_call(WIDGET(it), SIG_LONGPRESSED, EO_OBJ(it));
3833 if ((sd->reorder_mode) && (GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP)) 3833 if ((sd->reorder_mode) && !(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP))
3834 { 3834 {
3835 sd->reorder_it = it; 3835 sd->reorder_it = it;
3836 sd->reorder_start_y = 0; 3836 sd->reorder_start_y = 0;
@@ -4979,9 +4979,9 @@ _item_block_recalc(Item_Block *itb,
4979 if (!itb->realized) 4979 if (!itb->realized)
4980 { 4980 {
4981 if (qadd || (itb->sd->homogeneous && 4981 if (qadd || (itb->sd->homogeneous &&
4982 (((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) && 4982 (((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
4983 (!itb->sd->group_item_height)) || 4983 (!itb->sd->group_item_height)) ||
4984 ((GL_IT(it)->type != ELM_GENLIST_ITEM_GROUP) && 4984 (!(GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
4985 (!itb->sd->item_height))))) 4985 (!itb->sd->item_height)))))
4986 { 4986 {
4987 if (!it->item->mincalcd) changed = EINA_TRUE; 4987 if (!it->item->mincalcd) changed = EINA_TRUE;
@@ -4991,7 +4991,7 @@ _item_block_recalc(Item_Block *itb,
4991 4991
4992 if (itb->sd->homogeneous) 4992 if (itb->sd->homogeneous)
4993 { 4993 {
4994 if ((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) && 4994 if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
4995 (itb->sd->group_item_height == 0)) 4995 (itb->sd->group_item_height == 0))
4996 doit = EINA_TRUE; 4996 doit = EINA_TRUE;
4997 else if (itb->sd->item_height == 0) 4997 else if (itb->sd->item_height == 0)
@@ -5006,7 +5006,7 @@ _item_block_recalc(Item_Block *itb,
5006 } 5006 }
5007 else 5007 else
5008 { 5008 {
5009 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 5009 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
5010 { 5010 {
5011 it->item->w = it->item->minw = 5011 it->item->w = it->item->minw =
5012 sd->group_item_width; 5012 sd->group_item_width;
@@ -5029,7 +5029,7 @@ _item_block_recalc(Item_Block *itb,
5029 if ((itb->sd->homogeneous) && 5029 if ((itb->sd->homogeneous) &&
5030 (itb->sd->mode == ELM_LIST_COMPRESS)) 5030 (itb->sd->mode == ELM_LIST_COMPRESS))
5031 { 5031 {
5032 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 5032 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
5033 { 5033 {
5034 it->item->w = it->item->minw = 5034 it->item->w = it->item->minw =
5035 sd->group_item_width; 5035 sd->group_item_width;
@@ -5898,14 +5898,14 @@ _elm_genlist_item_new(Elm_Genlist_Data *sd,
5898 5898
5899 if (it->parent) 5899 if (it->parent)
5900 { 5900 {
5901 if (GL_IT(it->parent)->type == ELM_GENLIST_ITEM_GROUP) 5901 if (GL_IT(it->parent)->type & ELM_GENLIST_ITEM_GROUP)
5902 GL_IT(it)->group_item = parent; 5902 GL_IT(it)->group_item = parent;
5903 else if (GL_IT(it->parent)->group_item) 5903 else if (GL_IT(it->parent)->group_item)
5904 GL_IT(it)->group_item = GL_IT(it->parent)->group_item; 5904 GL_IT(it)->group_item = GL_IT(it->parent)->group_item;
5905 } 5905 }
5906 for (it2 = it, depth = 0; it2->parent; it2 = it2->parent) 5906 for (it2 = it, depth = 0; it2->parent; it2 = it2->parent)
5907 { 5907 {
5908 if (!GL_IT(it2->parent)->type == ELM_GENLIST_ITEM_GROUP) depth += 1; 5908 if (!(GL_IT(it2->parent)->type & ELM_GENLIST_ITEM_GROUP)) depth += 1;
5909 } 5909 }
5910 GL_IT(it)->expanded_depth = depth; 5910 GL_IT(it)->expanded_depth = depth;
5911 sd->item_count++; 5911 sd->item_count++;
@@ -5993,7 +5993,7 @@ _elm_genlist_item_append(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_Ge
5993 5993
5994 if (!it->parent) 5994 if (!it->parent)
5995 { 5995 {
5996 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 5996 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
5997 sd->group_items = eina_list_append(sd->group_items, it); 5997 sd->group_items = eina_list_append(sd->group_items, it);
5998 sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it)); 5998 sd->items = eina_inlist_append(sd->items, EINA_INLIST_GET(it));
5999 it->item->rel = NULL; 5999 it->item->rel = NULL;
@@ -6037,7 +6037,7 @@ _elm_genlist_item_prepend(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const Elm_G
6037 6037
6038 if (!it->parent) 6038 if (!it->parent)
6039 { 6039 {
6040 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 6040 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
6041 sd->group_items = eina_list_prepend(sd->group_items, it); 6041 sd->group_items = eina_list_prepend(sd->group_items, it);
6042 sd->items = eina_inlist_prepend(sd->items, EINA_INLIST_GET(it)); 6042 sd->items = eina_inlist_prepend(sd->items, EINA_INLIST_GET(it));
6043 it->item->rel = NULL; 6043 it->item->rel = NULL;
@@ -6088,8 +6088,8 @@ _elm_genlist_item_insert_after(Eo *obj EINA_UNUSED, Elm_Genlist_Data *sd, const
6088 6088
6089 if (!it->parent) 6089 if (!it->parent)
6090 { 6090 {
6091 if ((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) && 6091 if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
6092 (GL_IT(after)->type == ELM_GENLIST_ITEM_GROUP)) 6092 (GL_IT(after)->type & ELM_GENLIST_ITEM_GROUP))
6093 sd->group_items = eina_list_append_relative 6093 sd->group_items = eina_list_append_relative
6094 (sd->group_items, it, after); 6094 (sd->group_items, it, after);
6095 } 6095 }
@@ -6134,8 +6134,8 @@ _elm_genlist_item_insert_before(Eo *obj, Elm_Genlist_Data *sd, const Elm_Genlist
6134 6134
6135 if (!it->parent) 6135 if (!it->parent)
6136 { 6136 {
6137 if ((GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) && 6137 if ((GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP) &&
6138 (GL_IT(before)->type == ELM_GENLIST_ITEM_GROUP)) 6138 (GL_IT(before)->type & ELM_GENLIST_ITEM_GROUP))
6139 sd->group_items = 6139 sd->group_items =
6140 eina_list_prepend_relative(sd->group_items, it, before); 6140 eina_list_prepend_relative(sd->group_items, it, before);
6141 } 6141 }
@@ -7603,7 +7603,7 @@ _elm_genlist_item_select_mode_set(Eo *eo_it EINA_UNUSED, Elm_Gen_Item *it,
7603 // reset homogeneous item size 7603 // reset homogeneous item size
7604 if (sd->homogeneous) 7604 if (sd->homogeneous)
7605 { 7605 {
7606 if (GL_IT(it)->type == ELM_GENLIST_ITEM_GROUP) 7606 if (GL_IT(it)->type & ELM_GENLIST_ITEM_GROUP)
7607 sd->group_item_width = sd->group_item_height = 0; 7607 sd->group_item_width = sd->group_item_height = 0;
7608 else 7608 else
7609 sd->item_width = sd->item_height = 0; 7609 sd->item_width = sd->item_height = 0;