gint new_out;
GString *output;
+ void (*callback)(void *data);
+ void *data;
};
static void action_update_menu (GtkItemFactory *ifactory,
GSList *msg_list,
GtkWidget *text,
gint body_pos,
- MimeInfo *partinfo);
+ MimeInfo *partinfo,
+ void (*callback)(void *data),
+ void *data);
static gchar *parse_action_cmd (gchar *action,
MsgInfo *msginfo,
return;
}
- execute_actions(action, NULL, compose->text, 0, NULL);
+ execute_actions(action, NULL, compose->text, 0, NULL,
+ compose_action_cb, compose);
}
static void mainwin_actions_execute_cb(MainWindow *mainwin, guint action_nb,
* filtering */
execute_filtering_actions(action, msg_list);
else
- execute_actions(action, msg_list, text, body_pos, partinfo);
+ execute_actions(action, msg_list, text, body_pos, partinfo,
+ NULL, NULL);
}
static gboolean execute_filtering_actions(gchar *action, GSList *msglist)
static gboolean execute_actions(gchar *action, GSList *msg_list,
GtkWidget *text,
- gint body_pos, MimeInfo *partinfo)
+ gint body_pos, MimeInfo *partinfo,
+ void (*callback)(void *data), void *data)
{
GSList *children_list = NULL;
gint is_ok = TRUE;
for (cur = children_list; cur; cur = cur->next) {
child_info = (ChildInfo *) cur->data;
+ child_info->callback = callback;
+ child_info->data = data;
child_info->tag_status =
gdk_input_add(child_info->chld_status,
GDK_INPUT_READ,
create_io_dialog(children);
}
-
return is_ok;
}
static void free_children(Children *children)
{
ChildInfo *child_info;
+ void (*callback)(void *data) = NULL;
+ void *data = NULL;
debug_print("Freeing children data %p\n", children);
g_free(child_info->cmd);
g_string_free(child_info->output, TRUE);
children->list = g_slist_remove(children->list, child_info);
+ callback = child_info->callback;
+ data = child_info->data;
g_free(child_info);
}
+
+ if (callback)
+ callback(data);
+
g_free(children);
}