nemo r56 - trunk/gtk



Author: arj
Date: Tue Jan  8 17:31:26 2008
New Revision: 56
URL: http://svn.gnome.org/viewvc/nemo?rev=56&view=rev

Log:
Also bold filenames which starts with a capital letter



Modified:
   trunk/gtk/SearchPopup.cs

Modified: trunk/gtk/SearchPopup.cs
==============================================================================
--- trunk/gtk/SearchPopup.cs	(original)
+++ trunk/gtk/SearchPopup.cs	Tue Jan  8 17:31:26 2008
@@ -224,9 +224,14 @@
 			
 			string str_title = item.name(40);
 			
+			string capitalized = search_text.Substring(0, 1).ToUpper() + search_text.Substring(1); 
+			
 			if (str_title.Contains(search_text)) {
 				int index = str_title.IndexOf(search_text);
 				str_title = str_title.Substring(0, index) + "<b>" + search_text + "</b>" + str_title.Substring(index+search_text.Length);
+			} else if (str_title.Contains(capitalized)) {
+				int index = str_title.IndexOf(capitalized);
+				str_title = str_title.Substring(0, index) + "<b>" + capitalized + "</b>" + str_title.Substring(index+capitalized.Length);
 			}
 			
 			title.Markup = "<big>" + str_title + "</big>";



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