diff --git a/ChangeLog b/ChangeLog index b1caf5b22c51a77343bc3a421b4e7f4f57d0e107..55088bbb310b05bb3e57383b208123fa58a5abb0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-11-06 Benedikt Meurer <benny@xfce.org> + + * thunar/thunar-path-entry.c(thunar_path_entry_changed): Changing the + model currently in used by a GtkEntryCompletion is very slow with + recent GTK+ versions. Therefore we disconnect the model first when + changing the folder and reconnect it to the entry completion after- + wards. Bug #1681. + 2006-11-05 Benedikt Meurer <benny@xfce.org> * thunar/thunar-shortcuts-view.c(thunar_shortcuts_view_drag_leave): diff --git a/thunar/thunar-path-entry.c b/thunar/thunar-path-entry.c index b714f4625557b45892c55b2ac33e21705880354f..0ce7e93646cb5bebfbbf7b04edd0d4e821712965 100644 --- a/thunar/thunar-path-entry.c +++ b/thunar/thunar-path-entry.c @@ -794,6 +794,7 @@ thunar_path_entry_changed (GtkEditable *editable) ThunarVfsPath *folder_path = NULL; ThunarVfsPath *file_path = NULL; ThunarFolder *folder; + GtkTreeModel *model; const gchar *text; ThunarFile *current_folder; ThunarFile *current_file; @@ -848,7 +849,19 @@ thunar_path_entry_changed (GtkEditable *editable) /* try to open the current-folder file as folder */ folder = (current_folder != NULL) ? thunar_folder_get_for_file (current_folder) : NULL; - thunar_list_model_set_folder (THUNAR_LIST_MODEL (gtk_entry_completion_get_model (completion)), folder); + + /* set the new folder for the completion model, but disconnect the model from the + * completion first, because GtkEntryCompletion has become very slow recently when + * updating the model being used (http://bugzilla.xfce.org/show_bug.cgi?id=1681). + */ + model = gtk_entry_completion_get_model (completion); + g_object_ref (G_OBJECT (model)); + gtk_entry_completion_set_model (completion, NULL); + thunar_list_model_set_folder (THUNAR_LIST_MODEL (model), folder); + gtk_entry_completion_set_model (completion, model); + g_object_unref (G_OBJECT (model)); + + /* cleanup */ if (G_LIKELY (folder != NULL)) g_object_unref (G_OBJECT (folder)); }