summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-02-27 18:14:11 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-02-27 18:14:11 +0100
commit595584e7811e319ce925d8c0ce93d51490101891 (patch)
treec723454d4d2a165751ea4ce6b19f3088d59e5754
parentf4c4149fade873e9ab36b64510a466eedc0ee2b5 (diff)
modules: update scroll stuff to the new behaviourdevs/bu5hm4n/econfigure2
-rw-r--r--src/bin/e_int_config_modules.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/bin/e_int_config_modules.c b/src/bin/e_int_config_modules.c
index acc3f1812..bf348f6ab 100644
--- a/src/bin/e_int_config_modules.c
+++ b/src/bin/e_int_config_modules.c
@@ -338,6 +338,9 @@ static void
338_toolbar_selected_cb(void *data, Evas_Object *obj, void *event) 338_toolbar_selected_cb(void *data, Evas_Object *obj, void *event)
339{ 339{
340 CFType *cft = data; 340 CFType *cft = data;
341
342 if (evas_object_data_get(obj, "__anim")) return;
343
341 elm_genlist_item_bring_in(cft->gindex, ELM_GENLIST_ITEM_SCROLLTO_TOP); 344 elm_genlist_item_bring_in(cft->gindex, ELM_GENLIST_ITEM_SCROLLTO_TOP);
342} 345}
343 346
@@ -481,13 +484,13 @@ _unload_cb(void *data, Evas_Object *obj, void *event)
481static void 484static void
482_list_scroll_start_cb(void *data, Evas_Object *obj, void *event) 485_list_scroll_start_cb(void *data, Evas_Object *obj, void *event)
483{ 486{
484 evas_object_data_set(obj, "__anim", (void*) 1); 487 evas_object_data_set(data, "__anim", (void*) 1);
485} 488}
486 489
487static void 490static void
488_list_scroll_stop_cb(void *data, Evas_Object *obj, void *event) 491_list_scroll_stop_cb(void *data, Evas_Object *obj, void *event)
489{ 492{
490 evas_object_data_del(obj, "__anim"); 493 evas_object_data_del(data, "__anim");
491} 494}
492 495
493static void 496static void
@@ -497,7 +500,7 @@ _list_scroll_cb(void *data, Evas_Object *obj, void *event)
497 Elm_Object_Item *it, *gi; 500 Elm_Object_Item *it, *gi;
498 CFType *cft; 501 CFType *cft;
499 502
500 if (evas_object_data_get(obj, "__anim")) return; 503
501 504
502 evas_object_geometry_get(obj, &x, &y, &w ,&h); 505 evas_object_geometry_get(obj, &x, &y, &w ,&h);
503 it = elm_genlist_at_xy_item_get(obj, x + 3, y + 3, NULL); 506 it = elm_genlist_at_xy_item_get(obj, x + 3, y + 3, NULL);
@@ -539,9 +542,9 @@ e_int_config_modules_create_cb(const char *path, const char *part, Evas_Object *
539 list = elm_genlist_add(parent); 542 list = elm_genlist_add(parent);
540 evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); 543 evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL);
541 evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 544 evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
542 evas_object_smart_callback_add(list, "scroll", _list_scroll_cb, list); 545 evas_object_smart_callback_add(list, "scroll", _list_scroll_cb, tb);
543 evas_object_smart_callback_add(list, "scroll,anim,start", _list_scroll_start_cb, list); 546 evas_object_smart_callback_add(list, "scroll,anim,start", _list_scroll_start_cb, tb);
544 evas_object_smart_callback_add(list, "scroll,anim,stop", _list_scroll_stop_cb, list); 547 evas_object_smart_callback_add(list, "scroll,anim,stop", _list_scroll_stop_cb, tb);
545 evas_object_data_set(list, "__toolbar", tb); 548 evas_object_data_set(list, "__toolbar", tb);
546 elm_table_pack(tab, list, 1, 0, 1, 1); 549 elm_table_pack(tab, list, 1, 0, 1, 1);
547 evas_object_show(list); 550 evas_object_show(list);