event-hook: rewrite the hook priorities enum
Hooks need to have a priority relative to the event they are executed on, so it does not make much sense to have all kinds of different priorities based also on the event type and/or the module where they are defined. Also, it wouldn't be acceptable to have such an enumeration on the public API.
This commit is contained in:

committed by
Julian Bouzas

parent
e2b9cb0b5e
commit
24db3fe24a
@@ -151,8 +151,7 @@ wp_default_nodes_api_enable (WpPlugin * plugin, WpTransition * transition)
|
||||
|
||||
/* default metadata added */
|
||||
hook = wp_simple_event_hook_new ("metadata-added@default-nodes-api",
|
||||
WP_EVENT_HOOK_DEFAULT_PRIORITY_DEFAULT_METADATA_ADDED_DEFAULT_NODES_API,
|
||||
WP_EVENT_HOOK_EXEC_TYPE_ON_EVENT,
|
||||
WP_EVENT_HOOK_PRIORITY_NORMAL, WP_EVENT_HOOK_EXEC_TYPE_ON_EVENT,
|
||||
g_cclosure_new ((GCallback) on_metadata_added, self, NULL));
|
||||
wp_interest_event_hook_add_interest (WP_INTEREST_EVENT_HOOK (hook),
|
||||
WP_CONSTRAINT_TYPE_PW_PROPERTY, "event.type", "=s", "object-added",
|
||||
@@ -164,8 +163,7 @@ wp_default_nodes_api_enable (WpPlugin * plugin, WpTransition * transition)
|
||||
|
||||
/* default metadata changed */
|
||||
hook = wp_simple_event_hook_new ("metadata-changed@default-nodes-api",
|
||||
WP_EVENT_HOOK_DEFAULT_PRIORITY_DEFAULT_METADATA_CHANGED_DEFAULT_NODES_API,
|
||||
WP_EVENT_HOOK_EXEC_TYPE_ON_EVENT,
|
||||
WP_EVENT_HOOK_PRIORITY_NORMAL, WP_EVENT_HOOK_EXEC_TYPE_ON_EVENT,
|
||||
g_cclosure_new ((GCallback) on_metadata_changed_hook, self, NULL));
|
||||
|
||||
wp_interest_event_hook_add_interest (WP_INTEREST_EVENT_HOOK (hook),
|
||||
|
Reference in New Issue
Block a user