mpris.py: fix volume handling (wrong event).
authorRémi Duraffort <ivoire@videolan.org>
Fri, 10 Jul 2009 13:19:19 +0000 (15:19 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 10 Jul 2009 13:20:08 +0000 (15:20 +0200)
extras/misc/mpris.py

index 1c5bf71..32aa791 100755 (executable)
@@ -212,7 +212,7 @@ def update(widget):
     GetPlayStatus(0)
 
 # callback for volume change
-def volchange(widget, data):
+def volchange(widget):
     player.VolumeSet(vol.get_value_as_int(), reply_handler=(lambda *args: None), error_handler=(lambda *args: None))
 
 # callback for position change
@@ -336,8 +336,7 @@ bt_loop.connect('clicked',      Loop)
 bt_repeat.connect('clicked',    Repeat)
 bt_shuffle.connect('clicked',   Shuffle)
 exp.connect('activate',         expander)
-vol.connect('change-value',     volchange)
-vol.connect('scroll-event',     volchange)
+vol.connect('changed',          volchange)
 time_s.connect('adjust-bounds', timechange)
 audioicon.set_events(gtk.gdk.BUTTON_PRESS_MASK) # hack for the bottom right icon
 audioicon.connect('button_press_event', icon_clicked)