[sugar] [PATCH] Add indications for empty journal and empty search results

Tomeu Vizoso tomeu at tomeuvizoso.net
Tue Jun 17 03:36:11 EDT 2008


What about creating the empty_box in a method? We don't really need to
hold a reference to it in ListView, right? You could then pass the
string as a parameter to that method, thus avoiding multiple repeated
instances of translatable strings, that is something quite bad.

+        # Indicate when the Journal is empty
+        if len(jobjects) == 0:
+            self._empty_text.props.text = _('Your Journal is empty')
+            self._canvas.set_root(self._empty_box)
+            return

Why it's not enough to set the box in refresh()?

Thanks,

Tomeu

On Mon, Jun 16, 2008 at 10:35 PM, Eben Eliason <eben.eliason at gmail.com> wrote:
> This patch adds visual indication when the Journal is empty, or when
> there are no entries which match the supplied search/filter.  The
> design for these indications calls for buttons (which "Return to Home"
> or "Clear search", respectively), but this simpler patch is a good
> step in the right direction, eliminating the perception that something
> is broken due to the otherwise near-empty white screen. (Tickets #3091
> and #3772)
>
> - Eben
>
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar
>
>


More information about the Sugar mailing list