g_free(o->sn_name);
g_free(o->sn_icon);
g_free(o->sn_wmclass);
+ g_free(o->prompt);
g_free(o);
}
}
static gboolean run_func(ObActionsData *data, gpointer options);
-static void prompt_cb(ObPrompt *p, gint result, gpointer data)
+static void prompt_cb(ObPrompt *p, gint result, gpointer options)
{
- Options *options = data;
-
if (result)
run_func(NULL, options);
prompt_unref(p);
-
- g_free(options->cmd);
- g_free(options->sn_name);
- g_free(options->sn_icon);
- g_free(options->sn_wmclass);
- g_free(options);
+ free_func(options);
}
/* Always return FALSE because its not interactive */
event_cancel_all_key_grabs();
if (!g_shell_parse_argv(cmd, NULL, &argv, &e)) {
- g_message(_("Failed to execute \"%s\": %s"), o->cmd, e->message);
+ g_message(e->message, o->cmd);
g_error_free(e);
}
else {
G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD,
NULL, NULL, NULL, &e))
{
- g_message(_("Failed to execute \"%s\": %s"), o->cmd, e->message);
+ g_message(e->message, o->cmd);
g_error_free(e);
if (o->sn)