X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fsession.c;h=58652adb46021c9d314bf4b20730133891311ace;hb=a170ad7c85b5f23fafe64d28a3f183a7ce42ce53;hp=9bc9ea80a943553dd4c5241c65e342a5508d5176;hpb=f542c5143ac115937c5ee8f3a229e557383cd180;p=chaz%2Fopenbox diff --git a/openbox/actions/session.c b/openbox/actions/session.c index 9bc9ea80..58652adb 100644 --- a/openbox/actions/session.c +++ b/openbox/actions/session.c @@ -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,9 @@ 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")); + /* TRANSLATORS: Don't translate the word "SessionLogout" as it's the + name of the action you write in rc.xml */ + g_message(_("The SessionLogout action is not available since Openbox was built without session management support")); #endif } return TRUE; /* call cleanup func */ @@ -60,17 +62,17 @@ 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); } else - prompt_cb(NULL, 1, NULL); + prompt_cb(NULL, 1, o); return FALSE; }