diff --git a/src/mpdnotify.py b/src/mpdnotify.py index 86c9200..2a46084 100644 --- a/src/mpdnotify.py +++ b/src/mpdnotify.py @@ -166,7 +166,7 @@ class Notifier(object): 'XF86AudioPrev': self.client.previous, 'XF86AudioStop': self.client.stop, } - def callback(keystring): + def callback(keystring, data=None): self.client.noidle() try: handlers[keystring]() @@ -175,7 +175,7 @@ class Notifier(object): self.client.send_idle('player') Keybinder.init() for key in handlers.keys(): - Keybinder.bind(key, callback) + Keybinder.bind(key, callback, None) def connect(self): self.client._sock = None @@ -305,12 +305,12 @@ def main(): notifier.bind_keys() notifier.start() - def quit(): + def quit(data=None): notifier.stop() Gtk.main_quit() raise SystemExit for s in (signal.SIGINT, signal.SIGTERM): - GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, s, quit) + GLib.unix_signal_add(GLib.PRIORITY_DEFAULT, s, quit, None) Gtk.main()