changeset 10623:14c32196fcfd

[gaim-migrate @ 12094] The logic I used for dragging buddies and expanding them was so flawed it floored me. People probably prefer it like this. Also fix up body tags with bgcolors. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 22 Feb 2005 16:06:29 +0000
parents 78a43d6e1801
children 235e72d7bb0a
files src/gtkblist.c src/util.c
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Tue Feb 22 15:16:56 2005 +0000
+++ b/src/gtkblist.c	Tue Feb 22 16:06:29 2005 +0000
@@ -3722,10 +3722,6 @@
 	} else {
 		gaim_gtk_blist_new_node(node);
 		gtknode = (struct _gaim_gtk_blist_node *)node->ui_data;
-		/* If the node is a contact, and gtknode was NULL, it's because it was dragged.
-		 * It *must* have been expanded in order for it to be dragged. */
-		if(GAIM_BLIST_NODE_IS_CONTACT(node))
-			gtknode->contact_expanded = TRUE;
 	}
 
 	newpath = gtk_tree_model_get_path(GTK_TREE_MODEL(gtkblist->treemodel),
--- a/src/util.c	Tue Feb 22 15:16:56 2005 +0000
+++ b/src/util.c	Tue Feb 22 16:06:29 2005 +0000
@@ -1122,7 +1122,10 @@
 							}
 							g_string_append_printf(xhtml, "<span style='background: %s;'>", color->str);
 							g_string_free(color, TRUE);
-							c = strchr(c, '>') + 1;
+							if ((c = strchr(c, '>')) != NULL)
+								c++;
+							else
+								c = p;
 							pt->src_tag = "body";
 							pt->dest_tag = "span";
 							tags = g_list_prepend(tags, pt);
@@ -2763,6 +2766,9 @@
 		if (end == NULL)
 			end = strchr(s, '\n');
 
+		if (end == NULL)
+			return FALSE;
+
 		len = end - s;
 
 		new_url = g_malloc(len + 1);