[tracker/needle: 20/30] tracker-needle: Don't make subtext italic and fix warnings when text is null



commit 9ccfaa98c00b6e9c83112bc1f28c39151781522c
Author: Martyn Russell <martyn lanedo com>
Date:   Sun Aug 15 16:04:59 2010 +0100

    tracker-needle: Don't make subtext italic and fix warnings when text is null

 src/tracker-needle/tracker-cell-renderer-text.vala |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker-needle/tracker-cell-renderer-text.vala b/src/tracker-needle/tracker-cell-renderer-text.vala
index f023a4d..841a5a5 100644
--- a/src/tracker-needle/tracker-cell-renderer-text.vala
+++ b/src/tracker-needle/tracker-cell-renderer-text.vala
@@ -57,12 +57,12 @@ class Tracker.CellRendererText : Gtk.CellRendererText {
 
 		var style = widget.get_style ();
 		var attr_list = new Pango.AttrList ();
-		uint start = (uint) text.length;
-		
-//		var attr_style = new Pango.Style (Pango.Style.ITALIC);
-//		attr_style.start_index = start
-//		attr_style.end_index = -1;
-//		attr_list.insert (attr_style);
+
+		uint start = 0;
+
+		if (text != null) {
+			start = (uint) text.length;
+		}
 
 		if (!selected) {
 			var c = style.text_aa[Gtk.StateType.NORMAL];
@@ -87,7 +87,6 @@ class Tracker.CellRendererText : Gtk.CellRendererText {
 			str = "%s\n%s".printf (text, subtext);
 		}
 
-		debug ("str:'%s'\n", str);
 		this.visible = true;
 		this.weight = Pango.Weight.NORMAL;
 		this.text = str;



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