Insert an empty widget in chat windows to ensure that the infopane is

Mon, 18 May 2009 21:05:00 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Mon, 18 May 2009 21:05:00 +0000
changeset 27097
ca25e07a6473
parent 27096
d3c7ba0732a0
child 27098
88ad7520c86f

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.

pidgin/gtkconv.c file | annotate | diff | comparison | revisions
--- 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),

mercurial