Pushed and the ticket closed.<div>Thanks again, and if is your first patch... welcome!</div><div><br></div><div>Gonzalo<br><br><div class="gmail_quote">On Sat, Mar 17, 2012 at 5:16 PM, Kalpa Welivitigoda <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"><div class="im">On Sun, Mar 18, 2012 at 1:06 AM, Gonzalo Odiard <<a href="mailto:gonzalo@laptop.org">gonzalo@laptop.org</a>> wrote:<br>

> Thanks Kalpa,<br>
> What do you think about replacing:<br>
><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>
><br>
> by:<br>
><br>
> +            # If there is no category, display as Unknown<br>
> +            description = c<br>
> +            if c is '':<br>
> +                description = _('Unknown')<br>
>              catbox = gtk.Label(description)<br>
><br>
> Looks simpler, right?<br>
><br>
<br>
</div>and much better.<br>
<br>
I've attached the new patch.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
> Gonzalo<br>
><br>
> On Sat, Mar 17, 2012 at 4:21 PM, <<a href="mailto:callkalpa@gmail.com">callkalpa@gmail.com</a>> wrote:<br>
>><br>
>> 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>
>> --<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>
><br>
><br>
<br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Best Regards,<br>
<br>
Kalpa Pathum Welivitigoda<br>
<a href="http://about.me/callkalpa" target="_blank">http://about.me/callkalpa</a><br>
</font></span></blockquote></div><br></div>