pidgin: 212ddad0: This should fix the 1px bug. If someone ...

sadrul at pidgin.im sadrul at pidgin.im
Sat Mar 15 15:35:47 EDT 2008


-----------------------------------------------------------------
Revision: 212ddad0deea54f08e3194c79d2a60584f60d855
Ancestor: 6a300d6fe3972408fb6a40a314e1343d307c60bd
Author: sadrul at pidgin.im
Date: 2008-03-15T19:39:10
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/212ddad0deea54f08e3194c79d2a60584f60d855

Modified files:
        pidgin/gtkconv.c

ChangeLog: 

This should fix the 1px bug. If someone still sees this bug after this change, please let me know.

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	7057bf38b1eb4bf08b1b783e3a81aa95fdd56a8a
+++ pidgin/gtkconv.c	06f143168588ce9262f440ad9cf7d3edfed8f844
@@ -533,9 +533,6 @@ send_cb(GtkWidget *widget, PidginConvers
 	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 @@ send_cb(GtkWidget *widget, PidginConvers
 	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 @@ update_tab_icon(PurpleConversation *conv
 	}
 }
 
+#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 @@ static gboolean reset_auto_resize_cb(gpo
 	gtkconv->auto_resize = FALSE;
 	return FALSE;
 }
+#endif
 
 static gboolean
 redraw_icon(gpointer data)
@@ -4396,16 +4392,15 @@ static gboolean resize_imhtml_cb(PidginC
 	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 @@ setup_common_pane(PidginConversation *gt
 
 	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);


More information about the Commits mailing list