From 1990a6c367053ddc51ea5592b3b498376a72e184 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 28 Jun 2010 14:24:58 -0400 Subject: [PATCH] add new context to sync with frame.h fir strcmp() misuse --- obtheme/parser.y | 11 ++++++----- obtheme/theme.obtheme | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) 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 { -- 2.34.1