changeset 19265:ce892eddb8f1

propagate from branch 'im.pidgin.pidgin' (head 37a828a3519f5c2fe7a6d94dc41d607b807dd371) to branch 'im.pidgin.soc.2007.certmgr' (head 462298218a3d857c74beff14713b6b92743e3b08)
author William Ehlhardt <williamehlhardt@gmail.com>
date Tue, 14 Aug 2007 04:52:22 +0000
parents d5e76ad4b365 (diff) 8828d7aec7b6 (current diff)
children f14d539508ca
files libpurple/Makefile.am pidgin/gtkblist.c
diffstat 13 files changed, 184 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Aug 13 23:33:20 2007 +0000
+++ b/ChangeLog	Tue Aug 14 04:52:22 2007 +0000
@@ -1,11 +1,14 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
 version 2.1.1 (??/??/????):
-	libpurple:
+	Yahoo:
 	* Added an account action to open your inbox in the yahoo prpl.
 	* Added support for Unicode status messages in Yahoo.
 	* Server-stored aliases for Yahoo. (John Moody)
 	* Fixed support for Yahoo! doodling.
+	* Support for MSN Messenger contacts
+	
+	Bonjour:
 	* Bonjour plugin uses native Avahi instead of Howl
 	* Bonjour plugin supports Buddy Icons
 
@@ -14,6 +17,11 @@
 	  the toolbar
 	* Slim new redesign of conversation tabs to maximize number of
 	  conversations that can fit in a window
+	* Tab bar is not visible when only one conversation is open. You can
+	  drag and drop conversations from the infopane.
+	* Moved "Reset Formatting" toolbar button to Font menu.
+	* Double click on the infopane to alias buddies and set topics
+	  on chats
 
 	Finch:
 	* Sound support (Eric Polino)
--- a/libpurple/Makefile.am	Mon Aug 13 23:33:20 2007 +0000
+++ b/libpurple/Makefile.am	Tue Aug 14 04:52:22 2007 +0000
@@ -22,9 +22,6 @@
 		win32/giowin32.c \
 		win32/win32dep.h
 
-if USE_GCONFTOOL
-GCONF_DIR=gconf
-endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = purple.pc
--- a/libpurple/dbus-analyze-functions.py	Mon Aug 13 23:33:20 2007 +0000
+++ b/libpurple/dbus-analyze-functions.py	Tue Aug 14 04:52:22 2007 +0000
@@ -39,6 +39,7 @@
     "purple_prefs_get_string_list",
     "purple_uri_list_extract_filenames",
     "purple_uri_list_extract_uris",
+    "purple_prefs_get_children_names",
 ]
 
 # This is a list of functions that return a GList* or GSList* that should
--- a/libpurple/protocols/bonjour/jabber.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Tue Aug 14 04:52:22 2007 +0000
@@ -371,6 +371,8 @@
 
 	purple_debug_info("bonjour", "Recieved conversation close notification from %s.\n", pb->name);
 
+	g_return_if_fail(bb != NULL);
+
 	/* Close the socket, clear the watcher and free memory */
 	bonjour_jabber_close_conversation(bb->conversation);
 	bb->conversation = NULL;
--- a/libpurple/protocols/bonjour/parser.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/libpurple/protocols/bonjour/parser.c	Tue Aug 14 04:52:22 2007 +0000
@@ -82,6 +82,11 @@
 	}
 }
 
+static gboolean _async_bonjour_jabber_stream_ended_cb(gpointer data) {
+	bonjour_jabber_stream_ended((PurpleBuddy *) data);
+	return FALSE;
+}
+
 static void
 bonjour_parser_element_end_libxml(void *user_data, const xmlChar *element_name,
 				 const xmlChar *prefix, const xmlChar *namespace)
@@ -94,7 +99,9 @@
 		/* We don't keep a reference to the start stream xmlnode,
 		 * so we have to check for it here to close the conversation */
 		if(!xmlStrcmp(element_name, (xmlChar*) "stream")) {
-			bonjour_jabber_stream_ended(pb);
+			/* Asynchronously close the conversation to prevent bonjour_parser_setup()
+			 * being called from within this context */
+			g_idle_add(_async_bonjour_jabber_stream_ended_cb, pb);
 		}
 		return;
 	}
