/pidgin/main: b6c76bcadbe8: Probably fix the statusbox sizing.

Elliott Sales de Andrade qulogic at pidgin.im
Tue Jul 24 04:03:46 EDT 2012


Changeset: b6c76bcadbe8b8da506cbc493b4568f629296099
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2012-06-25 01:06 -0400
Branch:	 cpw.qulogic.gtk3-required
URL: http://hg.pidgin.im/pidgin/main/rev/b6c76bcadbe8

Description:

Probably fix the statusbox sizing.

Using the stored boolean about the entry visibility seems to work
better than checking the size of the vbox containing it.

diffstat:

 pidgin/gtkstatusbox.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (37 lines):

diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c
--- a/pidgin/gtkstatusbox.c
+++ b/pidgin/gtkstatusbox.c
@@ -1942,14 +1942,16 @@
 	*natural_height = MAX(*natural_height, 34) + border_width * 2;
 
 	/* If the gtkimhtml is visible, then add some additional padding */
-	gtk_widget_get_preferred_height(PIDGIN_STATUS_BOX(widget)->vbox,
-		&box_min_height, &box_nat_height);
-
-	if (box_min_height > 1)
-		*minimum_height += box_min_height + border_width * 2;
-
-	if (box_nat_height > 1)
-		*natural_height += box_nat_height + border_width * 2;
+	if (PIDGIN_STATUS_BOX(widget)->imhtml_visible) {
+		gtk_widget_get_preferred_height(PIDGIN_STATUS_BOX(widget)->vbox,
+			&box_min_height, &box_nat_height);
+
+		if (box_min_height > 1)
+			*minimum_height += box_min_height + border_width * 2;
+
+		if (box_nat_height > 1)
+			*natural_height += box_nat_height + border_width * 2;
+	}
 }
 
 /* From gnome-panel */
@@ -2039,8 +2041,6 @@
 	}
 	gtk_widget_size_allocate(status_box->toggle_button, &parent_alc);
   	gtk_widget_set_allocation(GTK_WIDGET(status_box), allocation);
-	purple_debug_info("pidgin", "statusbox allocation: width = %d, height = %d\n",
-	                  allocation->width, allocation->height);
 }
 
 static gboolean



More information about the Commits mailing list