X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=blobdiff_plain;f=openbox%2Factions%2Fexit.c;h=4f8cce6e6c44517bd50d88eeeced98de3002db7c;hp=25fc08bc8730c719090cff08b729584efc79a3f2;hb=7fb107cd37a09787c5cfa590688944b3bcb2bab8;hpb=ac255432b46617fe01fd40fd02fdea878893ce3c diff --git a/openbox/actions/exit.c b/openbox/actions/exit.c index 25fc08b..4f8cce6 100644 --- a/openbox/actions/exit.c +++ b/openbox/actions/exit.c @@ -29,10 +29,15 @@ static gpointer setup_func(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