[gtk+] Bug 563002 - Doesn't call 'update-preview' on set_filename



commit 6bdc9b7f8a0196ee63af7f0ed0423af793ba0d32
Author: Michael Natterer <mitch gimp org>
Date:   Tue Oct 12 21:20:16 2010 +0200

    Bug 563002 - Doesn't call 'update-preview' on set_filename
    
    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 |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 5fddcfa..7a47699 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -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;
         }
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]