Always check to see if the shortcuts exists. We don't want to put invalid

Wed Mar 10 00:10:47 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
        check to see if the shortcuts exists.  We don't want to put
        invalid dirs in the shortcuts pane.
This commit is contained in:
Jonathan Blandford 2004-03-10 05:19:29 +00:00 committed by Jonathan Blandford
parent e76bb1c3c7
commit 382bf3a113
6 changed files with 38 additions and 7 deletions

View File

@ -1,3 +1,9 @@
Wed Mar 10 00:10:47 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
check to see if the shortcuts exists. We don't want to put
invalid dirs in the shortcuts pane.
Tue Mar 9 16:40:34 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):

View File

@ -1,3 +1,9 @@
Wed Mar 10 00:10:47 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
check to see if the shortcuts exists. We don't want to put
invalid dirs in the shortcuts pane.
Tue Mar 9 16:40:34 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):

View File

@ -1,3 +1,9 @@
Wed Mar 10 00:10:47 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
check to see if the shortcuts exists. We don't want to put
invalid dirs in the shortcuts pane.
Tue Mar 9 16:40:34 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):

View File

@ -1,3 +1,9 @@
Wed Mar 10 00:10:47 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
check to see if the shortcuts exists. We don't want to put
invalid dirs in the shortcuts pane.
Tue Mar 9 16:40:34 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):

View File

@ -1,3 +1,9 @@
Wed Mar 10 00:10:47 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (shortcuts_insert_path): Always
check to see if the shortcuts exists. We don't want to put
invalid dirs in the shortcuts pane.
Tue Mar 9 16:40:34 2004 Jonathan Blandford <jrb@gnome.org>
* gtk/gtkfilechooserdefault.c (struct _GtkFileChooserDefault):

View File

@ -869,16 +869,17 @@ shortcuts_insert_path (GtkFileChooserDefault *impl,
}
else
{
/* Always check to make sure that the directory exists. */
GtkFileInfo *info = get_file_info (impl->file_system, path, FALSE, error);
if (info == NULL)
return FALSE;
if (label)
label_copy = g_strdup (label);
else
{
GtkFileInfo *info = get_file_info (impl->file_system, path, TRUE, error);
if (!info)
return FALSE;
label_copy = g_strdup (gtk_file_info_get_display_name (info));
gtk_file_info_free (info);
}
label_copy = g_strdup (gtk_file_info_get_display_name (info));
gtk_file_info_free (info);
data = gtk_file_path_copy (path);
pixbuf = gtk_file_system_render_icon (impl->file_system, path, GTK_WIDGET (impl),