Enlightenment CVS committal Author : titan Project : e17 Module : apps/ephoto
Dir : e17/apps/ephoto/src/bin Modified Files: Makefile.am ephoto.h ephoto_edit_view.c ephoto_imaging.c ephoto_list_view.c ephoto_main.c ephoto_normal_view.c ephoto_single_view.c Added Files: ephoto_dialogs.c Log Message: Add a new file that separates out dialogs. This is cleaner. Cleanup some code. Ephoto will now open with its file system in the current working directory! =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- Makefile.am 19 Apr 2007 03:17:11 -0000 1.8 +++ Makefile.am 31 May 2007 06:02:36 -0000 1.9 @@ -8,6 +8,7 @@ ephoto_SOURCES = ephoto.c \ ephoto_browsing.c \ ephoto_database.c \ + ephoto_dialogs.c \ ephoto_edit_view.c \ ephoto_exif.c \ ephoto_gui.c \ =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ephoto.h 24 May 2007 19:27:07 -0000 1.24 +++ ephoto.h 31 May 2007 06:02:36 -0000 1.25 @@ -80,6 +80,10 @@ Ewl_Widget *add_shadow(Ewl_Widget *c); Ewl_Widget *add_window(char *name, int width, int height, void *cb, void *data); +/* Ephoto Dialogs */ +void about_dialog(Ewl_Widget *w, void *event, void *data); +void add_album(Ewl_Widget *w, void *event, void *data); + /* Ephoto Imaging */ unsigned int *flip_horizontal(Ewl_Widget *image); unsigned int *flip_vertical(Ewl_Widget *image); @@ -117,6 +121,8 @@ /* Ephoto Main View */ void show_main_view(Ewl_Widget *w, void *event, void *data); void show_edit_view(Ewl_Widget *w, void *event, void *data); +void populate_albums(Ewl_Widget *w, void *event, void *data); +void populate_directories(Ewl_Widget *w, void *event, void *data); /* Ephoto Viewer Views */ void show_normal_view(Ewl_Widget *w, void *event, void *data); =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_edit_view.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ephoto_edit_view.c 25 May 2007 20:55:53 -0000 1.24 +++ ephoto_edit_view.c 31 May 2007 06:02:36 -0000 1.25 @@ -7,7 +7,6 @@ static void next_image(Ewl_Widget *w, void *event, void *data); static void zoom_in(Ewl_Widget *w, void *event, void *data); static void zoom_out(Ewl_Widget *w, void *event, void *data); -//static void zoom_full(Ewl_Widget *w, void *event, void *data); static void flip_image_horizontal(Ewl_Widget *w, void *event, void *data); static void flip_image_vertical(Ewl_Widget *w, void *event, void *data); static void rotate_image_left(Ewl_Widget *w, void *event, void *data); @@ -16,8 +15,8 @@ static void image_sharpen(Ewl_Widget *w, void *event, void *data); static void image_grayscale(Ewl_Widget *w, void *event, void *data); static void image_sepia(Ewl_Widget *w, void *event, void *data); -//static void close_channel(Ewl_Widget *w, void *event, void *data); -//static void channel_mixer(Ewl_Widget *w, void *event, void *data); +static void close_channel(Ewl_Widget *w, void *event, void *data); +static void channel_mixer(Ewl_Widget *w, void *event, void *data); /*Add the edit view*/ Ewl_Widget *add_edit_view(Ewl_Widget *c) @@ -100,11 +99,6 @@ ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); - //button = add_button(c, "Zoom 1:1", PACKAGE_DATA_DIR "/images/search.png", zoom_full, NULL); - ewl_button_image_size_set(EWL_BUTTON(button), 20, 20); - ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); - ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); - button = add_button(c, "Rotate Left", PACKAGE_DATA_DIR "/images/undo.png", rotate_image_left, NULL); ewl_button_image_size_set(EWL_BUTTON(button), 20, 20); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); @@ -153,9 +147,9 @@ ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); -/* button = add_button(c, "Channel Editor", NULL, channel_mixer, NULL); + button = add_button(c, "Channel Editor", NULL, channel_mixer, NULL); ewl_object_alignment_set(EWL_OBJECT(button), EWL_FLAG_ALIGN_LEFT); - ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL);*/ + ewl_object_fill_policy_set(EWL_OBJECT(button), EWL_FLAG_FILL_HFILL); return; } @@ -203,7 +197,7 @@ ewl_object_current_size_get(EWL_OBJECT(em->eimage), &ow, &oh); - ewl_image_size_set(EWL_IMAGE(em->eimage), ow*2, oh*2); + ewl_image_size_set(EWL_IMAGE(em->eimage), ow*1.5, oh*1.5); ewl_widget_configure(em->eimage->parent); return; @@ -216,7 +210,7 @@ ewl_object_current_size_get(EWL_OBJECT(em->eimage), &ow, &oh); - ewl_image_size_set(EWL_IMAGE(em->eimage), ow/2, oh/2); + ewl_image_size_set(EWL_IMAGE(em->eimage), ow/1.5, oh/1.5); ewl_widget_configure(em->eimage->parent); return; @@ -360,56 +354,84 @@ } /*Close the Channel Mixer*/ -/*static void close_channel(Ewl_Widget *w, void *event, void *data) +static void close_channel(Ewl_Widget *w, void *event, void *data) { - Ewl_Widget *win; +/* Ewl_Widget *win; win = data; - ewl_widget_destroy(win); -}*/ + ewl_widget_destroy(win);*/ +} /*Add a Channel Mixer*/ -/*static void channel_mixer(Ewl_Widget *w, void *event, void *data) +static void channel_mixer(Ewl_Widget *w, void *event, void *data) { - Ewl_Widget *window, *vbox, *ol, *image, *hist; + close_channel(NULL, NULL, NULL); +/* Ewl_Widget *window, *vbox, *seek; - window = add_window("Channel Editor", 200, 400, NULL, NULL); + window = add_window("Channel Editor", 400, 400, NULL, NULL); ewl_callback_append(window, EWL_CALLBACK_DELETE_WINDOW, close_channel, window); - vbox = add_box(window, EWL_ORIENTATION_VERTICAL, 5); - - ol = ewl_overlay_new(); - ewl_object_alignment_set(EWL_OBJECT(ol), EWL_FLAG_ALIGN_CENTER); - ewl_object_fill_policy_set(EWL_OBJECT(ol), EWL_FLAG_FILL_SHRINK); - ewl_container_child_append(EWL_CONTAINER(vbox), ol); - ewl_widget_show(ol); - - image = add_image(ol, ewl_image_file_path_get(EWL_IMAGE(em->eimage)), - 0, NULL, NULL); - ewl_image_size_set(EWL_IMAGE(image), 175, 175); - ewl_object_alignment_set(EWL_OBJECT(image), EWL_FLAG_ALIGN_CENTER); - - hist = ewl_histogram_new(); - ewl_histogram_channel_set(EWL_HISTOGRAM(hist), EWL_HISTOGRAM_CHANNEL_R); - ewl_histogram_image_set(EWL_HISTOGRAM(hist), EWL_IMAGE(image)); - ewl_object_fill_policy_set(EWL_OBJECT(hist), EWL_FLAG_FILL_ALL); - ewl_container_child_append(EWL_CONTAINER(ol), hist); - ewl_widget_show(hist); - - hist = ewl_histogram_new(); - ewl_histogram_channel_set(EWL_HISTOGRAM(hist), EWL_HISTOGRAM_CHANNEL_G); - ewl_histogram_image_set(EWL_HISTOGRAM(hist), EWL_IMAGE(image)); - ewl_object_fill_policy_set(EWL_OBJECT(hist), EWL_FLAG_FILL_ALL); - ewl_container_child_append(EWL_CONTAINER(ol), hist); - ewl_widget_show(hist); - - hist = ewl_histogram_new(); - ewl_histogram_channel_set(EWL_HISTOGRAM(hist), EWL_HISTOGRAM_CHANNEL_B); - ewl_histogram_image_set(EWL_HISTOGRAM(hist), EWL_IMAGE(image)); - ewl_object_fill_policy_set(EWL_OBJECT(hist), EWL_FLAG_FILL_ALL); - ewl_container_child_append(EWL_CONTAINER(ol), hist); - ewl_widget_show(hist); + vbox = add_box(window, EWL_ORIENTATION_VERTICAL, 1); + + add_label(vbox, "Hue"); -}*/ + seek = ewl_hseeker_new(); + ewl_range_minimum_value_set(EWL_RANGE(seek), -100); + ewl_range_maximum_value_set(EWL_RANGE(seek), 100); + ewl_range_step_set(EWL_RANGE(seek), 10); + ewl_range_value_set(EWL_RANGE(seek), 0); + ewl_container_child_append(EWL_CONTAINER(vbox), seek); + ewl_widget_show(seek); + + add_label(vbox, "Saturation"); + + seek = ewl_hseeker_new(); + ewl_range_minimum_value_set(EWL_RANGE(seek), -100); + ewl_range_maximum_value_set(EWL_RANGE(seek), 100); + ewl_range_step_set(EWL_RANGE(seek), 10); + ewl_range_value_set(EWL_RANGE(seek), 0); + ewl_container_child_append(EWL_CONTAINER(vbox), seek); + ewl_widget_show(seek); + + add_label(vbox, "Value"); + + seek = ewl_hseeker_new(); + ewl_range_minimum_value_set(EWL_RANGE(seek), -100); + ewl_range_maximum_value_set(EWL_RANGE(seek), 100); + ewl_range_step_set(EWL_RANGE(seek), 10); + ewl_range_value_set(EWL_RANGE(seek), 0); + ewl_container_child_append(EWL_CONTAINER(vbox), seek); + ewl_widget_show(seek); + + add_label(vbox, "Light"); + + seek = ewl_hseeker_new(); + ewl_range_minimum_value_set(EWL_RANGE(seek), -100); + ewl_range_maximum_value_set(EWL_RANGE(seek), 100); + ewl_range_step_set(EWL_RANGE(seek), 10); + ewl_range_value_set(EWL_RANGE(seek), 0); + ewl_container_child_append(EWL_CONTAINER(vbox), seek); + ewl_widget_show(seek); + + add_label(vbox, "Brightness"); + + seek = ewl_hseeker_new(); + ewl_range_minimum_value_set(EWL_RANGE(seek), -100); + ewl_range_maximum_value_set(EWL_RANGE(seek), 100); + ewl_range_step_set(EWL_RANGE(seek), 10); + ewl_range_value_set(EWL_RANGE(seek), 0); + ewl_container_child_append(EWL_CONTAINER(vbox), seek); + ewl_widget_show(seek); + + add_label(vbox, "Contrast"); + + seek = ewl_hseeker_new(); + ewl_range_minimum_value_set(EWL_RANGE(seek), -100); + ewl_range_maximum_value_set(EWL_RANGE(seek), 100); + ewl_range_step_set(EWL_RANGE(seek), 10); + ewl_range_value_set(EWL_RANGE(seek), 0); + ewl_container_child_append(EWL_CONTAINER(vbox), seek); + ewl_widget_show(seek);*/ +} =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_imaging.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- ephoto_imaging.c 25 May 2007 20:55:53 -0000 1.16 +++ ephoto_imaging.c 31 May 2007 06:02:36 -0000 1.17 @@ -1,75 +1,5 @@ #include "ephoto.h" -#define R_CMOD(r) \ - red[(int)(r)] -#define G_CMOD(g) \ - green[(int)(g)] -#define B_CMOD(b) \ - blue[(int)(b)] \ -/*#define A_CMOD(a) \ - alpha[(int)(a)]*/ - -#define A_VAL(p) ((unsigned char *)(p))[3] -#define R_VAL(p) ((unsigned char *)(p))[2] -#define G_VAL(p) ((unsigned char *)(p))[1] -#define B_VAL(p) ((unsigned char *)(p))[0] - -//static unsigned int *set_contrast(unsigned int *data, int ew, int eh, float v); - -static void close_dialog(Ewl_Widget *w, void *event, void *data); -static void close_progress(Ewl_Widget *w, void *event, void *data); -static void save_clicked(Ewl_Widget *w, void *event, void *data); -static void save_image(Ewl_Widget *w, void *event, void *data); - -static Ewl_Widget *save_win, *qseek; - -/*static unsigned int *set_contrast(unsigned int *data, int ew, int eh, float v) -{ - int i, val; - unsigned int *p; - unsigned char red[256], green[256], blue[256], alpha[256]; - - for (i = 0; i < 256; i++) - { - red[i] = (unsigned char)i; - green[i] = (unsigned char)i; - blue[i] = (unsigned char)i; - alpha[i] = (unsigned char)i; - } - for (i = 0; i < 256; i++) - { - val = (int)(((double)red[i] - 127) * v) + 127; - if (val < 0) val = 0; - if (val > 255) val = 255; - red[i] = (unsigned char)val; - - val = (int)(((double)green[i] - 127) * v) + 127; - if (val < 0) val = 0; - if (val > 255) val = 255; - green[i] = (unsigned char)val; - - val = (int)(((double)blue[i] - 127) * v) + 127; - if (val < 0) val = 0; - if (val > 255) val = 255; - blue[i] = (unsigned char)val; - - val = (int)(((double)alpha[i] - 127) * v) + 127; - if (val < 0) val = 0; - if (val > 255) val = 255; - alpha[i] = (unsigned char)val; - } - for (i = 0; i < (ew * eh); i++) - { - p = &data[i]; - - R_VAL(p) = R_CMOD(R_VAL(p)); - G_VAL(p) = G_CMOD(G_VAL(p)); - B_VAL(p) = B_CMOD(B_VAL(p)); - // A_VAL(p) = A_CMOD(A_VAL(p)); - } - return data; -}*/ - unsigned int *flip_horizontal(Ewl_Widget *image) { unsigned int *im_data, *im_data_new; @@ -413,119 +343,5 @@ evas_object_image_data_update_add(EWL_IMAGE(image)->image, 0, 0, w, h); } -} - -static void close_dialog(Ewl_Widget *w, void *event, void *data) -{ - ewl_widget_destroy(save_win); -} - -static void close_progress(Ewl_Widget *w, void *event, void *data) -{ - ewl_widget_destroy(w); -} - -static void save_image(Ewl_Widget *w, void *event, void *data) -{ - const char *file; - char flags[PATH_MAX]; - char *ext; - - file = data; - - ext = strrchr(file, '.')+1; - if (!strncmp(ext, "png", 3)) - { - snprintf(flags, PATH_MAX, "compress=%i", - (int)ewl_range_value_get(EWL_RANGE(qseek))); - } - else - { - double svalue; - float jvalue; - - svalue = ewl_range_value_get(EWL_RANGE(qseek)); - jvalue = (svalue / 9) * 100; - - snprintf(flags, PATH_MAX, "quality=%.0f", jvalue); - } - - if(!file) return; - - if(VISIBLE(em->eimage)) - { - evas_object_image_save(EWL_IMAGE(em->eimage)->image, - file, NULL, flags); - } - - ewl_widget_destroy(EWL_WIDGET(w)); -} - -static void save_clicked(Ewl_Widget *w, void *event, void *data) -{ - char *file; - - Ewl_Widget *pwin, *vbox, *label, *pbar; - - file = ewl_text_text_get(EWL_TEXT(data)); - - if(!file) return; - - ewl_widget_destroy(save_win); - - pwin = add_window("Save Progress", 200, 75, close_progress, NULL); - ewl_callback_append(pwin, EWL_CALLBACK_SHOW, save_image, file); - - vbox = add_box(pwin, EWL_ORIENTATION_VERTICAL, 5); - - label = add_label(vbox, "Save Progress"); - - pbar = ewl_progressbar_new(); - ewl_progressbar_label_set(EWL_PROGRESSBAR(pbar), "Saving..."); - ewl_range_unknown_set(EWL_RANGE(pbar), 1); - ewl_container_child_append(EWL_CONTAINER(vbox), pbar); - ewl_widget_show(pbar); - - return; -} - -void save_dialog(const char *file) -{ - Ewl_Widget *vbox, *hbox, *button, *entry; - - save_win = add_window("Save Image", 300, 100, close_dialog, NULL); - - vbox = add_box(save_win, EWL_ORIENTATION_VERTICAL, 5); - ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); - - add_label(vbox, "Save As:"); - - entry = add_entry(vbox, "default.jpg", NULL, NULL); - - add_label(vbox, "Quality/Compression:"); - - qseek = ewl_hseeker_new(); - ewl_range_minimum_value_set(EWL_RANGE(qseek), 1); - ewl_range_maximum_value_set(EWL_RANGE(qseek), 9); - ewl_range_step_set(EWL_RANGE(qseek), 1); - ewl_range_value_set(EWL_RANGE(qseek), 7); - ewl_container_child_append(EWL_CONTAINER(vbox), qseek); - ewl_widget_show(qseek); - - hbox = add_box(vbox, EWL_ORIENTATION_HORIZONTAL, 5); - ewl_object_alignment_set(EWL_OBJECT(hbox), EWL_FLAG_ALIGN_CENTER); - ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_SHRINK); - - button = add_button(hbox, "Save", - PACKAGE_DATA_DIR "/images/stock_save.png", - save_clicked, entry); - ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - - button = add_button(hbox, "Close", - PACKAGE_DATA_DIR "/images/dialog-close.png", - close_dialog, NULL); - ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - - return; } =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_list_view.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -3 -r1.21 -r1.22 --- ephoto_list_view.c 14 May 2007 17:05:29 -0000 1.21 +++ ephoto_list_view.c 31 May 2007 06:02:36 -0000 1.22 @@ -14,7 +14,7 @@ ewl_object_fill_policy_set(EWL_OBJECT(em->list_vbox), EWL_FLAG_FILL_ALL); ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(c), em->list_vbox, "List"); - em->ltree = add_ltree(em->list_vbox); + em->ltree = add_ltree(em->list_vbox); return em->list_vbox; } @@ -22,7 +22,7 @@ /*Show the list view*/ void show_list_view(Ewl_Widget *w, void *event, void *data) { - ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->main_nb), em->main_vbox); + show_main_view(NULL, NULL, NULL); ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), em->list_vbox); } @@ -132,7 +132,7 @@ const char *image; void *val = NULL; - image = ecore_list_goto_index(em->images, row); + image = ecore_dlist_goto_index(em->images, row); if (image) { val = (void *)image; =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -3 -r1.38 -r1.39 --- ephoto_main.c 27 May 2007 03:22:16 -0000 1.38 +++ ephoto_main.c 31 May 2007 06:02:36 -0000 1.39 @@ -1,15 +1,7 @@ #include "ephoto.h" - - /*Ewl Callbacks*/ -static void about_dialog(Ewl_Widget *w, void *event, void *data); -static void add_album(Ewl_Widget *w, void *event, void *data); -static void cancel(Ewl_Widget *w, void *event, void *data); static void destroy(Ewl_Widget *w, void *event, void *data); -static void populate_albums(Ewl_Widget *w, void *event, void *data); -static void populate_directories(Ewl_Widget *w, void *event, void *data); -static void save(Ewl_Widget *w, void *event, void *data); static void update_view(Ewl_Widget *w, void *event, void *data); static void window_fullscreen(Ewl_Widget *w, void *event, void *data); @@ -29,7 +21,6 @@ /*Ephoto Global Variables*/ Ephoto_Main *em; -Ewl_Widget *ae, *de; /*Destroy the Main Window*/ static void destroy(Ewl_Widget *w, void *event, void *data) @@ -91,105 +82,10 @@ return; } -/*Cancel the Dialog*/ -static void cancel(Ewl_Widget *w, void *event, void *data) -{ - Ewl_Widget *win; - - win = data; - - ewl_widget_destroy(win); -} - -/*Save the Album*/ -static void save(Ewl_Widget *w, void *event, void *data) -{ - char *album, *description; - Ewl_Widget *win; - sqlite3 *db; - - win = data; - - album = ewl_text_text_get(EWL_TEXT(ae)); - description = ewl_text_text_get(EWL_TEXT(de)); - - if (album) - { - db = ephoto_db_init(); - ephoto_db_add_album(db, album, description); - ephoto_db_close(db); - ewl_widget_destroy(win); - ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->browser), - em->atree); - populate_albums(NULL, NULL, NULL); - } -} - -/*Add an Album to Ephoto*/ -static void add_album(Ewl_Widget *w, void *event, void *data) -{ - Ewl_Widget *window, *label, *button, *vbox, *hbox; - - window = add_window("Add Album", 200, 100, NULL, NULL); - ewl_callback_append(window, EWL_CALLBACK_DELETE_WINDOW, cancel, window); - - vbox = add_box(window, EWL_ORIENTATION_VERTICAL, 3); - ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); - - label = add_label(vbox, "Enter a name for the new album:"); - ae = add_entry(vbox, NULL, NULL, NULL); - - label = add_label(vbox, "Enter a description for the album:"); - de = add_entry(vbox, NULL, NULL, NULL); - - hbox = add_box(vbox, EWL_ORIENTATION_HORIZONTAL, 2); - ewl_object_fill_policy_set(EWL_OBJECT(hbox), EWL_FLAG_FILL_SHRINK); - - button = add_button(hbox, "Save", - PACKAGE_DATA_DIR "/images/stock_save.png", - save, window); - ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - - button = add_button(hbox, "Cancel", - PACKAGE_DATA_DIR "/images/dialog-close.png", - cancel, window); - ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); -} - -/*Add an About Dialog*/ -static void about_dialog(Ewl_Widget *w, void *event, void *data) -{ - Ewl_Widget *window, *button, *vbox, *text; - - window = add_window("About Ephoto", 200, 100, NULL, NULL); - ewl_callback_append(window, EWL_CALLBACK_DELETE_WINDOW, cancel, window); - - vbox = add_box(window, EWL_ORIENTATION_VERTICAL, 3); - ewl_object_fill_policy_set(EWL_OBJECT(vbox), EWL_FLAG_FILL_ALL); - - text = add_text(vbox, "Ephoto is an advanced image viewer that allows\n" - "you to view images in several methods. They\n" - "include an icon view, a list view, and a single\n" - "image view. You can also view exif data, view\n" - "images in a fullscreen mode, and view images in a\n" - "slideshow. The edit view offers simple and advanced\n" - "editing options including rotations, flips, blurs,\n" - "sharpens, conversion to black and white, and\n" - "conversions to sepia."); - - ewl_text_wrap_set(EWL_TEXT(text), EWL_TEXT_WRAP_WORD); - - button = add_button(vbox, "Close", - PACKAGE_DATA_DIR "/images/dialog-close.png", - cancel, window); - ewl_button_image_size_set(EWL_BUTTON(button), 25, 25); - - return; -} - /*Create the Main Ephoto Window*/ void create_main_gui(void) { + char buf[PATH_MAX]; Ewl_Widget *vbox, *hbox, *vsep, *button; Ewl_Widget *mb, *menu, *mi; @@ -352,7 +248,7 @@ em->db = ephoto_db_init(); em->current_album = strdup(_("Complete Library")); - em->current_directory = strdup(getenv("HOME")); + em->current_directory = strdup(getcwd(buf, PATH_MAX)); populate_albums(NULL, NULL, NULL); ewl_callback_append(em->browser, EWL_CALLBACK_VALUE_CHANGED, @@ -362,7 +258,7 @@ } /*Update the Image List*/ -static void populate_albums(Ewl_Widget *w, void *event, void *data) +void populate_albums(Ewl_Widget *w, void *event, void *data) { const char *album; char *imagef; @@ -417,7 +313,7 @@ } /*Update the Image List*/ -static void populate_directories(Ewl_Widget *w, void *event, void *data) +void populate_directories(Ewl_Widget *w, void *event, void *data) { const char *directory; char *imagef; =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_normal_view.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ephoto_normal_view.c 22 Apr 2007 19:09:02 -0000 1.13 +++ ephoto_normal_view.c 31 May 2007 06:02:36 -0000 1.14 @@ -27,7 +27,7 @@ /*Show the normal view*/ void show_normal_view(Ewl_Widget *w, void *event, void *data) { - ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->main_nb), em->main_vbox); + show_main_view(NULL, NULL, NULL); ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), em->fbox_vbox); } =================================================================== RCS file: /cvs/e/e17/apps/ephoto/src/bin/ephoto_single_view.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ephoto_single_view.c 15 May 2007 17:09:26 -0000 1.8 +++ ephoto_single_view.c 31 May 2007 06:02:36 -0000 1.9 @@ -44,7 +44,7 @@ /*Show the single view*/ void show_single_view(Ewl_Widget *w, void *event, void *data) { - ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->main_nb), em->main_vbox); + show_main_view(NULL, NULL, NULL); ewl_notebook_visible_page_set(EWL_NOTEBOOK(em->view_box), em->single_vbox); ewl_image_file_path_set(EWL_IMAGE(em->simage), ecore_dlist_current(em->images)); ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs