GNOME Bugzilla – Bug 147521
add_shortcut_folder should not add duplicates
Last modified: 2005-10-10 14:30:12 UTC
When adding folders to the filechooser shortcut list, it is possible to end up having multiple shortcuts for the same folder. The builtin one and the one application adds. Since there's no way to know the list of builtin shortcuts, application can't reliably avoid having duplicates. Even if the list of shortcuts were available for applications, it shouldn't be their responsibility to figure out the filechooser internals.
Created attachment 29561 [details] [review] don't add shortcut if it already exists This patch adds GTK_FILE_CHOOSER_ERROR_ALREADY_EXISTS error code that will be returned when trying to add a shortcut that already exists.
Comment on attachment 29561 [details] [review] don't add shortcut if it already exists Looks fine to me.
Ping.
Should this be commited? Has been accepted-commit_now for a long time.
Matthias, is this still good to be checked in ?
Committed the patch to HEAD. 2005-10-10 Tommi Komulainen <tommi.komulainen@iki.fi> * gtk/gtkfilechooser.h (GtkFileChooserError): Add ALREADY_EXISTS error code. * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_add_shortcut_folder): Return an error code when the shortcut already exists in the sidebar. (#147521)