summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorjerous <jerous@gmail.com>2008-10-16 00:02:54 +0200
committerjerous <jerous@gmail.com>2008-10-16 00:02:54 +0200
commitca15ecdf6db1c35a9f3d093e985d1544045b9906 (patch)
tree64884b9dad463f487bf8e7cddbbf46ca8aa188bc /plugins
parentbd543fb9c6683f72019fca66463f033ecb7dff5f (diff)
Systray: left click shows/hides main, middle button toggles playstate, right click skips song
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Systray.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/Systray.py b/plugins/Systray.py
index 36758fc..a708e80 100644
--- a/plugins/Systray.py
+++ b/plugins/Systray.py
@@ -20,4 +20,15 @@ class pluginSystray(Plugin):
return "Display the montypc icon in the systray."
def onSysTrayClick(self, reason):
- self.getWinMain().setVisible(not(self.getWinMain().isVisible()))
+ if reason==3:
+ # left mouse button
+ self.getWinMain().setVisible(not(self.getWinMain().isVisible()))
+ elif reason==1:
+ # right mouse button
+ monty.next()
+ elif reason==4:
+ # middle mouse button
+ if monty.isPlaying():
+ monty.pause()
+ else:
+ monty.resume()