Cleanups. Fix slideshow segv.

SVN revision: 29999
This commit is contained in:
titan 2007-05-15 16:44:07 +00:00 committed by titan
parent 3cf5b00d0d
commit 612cbd31ad
3 changed files with 7 additions and 16 deletions

View File

@ -3,7 +3,7 @@
static void close_dialog(Ewl_Widget *w, void *event, void *data);
static void save_image(Ewl_Widget *w, void *event, void *data);
static Ewl_Widget *save_win, *qseek, *cseek;
static Ewl_Widget *save_win, *qseek;
unsigned int *flip_horizontal(Ewl_Widget *image)
{
@ -305,8 +305,7 @@ static void save_image(Ewl_Widget *w, void *event, void *data)
pid_t pid;
file = ewl_text_text_get(EWL_TEXT(data));
snprintf(flags, PATH_MAX, "quality=%i compress=%i", (int)ewl_range_value_get(EWL_RANGE(qseek)),
(int)ewl_range_value_get(EWL_RANGE(cseek)));
snprintf(flags, PATH_MAX, "quality=%i", (int)ewl_range_value_get(EWL_RANGE(qseek)));
if(!file) return;
@ -338,7 +337,7 @@ void save_dialog(const char *file)
entry = add_entry(vbox, "default.jpg", NULL, NULL);
add_label(vbox, "Quality:");
add_label(vbox, "Quality/Compression:");
qseek = ewl_hseeker_new();
ewl_range_minimum_value_set(EWL_RANGE(qseek), 0);
@ -348,16 +347,6 @@ void save_dialog(const char *file)
ewl_container_child_append(EWL_CONTAINER(vbox), qseek);
ewl_widget_show(qseek);
add_label(vbox, "Compression:");
cseek = ewl_hseeker_new();
ewl_range_minimum_value_set(EWL_RANGE(cseek), 0);
ewl_range_maximum_value_set(EWL_RANGE(cseek), 9);
ewl_range_step_set(EWL_RANGE(cseek), 1);
ewl_range_value_set(EWL_RANGE(cseek), 9);
ewl_container_child_append(EWL_CONTAINER(vbox), cseek);
ewl_widget_show(cseek);
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);

View File

@ -324,6 +324,7 @@ static void populate_albums(Ewl_Widget *w, void *event, void *data)
em->images = ephoto_db_list_images(em->db, em->current_album);
ecore_dlist_goto_first(em->images);
ewl_container_reset(EWL_CONTAINER(em->fbox));
while (ecore_dlist_current(em->images))
{
@ -337,7 +338,7 @@ static void populate_albums(Ewl_Widget *w, void *event, void *data)
}
ecore_dlist_next(em->images);
}
ewl_widget_reparent(em->fbox);
ewl_widget_configure(em->fbox);
ecore_dlist_goto_first(em->images);
if(ecore_dlist_current(em->images))
{
@ -398,7 +399,7 @@ static void populate_directories(Ewl_Widget *w, void *event, void *data)
}
ecore_dlist_next(em->images);
}
ewl_widget_reparent(em->fbox);
ewl_widget_configure(em->fbox);
ecore_dlist_goto_first(em->images);
if(ecore_dlist_current(em->images))
{

View File

@ -31,6 +31,7 @@ static int change_picture(void *data)
static void destroy(Ewl_Widget *w, void *event, void *data)
{
ewl_widget_destroy(win);
ecore_timer_del(change);
}
static void show_first_image(Ewl_Widget *w, void *event, void *data)