mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-29 01:58:26 +00:00
new_font: convert to common signature
This commit is contained in:
parent
e5b25fd30a
commit
95b92d6cff
@ -791,7 +791,7 @@ void generate_text_internal(char *p, int p_max_size,
|
|||||||
NORM_ERR("not implemented obj type %d", obj->type);
|
NORM_ERR("not implemented obj type %d", obj->type);
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
OBJ(font) {
|
OBJ(font) {
|
||||||
new_font(p, obj->data.s);
|
new_font(obj, p, p_max_size);
|
||||||
}
|
}
|
||||||
#endif /* X11 */
|
#endif /* X11 */
|
||||||
OBJ(text) {
|
OBJ(text) {
|
||||||
|
@ -284,24 +284,25 @@ void new_gauge(struct text_object *obj, char *p, int p_max_size, int usage)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef X11
|
#ifdef X11
|
||||||
void new_font(char *buf, char *args)
|
void new_font(struct text_object *obj, char *p, int p_max_size)
|
||||||
{
|
{
|
||||||
|
struct special_t *s;
|
||||||
|
int tmp = selected_font;
|
||||||
|
|
||||||
if ((output_methods & TO_X) == 0)
|
if ((output_methods & TO_X) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (args) {
|
if (!p_max_size)
|
||||||
struct special_t *s = new_special(buf, FONT);
|
return;
|
||||||
|
|
||||||
if (s->font_added > font_count || !s->font_added || (strncmp(args, fonts[s->font_added].name, DEFAULT_TEXT_BUFFER_SIZE) != EQUAL) ) {
|
s = new_special(p, FONT);
|
||||||
int tmp = selected_font;
|
|
||||||
|
|
||||||
selected_font = s->font_added = add_font(args);
|
if (obj->data.s) {
|
||||||
|
if (s->font_added > font_count || !s->font_added || (strncmp(obj->data.s, fonts[s->font_added].name, DEFAULT_TEXT_BUFFER_SIZE) != EQUAL) ) {
|
||||||
|
selected_font = s->font_added = add_font(obj->data.s);
|
||||||
selected_font = tmp;
|
selected_font = tmp;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
struct special_t *s = new_special(buf, FONT);
|
|
||||||
int tmp = selected_font;
|
|
||||||
|
|
||||||
selected_font = s->font_added = 0;
|
selected_font = s->font_added = 0;
|
||||||
selected_font = tmp;
|
selected_font = tmp;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +103,7 @@ void scan_tab(struct text_object *, const char *);
|
|||||||
void scan_stippled_hr(struct text_object *, const char*);
|
void scan_stippled_hr(struct text_object *, const char*);
|
||||||
|
|
||||||
/* printing specials */
|
/* printing specials */
|
||||||
void new_font(char *, char *);
|
void new_font(struct text_object *, char *, int);
|
||||||
void new_graph(struct text_object *, char *, int, double);
|
void new_graph(struct text_object *, char *, int, double);
|
||||||
void new_hr(struct text_object *, char *, int);
|
void new_hr(struct text_object *, char *, int);
|
||||||
void new_stippled_hr(struct text_object *, char *, int);
|
void new_stippled_hr(struct text_object *, char *, int);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user