[Sugar-devel] [PATCH sugar-toolkit-gtk3 (shell-port)] The icon consists of an GtkEventBox and an IconBuffer. The GtkEventBox is a subclass of GtkBin which has its own window and therefor is used to catch events for our IconBuffer which does not have it's own window.

Benjamin Berg benzea at sugarlabs.org
Tue Jul 3 14:05:17 EDT 2012


On Fri, 2012-06-22 at 16:08 +0200, Simon Schampijer wrote:
> The EventIcon does emit the 'activated' signal when clicked
> and uses the CursorInvoker to invoke a palette the same
> way as the CanvasIcon did.
> 
> We keep the same API as with the CanvasIcon, only the 'size'
> property is changed to be called 'pixel_size' in order to
> make clearer which values it expects to be passed. We don't
> expect a GtkIconSize to be passed here.
> 
> Another option would have been to put a SugarIcon inside a
> a GtkEventBox and make the properties available through an
> icon property but the API would have not been as nice and
> logically it seems to make more sense to have the IconBuffer
> being the base for both the SugarIcon and the SugarEventIcon.
> 
> This patch has ben developed based on the one that is
> proposed for the toolkit-gtk2.

The patch looks good.

> Signed-off-by: Simon Schampijer <simon at laptop.org>
Reviewd-by: Benjamin Berg <benzea at sugarlabs.org>




More information about the Sugar-devel mailing list