changeset 27794:92e4a9dce972

catch up with recent gtkconv change
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sun, 16 Mar 2008 19:36:12 +0000
parents 2f691e22f0d8
children 84d01400c3f0
files pidgin/gtkconv.c
diffstat 1 files changed, 6 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sun Mar 16 01:05:01 2008 +0000
+++ b/pidgin/gtkconv.c	Sun Mar 16 19:36:12 2008 +0000
@@ -460,6 +460,7 @@
 	gtkconv->send_history = g_list_prepend(first, NULL);
 }
 
+#if 0
 static void
 reset_default_size(PidginConversation *gtkconv)
 {
@@ -471,6 +472,7 @@
 		gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
 					    purple_prefs_get_int(PIDGIN_PREFS_ROOT "/conversations/im/entry_height"));
 }
+#endif
 
 static gboolean
 check_for_and_do_command(PurpleConversation *conv)
@@ -587,10 +589,6 @@
 	account = purple_conversation_get_account(conv);
 
 	if (check_for_and_do_command(conv)) {
-		if (gtkconv->entry_growing) {
-			reset_default_size(gtkconv);
-			gtkconv->entry_growing = FALSE;
-		}
 		gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry));
 		return;
 	}
@@ -647,10 +645,6 @@
 	g_free(buf);
 
 	gtk_imhtml_clear(GTK_IMHTML(gtkconv->entry));
-	if (gtkconv->entry_growing) {
-		reset_default_size(gtkconv);
-		gtkconv->entry_growing = FALSE;
-	}
 	gtkconv_set_unseen(gtkconv, PIDGIN_UNSEEN_NONE);
 }
 
@@ -4473,18 +4467,13 @@
 		height += (oneline.height + pad_inside) * (wrapped_lines - lines);
 
 	diff = height - gtkconv->entry->allocation.height;
-	if (diff == 0)
-		return FALSE;
+
+	if (diff <= 0)
+		return;
 
 	gtk_widget_size_request(gtkconv->lower_hbox, &sr);
-	gtkconv->entry_growing = TRUE;
-
-	/* uncomment this to auto resize even after the user manually
-	   resizes
-	gtk_paned_set_position(GTK_PANED(gtkconv->lower_hbox->parent->parent), -1);
-	*/
 	gtk_widget_set_size_request(gtkconv->lower_hbox, -1,
-		diff + gtkconv->lower_hbox->allocation.height);
+				    diff + gtkconv->lower_hbox->allocation.height);
 }
 
 static void