rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=18945a9be1152b8fbe3c4f878dd5609bb700c35c

commit 18945a9be1152b8fbe3c4f878dd5609bb700c35c
Author: Vitalii Vorobiov <vi.vorob...@samsung.com>
Date:   Tue Jan 26 15:07:47 2016 +0000

    image_editor: rename create function
    
    UTC fix included as well
---
 src/bin/ui/editors/image_editor.c                 |  21 +---
 src/bin/ui/editors/image_editor.h                 |   9 +-
 src/bin/ui/tabs.c                                 |   2 +-
 tests/Makefile.am                                 |  12 +--
 tests/edj_build/Makefile.am                       |   2 +-
 tests/test_image_editor/image_editor_window_add.c | 126 ----------------------
 tests/test_image_editor/test_image_editor.c       |  40 -------
 tests/test_image_editor/test_image_editor.h       |  31 ------
 8 files changed, 15 insertions(+), 228 deletions(-)

diff --git a/src/bin/ui/editors/image_editor.c 
b/src/bin/ui/editors/image_editor.c
index 4714a2a..fb60a82 100644
--- a/src/bin/ui/editors/image_editor.c
+++ b/src/bin/ui/editors/image_editor.c
@@ -504,7 +504,7 @@ _image_editor_init(Image_Editor *img_edit)
 }
 
 Evas_Object *