--- a/libpurple/util.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/libpurple/util.c	Tue Aug 14 04:52:22 2007 +0000
@@ -1338,6 +1338,7 @@
 	GString *xhtml = NULL;
 	GString *plain = NULL;
 	GString *url = NULL;
+	GString *cdata = NULL;
 	GList *tags = NULL, *tag;
 	const char *c = html;
 
@@ -1367,7 +1368,13 @@
 							g_string_append_printf(xhtml, "</%s>", pt->dest_tag);
 						if(plain && !strcmp(pt->src_tag, "a")) {
 							/* if this is a link, we have to add the url to the plaintext, too */
-							g_string_append_printf(plain, " <%s>", g_strstrip(url->str));
+							if (cdata && url && !g_string_equal(cdata, url))
+								g_string_append_printf(plain, " <%s>", g_strstrip(url->str));
+							if (cdata) {
+								g_string_free(cdata, TRUE);
+								cdata = NULL;
+							}
+							
 						}
 						if(tags == tag)
 							break;
@@ -1537,6 +1544,7 @@
 							const char *q = p + strlen("href=");
 							g_string_free(url, TRUE);
 							url = g_string_new("");
+							cdata = g_string_new("");
 							if(*q == '\'' || *q == '\"')
 								q++;
 							while(*q && *q != '\"' && *q != '\'' && *q != ' ') {
@@ -1725,6 +1733,8 @@
 				xhtml = g_string_append_c(xhtml, *c);
 			if(plain)
 				plain = g_string_append_c(plain, *c);
+			if(cdata)
+				cdata = g_string_append_c(cdata, *c);
 			c++;
 		}
 	}
--- a/pidgin/gtkblist.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/pidgin/gtkblist.c	Tue Aug 14 04:52:22 2007 +0000
@@ -2609,6 +2609,7 @@
 	gboolean tooltip_top = FALSE;
 	struct _pidgin_blist_node *gtknode;
 	GdkRectangle mon_size;
+	int sig;
 	
 	if (node == NULL)
 		return;
@@ -2619,7 +2620,6 @@
 	 */
 	pidgin_blist_tooltip_destroy();
 
-
 	gtkblist->tipwindow = gtk_window_new(GTK_WINDOW_POPUP);
 
 	if(PURPLE_BLIST_NODE_IS_CHAT(node) || PURPLE_BLIST_NODE_IS_BUDDY(node)) {
@@ -2674,7 +2674,6 @@
 			G_CALLBACK(pidgin_blist_paint_tip), NULL);
 	gtk_widget_ensure_style (gtkblist->tipwindow);
 
-
 #if GTK_CHECK_VERSION(2,2,0)
 	gdk_display_get_pointer(gdk_display_get_default(), &screen, &x, &y, NULL);
 	mon_num = gdk_screen_get_monitor_at_point(screen, x, y);
@@ -2723,6 +2722,10 @@
 	gtk_window_move(GTK_WINDOW(gtkblist->tipwindow), x, y);
 	gtk_widget_show(gtkblist->tipwindow);
 
+	/* Hide the tooltip when the widget is destroyed */
+	sig = g_signal_connect(G_OBJECT(widget), "destroy", G_CALLBACK(pidgin_blist_tooltip_destroy), NULL);
+	g_signal_connect_swapped(G_OBJECT(gtkblist->tipwindow), "destroy", G_CALLBACK(g_source_remove), GINT_TO_POINTER(sig));
+
 	return;
 }
 
@@ -3323,18 +3326,14 @@
 	}
 
 	/* XXX Good luck cleaning up this crap */
-	if (aliased) {
-		contact = (PurpleContact*)((PurpleBlistNode*)b)->parent;
-		if(contact)
-			gtkcontactnode = ((PurpleBlistNode*)contact)->ui_data;
-
-		if(gtkcontactnode && !gtkcontactnode->contact_expanded && contact->alias)
-			name = contact->alias;
-		else
-			name = purple_buddy_get_alias(b);
-	} else {
-		name = b->name;
-	}
+	contact = (PurpleContact*)((PurpleBlistNode*)b)->parent;
+	if(contact)
+		gtkcontactnode = ((PurpleBlistNode*)contact)->ui_data;
+
+	if(gtkcontactnode && !gtkcontactnode->contact_expanded && contact->alias)
+		name = contact->alias;
+	else
+		name = purple_buddy_get_alias(b);
 	
 	esc = g_markup_escape_text(name, strlen(name));
 
