forked from enlightenment/ephoto
Minor changes, make the list from file system images a dlist, and better align the image seek buttons on single view.
SVN revision: 29609
This commit is contained in:
parent
bbc54e284e
commit
a880bc840e
|
@ -57,8 +57,8 @@ Ecore_List *get_images(const char *directory)
|
||||||
if (ecore_file_is_dir(directory))
|
if (ecore_file_is_dir(directory))
|
||||||
{
|
{
|
||||||
ls = ecore_list_new();
|
ls = ecore_list_new();
|
||||||
files = ecore_list_new();
|
files = ecore_dlist_new();
|
||||||
ecore_list_set_free_cb(files, free);
|
ecore_dlist_set_free_cb(files, free);
|
||||||
|
|
||||||
ls = ecore_file_ls(directory);
|
ls = ecore_file_ls(directory);
|
||||||
while (!ecore_list_is_empty(ls))
|
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)
|
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)
|
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)
|
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;
|
files = NULL;
|
||||||
}
|
}
|
||||||
ecore_list_goto_first(files);
|
ecore_dlist_goto_first(files);
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,16 @@ static void next_image(Ewl_Widget *w, void *event, void *data);
|
||||||
/*Add the single view*/
|
/*Add the single view*/
|
||||||
Ewl_Widget *add_single_view(Ewl_Widget *c)
|
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);
|
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_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");
|
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_alignment_set(EWL_OBJECT(em->simage), EWL_FLAG_ALIGN_CENTER);
|
||||||
ewl_object_fill_policy_set(EWL_OBJECT(em->simage), EWL_FLAG_FILL_SHRINK);
|
ewl_object_fill_policy_set(EWL_OBJECT(em->simage), EWL_FLAG_FILL_SHRINK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue