]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
add a config option hideDisabled in the theme section that hides disabled buttons...
[chaz/openbox] / openbox / frame.c
index fcad427b49d17023efb3b5350a892fecfd7b48ae..f390887ae8908fd27226abbf2fbd9ca4c57785a3 100644 (file)
@@ -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);
This page took 0.023297 seconds and 4 git commands to generate.