aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authoroga2008-06-15 02:47:46 +0000
committeroga2008-06-15 02:47:46 +0000
commit95f0da676903ac1975beaa3567cb8c5ba28660e5 (patch)
tree9b5c8fbd2442ccbde0b95a852321b9a5b5ee93f7 /conf.c
parent436f35e0eec7bc1d4cebee440858aad0e2f5e123 (diff)
downloadcwm-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 '')
-rw-r--r--conf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/conf.c b/conf.c
index 90e8e0c..69b4226 100644
--- a/conf.c
+++ b/conf.c
@@ -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