im.pidgin.pidgin.2.2.2: 8ac64964ea5eb21d0df65865c5f108e620bd0320

lschiere at pidgin.im lschiere at pidgin.im
Fri Oct 19 17:12:57 EDT 2007


-----------------------------------------------------------------
Revision: 8ac64964ea5eb21d0df65865c5f108e620bd0320
Ancestor: debc1dd2f569741955d1aaa52fcfa788592c68d8
Author: lschiere at pidgin.im
Date: 2007-10-19T17:56:36
Branch: im.pidgin.pidgin.2.2.2

Modified files:
        pidgin/gtkblist.c

ChangeLog: 

applied changes from 61346ebfdbe38e90d131141a7fa41abeda7984c5
             through 2ed39e287c8bc0502ecaf3b390fc0441ab160a99

-------------- next part --------------
============================================================
--- pidgin/gtkblist.c	aade4b6d394ba1e271880e012dd494f970a3ee2d
+++ pidgin/gtkblist.c	411755136079086c53a23c78898366f3d3070ae6
@@ -3459,25 +3459,31 @@ gchar *pidgin_blist_get_name_markup(Purp
 			else
 				idletime = g_strdup(_("Idle"));
 
-			if (!selected)
+			if (!selected) {
+				g_free(text);
 				text = g_strdup_printf("<span color='%s'>%s</span>\n"
-				"<span color='%s' size='smaller'>%s%s%s</span>",
-				dim_grey(), esc, dim_grey(),
-				idletime != NULL ? idletime : "",
-				(idletime != NULL && statustext != NULL) ? " - " : "",
-				statustext != NULL ? statustext : "");
+					"<span color='%s' size='smaller'>%s%s%s</span>",
+					dim_grey(), esc, dim_grey(),
+					idletime != NULL ? idletime : "",
+					(idletime != NULL && statustext != NULL) ? " - " : "",
+					statustext != NULL ? statustext : "");
+			}
 		}
-		else if (!selected && !statustext) /* We handle selected text later */
+		else if (!selected && !statustext) {/* We handle selected text later */
+			g_free(text);
 			text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc);
-		else if (!selected && !text)
+		} else if (!selected && !text) {
+			g_free(text);
 			text = g_strdup_printf("<span color='%s'>%s</span>\n"
 				"<span color='%s' size='smaller'>%s</span>",
 				dim_grey(), esc, dim_grey(),
 				statustext != NULL ? statustext : "");
+		}
 	} else if (!PURPLE_BUDDY_IS_ONLINE(b)) {
-		if (!selected && !statustext) /* We handle selected text later */
+		if (!selected && !statustext) {/* We handle selected text later */
+			g_free(text);
 			text = g_strdup_printf("<span color='%s'>%s</span>", dim_grey(), esc);
-		else if (!selected && !text)
+		} else if (!selected && !text)
 			text = g_strdup_printf("<span color='%s'>%s</span>\n"
 				"<span color='%s' size='smaller'>%s</span>",
 				dim_grey(), esc, dim_grey(),
@@ -3494,13 +3500,15 @@ gchar *pidgin_blist_get_name_markup(Purp
 	}
 
 	/* It is selected. */
-	if ((selected && !text) || (selected && idletime))
+	if ((selected && !text) || (selected && idletime)) {
+		g_free(text);
 		text = g_strdup_printf("%s\n"
 			"<span size='smaller'>%s%s%s</span>",
 			esc,
 			idletime != NULL ? idletime : "",
 			(idletime != NULL && statustext != NULL) ? " - " : "",
 			statustext != NULL ? statustext :  "");
+	}
 
 	g_free(idletime);
 	g_free(statustext);


More information about the Commits mailing list