EventIcon: only trigger 'activate' signal on principal button click
With the introduction of 'activate' signal on [1], and the use of that
signal in Sugar Home, we introduced a bug, now, pressing the secondary button
starts the activity instead of open the palette.
This patch solves the issue checking the putton pressed before send the signal.
[1] a19cf9ed27
This commit is contained in:
parent
16107a3985
commit
88213f6408
@ -762,6 +762,7 @@ class EventIcon(Gtk.EventBox):
|
||||
self.set_palette(Palette(text))
|
||||
|
||||
def __button_release_event_cb(self, icon, event):
|
||||
if event.button == 1:
|
||||
alloc = self.get_allocation()
|
||||
if 0 < event.x < alloc.width and 0 < event.y < alloc.height:
|
||||
self.emit('activate')
|
||||
|
Loading…
Reference in New Issue
Block a user