aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data/uzbl/scripts/uzbl-event-manager
Commit message (Collapse)AuthorAge
* merge in changes from masterGravatar Dieter Plaetinck2010-01-02
|\
| * Correctness re-write of the export mechanism.Gravatar Mason Larobina2010-01-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exporting is now done with the following two new functions: 1. `uzbl.export('external_name', function)` 2. `uzbl.export_dict({'name1': func1, 'name2': func2, ...})` This system is preferable to the old `__export__` variable for several reasons. The first being that the exporting system is now very similar to the connect (read: `uzbl.connect(..)` and `uzbl.connect_dict({..})`) system in the event manager. And consider the following: 1. User wishes to write a plugin that doesn't connect to any events but exports a function. 2. It's an arbitrary requirement that a plugin have an `init(uzbl)` function. 3. The user would have done the following (example plugin snippet): __export__ = 'my_function' def my_function(uzbl, ..): # Do something def init(uzbl): # Do nothing pass 4. The user now does the following: def my_function(uzbl, ..): # do something def init(uzbl): uzbl.export('my_function', my_function) Note that the name in `uzbl.export('external_name', function)` doesn't need to match the function name. Example pseudo-python: # In the plugin >>> def hello(uzbl): ... return "Hello, World!" >>> def init(uzbl): ... uzbl.export('say_hello', hello) ... print uzbl.say_hello() # In the event manager >>> plugin.init(uzbl) Hello, World!
* | Moved xdghome function out of config section.Gravatar Mason Larobina2010-01-01
|/
* Create sockets before daemonising in uzbl-{cookie-daemon,event-manager}.Gravatar Mason Larobina2009-12-17
|
* Print all events, store the instance pid and check event name.Gravatar Mason Larobina2009-12-13
|
* Pylint rating of the EM raised to 9.38/10.Gravatar Mason Larobina2009-12-01
|
* Use builtin and default library functions over custom functions.Gravatar Mason Larobina2009-12-01
|
* Indent event printing & strip outgoing commands.Gravatar Mason Larobina2009-11-24
|
* simplify PREFIX logic in EMGravatar Dieter Plaetinck2009-11-11
|
* Give all instances access to the global config dict.Gravatar Mason Larobina2009-11-11
|
* uniformize naming of helper python scriptsGravatar Dieter Plaetinck2009-11-11