From: Carlos Garcia Campos Date: Mon, 9 Jul 2007 13:38:17 +0000 (+0000) Subject: Fix selection of first item in list form fields. X-Git-Tag: EVINCE_0_9_2~5 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=1923aac54c1e2e100187d7556dedb85866035146;p=evince.git Fix selection of first item in list form fields. 2007-07-09 Carlos Garcia Campos * shell/ev-view.c: (ev_view_form_field_choice_save): Fix selection of first item in list form fields. svn path=/trunk/; revision=2563 --- diff --git a/ChangeLog b/ChangeLog index 743623c3..f19add66 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-07-09 Carlos Garcia Campos + + * shell/ev-view.c: (ev_view_form_field_choice_save): + + Fix selection of first item in list form fields. + 2007-07-09 Carlos Garcia Campos * shell/ev-pixbuf-cache.c: (add_job), (add_job_if_needed), diff --git a/shell/ev-view.c b/shell/ev-view.c index 468a8946..f46f1652 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -1761,13 +1761,13 @@ ev_view_form_field_choice_save (EvView *view, if (field_choice->is_editable) { ev_document_forms_form_field_choice_set_text (EV_DOCUMENT_FORMS (view->document), field, field_choice->text); - } - - ev_document_forms_form_field_choice_unselect_all (EV_DOCUMENT_FORMS (view->document), field); - for (l = field_choice->selected_items; l && l->data; l = g_list_next (l)) { - ev_document_forms_form_field_choice_select_item (EV_DOCUMENT_FORMS (view->document), - field, - GPOINTER_TO_INT (l->data)); + } else { + ev_document_forms_form_field_choice_unselect_all (EV_DOCUMENT_FORMS (view->document), field); + for (l = field_choice->selected_items; l; l = g_list_next (l)) { + ev_document_forms_form_field_choice_select_item (EV_DOCUMENT_FORMS (view->document), + field, + GPOINTER_TO_INT (l->data)); + } } field->changed = FALSE; ev_pixbuf_cache_reload_page (view->pixbuf_cache,