summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis@xfce.org>2009-06-19 15:34:00 +0000
committerJannis Pohlmann <jannis@xfce.org>2009-06-19 15:34:00 +0000
commit14a8f43e77dd7f90484f45ffe5e0f330a5b63ec7 (patch)
tree0644c78290ce3f354196b08b1eaef65a44fdca84
parentdc389f4e4e667bd98d735a788c26c869e638492a (diff)
downloadthunar-14a8f43e77dd7f90484f45ffe5e0f330a5b63ec7.tar.gz
* thunar/thunar-file.c: Use special icon names for root folders other
than trash://: "disk-harddrive" for the local root and "folder-remote" for root folders on other machines. * thunar/thunar-location-button.c: Show a label even for the local root, just to be more consistent. (Old svn revision: 30046)
-rw-r--r--ChangeLog8
-rw-r--r--thunar/thunar-file.c16
-rw-r--r--thunar/thunar-location-button.c15
3 files changed, 24 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 09b0daad..bb23cda6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-06-17 Jannis Pohlmann <jannis@xfce.org>
+ * thunar/thunar-file.c: Use special icon names for root folders other
+ than trash://: "disk-harddrive" for the local root and
+ "folder-remote" for root folders on other machines.
+ * thunar/thunar-location-button.c: Show a label even for the local
+ root, just to be more consistent.
+
+2009-06-17 Jannis Pohlmann <jannis@xfce.org>
+
* thunar/thunar-shortcuts-view.c: Rework mounting and mounting + open.
Also make opening items other than volumes work asynchronously. To
do that, first check if the file to be opened is mounted already. If
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 4f8dece4..80b9e8d7 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -2633,6 +2633,16 @@ thunar_file_get_icon_name (const ThunarFile *file,
_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))
+ {
+ /* 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");
+ }
+
if (file->info == NULL)
return NULL;
@@ -2679,9 +2689,9 @@ thunar_file_get_icon_name (const ThunarFile *file,
}
/* check if we have an accept icon for the icon we found */
- if (icon_name != NULL &&
- (g_str_equal (icon_name, "inode-directory")
- || g_str_equal (icon_name, "folder")))
+ if (icon_name != NULL
+ && (g_str_equal (icon_name, "inode-directory")
+ || g_str_equal (icon_name, "folder")))
{
if (icon_state == THUNAR_FILE_ICON_STATE_DROP)
{
diff --git a/thunar/thunar-location-button.c b/thunar/thunar-location-button.c
index 1c9e16f4..523b332a 100644
--- a/thunar/thunar-location-button.c
+++ b/thunar/thunar-location-button.c
@@ -467,18 +467,9 @@ thunar_location_button_file_changed (ThunarLocationButton *location_button,
/* determine the icon theme for the widget */
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (location_button)));
- /* the label is hidden for the file system root */
- if (thunar_file_is_local (file) && thunar_file_is_root (file))
- {
- /* hide the label widget */
- gtk_widget_hide (location_button->label);
- }
- else
- {
- /* update and show the label widget */
- gtk_label_set_text (GTK_LABEL (location_button->label), thunar_file_get_display_name (file));
- gtk_widget_show (location_button->label);
- }
+ /* update and show the label widget */
+ gtk_label_set_text (GTK_LABEL (location_button->label), thunar_file_get_display_name (file));
+ gtk_widget_show (location_button->label);
/* the image is only visible for certain special paths */
if (thunar_file_is_home (file) || thunar_file_is_desktop (file) || thunar_file_is_root (file))