From a880bc840e60796a9e88fd6b75e6c8be2866d919 Mon Sep 17 00:00:00 2001 From: titan Date: Thu, 19 Apr 2007 23:31:19 +0000 Subject: [PATCH] Minor changes, make the list from file system images a dlist, and better align the image seek buttons on single view. SVN revision: 29609 --- src/bin/ephoto_browsing.c | 12 ++++++------ src/bin/ephoto_single_view.c | 7 +++++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/bin/ephoto_browsing.c b/src/bin/ephoto_browsing.c index b51a3b9..f95c245 100644 --- a/src/bin/ephoto_browsing.c +++ b/src/bin/ephoto_browsing.c @@ -57,8 +57,8 @@ Ecore_List *get_images(const char *directory) if (ecore_file_is_dir(directory)) { ls = ecore_list_new(); - files = ecore_list_new(); - ecore_list_set_free_cb(files, free); + files = ecore_dlist_new(); + ecore_dlist_set_free_cb(files, free); ls = ecore_file_ls(directory); while (!ecore_list_is_empty(ls)) @@ -78,15 +78,15 @@ Ecore_List *get_images(const char *directory) } if (fnmatch("*.[Jj][Pp][Ee][Gg]", path, 0) == 0) { - ecore_list_append(files, strdup(path)); + ecore_dlist_append(files, strdup(path)); } else if (fnmatch("*.[Jj][Pp][Gg]", path, 0) == 0) { - ecore_list_append(files, strdup(path)); + ecore_dlist_append(files, strdup(path)); } else if (fnmatch("*.[Pp][Nn][Gg]", path, 0) == 0) { - ecore_list_append(files, strdup(path)); + ecore_dlist_append(files, strdup(path)); } } } @@ -95,6 +95,6 @@ Ecore_List *get_images(const char *directory) { files = NULL; } - ecore_list_goto_first(files); + ecore_dlist_goto_first(files); return files; } diff --git a/src/bin/ephoto_single_view.c b/src/bin/ephoto_single_view.c index b908ba6..fe3f12a 100644 --- a/src/bin/ephoto_single_view.c +++ b/src/bin/ephoto_single_view.c @@ -7,13 +7,16 @@ static void next_image(Ewl_Widget *w, void *event, void *data); /*Add the single view*/ Ewl_Widget *add_single_view(Ewl_Widget *c) { - Ewl_Widget *hbox, *button; + Ewl_Widget *hbox, *ibox, *button; em->single_vbox = add_box(c, EWL_ORIENTATION_VERTICAL, 5); ewl_object_fill_policy_set(EWL_OBJECT(em->single_vbox), EWL_FLAG_FILL_ALL); ewl_notebook_page_tab_text_set(EWL_NOTEBOOK(c), em->single_vbox, "Single"); - em->simage = add_image(em->single_vbox, NULL, 0, NULL, NULL); + ibox = add_box(em->single_vbox, EWL_ORIENTATION_VERTICAL, 0); + ewl_object_fill_policy_set(EWL_OBJECT(ibox), EWL_FLAG_FILL_ALL); + + em->simage = add_image(ibox, NULL, 0, NULL, NULL); ewl_object_alignment_set(EWL_OBJECT(em->simage), EWL_FLAG_ALIGN_CENTER); ewl_object_fill_policy_set(EWL_OBJECT(em->simage), EWL_FLAG_FILL_SHRINK);