[Xfce4-commits] r30046 - in thunar/branches/migration-to-gio: . thunar

Jannis Pohlmann jannis at xfce.org
Fri Jun 19 17:34:00 CEST 2009


Author: jannis
Date: 2009-06-19 15:34:00 +0000 (Fri, 19 Jun 2009)
New Revision: 30046

Modified:
   thunar/branches/migration-to-gio/ChangeLog
   thunar/branches/migration-to-gio/thunar/thunar-file.c
   thunar/branches/migration-to-gio/thunar/thunar-location-button.c
Log:
	* 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.

Modified: thunar/branches/migration-to-gio/ChangeLog
===================================================================
--- thunar/branches/migration-to-gio/ChangeLog	2009-06-17 17:57:51 UTC (rev 30045)
+++ thunar/branches/migration-to-gio/ChangeLog	2009-06-19 15:34:00 UTC (rev 30046)
@@ -1,5 +1,13 @@
 2009-06-17	Jannis Pohlmann <jannis at 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 at 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

Modified: thunar/branches/migration-to-gio/thunar/thunar-file.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-file.c	2009-06-17 17:57:51 UTC (rev 30045)
+++ thunar/branches/migration-to-gio/thunar/thunar-file.c	2009-06-19 15:34:00 UTC (rev 30046)
@@ -2633,6 +2633,16 @@
   _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 @@
     }
 
   /* 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)
         {

Modified: thunar/branches/migration-to-gio/thunar/thunar-location-button.c
===================================================================
--- thunar/branches/migration-to-gio/thunar/thunar-location-button.c	2009-06-17 17:57:51 UTC (rev 30045)
+++ thunar/branches/migration-to-gio/thunar/thunar-location-button.c	2009-06-19 15:34:00 UTC (rev 30046)
@@ -467,18 +467,9 @@
   /* 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))




More information about the Xfce4-commits mailing list