summaryrefslogtreecommitdiff
path: root/openbox/actions/exit.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-03-02 17:23:23 -0500
committerDana Jansens <danakj@orodu.net>2008-03-02 17:23:23 -0500
commit7fb107cd37a09787c5cfa590688944b3bcb2bab8 (patch)
treebdd5bbf3eb5d4594dc9ae5b90bf553f14ee0946d /openbox/actions/exit.c
parentac255432b46617fe01fd40fd02fdea878893ce3c (diff)
parentf542c5143ac115937c5ee8f3a229e557383cd180 (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/exit.c')
-rw-r--r--openbox/actions/exit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/openbox/actions/exit.c b/openbox/actions/exit.c
index 25fc08bc..4f8cce6e 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