]> www.fi.muni.cz Git - evince.git/commitdiff
Fix selection of first item in list form fields.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 9 Jul 2007 13:38:17 +0000 (13:38 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 9 Jul 2007 13:38:17 +0000 (13:38 +0000)
2007-07-09  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_form_field_choice_save):
Fix selection of first item in list form fields.

svn path=/trunk/; revision=2563

ChangeLog
shell/ev-view.c

index 743623c334fec8e3f20986d488b0040cbc351eff..f19add66af23e0c50199fe2b1726e40b47e31387 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-09  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * 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  <carlosgc@gnome.org>
 
        * shell/ev-pixbuf-cache.c: (add_job), (add_job_if_needed),
index 468a8946acd72e84f6efe5429320872f80e90691..f46f1652c577d24a935e557a96b4f7706b9d4fb4 100644 (file)
@@ -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,