diff options
author | Federico Mena Quintero <federico@ximian.com> | 2004-03-15 02:09:22 +0000 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2004-03-15 02:09:22 +0000 |
commit | dfa36bb4e4035370f283823372ea71e77baec3bc (patch) | |
tree | bec3906a4a93a54d9665a70e07b46216677a55c5 /gtk/gtkfilesystem.c | |
parent | 3895bea4df873c114689f8de97b5527a75657aaf (diff) | |
download | gtk+-dfa36bb4e4035370f283823372ea71e77baec3bc.tar.gz |
Fixes #136185, patch by Morten Welinder, with some changes.
2004-03-14 Federico Mena Quintero <federico@ximian.com>
Fixes #136185, patch by Morten Welinder, with some changes.
* gtk/gtkfilechooserdefault.c (check_is_folder): New helper function.
(shortcuts_insert_path): Check the path first with check_is_folder().
(gtk_file_chooser_default_set_current_folder): Likewise.
(gtk_file_chooser_default_add_shortcut_folder): Likewise.
(browse_widgets_create): Unref the size group.
* gtk/gtkfilesystemunix.c (gtk_file_system_unix_get_folder):
Handle the case where the file exists but it is not a directory.
(IconType): Add value for ICON_UNDECIDED.
(struct stat_info_entry): New structure to hold a file's struct
stat, its MIME type and its icon type.
(struct _GtkFileFolderUnix): Added a hash of struct
stat_info_entry, and flags to remember which info types we've read
so far.
(get_icon_type): Use a helper function for the icons-from-stat
types.
(gtk_file_system_unix_render_icon): Use the cached file info.
(gtk_file_folder_unix_get_info): Put the info in the cache.
(gtk_file_system_unix_get_folder): Create the cache of file info
structures.
* gtk/gtkfilesystem.c (gtk_file_info_set_display_name): Handle the
case where display_name is the same as the existing
info->display_name.
Diffstat (limited to 'gtk/gtkfilesystem.c')
-rw-r--r-- | gtk/gtkfilesystem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkfilesystem.c b/gtk/gtkfilesystem.c index 5e903f83d5..f5b11eed1d 100644 --- a/gtk/gtkfilesystem.c +++ b/gtk/gtkfilesystem.c @@ -146,6 +146,9 @@ gtk_file_info_set_display_name (GtkFileInfo *info, { g_return_if_fail (info != NULL); + if (display_name == info->display_name) + return; + if (info->display_name) g_free (info->display_name); if (info->display_key) |