X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fexecute.c;h=cb3ab24796a0e74d0da9ecf87ccdc8cc21bcfed0;hb=0c0ddc36289f39ee32347e775147e7300ce6cf89;hp=f87fe00c6ea8317750c22be9589828545a8c3c10;hpb=8562034e30e8b319a746009859cbefc1f41b41f5;p=chaz%2Fopenbox diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index f87fe00c..cb3ab247 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -98,11 +98,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); } @@ -126,7 +130,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;