changeset 26987:1735d1c88d4e

Insert an empty widget in chat windows to ensure that the infopane is correctly sized for chat windows. The correct fix is to put an icon in the chat window as well, because that would make "Set Custom Icon" consistent for both the buddy list and the chat window, but PidginConversation is pretty much stuck until 3.0.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 18 May 2009 21:05:00 +0000
parents d62b94408a00
children 6db0d455813b
files pidgin/gtkconv.c
diffstat 1 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Mon May 18 08:10:17 2009 +0000
+++ b/pidgin/gtkconv.c	Mon May 18 21:05:00 2009 +0000
@@ -4637,6 +4637,7 @@
 		gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
 
 		gtkchat->topic_text = gtk_entry_new();
+		gtk_widget_set_size_request(gtkchat->topic_text, -1, BUDDYICON_SIZE_MIN);
 
 		if(prpl_info->set_chat_topic == NULL) {
 			gtk_editable_set_editable(GTK_EDITABLE(gtkchat->topic_text), FALSE);
@@ -4855,7 +4856,19 @@
 	gtk_cell_view_set_displayed_row(GTK_CELL_VIEW(gtkconv->infopane), path);
 	gtk_tree_path_free(path);
 
-	if (!chat) {
+	if (chat) {
+		/* This empty widget is used to ensure that the infopane is consistently
+		   sized for chat windows. The correct fix is to put an icon in the chat
+		   window as well, because that would make "Set Custom Icon" consistent
+		   for both the buddy list and the chat window, but PidginConversation
+		   is pretty much stuck until 3.0. */
+		GtkWidget *sizing_vbox;
+		sizing_vbox = gtk_vbox_new(FALSE, 0);
+		gtk_widget_set_size_request(sizing_vbox, -1, BUDDYICON_SIZE_MIN);
+		gtk_box_pack_start(GTK_BOX(gtkconv->infopane_hbox), sizing_vbox, FALSE, FALSE, 0);
+		gtk_widget_show(sizing_vbox);
+	}
+	else {
 		gtkconv->u.im->icon_container = gtk_vbox_new(FALSE, 0);
 
 		if ((buddy = purple_find_buddy(purple_conversation_get_account(conv),