im.pidgin.pidgin: 173ad946b0ecc5e4064c81c5dad8a370df704b06

sadrul at pidgin.im sadrul at pidgin.im
Sat Jan 12 17:00:48 EST 2008


-----------------------------------------------------------------
Revision: 173ad946b0ecc5e4064c81c5dad8a370df704b06
Ancestor: 4cfb69120c27231aa35204f7379b38aa9327fdbf
Author: sadrul at pidgin.im
Date: 2008-01-12T22:05:52
Branch: im.pidgin.pidgin

Modified files:
        libpurple/util.c

ChangeLog: 

Make setting 'now listening' actually work, thanks to khc.

-------------- next part --------------
============================================================
--- libpurple/util.c	c183e1b443eccf5b026701c90723fb31aaf2eff6
+++ libpurple/util.c	6a420aa1b7199b68194c51aec37e4ee9e3fde96e
@@ -4629,6 +4629,15 @@ void purple_restore_default_signal_handl
 #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 @@ void purple_util_set_current_song(const 
 		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);
 		}


More information about the Commits mailing list