diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-03-02 17:23:23 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-03-02 17:23:23 -0500 |
| commit | 7fb107cd37a09787c5cfa590688944b3bcb2bab8 (patch) | |
| tree | bdd5bbf3eb5d4594dc9ae5b90bf553f14ee0946d /openbox/actions/execute.c | |
| parent | ac255432b46617fe01fd40fd02fdea878893ce3c (diff) | |
| parent | f542c5143ac115937c5ee8f3a229e557383cd180 (diff) | |
Merge branch 'backport' into work
Conflicts:
openbox/actions/execute.c
openbox/event.c
openbox/openbox.c
openbox/openbox.h
Diffstat (limited to 'openbox/actions/execute.c')
| -rw-r--r-- | openbox/actions/execute.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index 81aa6d22..05ab2ef3 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -96,11 +96,15 @@ static Options* dup_options(Options *in) static gboolean run_func(ObActionsData *data, gpointer options); -static void prompt_cb(ObPrompt *p, gint result, gpointer options) +static gboolean prompt_cb(ObPrompt *p, gint result, gpointer options) { if (result) run_func(NULL, options); + return TRUE; /* call the cleanup func */ +} +static void prompt_cleanup(ObPrompt *p, gpointer options) +{ prompt_unref(p); free_func(options); } @@ -124,7 +128,8 @@ static gboolean run_func(ObActionsData *data, gpointer options) }; ocp = dup_options(options); - p = prompt_new(o->prompt, answers, 2, 0, 0, prompt_cb, ocp); + p = prompt_new(o->prompt, _("Execute"), answers, 2, 0, 0, + prompt_cb, prompt_cleanup, ocp); prompt_show(p, NULL, FALSE); return FALSE; @@ -204,7 +209,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) e = NULL; 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 { @@ -226,8 +231,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, NULL, &e); if (!ok) { - g_message(_("Failed to execute \"%s\": %s"), - o->cmd, e->message); + g_message(e->message, o->cmd); g_error_free(e); } |
