nemo r43 - in trunk: . gtk



Author: arj
Date: Mon Jan  7 11:03:20 2008
New Revision: 43
URL: http://svn.gnome.org/viewvc/nemo?rev=43&view=rev

Log:
Show path in file view



Modified:
   trunk/NEWS
   trunk/gtk/DisplayItem.cs

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Mon Jan  7 11:03:20 2008
@@ -11,6 +11,7 @@
 - Make add label menu look better when the item has no labels already
 - Add indexing dialog
 - Add shortcut for search
+- Show path in file view
 
 0.1.2 alpha
 -----------

Modified: trunk/gtk/DisplayItem.cs
==============================================================================
--- trunk/gtk/DisplayItem.cs	(original)
+++ trunk/gtk/DisplayItem.cs	Mon Jan  7 11:03:20 2008
@@ -159,6 +159,22 @@
 			foreach (KeyValuePair<string, string> kvp in new_fields)
 				add_line(kvp.Key, kvp.Value);
 
+			string path = item.path;
+			
+			string homedir = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
+			
+			if (path.StartsWith(homedir))
+				path = path.Replace(homedir, "~");
+			
+			int index = -1;
+			if ((index = path.LastIndexOf('/')) != -1)
+				if (index > 27) {
+					path = path.Substring(0, 25);
+					path += "...";
+				} else
+					path = path.Substring(0, index);
+			
+			add_line(Mono.Unix.Catalog.GetString("Path:"), path);
 			add_line(Mono.Unix.Catalog.GetString("Size:"), item.size);
 			add_line(Mono.Unix.Catalog.GetString("Last modified:"), item.accessed);
 			add_line(Mono.Unix.Catalog.GetString("Last accessed:"), item.modify);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]