-image_editor_window_add(Image_Editor_Mode mode)
+image_manager_add()
 {
    Evas_Object *button;
    Evas_Object *ic = NULL;
@@ -525,22 +525,9 @@ image_editor_window_add(Image_Editor_Mode mode)
    elm_scroller_policy_set(img_edit->gengrid, ELM_SCROLLER_POLICY_OFF,
                            ELM_SCROLLER_POLICY_OFF);
 
-   if (mode == SINGLE)
-     {
-        elm_gengrid_multi_select_set(img_edit->gengrid, false);
-     }
-   else if (mode == MULTIPLE)
-     {
-        elm_gengrid_multi_select_set(img_edit->gengrid, true);
-        elm_gengrid_multi_select_mode_set(img_edit->gengrid,
-                                          
ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL);
-     }
-   else if (mode == TWEENS)
-     {
-        elm_gengrid_multi_select_set(img_edit->gengrid, true);
-        elm_gengrid_multi_select_mode_set(img_edit->gengrid,
-                                          
ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL);
-     }
+   elm_gengrid_multi_select_set(img_edit->gengrid, true);
+   elm_gengrid_multi_select_mode_set(img_edit->gengrid,
+                                     
ELM_OBJECT_MULTI_SELECT_MODE_WITH_CONTROL);
 
    elm_gengrid_select_mode_set(img_edit->gengrid, 
ELM_OBJECT_SELECT_MODE_ALWAYS);
    evas_object_size_hint_weight_set(img_edit->gengrid,
diff --git a/src/bin/ui/editors/image_editor.h 
b/src/bin/ui/editors/image_editor.h
index c40e572..2b16874 100644
--- a/src/bin/ui/editors/image_editor.h
+++ b/src/bin/ui/editors/image_editor.h
@@ -38,16 +38,13 @@ typedef enum {
 } Image_Editor_Mode;
 
 /**
- * Add new image editor inwin object.
+ * Add new image editor layout for setting into tab.
  *
- * @param mode its enumerate: SINGLE if single-selection mode,
- *             MULTIPLE if multi-selection mode.
- *
- * @return Pointer to inwin object, which contain image grid and buttons.
+ * @return Pointer to layout object, which contain image grid and buttons.
  *
  * @ingroup ImageEditor
  */
 Evas_Object *
-image_editor_window_add(Image_Editor_Mode mode);
+image_manager_add(void);
 
 #endif /*IMAGE_EDITOR_H*/
diff --git a/src/bin/ui/tabs.c b/src/bin/ui/tabs.c
index 38f75ae..62f7f67 100644
--- a/src/bin/ui/tabs.c
+++ b/src/bin/ui/tabs.c
@@ -385,7 +385,7 @@ _project_opened(void *data __UNUSED__,
                 Evas_Object *obj __UNUSED__,
                 void *ei __UNUSED__)
 {
-   tabs.menu.content_image_editor = image_editor_window_add(MULTIPLE);
+   tabs.menu.content_image_editor = image_manager_add();
    tabs.menu.content_sound_editor = sound_editor_window_add();
    tabs.menu.content_text_editor = style_editor_window_add();
    tabs.menu.content_colorclass_editor = colorclass_manager_add();
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0b77365..54dd5b0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -13,7 +13,7 @@ diff_test \
 change_test \
 new_history_test \
 sound_editor_test \
-image_editor_test \
+image_manager_test \
 logger_test \
 container_test \
 modal_window_test \
@@ -183,11 +183,11 @@ sound_editor_test_SOURCES = \
 sound_editor_test_CFLAGS = ${FLAGS}
 sound_editor_test_LDADD = ${LD}
 
-image_editor_test_SOURCES = \
-../tests/test_image_editor/test_image_editor.c \
-../tests/test_image_editor/image_editor_window_add.c
-image_editor_test_CFLAGS = ${FLAGS}
-image_editor_test_LDADD = ${LD}
+image_manager_test_SOURCES = \
+../tests/test_image_manager/test_image_manager.c \
+../tests/test_image_manager/image_manager_add.c
+image_manager_test_CFLAGS = ${FLAGS}
+image_manager_test_LDADD = ${LD}
 
 logger_test_SOURCES = \
 ../tests/test_logger/test_logger.c \
diff --git a/tests/edj_build/Makefile.am b/tests/edj_build/Makefile.am
index 08b46f4..ac5d1b4 100644
--- a/tests/edj_build/Makefile.am
+++ b/tests/edj_build/Makefile.am
@@ -46,7 +46,7 @@ check: Makefile
        $(builddir)/program_editor_window_add_test.edj \
        $(builddir)/style_editor.edj \
        $(builddir)/test_project_manager.edj \
-       $(builddir)/image_editor.edj \
+       $(builddir)/image_manager.edj \
        $(builddir)/ui_states_list_data_set.edj \
        $(builddir)/ui_states_list_data_unset.edj \
        $(builddir)/ui_states_list_part_get.edj \
diff --git a/tests/test_image_editor/image_editor_window_add.c 
b/tests/test_image_editor/image_editor_window_add.c
deleted file mode 100644
index 5ecbbdb..0000000
--- a/tests/test_image_editor/image_editor_window_add.c
+++ /dev/null
@@ -1,126 +0,0 @@
-/**
- * Edje Theme Editor
- * Copyright (C) 2013-2014 Samsung Electronics.
- *
- * This file is part of Edje Theme Editor.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
- */
-
-#include "test_image_editor.h"
-#include "test_common.h"
-
-/**
- * @addtogroup image_editor_test
- * @{
- * @addtogroup image_editor_window_add
- * @{
- * image editor
- * <TABLE>
- * @}
- */
-
-/**
- * @addtogroup image_editor_window_add
- * @{
- * <tr>
- * <td>image_editor_window_add</td>
- * <td>image_editor_window_add_test_p1</td>
- * <td>
- * @precondition
- * @step 1 init elemantary
- * @step 2 init app
- * @step 3 create main window
- * @step 4 load project
- *
- * @procedure
- * @step 1 call image_editor_window_add
- * @step 2 check returned value
- *
- * </td>
- * <td>project, SINGLE</td>
- * <td>Not NULL Pointer returned</td>
- * </tr>
- * @}
- */
-EFLETE_TEST (image_editor_window_add_test_p1)
-{
-   elm_init(0,0);
-
-   app_init();
-   Evas_Object *images;
-   ui_main_window_add();
-   ap.project = setup("image_editor_window_add_test_p1");
-
-   images = image_editor_window_add(SINGLE);
-   ck_assert_msg(images != NULL,
-                 "cannot create image editor window in SINGLE mode");
-
-   evas_object_del(images);
-   app_shutdown();
-   teardown("image_editor_window_add_test_p1");
-   elm_shutdown();
-}
-END_TEST
-
-/**
- * @addtogroup image_editor_window_add
- * @{
- * <tr>
- * <td>image_editor_window_add</td>
- * <td>image_editor_window_add_test_p2</td>
- * <td>
- * @precondition
- * @step 1 init elemantary
- * @step 2 init app
- * @step 3 create main window
- * @step 4 load project
- *
- * @procedure
- * @step 1 call image_editor_window_add
- * @step 2 check returned value
- *
- * </td>
- * <td>project, MULTIPLE</td>
- * <td>Not NULL Pointer returned</td>
- * </tr>
- * @}
- */
-EFLETE_TEST (image_editor_window_add_test_p2)
-{
-   elm_init(0,0);
-
-   app_init();
-   Evas_Object *images;
-
-   ui_main_window_add();
-   //Project *project = setup("image_editor_window_add_test_p2");
-
-   images = image_editor_window_add(MULTIPLE);
-   ck_assert_msg(images != NULL,
-                 "cannot create image editor window in MULTIPLE mode");
-
-   evas_object_del(images);
-   app_shutdown();
-   //teardown("./image_editor_window_add_test_p2");
-   elm_shutdown();
-}
-END_TEST
-
-/**
- * @addtogroup image_editor_window_add
- * @{
- * </TABLE>
- * @}
- * @}
- */
diff --git a/tests/test_image_editor/test_image_editor.c 
b/tests/test_image_editor/test_image_editor.c
deleted file mode 100644
index cad8178..0000000
--- a/tests/test_image_editor/test_image_editor.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Edje Theme Editor
- * Copyright (C) 2013-2014 Samsung Electronics.
- *
- * This file is part of Edje Theme Editor.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
- */
-
-#include "test_image_editor.h"
-
-Suite* test_suite (void) {
-   Suite *suite = suite_create("test_image_editor");
-   TCase *tcase = tcase_create("TCase");
-   tcase_add_test(tcase, image_editor_window_add_test_p1);
-   tcase_add_test(tcase, image_editor_window_add_test_p2);
-   suite_add_tcase(suite, tcase);
-   return suite;
-}
-
-int main(void) {
-   int number_failed;
-   Suite *suite = test_suite();
-   SRunner *runner = srunner_create(suite);
-   srunner_set_xml(runner, "test_image_editor.xml");
-   srunner_run_all(runner, CK_VERBOSE);
-   number_failed = srunner_ntests_failed(runner);
-   srunner_free(runner);
-   return number_failed;
-}
diff --git a/tests/test_image_editor/test_image_editor.h 
b/tests/test_image_editor/test_image_editor.h
deleted file mode 100644
index 694f2df..0000000
--- a/tests/test_image_editor/test_image_editor.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Edje Theme Editor
- * Copyright (C) 2013-2014 Samsung Electronics.
- *
- * This file is part of Edje Theme Editor.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; If not, see www.gnu.org/licenses/lgpl.html.
- */
-
-#include "utc_common.h"
-#include "image_editor.h"
-#include "main_window.h"
-
-/**
- * @defgroup style_editor_test
- */
-
-#define TEST_NAME "image_editor"
-
-void image_editor_window_add_test_p1(int);
-void image_editor_window_add_test_p2(int);

-- 


Reply via email to