Am Mittwoch, den 19.10.2005, 17:23 +0200 schrieb Alexander Larsson: > On Wed, 2005-10-19 at 17:02 +0200, Christian Neumair wrote: > > Am Mittwoch, den 19.10.2005, 10:53 +0200 schrieb Alexander Larsson: > > > On Tue, 2005-10-18 at 20:04 +0200, Christian Neumair wrote: > > > > Am Dienstag, den 18.10.2005, 10:30 +0200 schrieb Alexander Larsson: > > > > > > > > > > So, unless we have a very well specified and useful semantics for them > > > > > we shouldn't introduce new abstract properties like that. Its better to > > > > > have specific ones instead (nautils_file_display_type() maybe?). > > > > > > > > Thanks for your valuable remarks. For consistency reasons, I've called > > > > the function nautilus_file_should_show_type. > > > > > > Why not show the type ("folder") for things like trash, burn and fonts? > > > They are essentially normal folders containing files. > > > > Because they're IMHO perceived as being very special locations. "CD/DVD > > Creator", "Fonts" "Trash" ("Themes" as well, btw.) doesn't suggest that > > they are ordinary folders. > > I'm not sure they are "ordinary", but they are surely folders, and act > in that way in every normal sense. The only way they are different is > that they support extra "features". (Well, maybe not "fonts".) > > I guess I don't see the huge advantage of not saying that the burn: > toplevel folder is a folder. I still disagree. It just feels wrong, because a real folder directory, not an abstract concept. However, I'm attaching a new patch with the trash, burn and fonts code removed. -- Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-file.c =================================================================== RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v retrieving revision 1.373 diff -u -p -r1.373 nautilus-file.c --- libnautilus-private/nautilus-file.c 3 Oct 2005 13:44:48 -0000 1.373 +++ libnautilus-private/nautilus-file.c 19 Oct 2005 17:15:54 -0000 @@ -3208,6 +3208,23 @@ nautilus_file_should_show_directory_item } gboolean +nautilus_file_should_show_type (NautilusFile *file) +{ + char *uri; + gboolean ret; + + g_return_val_if_fail (NAUTILUS_IS_FILE (file), FALSE); + + uri = nautilus_file_get_uri (file); + ret = ((strcmp (uri, "computer:///") != 0) && + (strcmp (uri, "network:///") != 0) && + (strcmp (uri, "smb:///") != 0)); + g_free (uri); + + return ret; +} + +gboolean nautilus_file_should_get_top_left_text (NautilusFile *file) { static gboolean show_text_in_icons_callback_added = FALSE; Index: libnautilus-private/nautilus-file.h =================================================================== RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.h,v retrieving revision 1.107 diff -u -p -r1.107 nautilus-file.h --- libnautilus-private/nautilus-file.h 20 Sep 2005 16:05:43 -0000 1.107 +++ libnautilus-private/nautilus-file.h 19 Oct 2005 17:15:54 -0000 @@ -167,6 +167,7 @@ NautilusRequestStatus nautilus_file_ge GnomeVFSFileSize *total_size, gboolean force); gboolean nautilus_file_should_show_directory_item_count (NautilusFile *file); +gboolean nautilus_file_should_show_type (NautilusFile *file); GList * nautilus_file_get_keywords (NautilusFile *file); void nautilus_file_set_keywords (NautilusFile *file, GList *keywords); Index: src/nautilus-sidebar-title.c =================================================================== RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-title.c,v retrieving revision 1.154 diff -u -p -r1.154 nautilus-sidebar-title.c --- src/nautilus-sidebar-title.c 17 Oct 2005 17:43:57 -0000 1.154 +++ src/nautilus-sidebar-title.c 19 Oct 2005 17:15:54 -0000 @@ -450,7 +450,12 @@ update_more_info (NautilusSidebarTitle * g_free (component_info); } else { info_string = g_string_new (NULL); - type_string = nautilus_file_get_string_attribute (file, "type"); + + type_string = NULL; + if (file != NULL && nautilus_file_should_show_type (file)) { + type_string = nautilus_file_get_string_attribute (file, "type"); + } + if (type_string != NULL) { append_and_eat (info_string, NULL, type_string); append_and_eat (info_string, ", ",
Attachment:
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil