[Sugar-devel] [PATCH sugar] Frame: reveal Palette on left click for device, friends and clipboard items v2

Simon Schampijer simon at schampijer.de
Tue Aug 21 05:41:00 EDT 2012


On 08/21/2012 11:15 AM, Sascha Silbe wrote:
> Simon Schampijer <simon at schampijer.de> writes:
>
>> As well the clipboard icons will reveal now the Palette on left
>> click. This is also true when selecting a clipboard item. Technically we
>> have to listen to the 'button-release-event' of the child widget
>> as the RadioToolButton does only emit a clicked signal. Using this
>> would colide with the state changes of the clipboard items as those
>> emit a signal [1]. We do let the event propagate further
>> (return False) so that the state change when selecting another
>> item is picked up.
> [...]
>
> [src/jarabe/frame/clipboardicon.py]
>> +    def __button_release_event_cb(self, widget, event):
>> +        if event.button != 1:
>> +            return False
>> +        self.props.palette_invoker.notify_right_click()
>> +        return False
>
> We should document why we are returning False here, as explained in the
> commit message.
>
> Sascha
>

Yeah, sounds good to add a note here why we return False.

Simon


More information about the Sugar-devel mailing list