From: Dana Jansens Date: Sun, 2 Mar 2008 20:01:46 +0000 (-0500) Subject: make the SessionLogout action always available but it shows an error if you use it... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=ffaac4a65043b6d4ea1e358d17f68f8c703db73d;p=chaz%2Fopenbox make the SessionLogout action always available but it shows an error if you use it and Openbox wasn't built with SM support --- diff --git a/openbox/actions/session.c b/openbox/actions/session.c index 0117e07c..2c373654 100644 --- a/openbox/actions/session.c +++ b/openbox/actions/session.c @@ -3,10 +3,6 @@ #include "openbox/session.h" #include "gettext.h" -#ifndef USE_SM -void action_logout_startup(void) {} -#else - typedef struct { gboolean prompt; gboolean silent; @@ -38,8 +34,13 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) static void prompt_cb(ObPrompt *p, gint result, gpointer data) { Options *o = data; - if (result) + if (result) { +#ifndef USE_SM session_request_logout(o->silent); +#else + g_message(_("The SessionLogout actions is not available since Openbox was built without session management support")); +#endif + } g_free(o); prompt_unref(p); } @@ -67,5 +68,3 @@ static gboolean logout_func(ObActionsData *data, gpointer options) return FALSE; } - -#endif