[gaim-migrate @ 11317]

Wed, 17 Nov 2004 05:57:29 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Wed, 17 Nov 2004 05:57:29 +0000
changeset 10200
33c21db946e7
parent 10199
cd9d23829c02
child 10201
6fd2263c79cc

[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

src/protocols/napster/napster.c file | annotate | diff | comparison | revisions
src/prpl.h file | annotate | diff | comparison | revisions
src/status.c file | annotate | diff | comparison | revisions
--- 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 */
--- 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);
--- 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);

mercurial