<theme>
<theme>operation</theme>
+ <titlelayout>NLIMC</titlelayout>
</theme>
<desktops>
char *config_theme;
+gchar *config_title_layout;
+
int config_desktops_num;
GSList *config_desktops_names;
g_free(config_theme);
config_theme = parse_string(doc, n);
}
+ if ((n = parse_find_node("titlelayout", node))) {
+ g_free(config_title_layout);
+ config_title_layout = parse_string(doc, n);
+ }
}
static void parse_desktops(xmlDocPtr doc, xmlNodePtr node, void *d)
config_theme = NULL;
+ config_title_layout = g_strdup("NLIMC");
+
parse_register("theme", parse_theme, NULL);
config_desktops_num = 4;
/* The name of the theme */
char *config_theme;
+/* Titlebar button layout */
+gchar *config_title_layout;
+
/*! The number of desktops */
extern int config_desktops_num;
/*! Names for the desktops */
#include "client.h"
#include "openbox.h"
#include "extensions.h"
+#include "config.h"
#include "framerender.h"
#include "render/theme.h"
/* figure out whats being shown, and the width of the label */
self->label_width = self->width - (ob_rr_theme->bevel + 1) * 2;
- for (lc = ob_rr_theme->title_layout; *lc != '\0'; ++lc) {
+ for (lc = config_title_layout; *lc != '\0'; ++lc) {
switch (*lc) {
case 'N':
if (n) { *lc = ' '; break; } /* rm duplicates */
if (!c) XUnmapWindow(ob_display, self->close);
x = ob_rr_theme->bevel + 1;
- for (lc = ob_rr_theme->title_layout; *lc != '\0'; ++lc) {
+ for (lc = config_title_layout; *lc != '\0'; ++lc) {
switch (*lc) {
case 'N':
if (!n) break;
mjust = RR_JUSTIFY_CENTER;
}
- /* load the title layout */
- if (!read_string(db, "window.title.layout", &font_str))
- font_str = "NLIMC";
- theme->title_layout = g_strdup(font_str);
-
/* load direct dimensions */
if (!read_int(db, "menuOverlap", &theme->menu_overlap) ||
theme->menu_overlap < 0 || theme->menu_overlap > 20)
RrFontClose(theme->mtitlefont);
RrFontClose(theme->mfont);
- g_free(theme->title_layout);
-
RrAppearanceFree(theme->a_disabled_focused_max);
RrAppearanceFree(theme->a_disabled_unfocused_max);
RrAppearanceFree(theme->a_hover_focused_max);
gint mfont_height;
RrFont *mfont;
- /* style settings - title layout */
- gchar *title_layout;
-
/* style settings - masks */
RrPixmapMask *max_set_mask;
RrPixmapMask *max_unset_mask;