diff options
author | oga | 2008-06-15 02:47:46 +0000 |
---|---|---|
committer | oga | 2008-06-15 02:47:46 +0000 |
commit | 95f0da676903ac1975beaa3567cb8c5ba28660e5 (patch) | |
tree | 9b5c8fbd2442ccbde0b95a852321b9a5b5ee93f7 /conf.c | |
parent | 436f35e0eec7bc1d4cebee440858aad0e2f5e123 (diff) | |
download | cwm-95f0da676903ac1975beaa3567cb8c5ba28660e5.tar.gz |
Rip out and burn the HASH_* stuff. We don't need a SPLAY tree for one font.
makes the code a lot simpler. While here rearrange the font handling functions
to be less shit.
ok and help okan@.
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: conf.c,v 1.39 2008/06/14 21:59:09 okan Exp $ + * $Id: conf.c,v 1.40 2008/06/15 02:47:46 oga Exp $ */ #include "headers.h" @@ -50,6 +50,15 @@ conf_cmd_add(struct conf *c, char *image, char *label, int flags) } } +void +conf_font(struct conf *c) +{ + struct screen_ctx *sc = screen_current(); + + c->DefaultFont = font_make(sc, Conf.DefaultFontName); + c->FontHeight = font_ascent() + font_descent() + 1; +} + int conf_changed(char *path) { @@ -78,7 +87,7 @@ conf_reload(struct conf *c) return; } - DefaultFont = font_getx(Curscreen, c->DefaultFontName); + conf_font(c); } void |