--- a/pidgin/gtkconv.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/pidgin/gtkconv.c	Tue Aug 14 04:52:22 2007 +0000
@@ -186,6 +186,7 @@
 static void focus_out_from_menubar(GtkWidget *wid, PidginWindow *win);
 static void pidgin_conv_tab_pack(PidginWindow *win, PidginConversation *gtkconv);
 static gboolean infopane_press_cb(GtkWidget *widget, GdkEventButton *e, PidginConversation *conv);
+static gboolean alias_double_click_cb(GtkWidget *widget, GdkEventButton *event, PidginConversation *gtkconv);
 
 static void pidgin_conv_set_position_size(PidginWindow *win, int x, int y,
 		int width, int height);
@@ -3340,8 +3341,10 @@
 	} else {
 		stock_id = PIDGIN_STOCK_ANIMATION_TYPING5;
 		tooltip = _("User has typed something and stopped");
-		g_source_remove(gtkconv->u.im->typing_timer);
-		gtkconv->u.im->typing_timer = 0;
+		if (gtkconv->u.im->typing_timer != 0) {
+			g_source_remove(gtkconv->u.im->typing_timer);
+			gtkconv->u.im->typing_timer = 0;
+		}
 	}
 
 	if (gtkwin->menu.typing_icon == NULL)
@@ -4015,7 +4018,6 @@
 	}
 
 	gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), current_topic);
-
 	prpl_info->set_chat_topic(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)),
 			new_topic);
 
@@ -4383,6 +4385,8 @@
 				 "foreground-set", TRUE,
 				 "weight-set", TRUE,
 				 NULL);
+        g_object_set(G_OBJECT(rend), "editable", TRUE, NULL);
+
 	col = gtk_tree_view_column_new_with_attributes(NULL, rend,
 	                                               "text", CHAT_USERS_ALIAS_COLUMN,
 	                                               "foreground-gdk", CHAT_USERS_COLOR_COLUMN,
@@ -4411,17 +4415,36 @@
 	gtk_container_add(GTK_CONTAINER(sw), list);
 }
 
-static int tooltip_timeout = 0;
+/* Stuff used to display tooltips on the infopane */
+static struct {
+	int timeout;
+	PidginConversation *gtkconv;   /* This is the Pidgin conversation that
+	                                  triggered the tooltip */
+} tooltip;
+
+static void
+reset_tooltip()
+{
+	if (tooltip.timeout != 0) {
+		g_source_remove(tooltip.timeout);
+		tooltip.timeout = 0;
+	}
+	tooltip.gtkconv = NULL;
+}
 
 static gboolean
 pidgin_conv_tooltip_timeout(PidginConversation *gtkconv)
 {
 	PurpleBlistNode *node = NULL;
-	PurpleConversation *conv = gtkconv->active_conv;
- 	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
-                node = (PurpleBlistNode*)(purple_blist_find_chat(conv->account, conv->name));
+	PurpleConversation *conv;
+
+	g_return_val_if_fail (tooltip.gtkconv == gtkconv, FALSE);
+
+	conv = gtkconv->active_conv;
+	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
+		node = (PurpleBlistNode*)(purple_blist_find_chat(conv->account, conv->name));
 	} else {
-                node = (PurpleBlistNode*)(purple_find_buddy(conv->account, conv->name));
+		node = (PurpleBlistNode*)(purple_find_buddy(conv->account, conv->name));
 	}
 
 	if (node) 
@@ -4433,10 +4456,7 @@
 pidgin_conv_leave_cb (GtkWidget *w, GdkEventCrossing *e, PidginConversation *gtkconv)
 {
 	pidgin_blist_tooltip_destroy();
-	if (tooltip_timeout) {
-		g_source_remove(tooltip_timeout);
-		tooltip_timeout = 0;
-	}
+	reset_tooltip();
 }
 
 static gboolean 
@@ -4448,10 +4468,11 @@
 	if (delay == 0)
 		return FALSE;
 
