diff pidgin/gtkblist.c @ 29916:6bcf405d5c63

Allow a PRPL to have get_moods return NULL to disable mood setting. Fixes not showing the "Set Mood" menu for XMPP accounts not supporting PEP such as gmail.com
author Marcus Lundblad <ml@update.uu.se>
date Wed, 03 Mar 2010 22:08:27 +0000
parents 27a94015e239
children 10c2702ecfff 3e5bb4e2334c
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sun Feb 28 22:30:02 2010 +0000
+++ b/pidgin/gtkblist.c	Wed Mar 03 22:08:27 2010 +0000
@@ -8016,8 +8016,10 @@
 		if (prpl_info &&
 		    (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) ||
 			 PURPLE_PLUGIN_HAS_ACTIONS(plugin))) {
-			if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods)) {
+			if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_moods) &&
+			    prpl_info->get_moods(account) != NULL) {
 				GList *types;
+
 				for (types = purple_account_get_status_types(account);
 			     	types != NULL ; types = types->next) {
 					PurpleStatusType *type = types->data;