Mercurial > pidgin
changeset 22089:1e227e2587e6
Make setting 'now listening' actually work, thanks to khc.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sat, 12 Jan 2008 22:05:52 +0000 |
parents | 51d6ae399919 |
children | 8c1d618e10e0 35d5b7804449 |
files | libpurple/util.c |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/util.c Sat Jan 12 19:42:02 2008 +0000 +++ b/libpurple/util.c Sat Jan 12 22:05:52 2008 +0000 @@ -4629,6 +4629,15 @@ #endif /* !_WIN32 */ } +static void +set_status_with_attrs(PurpleStatus *status, ...) +{ + va_list args; + va_start(args, status); + purple_status_set_active_with_attrs(status, TRUE, args); + va_end(args); +} + void purple_util_set_current_song(const char *title, const char *artist, const char *album) { GList *list = purple_accounts_get_all(); @@ -4644,10 +4653,11 @@ if (!tune) continue; if (title) { - purple_status_set_active(tune, TRUE); - purple_status_set_attr_string(tune, PURPLE_TUNE_TITLE, title); - purple_status_set_attr_string(tune, PURPLE_TUNE_ARTIST, artist); - purple_status_set_attr_string(tune, PURPLE_TUNE_ALBUM, album); + set_status_with_attrs(tune, + PURPLE_TUNE_TITLE, title, + PURPLE_TUNE_ARTIST, artist, + PURPLE_TUNE_ALBUM, album, + NULL); } else { purple_status_set_active(tune, FALSE); }