diff options
author | waker <wakeroid@gmail.com> | 2012-05-08 19:33:21 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2012-05-08 19:33:21 +0200 |
commit | 29e013ab607fc03030bdf93ee8f337826542bbd1 (patch) | |
tree | 5282e999df835a8649afb52b3f96343cc2e3371c /plugins | |
parent | 3638bb6eac235be3f7c253753553eafff57aef99 (diff) |
shellexecui: fixed crash when the action is called from non-gtk thread
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/shellexecui/shellexecui.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/shellexecui/shellexecui.c b/plugins/shellexecui/shellexecui.c index 0898d4aa..9a957dcb 100644 --- a/plugins/shellexecui/shellexecui.c +++ b/plugins/shellexecui/shellexecui.c @@ -348,15 +348,22 @@ init_treeview() { g_object_unref(liststore); } -static int -shellexecui_action_callback(DB_plugin_action_t *action, - void *user_data) { +static gboolean +shellexecui_action_gtk (void *data) +{ conf_dlg = create_shellexec_conf_dialog(); gtk_widget_set_size_request (conf_dlg, 400, 400); gtk_window_set_transient_for(GTK_WINDOW(conf_dlg), GTK_WINDOW(gtkui_plugin->get_mainwin())); init_treeview(); gtk_widget_show(conf_dlg); + return FALSE; +} + +static int +shellexecui_action_callback(DB_plugin_action_t *action, + void *user_data) { + g_idle_add (shellexecui_action_gtk, NULL); return 0; } |