5,418
edits
Changes
From Gramps
m
no edit summary
The CallbackManager actually makes the connections to the db when the following is executed, so this MUST follow the <code>register_callbacks</code> method in your code. The handles can be registered later on if desired.
connect_all(keys)
This connects all database signals related to the primary objects given in 'keys' to the already registered callbacks. Note that only those callbacks registered with <code>register_callbacks</code> will effectively result in an action, so it is safe to connect to all keys even if not all keys have a registered callback. The parameter 'keys' is a list of keys of primary objects for which to connect the signals, with the default that no connects are done. One can enable signal activity to needed objects by passing a list, <abbr title="exempli gratia - Latin phrase meaning 'for example'">e.g. </abbr> <code>keys=['source', 'place]</code>, or to all with <code>keys=callman.KEYS</code> (which is a list of all the keys)
=== Removing connections with the CallbackManager ===