]> Pileus Git - ~andy/gtk/commitdiff
Bug 563002 - Doesn't call 'update-preview' on set_filename
authorMichael Natterer <mitch@gimp.org>
Tue, 12 Oct 2010 19:20:16 +0000 (21:20 +0200)
committerMichael Natterer <mitch@gimp.org>
Tue, 12 Oct 2010 19:27:21 +0000 (21:27 +0200)
Call gtk_tree_view_set_cursor() in addition to
gtk_tree_selection_select_iter() when selecting the file in
show_and_select_files() so the preview update machinery gets
triggered.
(cherry picked from commit 795c8070db6c97ace040bfd220794bae3e2721c2)

gtk/gtkfilechooserdefault.c

index 5fddcfa06ca2865eac7a6d510e8a2f2b3e9cae81..7a47699cdbb4b71d55a4d0854d3efb2beca177a3 100644 (file)
@@ -6205,7 +6205,15 @@ show_and_select_files (GtkFileChooserDefault *impl,
           
       if (_gtk_file_system_model_iter_is_visible (fsmodel, &iter))
         {
+          GtkTreePath *path;
+
           gtk_tree_selection_select_iter (selection, &iter);
+
+          path = gtk_tree_model_get_path (fsmodel, &iter);
+          gtk_tree_view_set_cursor (GTK_TREE_VIEW (impl->browse_files_tree_view),
+                                    path, NULL, FALSE);
+          gtk_tree_path_free (path);
+
           selected_a_file = TRUE;
         }
     }