[Sugar-devel] [PATCH sugar-toolkit-gtk3] ToolButton: add 'icon_name' as a GObject property SL #3658

Simon Schampijer simon at schampijer.de
Fri Jun 1 10:06:40 EDT 2012


On 06/01/2012 03:51 PM, Manuel Quiñones wrote:
> Sugar ToolButton inherits from Gtk.ToolButton but is not overwriting
> 'icon_name' property.  So 'icon_name' can be passed to the constructor
> of Sugar ToolButton but the result is different than setting it via
> ToolButton.props.icon_name.
>
> Signed-off-by: Manuel Quiñones<manuq at laptop.org>
> ---
>   src/sugar3/graphics/toolbutton.py |    2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/sugar3/graphics/toolbutton.py b/src/sugar3/graphics/toolbutton.py
> index a1ab8e4..1df7d4c 100644
> --- a/src/sugar3/graphics/toolbutton.py
> +++ b/src/sugar3/graphics/toolbutton.py
> @@ -120,6 +120,8 @@ class ToolButton(Gtk.ToolButton):
>           self.set_icon_widget(icon)
>           icon.show()
>
> +    icon_name = GObject.property(type=str, setter=set_icon)
> +
>       def create_palette(self):
>           return None
>

Looks good to me, please push!

Regards,
    Simon


More information about the Sugar-devel mailing list