From 2fa76f92374d083e37d05cfd41a021b538420ec0 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 20 Sep 2008 16:04:23 +0200 Subject: [PATCH] statusbar: remove width_user Signed-off-by: Julien Danjou --- statusbar.c | 10 ++++------ structs.h | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/statusbar.c b/statusbar.c index da4946f2d..48fba19d9 100644 --- a/statusbar.c +++ b/statusbar.c @@ -358,7 +358,7 @@ statusbar_position_update(statusbar_t *statusbar) switch(statusbar->position) { case Right: - if(statusbar->width_user) + if(statusbar->width > 0) wingeometry.height = statusbar->width; else wingeometry.height = area.height; @@ -380,7 +380,7 @@ statusbar_position_update(statusbar_t *statusbar) } break; case Left: - if(statusbar->width_user) + if(statusbar->width > 0) wingeometry.height = statusbar->width; else wingeometry.height = area.height; @@ -401,7 +401,7 @@ statusbar_position_update(statusbar_t *statusbar) } break; case Bottom: - if(statusbar->width_user) + if(statusbar->width > 0) wingeometry.width = statusbar->width; else wingeometry.width = area.width; @@ -423,7 +423,7 @@ statusbar_position_update(statusbar_t *statusbar) } break; default: - if(statusbar->width_user) + if(statusbar->width > 0) wingeometry.width = statusbar->width; else wingeometry.width = area.width; @@ -549,8 +549,6 @@ luaA_statusbar_new(lua_State *L) sb->align = draw_align_fromstr(buf, len); sb->width = luaA_getopt_number(L, 2, "width", 0); - if(sb->width > 0) - sb->width_user = true; sb->height = luaA_getopt_number(L, 2, "height", 0); if(sb->height <= 0) /* 1.5 as default factor, it fits nice but no one knows why */ diff --git a/structs.h b/structs.h index da63d9f1b..5c033251c 100644 --- a/structs.h +++ b/structs.h @@ -226,8 +226,6 @@ struct statusbar_t int width; /** Bar height */ int height; - /** True if user specified width */ - bool width_user; /** Bar position */ position_t position; /** Alignment */