changeset 22472:7a815907ba5a

merge of '6db190b488381b25d0ad373ee417bc219d49b6bf' and 'b3930a1430bfa8b0e784f0337ba5374066f6fc52'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 15 Mar 2008 19:41:30 +0000
parents d5d95a852a1c (current diff) fa8739314372 (diff)
children ed786719b10a 9511acb88e58 2f691e22f0d8
files
diffstat 1 files changed, 6 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sat Mar 15 18:36:04 2008 +0000
+++ b/pidgin/gtkconv.c	Sat Mar 15 19:41:30 2008 +0000
@@ -533,9 +533,6 @@
 	account = purple_conversation_get_account(conv);
 
 	if (check_for_and_do_command(conv)) {
-		if (gtkconv->entry_growing) {
-			gtkconv->entry_growing = FALSE;
-		}
 		gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry));
 		return;
 	}
@@ -592,9 +589,6 @@
 	g_free(buf);
 
 	gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry));
-	if (gtkconv->entry_growing) {
-		gtkconv->entry_growing = FALSE;
-	}
 	gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
 }
 
@@ -2520,6 +2514,7 @@
 	}
 }
 
+#if 0
 /* This gets added as an idle handler when doing something that
  * redraws the icon. It sets the auto_resize gboolean to TRUE.
  * This way, when the size_allocate callback gets triggered, it notices
@@ -2532,6 +2527,7 @@
 	gtkconv->auto_resize = FALSE;
 	return FALSE;
 }
+#endif
 
 static gboolean
 redraw_icon(gpointer data)
@@ -4396,16 +4392,15 @@
 	if (wrapped_lines > lines)
 		height += (oneline.height + pad_inside) * (wrapped_lines - lines);
 
-	gtkconv->auto_resize = TRUE;
-	g_idle_add(reset_auto_resize_cb, gtkconv);
-
 	diff = height - gtkconv->entry->allocation.height;
+	if (diff == 0)
+		return FALSE;
 
 	gtk_widget_size_request(gtkconv->lower_hbox, &sr);
-	gtkconv->entry_growing = TRUE;
 
 	gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
 		diff + gtkconv->lower_hbox->allocation.height);
+
 	return FALSE;
 }
 
@@ -4736,7 +4731,7 @@
 
 	g_signal_connect_swapped(G_OBJECT(gtkconv->entry_buffer), "changed",
 				 G_CALLBACK(resize_imhtml_cb), gtkconv);
-	g_signal_connect_swapped(G_OBJECT(gtkconv->entry), "realize",
+	g_signal_connect_swapped(G_OBJECT(gtkconv->entry), "size-allocate",
 				 G_CALLBACK(resize_imhtml_cb), gtkconv);
 
 	default_formatize(gtkconv);