+ Options *o = options;
+
+ if (o->prompt) {
+ ObPrompt *p;
+ ObPromptAnswer answers[] = {
+ { _("Cancel"), 0 },
+ { _("Exit"), 1 }
+ };
+
+ if (session_connected())
+ p = prompt_new(_("Are you sure you want to log out?"),
+ _("Log Out"),
+ answers, 2, 0, 0, prompt_cb, prompt_cleanup, NULL);
+ else
+ p = prompt_new(_("Are you sure you want to exit Openbox?"),
+ _("Exit Openbox"),
+ answers, 2, 0, 0, prompt_cb, prompt_cleanup, NULL);
+
+ prompt_show(p, NULL, FALSE);
+ }
+ else
+ do_exit();