-	if (tooltip_timeout != 0) 
-		g_source_remove(tooltip_timeout);
-
-	tooltip_timeout = g_timeout_add(delay, (GSourceFunc)pidgin_conv_tooltip_timeout, gtkconv);
+	if (tooltip.timeout != 0) 
+		g_source_remove(tooltip.timeout);
+
+	tooltip.timeout = g_timeout_add(delay, (GSourceFunc)pidgin_conv_tooltip_timeout, gtkconv);
+	tooltip.gtkconv = gtkconv;
 	return FALSE;
 }
 
@@ -4488,11 +4509,10 @@
 	g_signal_connect(G_OBJECT(event_box), "button_press_event",
 	                 G_CALLBACK(infopane_press_cb), gtkconv);
 
-        g_signal_connect(G_OBJECT(event_box), "motion-notify-event", 
-			 G_CALLBACK(pidgin_conv_motion_cb), gtkconv);
-        g_signal_connect(G_OBJECT(event_box), "leave-notify-event", 
-			 G_CALLBACK(pidgin_conv_leave_cb), gtkconv);
-
+	g_signal_connect(G_OBJECT(event_box), "motion-notify-event", 
+			G_CALLBACK(pidgin_conv_motion_cb), gtkconv);
+	g_signal_connect(G_OBJECT(event_box), "leave-notify-event", 
+			G_CALLBACK(pidgin_conv_leave_cb), gtkconv);
 
 	gtkconv->infopane = gtk_cell_view_new();
 	gtkconv->infopane_model = gtk_list_store_new(CONV_NUM_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, GDK_TYPE_PIXBUF);
@@ -4986,6 +5006,9 @@
 	g_list_foreach(gtkconv->send_history, (GFunc)g_free, NULL);
 	g_list_free(gtkconv->send_history);
 
+	if (tooltip.gtkconv == gtkconv)
+		reset_tooltip();
+
 	g_free(gtkconv);
 }
 
@@ -6277,7 +6300,7 @@
 		else
 			title = g_strdup(purple_conversation_get_title(conv));
 
-		if ((truncate = strchr(title, ' ')) || 
+		if (((truncate = strchr(title, ' ')) && strcmp(title, conv->name)) || 
 		    (truncate = strchr(title, '@'))) {
 			truncchar = *truncate;
 			*truncate = '\0';
@@ -6292,16 +6315,19 @@
 				markup = title;
 			}
 		} else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
-			PurpleConvChat *chat = PURPLE_CONV_CHAT(conv);
-			const char *topic = purple_conv_chat_get_topic(chat);
+			const char *topic = gtk_entry_get_text(GTK_ENTRY(gtkconv->u.chat->topic_text));
+			char *esc = topic ? g_markup_escape_text(topic, -1) : NULL;
 			markup = g_strdup_printf("%s%s<span color='%s' size='smaller'>%s</span>",
 						purple_conversation_get_title(conv),
-						topic ? "\n" : "",
+						esc  && *esc ? "\n" : "",
 						pidgin_get_dim_grey_string(gtkconv->infopane),
-						topic ? topic : "");
+						esc ? esc : "");
+			g_free(esc);
 		}
 		gtk_list_store_set(gtkconv->infopane_model, &(gtkconv->infopane_iter),
 				CONV_TEXT_COLUMN, markup, -1);
+	        /* XXX seanegan Why do I have to do this? */
+        	gtk_widget_queue_draw(gtkconv->infopane);
 	
 		if (title != markup)
 			g_free(markup);
@@ -6604,10 +6630,10 @@
                               GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK);
 	g_signal_connect(G_OBJECT(event), "button-press-event",
 					 G_CALLBACK(icon_menu), gtkconv);
-        g_signal_connect(G_OBJECT(event), "motion-notify-event",
-                         G_CALLBACK(pidgin_conv_motion_cb), gtkconv);
-        g_signal_connect(G_OBJECT(event), "leave-notify-event",
-                         G_CALLBACK(pidgin_conv_leave_cb), gtkconv);
+	g_signal_connect(G_OBJECT(event), "motion-notify-event",
+			G_CALLBACK(pidgin_conv_motion_cb), gtkconv);
+	g_signal_connect(G_OBJECT(event), "leave-notify-event",
+			G_CALLBACK(pidgin_conv_leave_cb), gtkconv);
 	gtk_widget_show(event);
 
 	gtkconv->u.im->icon = gtk_image_new_from_pixbuf(scale);
