[Xfce4-commits] r30054 - in thunar/branches/migration-to-gio: . thunar
Jannis Pohlmann
jannis at xfce.org
Fri Jun 19 19:05:07 CEST 2009
Author: jannis
Date: 2009-06-19 17:05:07 +0000 (Fri, 19 Jun 2009)
New Revision: 30054
Modified:
thunar/branches/migration-to-gio/ChangeLog
thunar/branches/migration-to-gio/thunar/thunar-file.c
Log:
* thunar/thunar-file.c: Assume the file is read- and writable if it
has no G_FILE_ATTRIBUTE_ACCESS_CAN_READ or
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE attribute. This usually is the
case with shortcuts and mountables. This change removes all those
irritating emblems when browsing computer://, network:// and smb://.
Only show the "drive-harddisk" icon for local root directories (this
should only be the filesystem root, not media or anything).
Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:02 UTC (rev 30053)
+++ thunar/branches/migration-to-gio/ChangeLog 2009-06-19 17:05:07 UTC (rev 30054)
@@ -1,5 +1,15 @@
2009-06-19 Jannis Pohlmann <jannis at xfce.org>
+ * thunar/thunar-file.c: Assume the file is read- and writable if it
+ has no G_FILE_ATTRIBUTE_ACCESS_CAN_READ or
+ G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE attribute. This usually is the
+ case with shortcuts and mountables. This change removes all those
+ irritating emblems when browsing computer://, network:// and smb://.
+ Only show the "drive-harddisk" icon for local root directories (this
+ should only be the filesystem root, not media or anything).
+
+2009-06-19 Jannis Pohlmann <jannis at xfce.org>
+
* thunar/Makefile.am: Add missing entries for thunar-browser.{c,h}.
2009-06-19 Jannis Pohlmann <jannis at xfce.org>
Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 17:05:02 UTC (rev 30053)
+++ thunar/branches/migration-to-gio/thunar/thunar-file.c 2009-06-19 17:05:07 UTC (rev 30054)
@@ -2074,6 +2074,9 @@
if (file->info == NULL)
return FALSE;
+ if (!g_file_info_has_attribute (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ))
+ return TRUE;
+
return g_file_info_get_attribute_boolean (file->info,
G_FILE_ATTRIBUTE_ACCESS_CAN_READ);
}
@@ -2097,6 +2100,9 @@
if (file->info == NULL)
return FALSE;
+ if (!g_file_info_has_attribute (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
+ return TRUE;
+
return g_file_info_get_attribute_boolean (file->info,
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
}
@@ -2674,14 +2680,12 @@
_thunar_return_val_if_fail (THUNAR_IS_FILE (file), NULL);
_thunar_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL);
- /* root folders have special icons */
- if (thunar_file_is_root (file) && !thunar_file_is_trashed (file))
+ /* the system root folder has a special icon */
+ if (thunar_file_is_root (file)
+ && thunar_file_is_local (file)
+ && thunar_file_is_directory (file))
{
- /* use disk icon for / and a remote folder icon for remote roots */
- if (thunar_file_is_local (file))
- return g_strdup ("drive-harddisk");
- else
- return g_strdup ("folder-remote");
+ return g_strdup ("drive-harddisk");
}
if (file->info == NULL)
@@ -2696,10 +2700,8 @@
g_object_get (icon, "names", &themed_icon_names, NULL);
for (i = 0; icon_name == NULL && themed_icon_names[i] != NULL; ++i)
- {
- if (gtk_icon_theme_has_icon (icon_theme, themed_icon_names[i]))
- icon_name = g_strdup (themed_icon_names[i]);
- }
+ if (gtk_icon_theme_has_icon (icon_theme, themed_icon_names[i]))
+ icon_name = g_strdup (themed_icon_names[i]);
g_strfreev (themed_icon_names);
}
More information about the Xfce4-commits
mailing list