Merge branch 'activate_on_left_click_only' of https://github.com/godiard/sugar-toolkit-gtk3

This commit is contained in:
Sam Parkinson 2015-08-07 20:58:53 +10:00
commit e990ec7703

View File

@ -762,6 +762,7 @@ class EventIcon(Gtk.EventBox):
self.set_palette(Palette(text)) self.set_palette(Palette(text))
def __button_release_event_cb(self, icon, event): def __button_release_event_cb(self, icon, event):
if event.button == 1:
alloc = self.get_allocation() alloc = self.get_allocation()
if 0 < event.x < alloc.width and 0 < event.y < alloc.height: if 0 < event.x < alloc.width and 0 < event.y < alloc.height:
self.emit('activate') self.emit('activate')