]> Dogcows Code - chaz/openbox/commitdiff
make the SessionLogout action always available but it shows an error if you use it...
authorDana Jansens <danakj@orodu.net>
Sun, 2 Mar 2008 20:01:46 +0000 (15:01 -0500)
committerDana Jansens <danakj@orodu.net>
Sun, 2 Mar 2008 20:02:07 +0000 (15:02 -0500)
openbox/actions/session.c

index 0117e07c97b06ab55baf3c9de6487139f6bfad83..2c373654c84d8dd72c6fa3b94e4f74363c4a1fd6 100644 (file)
@@ -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
This page took 0.028674 seconds and 4 git commands to generate.