diff options
author | Mason Larobina <mason.larobina@gmail.com> | 2010-01-01 17:16:09 +0800 |
---|---|---|
committer | Mason Larobina <mason.larobina@gmail.com> | 2010-01-01 17:16:09 +0800 |
commit | b0e7190acd1c266b20d2624051d6932bbf90a3d9 (patch) | |
tree | 175f9b1346a2e90faed274d597b9eb212e87d98c /examples/data/uzbl/plugins/on_event.py | |
parent | 3d9e04194d816f28621b6f3fdd5c73d58f271545 (diff) |
Use new export mechanism in all plugins.
Diffstat (limited to 'examples/data/uzbl/plugins/on_event.py')
-rw-r--r-- | examples/data/uzbl/plugins/on_event.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/examples/data/uzbl/plugins/on_event.py b/examples/data/uzbl/plugins/on_event.py index f1ad0c9..b9c504a 100644 --- a/examples/data/uzbl/plugins/on_event.py +++ b/examples/data/uzbl/plugins/on_event.py @@ -92,9 +92,16 @@ def parse_on_event(uzbl, args): def init(uzbl): - - connects = {'ON_EVENT': parse_on_event, - 'INSTANCE_START': add_instance, - 'INSTANCE_EXIT': del_instance} - - uzbl.connect_dict(connects) + # Event handling hooks. + uzbl.connect_dict({ + 'INSTANCE_EXIT': del_instance, + 'INSTANCE_START': add_instance, + 'ON_EVENT': parse_on_event, + }) + + # Function exports to the uzbl object, `function(uzbl, *args, ..)` + # becomes `uzbl.function(*args, ..)`. + uzbl.export_dict({ + 'get_on_events': get_on_events, + 'on_event': on_event, + }) |