Thanks Kalpa,<div>What do you think about replacing:</div><div><br></div><div>-            catbox = gtk.Label(c)<br>+            # If there is no category, display as Unknown<br>+            if c is '':<br>+                catbox = gtk.Label(_('Unknown'))<br>
+            else:<br>+                catbox = gtk.Label(c)<br></div><div><br></div><div>by:</div><div><br></div>+            # If there is no category, display as Unknown<div>+            description = c<br><div>+            if c is '':<br>
+                description = _('Unknown')<br></div><div>             catbox = gtk.Label(description)<br></div><div><div><br></div><div>Looks simpler, right?</div><div><br></div><div>Gonzalo</div><div><br><div class="gmail_quote">
On Sat, Mar 17, 2012 at 4:21 PM,  <span dir="ltr"><<a href="mailto:callkalpa@gmail.com">callkalpa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: Kalpa Pathum Welivitigoda <<a href="mailto:callkalpa@gmail.com">callkalpa@gmail.com</a>><br>
<br>
---<br>
 budgetscreen.py |    6 +++++-<br>
 chartscreen.py  |    7 +++++--<br>
 2 files changed, 10 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/budgetscreen.py b/budgetscreen.py<br>
index 0e2cd98..bcbceb5 100644<br>
--- a/budgetscreen.py<br>
+++ b/budgetscreen.py<br>
@@ -96,7 +96,11 @@ class BudgetScreen(gtk.VBox):<br>
<br>
         # Build categories.<br>
         for c in self.sorted_categories:<br>
-            catbox = gtk.Label(c)<br>
+            # If there is no category, display as Unknown<br>
+            if c is '':<br>
+                catbox = gtk.Label(_('Unknown'))<br>
+            else:<br>
+                catbox = gtk.Label(c)<br>
             catbox.set_padding(10, 0)<br>
<br>
             color = finance.get_category_color_str(c)<br>
diff --git a/chartscreen.py b/chartscreen.py<br>
index 129be9b..b6d1977 100644<br>
--- a/chartscreen.py<br>
+++ b/chartscreen.py<br>
@@ -89,8 +89,11 @@ class ChartScreen(gtk.HBox):<br>
         for c in self.sorted_categories:<br>
             hbox = gtk.HBox()<br>
<br>
-            catlabel = gtk.Label()<br>
-            catlabel.set_markup(c)<br>
+            # If there is no category, display as Unknown<br>
+            if c is '':<br>
+                catlabel = gtk.Label(_('Unknown'))<br>
+            else:<br>
+                catlabel = gtk.Label(c)<br>
             catgroup.add_widget(catlabel)<br>
<br>
             color = finance.get_category_color_str(c)<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.7.6<br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</font></span></blockquote></div><br></div></div></div>