@@ -7179,23 +7205,23 @@
 
 	/* Conversations -> Chat */
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations/chat");
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", 50);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/entry_height", 54);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/userlist_width", 80);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/x", 0);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/y", 0);
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/width", 0);
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/height", 0);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/width", 340);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/chat/height", 390);
 
 	/* Conversations -> IM */
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/conversations/im");
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/x", 0);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/y", 0);
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/width", 0);
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/height", 0);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/width", 340);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/height", 390);
 
 	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/animate_buddy_icons", TRUE);
 
-	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height", 50);
+	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height", 54);
 	purple_prefs_add_bool(PIDGIN_PREFS_ROOT "/conversations/im/show_buddy_icons", TRUE);
 
 	purple_prefs_add_string(PIDGIN_PREFS_ROOT "/conversations/im/hide_new", "never");
@@ -7690,8 +7716,10 @@
 
 		gtkconv = pidgin_conv_window_get_gtkconv_at_index(dest_win, page_num);
 		tab = gtkconv->tabby;
-
-		if (horiz_tabs) {
+		if (gtk_notebook_get_show_tabs(dest_notebook) == FALSE) {
+				dnd_hints_show_relative(HINT_ARROW_DOWN, gtkconv->infopane, HINT_POSITION_CENTER, HINT_POSITION_TOP);
+				dnd_hints_show_relative(HINT_ARROW_UP, gtkconv->infopane, HINT_POSITION_CENTER, HINT_POSITION_BOTTOM);
+		} else if (horiz_tabs) {
 			if (((gpointer)win == (gpointer)dest_win && win->drag_tab < page_num) || to_right) {
 				dnd_hints_show_relative(HINT_ARROW_DOWN, tab, HINT_POSITION_RIGHT, HINT_POSITION_TOP);
 				dnd_hints_show_relative(HINT_ARROW_UP, tab, HINT_POSITION_RIGHT, HINT_POSITION_BOTTOM);
@@ -7738,9 +7766,37 @@
 static gboolean
 infopane_press_cb(GtkWidget *widget, GdkEventButton *e, PidginConversation *gtkconv)
 {
+	if (e->type == GDK_2BUTTON_PRESS && e->button == 1) {
+		if (alias_double_click_cb(widget, e, gtkconv))
+			return TRUE;
+	}
+
 	if (e->type != GDK_BUTTON_PRESS)
 		return FALSE;
 
+	if (e->button == 1) {
+		int nb_x, nb_y;
+
+		if (gtkconv->win->in_drag)
+			return TRUE;
+
+		gtkconv->win->in_predrag = TRUE;
+		gtkconv->win->drag_tab = gtk_notebook_page_num(GTK_NOTEBOOK(gtkconv->win->notebook), gtkconv->tab_cont);
+
+		gdk_window_get_origin(gtkconv->infopane_hbox->window, &nb_x, &nb_y);
+
+		gtkconv->win->drag_min_x = gtkconv->infopane_hbox->allocation.x + nb_x;
+		gtkconv->win->drag_min_y = gtkconv->infopane_hbox->allocation.y + nb_y;
+		gtkconv->win->drag_max_x = gtkconv->infopane_hbox->allocation.width + gtkconv->win->drag_min_x;
+		gtkconv->win->drag_max_y = gtkconv->infopane_hbox->allocation.height + gtkconv->win->drag_min_y;
+
+		gtkconv->win->drag_motion_signal = g_signal_connect(G_OBJECT(gtkconv->win->notebook), "motion_notify_event",
+								    G_CALLBACK(notebook_motion_cb), gtkconv->win);
+		gtkconv->win->drag_leave_signal = g_signal_connect(G_OBJECT(gtkconv->win->notebook), "leave_notify_event",
+								    G_CALLBACK(notebook_leave_cb), gtkconv->win);
+		return FALSE;
+	}
+	
 	if (e->button == 3) {
 		/* Right click was pressed. Popup the Send To menu. */
 		GtkWidget *menu = gtk_menu_new(), *sub;
@@ -8119,7 +8175,7 @@
 {
 	g_signal_handlers_disconnect_matched(G_OBJECT(entry), G_SIGNAL_MATCH_DATA,
 				0, 0, NULL, NULL, gtkconv);
-	gtk_widget_show(gtkconv->tab_label);
+	gtk_widget_show(gtkconv->infopane);
 	gtk_widget_grab_focus(gtkconv->entry);
 	gtk_widget_destroy(entry);
 }
@@ -8166,21 +8222,18 @@
 		}
 		serv_alias_buddy(buddy);
 	} else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {	        
-		PurpleChat *chat;
-
-		chat = purple_blist_find_chat(account, name);
-		if (chat != NULL) {
-			purple_blist_alias_chat(chat,
-			                        gtk_entry_get_text(entry));
-		}
+		gtk_entry_set_text(GTK_ENTRY(gtkconv->u.chat->topic_text), gtk_entry_get_text(entry));
+		topic_callback(NULL, gtkconv);
 	}
 	remove_edit_entry(user_data, GTK_WIDGET(entry));
 }
 
 static gboolean
-alias_double_click_cb(GtkNotebook *notebook, GdkEventButton *event, PidginConversation *gtkconv)
+alias_double_click_cb(GtkWidget *widget, GdkEventButton *event, PidginConversation *gtkconv)
 {
 	GtkWidget *entry = NULL;
+        PurpleConversation *conv = gtkconv->active_conv;
+	const char *text = NULL;
 
 	if (event->button != 1 || event->type != GDK_2BUTTON_PRESS) {
 		return FALSE;
@@ -8196,6 +8249,15 @@
 		return FALSE;
 	}
 
+	if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM) {
+		PurpleBuddy *buddy = purple_find_buddy(gtkconv->active_conv->account, gtkconv->active_conv->name);
+		if (!buddy)
+			return FALSE;
+		text = purple_buddy_get_contact_alias(buddy);
+	} else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
+		text = purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv));
+	}
+
 	/* alias label */
 	entry = gtk_entry_new();
 	gtk_entry_set_has_frame(GTK_ENTRY(entry), FALSE);
