diff --git a/ChangeLog b/ChangeLog index c7a754c7c8..c34388f68e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Fri Mar 5 01:45:04 2004 Jonathan Blandford + + * gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in + the correct place instead of naïvely appending. + (shortcuts_add_volumes): refilter the model + (shortcuts_add_bookmarks): refilter the model + (gtk_file_chooser_default_add_shortcut_folder): refilter the model + 2004-03-04 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (response_cb): New handler. Ask the diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c7a754c7c8..c34388f68e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Fri Mar 5 01:45:04 2004 Jonathan Blandford + + * gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in + the correct place instead of naïvely appending. + (shortcuts_add_volumes): refilter the model + (shortcuts_add_bookmarks): refilter the model + (gtk_file_chooser_default_add_shortcut_folder): refilter the model + 2004-03-04 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (response_cb): New handler. Ask the diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c7a754c7c8..c34388f68e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Fri Mar 5 01:45:04 2004 Jonathan Blandford + + * gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in + the correct place instead of naïvely appending. + (shortcuts_add_volumes): refilter the model + (shortcuts_add_bookmarks): refilter the model + (gtk_file_chooser_default_add_shortcut_folder): refilter the model + 2004-03-04 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (response_cb): New handler. Ask the diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c7a754c7c8..c34388f68e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Fri Mar 5 01:45:04 2004 Jonathan Blandford + + * gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in + the correct place instead of naïvely appending. + (shortcuts_add_volumes): refilter the model + (shortcuts_add_bookmarks): refilter the model + (gtk_file_chooser_default_add_shortcut_folder): refilter the model + 2004-03-04 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (response_cb): New handler. Ask the diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c7a754c7c8..c34388f68e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Fri Mar 5 01:45:04 2004 Jonathan Blandford + + * gtk/gtkfilechooserdefault.c (shortcuts_append_paths): insert in + the correct place instead of naïvely appending. + (shortcuts_add_volumes): refilter the model + (shortcuts_add_bookmarks): refilter the model + (gtk_file_chooser_default_add_shortcut_folder): refilter the model + 2004-03-04 Federico Mena Quintero * gtk/gtkfilechooserdialog.c (response_cb): New handler. Ask the diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index c5188a47ad..1692c2d093 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -852,8 +852,12 @@ static int shortcuts_append_paths (GtkFileChooserDefault *impl, GSList *paths) { + int start_row; int num_inserted; + /* As there is no separator now, we want to start there. + */ + start_row = shortcuts_get_index (impl, SHORTCUTS_BOOKMARKS_SEPARATOR); num_inserted = 0; for (; paths; paths = paths->next) @@ -865,8 +869,7 @@ shortcuts_append_paths (GtkFileChooserDefault *impl, error = NULL; /* NULL GError, but we don't really want to show error boxes here */ - - if (shortcuts_insert_path (impl, -1, FALSE, NULL, path, NULL, TRUE, NULL)) + if (shortcuts_insert_path (impl, start_row + num_inserted, FALSE, NULL, path, NULL, TRUE, NULL)) num_inserted++; } @@ -992,14 +995,15 @@ shortcuts_add_volumes (GtkFileChooserDefault *impl) GtkFileSystemVolume *volume; volume = l->data; - shortcuts_insert_path (impl, start_row + n, TRUE, volume, NULL, NULL, FALSE, NULL); n++; } impl->num_volumes = n; - g_slist_free (list); + + if (impl->shortcuts_filter_model) + gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (impl->shortcuts_filter_model)); } /* Used from shortcuts_remove_rows() */ @@ -1054,6 +1058,8 @@ shortcuts_add_bookmarks (GtkFileChooserDefault *impl) { shortcuts_insert_separator (impl, SHORTCUTS_BOOKMARKS_SEPARATOR); } + if (impl->shortcuts_filter_model) + gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (impl->shortcuts_filter_model)); } /* Appends a separator and a row to the shortcuts list for the current folder */ @@ -3290,6 +3296,9 @@ gtk_file_chooser_default_add_shortcut_folder (GtkFileChooser *chooser, if (result) impl->num_shortcuts++; + if (impl->shortcuts_filter_model) + gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (impl->shortcuts_filter_model)); + return result; }