mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-25 12:10:03 +00:00
convert xmms2_bar to callbacks.barval
This commit is contained in:
parent
997805c46b
commit
4988947829
@ -1223,7 +1223,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
|
||||
obj->callbacks.print = &print_xmms2_percent;
|
||||
END OBJ(xmms2_bar, &update_xmms2)
|
||||
scan_bar(obj, arg);
|
||||
obj->callbacks.print = &print_xmms2_bar;
|
||||
obj->callbacks.barval = &xmms2_barval;
|
||||
END OBJ(xmms2_smart, &update_xmms2)
|
||||
obj->callbacks.print = &print_xmms2_smart;
|
||||
END OBJ(xmms2_playlist, &update_xmms2)
|
||||
|
@ -343,13 +343,11 @@ void print_xmms2_duration(struct text_object *obj, char *p, int p_max_size)
|
||||
(info.xmms2.duration / 1000) % 60);
|
||||
}
|
||||
|
||||
void print_xmms2_bar(struct text_object *obj, char *p, int p_max_size)
|
||||
uint8_t xmms2_barval(struct text_object *obj)
|
||||
{
|
||||
(void)obj;
|
||||
if (!p_max_size)
|
||||
return;
|
||||
|
||||
new_bar(obj, p, p_max_size, (int) (info.xmms2.progress * 255.0f));
|
||||
return round_to_int(info.xmms2.progress * 255.0f);
|
||||
}
|
||||
|
||||
void print_xmms2_smart(struct text_object *obj, char *p, int p_max_size)
|
||||
|
@ -58,9 +58,7 @@ void update_xmms2(void);
|
||||
void print_xmms2_tracknr(struct text_object *, char *, int);
|
||||
void print_xmms2_elapsed(struct text_object *, char *, int);
|
||||
void print_xmms2_duration(struct text_object *, char *, int);
|
||||
#ifdef X11
|
||||
void print_xmms2_bar(struct text_object *, char *, int);
|
||||
#endif /* X11 */
|
||||
uint8_t xmms2_barval(struct text_object *);
|
||||
void print_xmms2_smart(struct text_object *, char *, int);
|
||||
void print_xmms2_artist(struct text_object *, char *, int);
|
||||
void print_xmms2_album(struct text_object *, char *, int);
|
||||
|
Loading…
Reference in New Issue
Block a user