Enlightenment CVS committal Author : titan Project : e17 Module : apps/ephoto
Dir : e17/apps/ephoto/src/bin Modified Files: ephoto.h ephoto_edit_view.c ephoto_exif.c ephoto_list_view.c ephoto_main.c ephoto_normal_view.c Log Message: Tone things down a bit. Clicking a image in normal view or list view now lets you view that image in the single view. Exif has been temporarily moved. =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ephoto.h 28 Mar 2007 20:22:48 -0000 1.12 +++ ephoto.h 29 Mar 2007 00:24:16 -0000 1.13 @@ -88,7 +88,7 @@ /* Ephoto Normal View */ Ewl_Widget *add_normal_view(Ewl_Widget *c); -void set_info(Ewl_Widget *w, void *event, void *data); +void freebox_image_clicked(Ewl_Widget *w, void *event, void *data); /* Ephoto Slideshow */ void start_slideshow(Ewl_Widget *w, void *event, void *data); @@ -110,16 +110,12 @@ { Ecore_List *albums; Ecore_List *images; - Ewl_Widget *atree; - Ewl_Widget *currenta; - Ewl_Widget *currentf; - Ewl_Widget *currentl; + Ewl_Widget *atree; Ewl_Widget *edit_tools; Ewl_Widget *edit_vbox; Ewl_Widget *eimage; Ewl_Widget *fbox_vbox; Ewl_Widget *fbox; - Ewl_Widget *ilabel; Ewl_Widget *list_vbox; Ewl_Widget *ltree; Ewl_Widget *tbar; =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_edit_view.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ephoto_edit_view.c 11 Mar 2007 01:14:47 -0000 1.8 +++ ephoto_edit_view.c 29 Mar 2007 00:24:16 -0000 1.9 @@ -27,15 +27,29 @@ /*Show the edit view*/ void show_edit_view(Ewl_Widget *w, void *event, void *data) { + char *path = data; + ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), em->edit_vbox); - ecore_dlist_goto_first(em->images); - ewl_widget_hide(em->ilabel); + if (path) + { + ewl_image_file_path_set(EWL_IMAGE(em->eimage), path); + free(path); + } + else ewl_image_file_path_set(EWL_IMAGE(em->eimage), ecore_dlist_current(em->images)); } /*Add edit tools to container c*/ void add_edit_tools(Ewl_Widget *c) { Ewl_Widget *image, *sep; + + image = add_image(c, PACKAGE_DATA_DIR "/images/get_exif.png", 0, NULL, NULL); + ewl_image_constrain_set(EWL_IMAGE(image), 30); + ewl_attach_tooltip_text_set(image, "You do not have libexif 0.6.13"); +#ifdef BUILD_EXIF_SUPPORT + ewl_callback_append(image, EWL_CALLBACK_CLICKED, display_exif_dialog, NULL); + ewl_attach_tooltip_text_set(image, "View Exif Data"); +#endif image = add_image(c, PACKAGE_DATA_DIR "/images/undo.png", 0, rotate_image_left, NULL); ewl_image_constrain_set(EWL_IMAGE(image), 30); =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_exif.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ephoto_exif.c 16 Mar 2007 04:34:22 -0000 1.12 +++ ephoto_exif.c 29 Mar 2007 00:24:16 -0000 1.13 @@ -59,18 +59,7 @@ { const char *img = NULL; - if (VISIBLE(em->fbox_vbox) && em->currentf) - { - img = ewl_widget_name_get(em->currentf); - } - else if (VISIBLE(em->list_vbox) && em->currentl) - { - img = ewl_widget_name_get(em->currentl); - } - else if (VISIBLE(em->edit_vbox)) - { - img = ewl_image_file_path_get(EWL_IMAGE(em->eimage)); - } + if (VISIBLE(em->edit_vbox)) img = ewl_image_file_path_get(EWL_IMAGE(em->eimage)); if(!img) return NULL; return strdup(img); } =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_list_view.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- ephoto_list_view.c 28 Mar 2007 17:50:49 -0000 1.14 +++ ephoto_list_view.c 29 Mar 2007 00:24:16 -0000 1.15 @@ -4,7 +4,6 @@ static Ewl_Widget *list_header_fetch(void *data, int column); static void *list_data_fetch(void *data, unsigned int row, unsigned int column); static int list_data_count(void *data); -static void set_active_list_view(Ewl_Widget *w, void *event, void *data); /*Add the list view*/ Ewl_Widget *add_list_view(Ewl_Widget *c) @@ -24,20 +23,6 @@ void show_list_view(Ewl_Widget *w, void *event, void *data) { ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), em->list_vbox); - ewl_mvc_dirty_set(EWL_MVC(em->ltree), 1); - ewl_widget_hide(em->ilabel); -} - -static void set_active_list_view(Ewl_Widget *w, void *event, void *data) -{ - if (em->currentl) - { - ewl_widget_state_set(em->currentl, "unselected", EWL_STATE_PERSISTENT); - } - em->currentl = w; - ewl_widget_state_set(em->currentl, "selected", EWL_STATE_PERSISTENT); - - return; } /*Create and Add a Tree to the Container c*/ @@ -89,7 +74,7 @@ hbox = ewl_hbox_new(); ewl_box_spacing_set(EWL_BOX(hbox), 10); ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_HFILL); - ewl_callback_append(hbox, EWL_CALLBACK_CLICKED, set_active_list_view, NULL); + ewl_callback_append(hbox, EWL_CALLBACK_CLICKED, show_edit_view, strdup(image)); ewl_widget_name_set(hbox, image); ewl_widget_show(hbox); =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_main.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -3 -r1.18 -r1.19 --- ephoto_main.c 28 Mar 2007 17:50:49 -0000 1.18 +++ ephoto_main.c 29 Mar 2007 00:24:16 -0000 1.19 @@ -138,14 +138,6 @@ ewl_container_child_append(EWL_CONTAINER(em->toolbar), vsep); ewl_widget_show(vsep); - button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/get_exif.png", NULL, NULL); - ewl_image_size_set(EWL_IMAGE(EWL_BUTTON(button)->image_object), 30, 30); - ewl_attach_tooltip_text_set(button, "You do not have libexif 0.6.13"); -#ifdef BUILD_EXIF_SUPPORT - ewl_callback_append(button, EWL_CALLBACK_CLICKED, display_exif_dialog, NULL); - ewl_attach_tooltip_text_set(button, "View Exif Data"); -#endif - button = add_button(em->toolbar, NULL, PACKAGE_DATA_DIR "/images/stock_fullscreen.png", window_fullscreen, NULL); ewl_image_size_set(EWL_IMAGE(EWL_BUTTON(button)->image_object), 30, 30); ewl_attach_tooltip_text_set(button, "Toggle Fullscreen"); @@ -175,14 +167,6 @@ if (w) { album = (char *)ewl_widget_name_get(w); - if (em->currenta) - { - ewl_widget_state_set(em->currenta, "unselected", EWL_STATE_PERSISTENT); - ewl_widget_state_set(EWL_ICON(em->currenta)->label, "default", EWL_STATE_PERSISTENT); - } - em->currenta = w; - ewl_widget_state_set(em->currenta, "selected", EWL_STATE_PERSISTENT); - ewl_widget_state_set(EWL_ICON(em->currenta)->label, "blue", EWL_STATE_PERSISTENT); } else { @@ -203,20 +187,17 @@ { imagef = ecore_dlist_current(em->images); - thumb = add_image(em->fbox, imagef, 1, set_info, NULL); + thumb = add_image(em->fbox, imagef, 1, freebox_image_clicked, NULL); ewl_image_constrain_set(EWL_IMAGE(thumb), 64); ewl_object_alignment_set(EWL_OBJECT(thumb), EWL_FLAG_ALIGN_CENTER); ewl_widget_name_set(thumb, imagef); ecore_dlist_next(em->images); } - ecore_dlist_goto_first(em->images); ewl_mvc_data_set(EWL_MVC(em->ltree), em->images); ewl_mvc_dirty_set(EWL_MVC(em->ltree), 1); - - ewl_image_file_set(EWL_IMAGE(em->eimage), ecore_dlist_current(em->images), NULL); return; } =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_normal_view.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ephoto_normal_view.c 11 Mar 2007 01:14:47 -0000 1.8 +++ ephoto_normal_view.c 29 Mar 2007 00:24:16 -0000 1.9 @@ -21,10 +21,6 @@ ewl_container_child_append(EWL_CONTAINER(sp), em->fbox); ewl_widget_show(em->fbox); - em->ilabel = add_label(em->fbox_vbox, "Image Information"); - ewl_object_fill_policy_set(EWL_OBJECT(em->ilabel), EWL_FLAG_FILL_HFILL); - ewl_widget_state_set(em->ilabel, "colored", EWL_STATE_PERSISTENT); - return em->fbox_vbox; } @@ -32,31 +28,15 @@ void show_normal_view(Ewl_Widget *w, void *event, void *data) { ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), em->fbox_vbox); - ewl_widget_show(em->ilabel); } /*Set the info that is in the info label on normal view*/ -void set_info(Ewl_Widget *w, void *event, void *data) +void freebox_image_clicked(Ewl_Widget *w, void *event, void *data) { - const char *path, *pixels, *size; - char info[PATH_MAX]; - time_t modtime; + const char *path; - if (ewl_widget_type_is(w, EWL_IMAGE_TYPE)) - { - if (em->currentf) ewl_widget_state_set(em->currentf, "unselected", EWL_STATE_PERSISTENT); - em->currentf = w; - ewl_widget_state_set(em->currentf, "selected", EWL_STATE_PERSISTENT); - } - path = ewl_widget_name_get(w); - pixels = image_pixels_string_get(path); - size = file_size_get(ecore_file_size(path)); - modtime = ecore_file_mod_time(path); - snprintf(info, PATH_MAX, "%s - %s - %s", basename((char *)path), pixels, size); - - ewl_label_text_set(EWL_LABEL(em->ilabel), info); - ewl_widget_reparent(em->ilabel); + show_edit_view(NULL, NULL, strdup(path)); return; } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs