X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fopenbox;a=blobdiff_plain;f=render%2Ftheme.c;h=399bd2c5a3fb8e72f55ca93a80e30e97ebab34e1;hp=aa9cb3f92945ed951a1b44b7249e5e00f976caa3;hb=4bf6b1b551be744be4fbe4d1faab5be12d051378;hpb=ada5de28f71efaa5584709673cc49cdb3b703299 diff --git a/render/theme.c b/render/theme.c index aa9cb3f9..399bd2c5 100644 --- a/render/theme.c +++ b/render/theme.c @@ -23,7 +23,7 @@ #include "mask.h" #include "theme.h" #include "icon.h" -#include "parser/parse.h" +#include "obt/paths.h" #include #include @@ -559,6 +559,16 @@ RrTheme* RrThemeNew(const RrInstance *inst, const gchar *name, theme->menu_bullet_mask = RrPixmapMaskNew(inst, 4, 7, (gchar*)data); } + /* up and down arrows */ + { + guchar data[] = { 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 0x10, 0x00 }; + theme->down_arrow_mask = RrPixmapMaskNew(inst, 9, 4, (gchar*)data); + } + { + guchar data[] = { 0x10, 0x00, 0x38, 0x00, 0x7c, 0x00, 0xfe, 0x00 }; + theme->up_arrow_mask = RrPixmapMaskNew(inst, 9, 4, (gchar*)data); + } + /* setup the default window icon */ theme->def_win_icon = read_c_image(OB_DEFAULT_ICON_WIDTH, OB_DEFAULT_ICON_HEIGHT, @@ -1470,6 +1480,8 @@ void RrThemeFree(RrTheme *theme) RrPixmapMaskFree(theme->close_hover_mask); RrPixmapMaskFree(theme->close_pressed_mask); RrPixmapMaskFree(theme->menu_bullet_mask); + RrPixmapMaskFree(theme->down_arrow_mask); + RrPixmapMaskFree(theme->up_arrow_mask); RrFontClose(theme->win_font_focused); RrFontClose(theme->win_font_unfocused); @@ -1580,6 +1592,10 @@ static XrmDatabase loaddb(const gchar *name, gchar **path) *path = g_path_get_dirname(s); g_free(s); } else { + ObtPaths *p; + + p = obt_paths_new(); + /* XXX backwards compatibility, remove me sometime later */ s = g_build_filename(g_get_home_dir(), ".themes", name, "openbox-3", "themerc", NULL); @@ -1587,8 +1603,7 @@ static XrmDatabase loaddb(const gchar *name, gchar **path) *path = g_path_get_dirname(s); g_free(s); - for (it = parse_xdg_data_dir_paths(); !db && it; - it = g_slist_next(it)) + for (it = obt_paths_data_dirs(p); !db && it; it = g_slist_next(it)) { s = g_build_filename(it->data, "themes", name, "openbox-3", "themerc", NULL); @@ -1596,6 +1611,8 @@ static XrmDatabase loaddb(const gchar *name, gchar **path) *path = g_path_get_dirname(s); g_free(s); } + + obt_paths_unref(p); } if (db == NULL) {