"defaultfont" is unclear (and confusing while reading code) when it also
applies to the user supplied font, so rename. ok oga@
This commit is contained in:
parent
5e01252a10
commit
f93ec1eba0
@ -15,7 +15,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: calmwm.h,v 1.135 2011/07/23 13:09:11 okan Exp $
|
* $OpenBSD: calmwm.h,v 1.136 2011/09/03 09:17:16 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CALMWM_H_
|
#ifndef _CALMWM_H_
|
||||||
@ -285,8 +285,8 @@ struct conf {
|
|||||||
struct color color[CWM_COLOR_MAX];
|
struct color color[CWM_COLOR_MAX];
|
||||||
char termpath[MAXPATHLEN];
|
char termpath[MAXPATHLEN];
|
||||||
char lockpath[MAXPATHLEN];
|
char lockpath[MAXPATHLEN];
|
||||||
#define DEFAULTFONTNAME "sans-serif:pixelsize=14:bold"
|
#define CONF_FONT "sans-serif:pixelsize=14:bold"
|
||||||
char *DefaultFontName;
|
char *font;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* MWM hints */
|
/* MWM hints */
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*
|
*
|
||||||
* $OpenBSD: conf.c,v 1.91 2011/08/29 09:10:49 okan Exp $
|
* $OpenBSD: conf.c,v 1.92 2011/09/03 09:17:16 okan Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -62,7 +62,7 @@ conf_gap(struct conf *c, struct screen_ctx *sc)
|
|||||||
void
|
void
|
||||||
conf_font(struct conf *c, struct screen_ctx *sc)
|
conf_font(struct conf *c, struct screen_ctx *sc)
|
||||||
{
|
{
|
||||||
sc->font = font_make(sc, c->DefaultFontName);
|
sc->font = font_make(sc, c->font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -208,7 +208,7 @@ conf_init(struct conf *c)
|
|||||||
c->color[CWM_COLOR_BG_MENU].name =
|
c->color[CWM_COLOR_BG_MENU].name =
|
||||||
xstrdup(CONF_COLOR_MENUBG);
|
xstrdup(CONF_COLOR_MENUBG);
|
||||||
|
|
||||||
c->DefaultFontName = xstrdup(DEFAULTFONTNAME);
|
c->font = xstrdup(CONF_FONT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -252,7 +252,7 @@ conf_clear(struct conf *c)
|
|||||||
for (i = 0; i < CWM_COLOR_MAX; i++)
|
for (i = 0; i < CWM_COLOR_MAX; i++)
|
||||||
xfree(c->color[i].name);
|
xfree(c->color[i].name);
|
||||||
|
|
||||||
xfree(c->DefaultFontName);
|
xfree(c->font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: parse.y,v 1.30 2011/08/22 16:18:05 okan Exp $ */
|
/* $OpenBSD: parse.y,v 1.31 2011/09/03 09:17:16 okan Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
|
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
|
||||||
@ -105,8 +105,8 @@ yesno : YES { $$ = 1; }
|
|||||||
;
|
;
|
||||||
|
|
||||||
main : FONTNAME STRING {
|
main : FONTNAME STRING {
|
||||||
free(conf->DefaultFontName);
|
free(conf->font);
|
||||||
conf->DefaultFontName = $2;
|
conf->font = $2;
|
||||||
}
|
}
|
||||||
| STICKY yesno {
|
| STICKY yesno {
|
||||||
if ($2 == 0)
|
if ($2 == 0)
|
||||||
@ -561,7 +561,7 @@ parse_config(const char *filename, struct conf *xconf)
|
|||||||
for (i = 0; i < CWM_COLOR_MAX; i++)
|
for (i = 0; i < CWM_COLOR_MAX; i++)
|
||||||
xconf->color[i].name = conf->color[i].name;
|
xconf->color[i].name = conf->color[i].name;
|
||||||
|
|
||||||
xconf->DefaultFontName = conf->DefaultFontName;
|
xconf->font = conf->font;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(conf);
|
free(conf);
|
||||||
|
Loading…
Reference in New Issue
Block a user