From 14a8f43e77dd7f90484f45ffe5e0f330a5b63ec7 Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Fri, 19 Jun 2009 15:34:00 +0000 Subject: * 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) --- ChangeLog | 8 ++++++++ thunar/thunar-file.c | 16 +++++++++++++--- thunar/thunar-location-button.c | 15 +++------------ 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09b0daad..bb23cda6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-06-17 Jannis Pohlmann + + * 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 * thunar/thunar-shortcuts-view.c: Rework mounting and mounting + open. 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)) -- cgit v1.2.1