From 1cfb65bc401ee8f44103a1a74404d191106a7535 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 14 Jul 2005 13:44:33 +0000 Subject: add a config option hideDisabled in the theme section that hides disabled buttons instead of showing them as disabled, based on patch in bug #2310 --- openbox/frame.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openbox/frame.c') diff --git a/openbox/frame.c b/openbox/frame.c index fcad427b..f390887a 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -579,18 +579,24 @@ static void layout_title(ObFrame *self) break; case 'D': if (d) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_ALLDESKTOPS) && config_theme_hidedisabled) + break; d = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); break; case 'S': if (s) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_SHADE) && config_theme_hidedisabled) + break; s = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); break; case 'I': if (i) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_ICONIFY) && config_theme_hidedisabled) + break; i = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); @@ -601,12 +607,16 @@ static void layout_title(ObFrame *self) break; case 'M': if (m) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_MAXIMIZE) && config_theme_hidedisabled) + break; m = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); break; case 'C': if (c) { *lc = ' '; break; } + if (!(self->decorations & OB_FRAME_DECOR_CLOSE) && config_theme_hidedisabled) + break; c = TRUE; self->label_width -= (ob_rr_theme->button_size + ob_rr_theme->padding + 1); -- cgit v1.2.3