Enlightenment CVS committal Author : titan Project : e17 Module : proto
Dir : e17/proto/ephoto/src Modified Files: Makefile.am ephoto.c ephoto.h ephoto_callbacks.c Added Files: ephoto_slideshow.c Log Message: We now have some slideshow features =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 20 Jul 2006 05:12:39 -0000 1.3 +++ Makefile.am 8 Sep 2006 02:52:19 -0000 1.4 @@ -6,7 +6,7 @@ bin_PROGRAMS = ephoto -ephoto_SOURCES = ephoto.c ephoto_callbacks.c +ephoto_SOURCES = ephoto.c ephoto_callbacks.c ephoto_slideshow.c ephoto_CFLAGS = @ewl_cflags@ =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -3 -r1.76 -r1.77 --- ephoto.c 8 Sep 2006 01:47:48 -0000 1.76 +++ ephoto.c 8 Sep 2006 02:52:19 -0000 1.77 @@ -1,6 +1,7 @@ #include "ephoto.h" Main *m; char *current_directory; +Ecore_List *current_thumbs; int main(int argc, char **argv) @@ -14,6 +15,7 @@ return 1; } + current_thumbs = ecore_list_new(); current_directory = strdup(getenv("HOME")); m = calloc(1, sizeof(Main)); @@ -43,6 +45,7 @@ m->menu_item = ewl_menu_item_new(); ewl_button_stock_type_set(EWL_BUTTON(m->menu_item), EWL_STOCK_QUIT); + ewl_object_alignment_set(EWL_OBJECT(m->menu_item), EWL_FLAG_ALIGN_CENTER); ewl_container_child_append(EWL_CONTAINER(m->menu), m->menu_item); ewl_callback_append(m->menu_item, EWL_CALLBACK_CLICKED, destroy_cb, NULL); ewl_object_fill_policy_set(EWL_OBJECT(m->menu_item), EWL_FLAG_FILL_ALL); @@ -59,6 +62,18 @@ ewl_container_child_append(EWL_CONTAINER(m->menubar), m->menu); ewl_object_fill_policy_set(EWL_OBJECT(m->menu), EWL_FLAG_FILL_NONE); ewl_widget_show(m->menu); + + m->menu_item = ewl_menu_item_new(); + ewl_button_image_set(EWL_BUTTON(m->menu_item), + ewl_icon_theme_icon_path_get(EWL_ICON_X_OFFICE_PRESENTATION, + EWL_ICON_SIZE_MEDIUM), + EWL_ICON_X_OFFICE_PRESENTATION); + ewl_button_label_set(EWL_BUTTON(m->menu_item), "Start Slideshow"); + ewl_object_alignment_set(EWL_OBJECT(m->menu_item), EWL_FLAG_ALIGN_CENTER); + ewl_container_child_append(EWL_CONTAINER(m->menu), m->menu_item); + ewl_callback_append(m->menu_item, EWL_CALLBACK_CLICKED, start_slideshow, NULL); + ewl_object_fill_policy_set(EWL_OBJECT(m->menu_item), EWL_FLAG_FILL_ALL); + ewl_widget_show(m->menu_item); m->hseparator = ewl_hseparator_new(); ewl_object_alignment_set(EWL_OBJECT(m->hseparator), EWL_FLAG_ALIGN_CENTER); =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -3 -r1.36 -r1.37 --- ephoto.h 6 Sep 2006 03:02:02 -0000 1.36 +++ ephoto.h 8 Sep 2006 02:52:19 -0000 1.37 @@ -17,6 +17,7 @@ void go_up(Ewl_Widget *w, void *event, void *data); void go_home(Ewl_Widget *w, void *event, void *data); void entry_change(Ewl_Widget *w, void *event, void *data); +void start_slideshow(Ewl_Widget *w, void *event, void *data); typedef struct _Main Main; @@ -47,5 +48,6 @@ extern Main *m; extern char *current_directory; +extern Ecore_List *current_thumbs; #endif =================================================================== RCS file: /cvs/e/e17/proto/ephoto/src/ephoto_callbacks.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ephoto_callbacks.c 7 Sep 2006 13:59:23 -0000 1.18 +++ ephoto_callbacks.c 8 Sep 2006 02:52:19 -0000 1.19 @@ -196,16 +196,23 @@ fclose(file_ptr); } } - + if(!ecore_list_is_empty(current_thumbs)) + { + ecore_list_destroy(current_thumbs); + current_thumbs = ecore_list_new(); + } while(!ecore_list_is_empty(images)) { image = ecore_list_remove_first(images); + ecore_list_append(current_thumbs, image); m->icon = ewl_image_thumbnail_new(); ewl_image_thumbnail_request(EWL_IMAGE_THUMBNAIL(m->icon), image); ewl_container_child_append(EWL_CONTAINER(m->viewer_freebox), m->icon); ewl_widget_show(m->icon); } + ecore_list_destroy(ls); + ecore_list_destroy(images); } void go_up(Ewl_Widget *w, void *event, void *data) ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs