Merge branch 'backport' into work
[mikachu/openbox.git] / openbox / actions / session.c
index 9bc9ea8..a70aee5 100644 (file)
@@ -8,7 +8,7 @@ typedef struct {
     gboolean silent;
 } Options;
 
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node);
+static gpointer setup_func(xmlNodePtr node);
 static gboolean logout_func(ObActionsData *data, gpointer options);
 
 void action_session_startup(void)
@@ -17,7 +17,7 @@ void action_session_startup(void)
                      NULL, NULL);
 }
 
-static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
+static gpointer setup_func(xmlNodePtr node)
 {
     xmlNodePtr n;
     Options *o;
@@ -25,8 +25,8 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
     o = g_new0(Options, 1);
     o->prompt = TRUE;
 
-    if ((n = parse_find_node("prompt", node)))
-        o->prompt = parse_bool(doc, n);
+    if ((n = obt_parse_find_node(node, "prompt")))
+        o->prompt = obt_parse_node_bool(n);
 
     return o;
 }
@@ -38,7 +38,7 @@ static gboolean prompt_cb(ObPrompt *p, gint result, gpointer data)
 #ifdef USE_SM
         session_request_logout(o->silent);
 #else
-        g_message(_("The SessionLogout actions is not available since Openbox was built without session management support"));
+        g_message(_("The SessionLogout action is not available since Openbox was built without session management support"));
 #endif
     }
     return TRUE; /* call cleanup func */
@@ -60,12 +60,12 @@ static gboolean logout_func(ObActionsData *data, gpointer options)
         ObPrompt *p;
         ObPromptAnswer answers[] = {
             { _("Cancel"), 0 },
-            { _("Log out"), 1 }
+            { _("Log Out"), 1 }
         };
 
         o2 = g_memdup(o, sizeof(Options));
         p = prompt_new(_("Are you sure you want to log out?"),
-                       _("Log out"),
+                       _("Log Out"),
                        answers, 2, 0, 0, prompt_cb, prompt_cleanup, o2);
         prompt_show(p, NULL, FALSE);
     }