[Xfce4-commits] r22658 - in thunar/trunk: . thunar

Benedikt Meurer benny at xfce.org
Fri Aug 4 20:34:04 UTC 2006


Author: benny
Date: 2006-08-04 20:34:01 +0000 (Fri, 04 Aug 2006)
New Revision: 22658

Modified:
   thunar/trunk/ChangeLog
   thunar/trunk/thunar/thunar-file.c
   thunar/trunk/thunar/thunar-location-button.c
Log:
2006-08-04	Benedikt Meurer <benny at xfce.org>

	* thunar/thunar-file.c(thunar_file_info_get_uri_scheme): Use a more
	  generic implementation here.
	* thunar/thunar-location-button.c(thunar_location_button_file_changed):
	  Hide the label only for the file system root node.




Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog	2006-08-04 18:53:13 UTC (rev 22657)
+++ thunar/trunk/ChangeLog	2006-08-04 20:34:01 UTC (rev 22658)
@@ -1,5 +1,12 @@
 2006-08-04	Benedikt Meurer <benny at xfce.org>
 
+	* thunar/thunar-file.c(thunar_file_info_get_uri_scheme): Use a more
+	  generic implementation here.
+	* thunar/thunar-location-button.c(thunar_location_button_file_changed):
+	  Hide the label only for the file system root node.
+
+2006-08-04	Benedikt Meurer <benny at xfce.org>
+
 	* configure.in.in, thunar-vfs/thunar-vfs-os-bsd.c: OpenBSD doesn't
 	  support getdents() and whiteout inodes, instead getdirentries()
 	  will be used on OpenBSD.

Modified: thunar/trunk/thunar/thunar-file.c
===================================================================
--- thunar/trunk/thunar/thunar-file.c	2006-08-04 18:53:13 UTC (rev 22657)
+++ thunar/trunk/thunar/thunar-file.c	2006-08-04 20:34:01 UTC (rev 22658)
@@ -387,18 +387,18 @@
 static gchar*
 thunar_file_info_get_uri_scheme (ThunarxFileInfo *file_info)
 {
-  switch (thunar_vfs_path_get_scheme (thunar_file_get_path (file_info)))
-    {
-    case THUNAR_VFS_PATH_SCHEME_FILE:
-      return g_strdup ("file");
+  gchar *colon;
+  gchar *uri;
 
-    case THUNAR_VFS_PATH_SCHEME_TRASH:
-      return g_strdup ("trash");
+  /* determine the URI for the file... */
+  uri = thunar_file_info_get_uri (file_info);
 
-    default:
-      g_assert_not_reached ();
-      return NULL;
-    }
+  /* ...and strip off everything after the colon */
+  colon = strchr (uri, ':');
+  if (G_LIKELY (colon != NULL))
+    *colon = '\0';
+
+  return uri;
 }
 
 

Modified: thunar/trunk/thunar/thunar-location-button.c
===================================================================
--- thunar/trunk/thunar/thunar-location-button.c	2006-08-04 18:53:13 UTC (rev 22657)
+++ thunar/trunk/thunar/thunar-location-button.c	2006-08-04 20:34:01 UTC (rev 22658)
@@ -449,8 +449,8 @@
   g_object_unref (G_OBJECT (icon_factory));
   g_object_unref (G_OBJECT (icon));
 
-  /* the label is only visible for non-root folders */
-  if (thunar_file_is_root (file))
+  /* 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);



More information about the Xfce4-commits mailing list