<xs:element name="name" type="xs:string"/>
<xs:element name="titlelayout" type="xs:string"/>
<xs:element name="keepBorder" type="ob:yesorno"/>
+ <xs:element name="hideDisabled" type="ob:yesorno"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="desktops">
gchar *config_theme;
gboolean config_theme_keepborder;
+gboolean config_theme_hidedisabled;
gchar *config_title_layout;
}
if ((n = parse_find_node("keepBorder", node)))
config_theme_keepborder = parse_bool(doc, n);
+ if ((n = parse_find_node("hideDisabled", node)))
+ config_theme_hidedisabled = parse_bool(doc, n);
}
static void parse_desktops(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
config_title_layout = g_strdup("NLIMC");
config_theme_keepborder = TRUE;
+ config_theme_hidedisabled = FALSE;
parse_register(i, "theme", parse_theme, NULL);
/* Show the onepixel border after toggleDecor */
extern gboolean config_theme_keepborder;
+/* Hide window frame buttons that the window doesn't allow */
+extern gboolean config_theme_hidedisabled;
/* Titlebar button layout */
extern gchar *config_title_layout;
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);
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);