[Sugar-devel] [PATCH Wikipedia] Search ToolButton, pass page and icon_name as parameters #3658

Daniel Drake dsd at laptop.org
Thu May 31 12:12:48 EDT 2012


On Thu, May 31, 2012 at 9:59 AM, Manuel Quiñones <manuq at laptop.org> wrote:
> The tool button had a grey background because of this.
>
> Signed-off-by: Manuel Quiñones <manuq at laptop.org>
> ---
>  activity.py |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/activity.py b/activity.py
> index 43b430a..ec72dec 100644
> --- a/activity.py
> +++ b/activity.py
> @@ -77,9 +77,8 @@ class WikipediaActivity(webactivity.WebActivity):
>             io_service.manageOfflineStatus = False
>
>         self.searchtoolbar = SearchToolbar(self)
> -        search_toolbar_button = ToolbarButton()
> -        search_toolbar_button.set_page(self.searchtoolbar)
> -        search_toolbar_button.props.icon_name = 'search-wiki'
> +        search_toolbar_button = ToolbarButton(
> +            page=self.searchtoolbar, icon_name = 'search-wiki')
>         search_toolbar_button.props.label = _('Search')
>         self.get_toolbar_box().toolbar.insert(search_toolbar_button, 1)
>         search_toolbar_button.show()

Can you explain why?
Glancing at the patch I can't see why it would make any difference.

Could this be a bug in ToolbarButton rather than in wikipedia?

Thanks
Daniel


More information about the Sugar-devel mailing list