# HG changeset patch # User Mark Doliner # Date 1100671049 0 # Node ID f086269582b1389a13a70766ab005d7d9b87cfb0 # Parent 76e296e16def74ed31438f74f0e8f3d934d96a9f [gaim-migrate @ 11317] -Get rid of a warning when using Napster -Add a little note to prpl.h -Get rid of some gratuitous debug output committer: Tailor Script diff -r 76e296e16def -r f086269582b1 src/protocols/napster/napster.c --- a/src/protocols/napster/napster.c Wed Nov 17 05:41:10 2004 +0000 +++ b/src/protocols/napster/napster.c Wed Nov 17 05:57:29 2004 +0000 @@ -164,14 +164,13 @@ static char *nap_get_chat_name(GHashTable *data) { char *name = g_hash_table_lookup(data, "group"); - + /* Make sure the name has a # preceding it */ if (name[0] != '#') { return g_strdup_printf("#%s", name); } return g_strdup(name); - } /* 400 - MSG_CLIENT_JOIN */ @@ -545,6 +544,26 @@ *se = "offline"; } +static GList *nap_status_types(GaimAccount *account) +{ + GList *types = NULL; + GaimStatusType *type; + + g_return_val_if_fail(account != NULL, NULL); + + type = gaim_status_type_new_full(GAIM_STATUS_OFFLINE, + "offline", + _("Offline"), FALSE, FALSE, FALSE); + types = g_list_append(types, type); + + type = gaim_status_type_new_full(GAIM_STATUS_ONLINE, + "online", + _("Online"), FALSE, FALSE, FALSE); + types = g_list_append(types, type); + + return types; +} + static GList *nap_chat_info(GaimConnection *gc) { GList *m = NULL; @@ -582,7 +601,7 @@ nap_list_emblems, /* list_emblems */ NULL, /* status_text */ NULL, /* tooltip_text */ - NULL, /* away_states */ + nap_status_types, /* status_types */ NULL, /* blist_node_menu */ nap_chat_info, /* chat_info */ nap_chat_info_defaults, /* chat_info_defaults */ diff -r 76e296e16def -r f086269582b1 src/prpl.h --- a/src/prpl.h Wed Nov 17 05:41:10 2004 +0000 +++ b/src/prpl.h Wed Nov 17 05:57:29 2004 +0000 @@ -197,6 +197,10 @@ */ char *(*tooltip_text)(GaimBuddy *buddy); + /** + * This must be implemented, and must add at least the offline + * and online states. + */ GList *(*status_types)(GaimAccount *account); GList *(*blist_node_menu)(GaimBlistNode *node); diff -r 76e296e16def -r f086269582b1 src/status.c --- a/src/status.c Wed Nov 17 05:41:10 2004 +0000 +++ b/src/status.c Wed Nov 17 05:57:29 2004 +0000 @@ -580,8 +580,6 @@ { GaimPresenceContext context = gaim_presence_get_context(presence); - gaim_debug_info("notify_status_update", "Context is %d\n", context); - if (context == GAIM_PRESENCE_CONTEXT_ACCOUNT) { GaimAccount *account = gaim_presence_get_account(presence);