Only activate menu items if the mouse releases in them - fixes #4863
Ticket URL <http://bugs.sugarlabs.org/ticket/4863>
This commit is contained in:
parent
7a3d23e2b6
commit
9fc5b49329
@ -159,7 +159,9 @@ class PaletteMenuItem(Gtk.EventBox):
|
|||||||
self.show_all()
|
self.show_all()
|
||||||
|
|
||||||
def __button_release_cb(self, widget, event):
|
def __button_release_cb(self, widget, event):
|
||||||
self.emit('activate')
|
alloc = self.get_allocation()
|
||||||
|
if 0 < event.x < alloc.width and 0 < event.y < alloc.height:
|
||||||
|
self.emit('activate')
|
||||||
|
|
||||||
def __enter_notify_cb(self, widget, event):
|
def __enter_notify_cb(self, widget, event):
|
||||||
self.modify_bg(Gtk.StateType.NORMAL,
|
self.modify_bg(Gtk.StateType.NORMAL,
|
||||||
|
Loading…
Reference in New Issue
Block a user