Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin/tests/image_thumbnail Modified Files: ewl_image_thumbnail_test.c Log Message: - change tabs to spaces (Ewl uses an 8 space indent now instead of a tab) =================================================================== RCS file: /cvs/e/e17/libs/ewl/src/bin/tests/image_thumbnail/ewl_image_thumbnail_test.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_image_thumbnail_test.c 4 Dec 2007 05:28:00 -0000 1.1 +++ ewl_image_thumbnail_test.c 6 May 2008 20:09:04 -0000 1.2 @@ -1,4 +1,4 @@ -/* vim: set sw=8 ts=8 sts=8 noexpandtab: */ +/* vim: set sw=8 ts=8 sts=8 expandtab: */ #include "Ewl_Test.h" #include "ewl_test_private.h" #include "ewl_image.h" @@ -16,57 +16,57 @@ void test_info(Ewl_Test *test) { - test->name = "Image Thumbnail"; - test->tip = "Provides a widget for displaying\n" - "thumbnails of images."; - test->filename = __FILE__; - test->func = create_test; - test->type = EWL_TEST_TYPE_SIMPLE; + test->name = "Image Thumbnail"; + test->tip = "Provides a widget for displaying\n" + "thumbnails of images."; + test->filename = __FILE__; + test->func = create_test; + test->type = EWL_TEST_TYPE_SIMPLE; } int create_test(Ewl_Container *box) { - Ewl_Widget *image; - Ewl_Widget *thumb; - Ewl_Widget *image_box; - char *image_file = NULL; - char *icon_file = NULL; - - image_box = EWL_WIDGET(box); - - if ((ecore_file_exists(PACKAGE_DATA_DIR "/ewl/images/e-logo.png")) != -1) - image_file = strdup(PACKAGE_DATA_DIR "/ewl/images/e-logo.png"); - else if ((ecore_file_exists(PACKAGE_SOURCE_DIR "/data/images/e-logo.png")) != -1) - image_file = strdup(PACKAGE_SOURCE_DIR "/data/images/e-logo.png"); - else if ((ecore_file_exists("./data/images/e-logo.png")) != -1) - image_file = strdup("./data/images/e-logo.png"); - else if ((ecore_file_exists("../data/images/e-logo.png")) != -1) - image_file = strdup("../data/images/e-logo.png"); - - image = ewl_image_new(); - ewl_image_file_set(EWL_IMAGE(image), image_file, NULL); - ewl_object_padding_set(EWL_OBJECT(image), 0, 0, 5, 0); - ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_CENTER); - ewl_container_child_append(EWL_CONTAINER(image_box), image); - ewl_widget_show(image); - - if ((ecore_file_exists(PACKAGE_DATA_DIR "/ewl/images/Draw.png")) != -1) - icon_file = strdup(PACKAGE_DATA_DIR "/ewl/images/Draw.png"); - else if ((ecore_file_exists(PACKAGE_SOURCE_DIR "/data/images/Draw.png")) != -1) - icon_file = strdup(PACKAGE_SOURCE_DIR "/data/images/Draw.png"); - else if ((ecore_file_exists("./data/images/Draw.png")) != -1) - icon_file = strdup("./data/images/Draw.png"); - else if ((ecore_file_exists("../data/images/Draw.png")) != -1) - icon_file = strdup("../data/images/Draw.png"); - - - thumb = ewl_image_thumbnail_get(EWL_IMAGE(image)); - ewl_image_constrain_set(EWL_IMAGE(thumb), 32); - if (icon_file) - ewl_image_file_path_set(EWL_IMAGE(thumb), icon_file); - ewl_container_child_append(EWL_CONTAINER(image_box), thumb); - ewl_widget_show(thumb); + Ewl_Widget *image; + Ewl_Widget *thumb; + Ewl_Widget *image_box; + char *image_file = NULL; + char *icon_file = NULL; + + image_box = EWL_WIDGET(box); + + if ((ecore_file_exists(PACKAGE_DATA_DIR "/ewl/images/e-logo.png")) != -1) + image_file = strdup(PACKAGE_DATA_DIR "/ewl/images/e-logo.png"); + else if ((ecore_file_exists(PACKAGE_SOURCE_DIR "/data/images/e-logo.png")) != -1) + image_file = strdup(PACKAGE_SOURCE_DIR "/data/images/e-logo.png"); + else if ((ecore_file_exists("./data/images/e-logo.png")) != -1) + image_file = strdup("./data/images/e-logo.png"); + else if ((ecore_file_exists("../data/images/e-logo.png")) != -1) + image_file = strdup("../data/images/e-logo.png"); + + image = ewl_image_new(); + ewl_image_file_set(EWL_IMAGE(image), image_file, NULL); + ewl_object_padding_set(EWL_OBJECT(image), 0, 0, 5, 0); + ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_CENTER); + ewl_container_child_append(EWL_CONTAINER(image_box), image); + ewl_widget_show(image); + + if ((ecore_file_exists(PACKAGE_DATA_DIR "/ewl/images/Draw.png")) != -1) + icon_file = strdup(PACKAGE_DATA_DIR "/ewl/images/Draw.png"); + else if ((ecore_file_exists(PACKAGE_SOURCE_DIR "/data/images/Draw.png")) != -1) + icon_file = strdup(PACKAGE_SOURCE_DIR "/data/images/Draw.png"); + else if ((ecore_file_exists("./data/images/Draw.png")) != -1) + icon_file = strdup("./data/images/Draw.png"); + else if ((ecore_file_exists("../data/images/Draw.png")) != -1) + icon_file = strdup("../data/images/Draw.png"); + + + thumb = ewl_image_thumbnail_get(EWL_IMAGE(image)); + ewl_image_constrain_set(EWL_IMAGE(thumb), 32); + if (icon_file) + ewl_image_file_path_set(EWL_IMAGE(thumb), icon_file); + ewl_container_child_append(EWL_CONTAINER(image_box), thumb); + ewl_widget_show(thumb); - return 1; + return 1; } ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs