diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-28 21:14:48 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-28 21:14:48 +0100 |
commit | bdd531322954ad92509c20a00c7372c893cdf412 (patch) | |
tree | e80cd29ce6f1918731dda3592c26d0a2c6a285bd /plugins/gtkui/actions.c | |
parent | aa9de77ed52bd8d7d70eba8533952121b836be9b (diff) |
gtkui: unity globalmenu compat fixes
Diffstat (limited to 'plugins/gtkui/actions.c')
-rw-r--r-- | plugins/gtkui/actions.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/gtkui/actions.c b/plugins/gtkui/actions.c index 969e489e..a85851e9 100644 --- a/plugins/gtkui/actions.c +++ b/plugins/gtkui/actions.c @@ -32,6 +32,13 @@ g_object_set_data_full (G_OBJECT (component), name, \ g_object_ref(G_OBJECT(widget)), (GDestroyNotify) g_object_unref) +static gboolean +menu_action_cb (void *ctx) { + DB_plugin_action_t *action = ctx; + action->callback (action, DDB_ACTION_CTX_MAIN); + return FALSE; +} + static void on_actionitem_activate (GtkMenuItem *menuitem, DB_plugin_action_t *action) @@ -39,7 +46,7 @@ on_actionitem_activate (GtkMenuItem *menuitem, // these actions are always in the MAIN context, or they are coming from new // plugins, so we don't have to care about the user data for <=1.4 plugins. // aren't we?.. - action->callback (action, DDB_ACTION_CTX_MAIN); + gdk_threads_add_idle (menu_action_cb, action); } void |