X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=engines%2Fopenbox%2Fopenbox.c;h=f9ac31d4c3f2c5a5f5770c8e19d2e0df08884f9d;hb=39946832001bd205f764a36fbdae17bc53d1fb35;hp=0123f474246e30466a6f491cddb9bc61ed71e3d1;hpb=2487e74d40448c110c6486fa5e2256a686d2c837;p=chaz%2Fopenbox diff --git a/engines/openbox/openbox.c b/engines/openbox/openbox.c index 0123f474..f9ac31d4 100644 --- a/engines/openbox/openbox.c +++ b/engines/openbox/openbox.c @@ -3,7 +3,7 @@ #include "../../kernel/screen.h" #include "../../kernel/extensions.h" #include "../../kernel/dispatch.h" -#include "../../kernel/themerc.h" +#include "../../kernel/config.h" #include "../../kernel/frame.h" #include "../../render/render.h" #include "../../render/color.h" @@ -605,12 +605,18 @@ static void layout_title(ObFrame *self) const char *lc; int x; gboolean n, d, i, l, m ,c; + ConfigValue layout; n = d = i = l = m = c = FALSE; + if (!config_get("titlebar.layout", Config_String, &layout)) { + layout.string = "NDLIMC"; + config_set("titlebar.layout", Config_String, layout); + } + /* figure out whats being shown, and the width of the label */ self->label_width = self->width - (s_bevel + 1) * 2; - for (lc = themerc_titlebar_layout; *lc != '\0'; ++lc) { + for (lc = layout.string; *lc != '\0'; ++lc) { switch (*lc) { case 'N': if (!(self->frame.client->decorations & Decor_Icon)) break; @@ -678,7 +684,7 @@ static void layout_title(ObFrame *self) } x = s_bevel + 1; - for (lc = themerc_titlebar_layout; *lc != '\0'; ++lc) { + for (lc = layout.string; *lc != '\0'; ++lc) { switch (*lc) { case 'N': if (!n) break;