changeset 22112:5b6d6ea542b8

Remove a variable that isn't used anywhere, if it was supposed to do something feel free to add it back and make it do that. Also, fix a compile error. Comparing a string literal and a const char * with == likely doesn't do what was intended here.
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 15 Jan 2008 04:58:42 +0000
parents 603d5325af4c
children 3afd04d5f9d6
files libpurple/plugins/tcl/tcl_cmds.c libpurple/plugins/test.pl libpurple/protocols/oscar/oscar.c pidgin/gtkblist.c
diffstat 4 files changed, 26 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/tcl/tcl_cmds.c	Mon Jan 14 23:29:52 2008 +0000
+++ b/libpurple/plugins/tcl/tcl_cmds.c	Tue Jan 15 04:58:42 2008 +0000
@@ -1067,7 +1067,8 @@
 			while (cur != NULL) {
 				elem = Tcl_NewStringObj((char *)cur->data, -1);
 				Tcl_ListObjAppendElement(interp, list, elem);
-				cur = g_list_next(cur);
+				g_free(cur->data);
+				cur = g_list_delete_link(cur, cur);
 			}
 			Tcl_SetObjResult(interp, list);
 			break;
--- a/libpurple/plugins/test.pl	Mon Jan 14 23:29:52 2008 +0000
+++ b/libpurple/plugins/test.pl	Tue Jan 15 04:58:42 2008 +0000
@@ -1,5 +1,4 @@
 #!/usr/bin/env perl -w
-
 use Gaim;
 
 %PLUGIN_INFO = (
--- a/libpurple/protocols/oscar/oscar.c	Mon Jan 14 23:29:52 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Tue Jan 15 04:58:42 2008 +0000
@@ -1795,7 +1795,7 @@
 		purple_prpl_got_user_status_deactive(account, info->sn, OSCAR_STATUS_ID_MOBILE);
 	}
 
-	if (status_id == OSCAR_STATUS_ID_AVAILABLE)
+	if (!strcmp(status_id, OSCAR_STATUS_ID_AVAILABLE))
 	{
 		char *message = NULL;
 
@@ -4456,7 +4456,6 @@
 	PurplePresence *presence;
 	PurpleStatusType *status_type;
 	PurpleStatusPrimitive primitive;
-	gboolean invisible;
 
 	char *htmlinfo;
 	char *info_encoding = NULL;
@@ -4471,7 +4470,6 @@
 	status_type = purple_status_get_type(status);
 	primitive = purple_status_type_get_primitive(status_type);
 	presence = purple_account_get_presence(account);
-	invisible = purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_INVISIBLE);
 
 	if (!setinfo)
 	{
--- a/pidgin/gtkblist.c	Mon Jan 14 23:29:52 2008 +0000
+++ b/pidgin/gtkblist.c	Tue Jan 15 04:58:42 2008 +0000
@@ -3316,24 +3316,34 @@
 
 		purple_notify_user_info_destroy(user_info);
 	} else if (PURPLE_BLIST_NODE_IS_GROUP(node)) {
+		gint count, total;
 		PurpleGroup *group = (PurpleGroup*)node;
 		PurpleNotifyUserInfo *user_info;
 
 		user_info = purple_notify_user_info_new();
 
-		/* Total buddies (from online accounts) in group */
-		tmp = g_strdup_printf("%d",
-		                      purple_blist_get_group_size(group, FALSE));
-		purple_notify_user_info_add_pair(user_info, _("Total Buddies"),
-		                                 tmp);
-		g_free(tmp);
-
-		/* Online buddies in group */
-		tmp = g_strdup_printf("%d",
-		                      purple_blist_get_group_online_count(group));
-		purple_notify_user_info_add_pair(user_info, _("Online Buddies"),
-		                                 tmp);
-		g_free(tmp);
+		count = purple_blist_get_group_online_count(group);
+
+		if (count != 0) {
+			/* Online buddies in group */
+			tmp = g_strdup_printf("%d", count);
+			purple_notify_user_info_add_pair(user_info,
+			                                 _("Online Buddies"),
+			                                 tmp);
+			g_free(tmp);
+		}
+		count = 0;
+
+		count = purple_blist_get_group_size(group, FALSE);
+		if (count != 0) {
+			/* Total buddies (from online accounts) in group */
+			tmp = g_strdup_printf("%d", count);
+			purple_notify_user_info_add_pair(user_info,
+			                                 _("Total Buddies"),
+			                                 tmp);
+			g_free(tmp);
+		}
+		count = 0;
 
 		tmp = purple_notify_user_info_get_text_with_newline(user_info, "\n");
 		g_string_append(str, tmp);