1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

xmms2 and audacious bars exist only under X

Signed-off-by: Nikos Ntarmos <ntarmos@cs.uoi.gr>
Signed-off-by: Pavel Labath <pavelo@centrum.sk>
This commit is contained in:
Nikos Ntarmos 2010-12-05 05:57:39 +02:00 committed by Pavel Labath
parent f607145f13
commit 4c0b1e936c
2 changed files with 8 additions and 0 deletions

View File

@ -2072,9 +2072,11 @@ void generate_text_internal(char *p, int p_max_size,
OBJ(xmms2_percent) {
snprintf(p, p_max_size, "%2.0f", cur->xmms2.progress * 100);
}
#ifdef X11
OBJ(xmms2_bar) {
new_bar(obj, p, p_max_size, (int) (cur->xmms2.progress * 255.0f));
}
#endif /* X11 */
OBJ(xmms2_playlist) {
snprintf(p, p_max_size, "%s", cur->xmms2.playlist);
}
@ -2150,6 +2152,7 @@ void generate_text_internal(char *p, int p_max_size,
snprintf(p, p_max_size, "%s",
cur->audacious.items[AUDACIOUS_MAIN_VOLUME]);
}
#ifdef X11
OBJ(audacious_bar) {
double progress;
@ -2158,6 +2161,7 @@ void generate_text_internal(char *p, int p_max_size,
atof(cur->audacious.items[AUDACIOUS_LENGTH_SECONDS]);
new_bar(obj, p, p_max_size, (int) (progress * 255.0f));
}
#endif /* X11 */
#endif /* AUDACIOUS */
#ifdef BMPX

View File

@ -967,8 +967,10 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
END OBJ(xmms2_size, &update_xmms2)
END OBJ(xmms2_status, &update_xmms2)
END OBJ(xmms2_percent, &update_xmms2)
#ifdef X11
END OBJ(xmms2_bar, &update_xmms2)
scan_bar(obj, arg);
#endif
END OBJ(xmms2_smart, &update_xmms2)
END OBJ(xmms2_playlist, &update_xmms2)
END OBJ(xmms2_timesplayed, &update_xmms2)
@ -994,9 +996,11 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
END OBJ(audacious_playlist_length, &update_audacious)
END OBJ(audacious_playlist_position, &update_audacious)
END OBJ(audacious_main_volume, &update_audacious)
#ifdef X11
END OBJ(audacious_bar, &update_audacious)
scan_bar(obj, arg);
#endif
#endif
#ifdef BMPX
END OBJ(bmpx_title, &update_bmpx)
memset(&(info.bmpx), 0, sizeof(struct bmpx_s));