all repos — openbox @ 5588c493355878e8243f889ec4225c02f044e822

openbox fork - make it a bit more like ryudo

add an allow_fallback option when opening a theme
Dana Jansens danakj@orodu.net
commit

5588c493355878e8243f889ec4225c02f044e822

parent

5e50b406d06147bfce746c24b5341321d55c4a3f

3 files changed, 7 insertions(+), 2 deletions(-)

jump to
M openbox/openbox.copenbox/openbox.c

@@ -261,7 +261,7 @@

/* load the theme specified in the rc file */ { RrTheme *theme; - if ((theme = RrThemeNew(ob_rr_inst, config_theme, + if ((theme = RrThemeNew(ob_rr_inst, config_theme, TRUE, config_font_activewindow, config_font_inactivewindow, config_font_menutitle,
M render/theme.crender/theme.c

@@ -65,6 +65,7 @@ /* shortcut to the various find_* functions */

#define FIND(type, args...) find_##type(&ps, root, args) RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, + gboolean allow_fallback, RrFont *active_window_font, RrFont *inactive_window_font, RrFont *menu_title_font, RrFont *menu_item_font, RrFont *osd_font)

@@ -85,12 +86,15 @@ /* make it fall back to default theme */

name = NULL; } } - if (!name) { + if (name == NULL && allow_fallback) { if (!parse_load_theme(DEFAULT_THEME, &ps.doc, &root, &ps.path)) { g_message("Unable to load the theme '%s'", DEFAULT_THEME); return NULL; } } + if (name == NULL) + return NULL; + ps.inst = inst; theme = g_new0(RrTheme, 1);
M render/theme.hrender/theme.h

@@ -236,6 +236,7 @@

/*! The font values are all optional. If a NULL is used for any of them, then the default font will be used. */ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *theme, + gboolean allow_fallback, RrFont *active_window_font, RrFont *inactive_window_font, RrFont *menu_title_font, RrFont *menu_item_font, RrFont *osd_font);