How to override window behaviour with a plugin?

11 views
Skip to first unread message

sunng

unread,
May 6, 2011, 9:29:35 PM5/6/11
to exaile-devel
Hi, exaile developers.

I am maintaining the sound menu indicator plugin for exaile. According
to the specification, when user close the window, music player should
hide itself if playing, and exit if stop. This is different with
default.

I registered a new `delete-event` handler on xlgui.main.window in my
plugin. But it doesn't work until I removed default handler in xlgui/
main.py . So I just wonder is it possible to override the handler
without modifying source code.

Aren Olson

unread,
May 7, 2011, 10:55:28 AM5/7/11
to exaile...@googlegroups.com
There isn't any clean way of overriding it at present. Frankly I'm
not sure there's any sane way to handle extending it from plugins,
since its really only possible to have a single handler and allowing
plugins to override that would lead to conflicts and/or unexpected
behavior. I think the best approach here is to add the desired
behavior as an additional option in core and simply require users to
enable that themselves if they want it to match the specification's
behavior. Not ideal, but I think it's the closest that is practical.

-Aren

> --
> You received this message because you are subscribed to the Google Groups "exaile-devel" group.
> To post to this group, send email to exaile...@googlegroups.com.
> To unsubscribe from this group, send email to exaile-devel...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/exaile-devel?hl=en.
>
>

--
"Whoever said sunshine brings happiness has never danced in the rain."
- K. Jackson

Reply all
Reply to author
Forward
0 new messages