@@ -8204,17 +8266,19 @@
 	gtk_entry_set_alignment(GTK_ENTRY(entry), 0.5);
 #endif
 
-	gtk_box_pack_start(GTK_BOX(gtkconv->tabby), entry, TRUE, TRUE, 0);
+	gtk_box_pack_start(GTK_BOX(gtkconv->infopane_hbox), entry, TRUE, TRUE, 0);
 	/* after the tab label */
-	gtk_box_reorder_child(GTK_BOX(gtkconv->tabby), entry, 2);
+	gtk_box_reorder_child(GTK_BOX(gtkconv->infopane_hbox), entry, 0);
 
 	g_signal_connect(G_OBJECT(entry), "activate", G_CALLBACK(alias_cb), gtkconv);
 	g_signal_connect(G_OBJECT(entry), "focus-out-event", G_CALLBACK(alias_focus_cb), gtkconv);
 	g_signal_connect(G_OBJECT(entry), "key-press-event", G_CALLBACK(alias_key_press_cb), gtkconv);
-	gtk_entry_set_text(GTK_ENTRY(entry),
-			gtk_label_get_text(GTK_LABEL(gtkconv->tab_label)));
+	
+	
+
+	gtk_entry_set_text(GTK_ENTRY(entry), text);
 	gtk_widget_show(entry);
-	gtk_widget_hide(gtkconv->tab_label);
+	gtk_widget_hide(gtkconv->infopane);
 	gtk_widget_grab_focus(entry);
 
 	return FALSE;
--- a/pidgin/gtkimhtml.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/pidgin/gtkimhtml.c	Tue Aug 14 04:52:22 2007 +0000
@@ -388,7 +388,8 @@
 	parent_size_allocate(widget, alloc);
 	
 	/* Don't scroll here if we're in the middle of a smooth scroll */
-	if (scroll && imhtml->scroll_time == NULL)
+	if (scroll && imhtml->scroll_time == NULL &&
+ 	    GTK_WIDGET_REALIZED(imhtml)) 
 		gtk_imhtml_scroll_to_end(imhtml, FALSE);	
 }
 
