X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fexit.c;h=875a181a4747ffa13eef86a65f47a3e09cb32d8a;hb=c716d1788bb4f4b9db403617023f06347ba48102;hp=747514f623dde81dbbc0ee0ae7f764818dadb79b;hpb=fc085fd66c2b06281df959285c5046fa5994e19e;p=chaz%2Fopenbox diff --git a/openbox/actions/exit.c b/openbox/actions/exit.c index 747514f6..875a181a 100644 --- a/openbox/actions/exit.c +++ b/openbox/actions/exit.c @@ -29,10 +29,15 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) return o; } -static void prompt_cb(ObPrompt *p, gint result, gpointer data) +static gboolean prompt_cb(ObPrompt *p, gint result, gpointer data) { if (result) ob_exit(0); + return TRUE; /* call the cleanup func */ +} + +static void prompt_cleanup(ObPrompt *p, gpointer data) +{ prompt_unref(p); } @@ -49,7 +54,8 @@ static gboolean run_func(ObActionsData *data, gpointer options) }; p = prompt_new(_("Are you sure you want to exit Openbox?"), - answers, 2, 0, 0, prompt_cb, NULL); + _("Exit Openbox"), + answers, 2, 0, 0, prompt_cb, prompt_cleanup, NULL); prompt_show(p, NULL, FALSE); } else