diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-02 19:02:03 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-01-02 19:02:03 +0100 |
commit | 02995443bc8af38fc3bb3896c8d32eb0adc142d0 (patch) | |
tree | 1aa3e26476b7f581f23c0ae6e17870967c3563d1 /examples/data/uzbl/plugins/on_event.py | |
parent | 30b7d1630e487f01f0f2ddc0fffca9d492213619 (diff) | |
parent | a5f014de5f76169a38ee67e46a0526e5d80a3433 (diff) |
merge in changes from master
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, + }) |