support right click

This commit is contained in:
j 2016-01-05 23:13:52 +05:30
parent 8067825220
commit 55ba49b631

View file

@ -22,10 +22,11 @@ class OMLIcon:
self.icon.set_from_file(icon)
self.icon.set_title(title)
self.icon.connect("activate", self._click)
self.icon.connect("popup-menu", self._click)
p = subprocess.Popen([ctl, 'start'])
GLib.timeout_add_seconds(1, self._open, None)
def _click(self, icon):
def _click(self, icon, button=None, time=None):
if self.menu:
self.menu.destroy()
self.menu = None