]> Dogcows Code - chaz/openbox/blobdiff - openbox/frame.c
make the pango rendering code really complicated because that is the only way to...
[chaz/openbox] / openbox / frame.c
index 18a32eab131a497a8516c0ea006d667c958b16e1..f390887ae8908fd27226abbf2fbd9ca4c57785a3 100644 (file)
@@ -1,6 +1,7 @@
 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
 
    frame.c for the Openbox window manager
+   Copyright (c) 2004        Mikael Magnusson
    Copyright (c) 2003        Ben Jansens
 
    This program is free software; you can redistribute it and/or modify
@@ -577,35 +578,45 @@ static void layout_title(ObFrame *self)
                                   ob_rr_theme->padding + 1);
             break;
         case 'D':
-            if (d) { *lc = ' '; break; } /* rm duplicates */
+            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; } /* rm duplicates */
+            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; } /* rm duplicates */
+            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);
             break;
         case 'L':
-            if (l) { *lc = ' '; break; } /* rm duplicates */
+            if (l) { *lc = ' '; break; }
             l = TRUE;
             break;
         case 'M':
-            if (m) { *lc = ' '; break; } /* rm duplicates */
+            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; } /* rm duplicates */
+            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.021568 seconds and 4 git commands to generate.