@@ -2153,8 +2154,9 @@
 			ret = g_string_append(ret, c);
 			e += len;
 		} else {
-			ret = g_string_append_c(ret, *e);
-			e++;
+			gunichar uni = g_utf8_get_char(e);
+			ret = g_string_append_unichar(ret, uni);
+			e = g_utf8_next_char(e);
 		}
 	}
 
--- a/pidgin/gtkprefs.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/pidgin/gtkprefs.c	Tue Aug 14 04:52:22 2007 +0000
@@ -1039,9 +1039,11 @@
 #endif
 
 	vbox = pidgin_make_frame(ret, _("Default Formatting"));
+	gtk_box_set_child_packing(GTK_BOX(vbox->parent), vbox, TRUE, TRUE, 0, GTK_PACK_START);
 
 	frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, NULL);
 	gtk_widget_set_name(imhtml, "pidgin_prefs_font_imhtml");
+	gtk_widget_set_size_request(frame, 300, -1);
 	gtk_imhtml_set_whole_buffer_formatting_only(GTK_IMHTML(imhtml), TRUE);
 	gtk_imhtml_set_format_functions(GTK_IMHTML(imhtml),
 									GTK_IMHTML_BOLD |
--- a/pidgin/gtkrequest.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/pidgin/gtkrequest.c	Tue Aug 14 04:52:22 2007 +0000
@@ -1107,7 +1107,7 @@
 
 	/* Setup the vbox */
 	vbox = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
-	gtk_box_pack_start(GTK_BOX(hbox), vbox, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
 	gtk_widget_show(vbox);
 
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
@@ -1132,6 +1132,8 @@
 		total_fields += g_list_length(purple_request_field_group_get_fields(gl->data));
 
 	if(total_fields > 9) {
+		GtkWidget *hbox_for_spacing, *vbox_for_spacing;
+
 		sw = gtk_scrolled_window_new(NULL, NULL);
 		gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(sw),
 				GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
@@ -1141,8 +1143,19 @@
 		gtk_box_pack_start(GTK_BOX(vbox), sw, TRUE, TRUE, 0);
 		gtk_widget_show(sw);
 
+		hbox_for_spacing = gtk_hbox_new(FALSE, PIDGIN_HIG_BORDER);
+		gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw),
+				hbox_for_spacing);
+		gtk_widget_show(hbox_for_spacing);
+
+		vbox_for_spacing = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
+		gtk_box_pack_start(GTK_BOX(hbox_for_spacing),
+				vbox_for_spacing, TRUE, TRUE, PIDGIN_HIG_BOX_SPACE);
+		gtk_widget_show(vbox_for_spacing);
+
 		vbox2 = gtk_vbox_new(FALSE, PIDGIN_HIG_BORDER);
-		gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), vbox2);
+		gtk_box_pack_start(GTK_BOX(vbox_for_spacing),
+				vbox2, TRUE, TRUE, PIDGIN_HIG_BOX_SPACE);
 		gtk_widget_show(vbox2);
 	} else {
 		vbox2 = vbox;
--- a/pidgin/plugins/win32/winprefs/winprefs.c	Mon Aug 13 23:33:20 2007 +0000
+++ b/pidgin/plugins/win32/winprefs/winprefs.c	Tue Aug 14 04:52:22 2007 +0000
@@ -92,11 +92,7 @@
 	if(!blist)
 		return;
 
-	if(val)
-		SetWindowPos(GDK_WINDOW_HWND(blist->window), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
-	else
-		SetWindowPos(GDK_WINDOW_HWND(blist->window), HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
-
+	gtk_window_set_keep_above(GTK_WINDOW(PIDGIN_BLIST(purple_get_blist())->window), val);
 }
 
 static void blist_dock_cb(gboolean val) {
--- a/po/POTFILES.in	Mon Aug 13 23:33:20 2007 +0000
+++ b/po/POTFILES.in	Tue Aug 14 04:52:22 2007 +0000
@@ -11,6 +11,7 @@
 finch/gntpounce.c
 finch/gntprefs.c
 finch/gntrequest.c
+finch/gntsound.c
 finch/gntstatus.c
 finch/gntui.c
 finch/libgnt/gntbox.c