im.pidgin.pidgin: 55eb5e28f52c9cdccc6229a8314ffbdac2260843

deryni at pidgin.im deryni at pidgin.im
Tue Jan 15 07:45:39 EST 2008


-----------------------------------------------------------------
Revision: 55eb5e28f52c9cdccc6229a8314ffbdac2260843
Ancestor: 3236dfb408a1020023e3fe090cf3044c65197c7b
Author: deryni at pidgin.im
Date: 2008-01-15T04:58:42
Branch: im.pidgin.pidgin

Modified files:
        libpurple/plugins/tcl/tcl_cmds.c libpurple/plugins/test.pl
        libpurple/protocols/oscar/oscar.c pidgin/gtkblist.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/plugins/tcl/tcl_cmds.c	3cff3ab7de3dc8f6aa03a38d433a011d85cea347
+++ libpurple/plugins/tcl/tcl_cmds.c	931b163c50c712a40a80f2119c6fb8e3aba9108f
@@ -1067,7 +1067,8 @@ int tcl_cmd_prefs(ClientData unused, Tcl
 			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;
============================================================
--- libpurple/plugins/test.pl	538be7ec7e701003f7227f38fb97ecbb407f2e15
+++ libpurple/plugins/test.pl	a840c639e4588af9bd5f677fe55e5d1e79c708a1
@@ -1,5 +1,4 @@
 #!/usr/bin/env perl -w
-
 use Gaim;
 
 %PLUGIN_INFO = (
============================================================
--- libpurple/protocols/oscar/oscar.c	dbaa79c139c8f6577c655ea2865ca54f9fbfdc6e
+++ libpurple/protocols/oscar/oscar.c	56456836e9d02276563c2056f7683adc7d1a917f
@@ -1795,7 +1795,7 @@ static int purple_parse_oncoming(OscarDa
 		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 @@ oscar_set_info_and_status(PurpleAccount 
 	PurplePresence *presence;
 	PurpleStatusType *status_type;
 	PurpleStatusPrimitive primitive;
-	gboolean invisible;
 
 	char *htmlinfo;
 	char *info_encoding = NULL;
@@ -4471,7 +4470,6 @@ oscar_set_info_and_status(PurpleAccount 
 	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)
 	{
============================================================
--- pidgin/gtkblist.c	079a3f5cfa5d3df520c5207875ceb0c8b75f12d2
+++ pidgin/gtkblist.c	3d15103b2aff09e380deffbc60b916795aa1ea00
@@ -3316,25 +3316,35 @@ static char *pidgin_get_tooltip_text(Pur
 
 		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);
+		count = purple_blist_get_group_online_count(group);
 
-		/* 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);
+		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);
 		g_free(tmp);


More information about the Commits mailing list