1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-02-03 20:48:31 +00:00

remove x11 dependency of fonts

Instead, we just ignore them. Less errors in output, little less
ifdef's.
This commit is contained in:
Phil Sutter 2009-02-22 18:21:15 +01:00
parent e28f79a133
commit 2c44e6dccf
3 changed files with 6 additions and 6 deletions

View File

@ -3373,11 +3373,9 @@ static void generate_text_internal(char *p, int p_max_size,
}
#endif /* __OpenBSD__ */
#ifdef X11
OBJ(font) {
new_font(p, obj->data.s);
}
#endif
/* TODO: move this correction from kB to kB/s elsewhere
* (or get rid of it??) */
OBJ(diskio) {

View File

@ -186,11 +186,11 @@ void new_bar(char *buf, int w, int h, int usage)
s->height = h;
}
#ifdef X11
void new_font(char *buf, char *args)
{
if ((output_methods & TO_X) == 0)
return;
#ifdef X11
if (args) {
struct special_t *s = new_special(buf, FONT);
@ -208,8 +208,12 @@ void new_font(char *buf, char *args)
selected_font = s->font_added = 0;
selected_font = tmp;
}
}
#else
(void)buf;
(void)args;
return;
#endif
}
static void graph_append(struct special_t *graph, double f, char showaslog)
{

View File

@ -86,9 +86,7 @@ char *scan_graph(const char *, int *, int *, unsigned int *,
/* printing specials */
void new_bar(char *, int, int, int);
#ifdef X11
void new_font(char *, char *);
#endif
void new_graph(char *, int, int, unsigned int,
unsigned int, double, int, int, char);
void new_hr(char *, int);