summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2015-01-10 14:14:57 +0900
committerChunEon Park <hermet@hermet.pe.kr>2015-01-10 14:14:57 +0900
commit1ed6c4c47a774f1cbbe9655e057ddeb71082587f (patch)
tree1da7ce48fd406058b3bb133de04b6b074d7c4a76
parentc14ca8032ed1ae79c9e2e5ed47258c014aa6b886 (diff)
genlist: code refactoring.
clean up decorate_item_realize() function. use macro and remove old debug code. no actual logical change.
-rw-r--r--src/lib/elm_genlist.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index cb24581d9..1c5ee9620 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -5252,32 +5252,32 @@ _decorate_item_realize(Elm_Gen_Item *it)
5252{ 5252{
5253 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 5253 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
5254 Evas_Object *obj = sd->obj; 5254 Evas_Object *obj = sd->obj;
5255 char buf[1024];
5255 5256
5256 if (it->item->deco_it_view) return; 5257 if (GL_IT(it)->deco_it_view) return;
5257 5258
5258 evas_event_freeze(evas_object_evas_get(obj)); 5259 evas_event_freeze(evas_object_evas_get(obj));
5259 it->item->deco_it_view = _view_create(it, it->itc->decorate_item_style); 5260 it->item->deco_it_view = _view_create(it, it->itc->decorate_item_style);
5260 5261
5261 /* signal callback add */ 5262 /* signal callback add */
5262 evas_object_event_callback_add 5263 evas_object_event_callback_add
5263 (it->item->deco_it_view, EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb, 5264 (GL_IT(it)->deco_it_view, EVAS_CALLBACK_MOUSE_DOWN, _item_mouse_down_cb,
5264 it); 5265 it);
5265 evas_object_event_callback_add 5266 evas_object_event_callback_add
5266 (it->item->deco_it_view, EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it); 5267 (GL_IT(it)->deco_it_view, EVAS_CALLBACK_MOUSE_UP, _item_mouse_up_cb, it);
5267 evas_object_event_callback_add 5268 evas_object_event_callback_add
5268 (it->item->deco_it_view, EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb, 5269 (GL_IT(it)->deco_it_view, EVAS_CALLBACK_MOUSE_MOVE, _item_mouse_move_cb,
5269 it); 5270 it);
5270 5271
5271 if (eina_list_count(it->item->deco_it_contents) != 0)
5272 ERR_ABORT("If you see this error, please notify us and we"
5273 "will fix it");
5274
5275 _view_inflate(it->item->deco_it_view, it, NULL, 5272 _view_inflate(it->item->deco_it_view, it, NULL,
5276 &GL_IT(it)->deco_it_contents); 5273 &GL_IT(it)->deco_it_contents);
5277 edje_object_part_swallow 5274 edje_object_part_swallow
5278 (it->item->deco_it_view, 5275 (it->item->deco_it_view,
5279 edje_object_data_get(it->item->deco_it_view, "mode_part"), VIEW(it)); 5276 edje_object_data_get(it->item->deco_it_view, "mode_part"), VIEW(it));
5280 5277
5278 snprintf(buf, sizeof(buf), "elm,state,%s,active", sd->decorate_it_type);
5279 edje_object_signal_emit(GL_IT(it)->deco_it_view, buf, "elm");
5280
5281 it->want_unrealize = EINA_FALSE; 5281 it->want_unrealize = EINA_FALSE;
5282 evas_event_thaw(evas_object_evas_get(obj)); 5282 evas_event_thaw(evas_object_evas_get(obj));
5283 evas_event_thaw_eval(evas_object_evas_get(obj)); 5283 evas_event_thaw_eval(evas_object_evas_get(obj));
@@ -5286,8 +5286,6 @@ _decorate_item_realize(Elm_Gen_Item *it)
5286static void 5286static void
5287_decorate_item_set(Elm_Gen_Item *it) 5287_decorate_item_set(Elm_Gen_Item *it)
5288{ 5288{
5289 char buf[1024];
5290
5291 if (!it) return; 5289 if (!it) return;
5292 5290
5293 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd); 5291 ELM_GENLIST_DATA_GET_FROM_ITEM(it, sd);
@@ -5308,8 +5306,6 @@ _decorate_item_set(Elm_Gen_Item *it)
5308 evas_event_thaw(evas_object_evas_get(sd->obj)); 5306 evas_event_thaw(evas_object_evas_get(sd->obj));
5309 evas_event_thaw_eval(evas_object_evas_get(sd->obj)); 5307 evas_event_thaw_eval(evas_object_evas_get(sd->obj));
5310 5308
5311 snprintf(buf, sizeof(buf), "elm,state,%s,active", sd->decorate_it_type);
5312 edje_object_signal_emit(it->item->deco_it_view, buf, "elm");
5313} 5309}
5314 5310
5315static void 5311static void