diff options
author | keis <keijser@gmail.com> | 2011-01-23 22:06:33 +0100 |
---|---|---|
committer | keis <keijser@gmail.com> | 2011-02-15 21:17:16 +0100 |
commit | 3cb9af3b4457f5c6aec1eae2acf552aad8a3e6db (patch) | |
tree | 1047f5046c84bc4c2728275d6d2e748a38c1be52 /examples/data/plugins/on_event.py | |
parent | 70b9ba7440c5164c90f61ddf4d988f32019a5ecc (diff) |
support quoted events in a few more places
* downloads
* on_event handlers
Diffstat (limited to 'examples/data/plugins/on_event.py')
-rw-r--r-- | examples/data/plugins/on_event.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/data/plugins/on_event.py b/examples/data/plugins/on_event.py index 5142275..32f09e2 100644 --- a/examples/data/plugins/on_event.py +++ b/examples/data/plugins/on_event.py @@ -24,6 +24,10 @@ def event_handler(uzbl, *args, **kargs): '''This function handles all the events being watched by various on_event definitions and responds accordingly.''' + # Could be connected to a EM internal event that can use anything as args + if len(args) == 1 and isinstance(args[0], basestring): + args = splitquoted(args[0]) + events = uzbl.on_events event = kargs['on_event'] if event not in events: @@ -80,3 +84,5 @@ def cleanup(uzbl): del handlers[:] uzbl.on_events.clear() + +# vi: set et ts=4: |