Mercurial > pidgin.yaz
changeset 20942:37f3c1023a68
Use a #define for the msn 'currentmedia' status attribute in line with the PURPLE_TUNE_ attributes used in the xmpp prpl
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Mon, 15 Oct 2007 23:46:02 +0000 |
parents | 65d19253f746 |
children | 1ec2b67e9bc1 |
files | libpurple/protocols/msn/msn.c libpurple/protocols/msn/user.c libpurple/status.h |
diffstat | 3 files changed, 12 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Mon Oct 15 01:44:52 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Mon Oct 15 23:46:02 2007 +0000 @@ -552,7 +552,7 @@ status = purple_presence_get_active_status(presence); msg = purple_status_get_attr_string(status, "message"); - cmedia = purple_status_get_attr_string(status, "currentmedia"); + cmedia = purple_status_get_attr_string(status, PURPLE_TUNE_FULL); if (cmedia) return g_markup_escape_text(cmedia, -1); @@ -577,7 +577,7 @@ char *tmp; psm = purple_status_get_attr_string(status, "message"); - currentmedia = purple_status_get_attr_string(status, "currentmedia"); + currentmedia = purple_status_get_attr_string(status, PURPLE_TUNE_FULL); if (!purple_presence_is_available(presence)) { name = purple_status_get_name(status); @@ -632,40 +632,40 @@ status = purple_status_type_new_with_attrs( PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), - "currentmedia", _("Current media"), purple_value_new(PURPLE_TYPE_STRING), + PURPLE_TUNE_FULL, _("Current media"), purple_value_new(PURPLE_TYPE_STRING), NULL); types = g_list_append(types, status); status = purple_status_type_new_with_attrs( PURPLE_STATUS_AWAY, NULL, NULL, TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), - "currentmedia", _("Current media"), purple_value_new(PURPLE_TYPE_STRING), + PURPLE_TUNE_FULL, _("Current media"), purple_value_new(PURPLE_TYPE_STRING), NULL); types = g_list_append(types, status); status = purple_status_type_new_with_attrs( PURPLE_STATUS_AWAY, "brb", _("Be Right Back"), TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), - "currentmedia", _("Current media"), purple_value_new(PURPLE_TYPE_STRING), + PURPLE_TUNE_FULL, _("Current media"), purple_value_new(PURPLE_TYPE_STRING), NULL); types = g_list_append(types, status); status = purple_status_type_new_with_attrs( PURPLE_STATUS_UNAVAILABLE, "busy", _("Busy"), TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), - "currentmedia", _("Current media"), purple_value_new(PURPLE_TYPE_STRING), + PURPLE_TUNE_FULL, _("Current media"), purple_value_new(PURPLE_TYPE_STRING), NULL); types = g_list_append(types, status); status = purple_status_type_new_with_attrs( PURPLE_STATUS_UNAVAILABLE, "phone", _("On the Phone"), TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), - "currentmedia", _("Current media"), purple_value_new(PURPLE_TYPE_STRING), + PURPLE_TUNE_FULL, _("Current media"), purple_value_new(PURPLE_TYPE_STRING), NULL); types = g_list_append(types, status); status = purple_status_type_new_with_attrs( PURPLE_STATUS_AWAY, "lunch", _("Out to Lunch"), TRUE, TRUE, FALSE, "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), - "currentmedia", _("Current media"), purple_value_new(PURPLE_TYPE_STRING), + PURPLE_TUNE_FULL, _("Current media"), purple_value_new(PURPLE_TYPE_STRING), NULL); types = g_list_append(types, status);
--- a/libpurple/protocols/msn/user.c Mon Oct 15 01:44:52 2007 +0000 +++ b/libpurple/protocols/msn/user.c Mon Oct 15 23:46:02 2007 +0000 @@ -94,9 +94,9 @@ if (user->statusline != NULL && user->currentmedia != NULL) { purple_prpl_got_user_status(account, user->passport, user->status, "message", user->statusline, - "currentmedia", user->currentmedia, NULL); + PURPLE_TUNE_FULL, user->currentmedia, NULL); } else if (user->currentmedia != NULL) { - purple_prpl_got_user_status(account, user->passport, user->status, "currentmedia", + purple_prpl_got_user_status(account, user->passport, user->status, PURPLE_TUNE_FULL, user->currentmedia, NULL); } else if (user->statusline != NULL) { //char *status = g_strdup_printf("%s - %s", user->status, user->statusline);
--- a/libpurple/status.h Mon Oct 15 01:44:52 2007 +0000 +++ b/libpurple/status.h Mon Oct 15 23:46:02 2007 +0000 @@ -121,7 +121,8 @@ #define PURPLE_TUNE_TRACK "tune_track" #define PURPLE_TUNE_TIME "tune_time" #define PURPLE_TUNE_YEAR "tune_year" -#define PURPLE_TUNE_URL "tune_url" +#define PURPLE_TUNE_URL "tune_url" +#define PURPLE_TUNE_FULL "tune_full" #ifdef __cplusplus extern "C" {