From: Derek Foreman Date: Mon, 28 Jun 2010 18:24:58 +0000 (-0400) Subject: add new context to sync with frame.h X-Git-Tag: cgl X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=b2616e2863f7a61d0ed2f629019d92fd88c7d766;p=dana%2Fopenbox.git add new context to sync with frame.h fir strcmp() misuse --- diff --git a/obtheme/parser.y b/obtheme/parser.y index d46a83a3..9f0d0c9f 100644 --- a/obtheme/parser.y +++ b/obtheme/parser.y @@ -45,14 +45,15 @@ static struct context_table_item contexts[OB_FRAME_NUM_CONTEXTS] = { {"iconify", OB_FRAME_CONTEXT_ICONIFY}, {"icon", OB_FRAME_CONTEXT_ICON}, {"close", OB_FRAME_CONTEXT_CLOSE}, - {"moveresize", OB_FRAME_CONTEXT_MOVE_RESIZE} + {"moveresize", OB_FRAME_CONTEXT_MOVE_RESIZE}, + {"dock", OB_FRAME_CONTEXT_DOCK} }; static ObFrameContext context_from_string(char *str) { int i; for (i = 0; i < OB_FRAME_NUM_CONTEXTS; i++) - if (strcmp(contexts[i].name, str) == 1) + if (strcmp(contexts[i].name, str) == 0) return contexts[i].val; return -1; } @@ -79,10 +80,10 @@ static RrSurfaceColorType gradient_from_string(char *str) { int i; - for (i = 0; i < RR_SURFACE_NUM_TYPES; i++) - if (strcmp(gradients[i].name, str) == 1) + for (i = 0; i < RR_SURFACE_NUM_TYPES; i++) { + if (strcmp(gradients[i].name, str) == 0) return gradients[i].val; - + } return -1; } diff --git a/obtheme/theme.obtheme b/obtheme/theme.obtheme index 6946cec4..426601f5 100644 --- a/obtheme/theme.obtheme +++ b/obtheme/theme.obtheme @@ -55,7 +55,7 @@ theme awesome { box (0, 0, 0) to (10, 10, 0) } material(none) - context(minimize) + context(iconify) } decor maxbutton { space {