summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-01-18 10:48:43 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-01-18 10:48:43 -0800
commitb1e15b852a64767cf1c970cb1ebbd6470be1ed8c (patch)
tree3f8d4a53708fc524f64411064af293c5062c66a0 /src
parente9bc9c920ac20cee863a1b56db76528f5da246f9 (diff)
elementary: simplify Efl.Ui.Text.Factory test.
Diffstat (limited to 'src')
-rw-r--r--src/bin/elementary/test_efl_ui_text.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c
index e28ba3bc64..ae9cf4e9f3 100644
--- a/src/bin/elementary/test_efl_ui_text.c
+++ b/src/bin/elementary/test_efl_ui_text.c
@@ -385,15 +385,6 @@ my_efl_ui_text_item_factory_bt_change(void *data, Evas_Object *obj EINA_UNUSED,
385#define FACTORY_IMAGE 1 385#define FACTORY_IMAGE 1
386#define FACTORY_EMOTICON 2 386#define FACTORY_EMOTICON 2
387 387
388static void
389_ui_text_factory_del(void *data, const Efl_Event *ev EINA_UNUSED)
390{
391 Eina_File *f = data;
392 eina_file_close(f);
393 efl_del(factories[FACTORY_IMAGE].item_factory);
394 efl_del(factories[FACTORY_EMOTICON].item_factory);
395}
396
397void 388void
398test_ui_text_item_factory(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 389test_ui_text_item_factory(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
399{ 390{
@@ -418,11 +409,11 @@ test_ui_text_item_factory(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
418 409
419 factories[FACTORY_IMAGE].name = "Image Factory"; 410 factories[FACTORY_IMAGE].name = "Image Factory";
420 factories[FACTORY_IMAGE].item_factory = 411 factories[FACTORY_IMAGE].item_factory =
421 efl_add(EFL_UI_TEXT_FACTORY_IMAGES_CLASS, win); 412 efl_add(EFL_UI_TEXT_FACTORY_IMAGES_CLASS, en);
422 413
423 factories[FACTORY_EMOTICON].name = "Emoticon Factory"; 414 factories[FACTORY_EMOTICON].name = "Emoticon Factory";
424 factories[FACTORY_EMOTICON].item_factory = 415 factories[FACTORY_EMOTICON].item_factory =
425 efl_add(EFL_UI_TEXT_FACTORY_EMOTICONS_CLASS, win); 416 efl_add(EFL_UI_TEXT_FACTORY_EMOTICONS_CLASS, en);
426 417
427 // Test assigning file path source 418 // Test assigning file path source
428 sprintf(buf, "%s/images/sky_01.jpg", elm_app_data_dir_get()); 419 sprintf(buf, "%s/images/sky_01.jpg", elm_app_data_dir_get());
@@ -440,14 +431,13 @@ test_ui_text_item_factory(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
440 f = eina_file_open(buf, EINA_FALSE); 431 f = eina_file_open(buf, EINA_FALSE);
441 if (f) 432 if (f)
442 { 433 {
443 efl_event_callback_add(en, EFL_EVENT_DEL, _ui_text_factory_del, f);
444
445 efl_ui_text_factory_images_matches_mmap_add( 434 efl_ui_text_factory_images_matches_mmap_add(
446 factories[FACTORY_IMAGE].item_factory, 435 factories[FACTORY_IMAGE].item_factory,
447 "eet_rock", f, "rock"); 436 "eet_rock", f, "rock");
448 efl_ui_text_factory_images_matches_mmap_add( 437 efl_ui_text_factory_images_matches_mmap_add(
449 factories[FACTORY_IMAGE].item_factory, 438 factories[FACTORY_IMAGE].item_factory,
450 "eet_plant", f, "plant"); 439 "eet_plant", f, "plant");
440 eina_file_close(f);
451 } 441 }
452 else 442 else
453 { 443 {