[anjuta] libanjuta: Fix a Gtk-Warning in AnjutaTabber



commit 216f0df1d181a1e878e0bbb5d40dcfc00338aa26
Author: Johannes Schmid <jhs gnome org>
Date:   Fri Jun 10 12:38:49 2011 +0200

    libanjuta: Fix a Gtk-Warning in AnjutaTabber

 libanjuta/anjuta-tabber.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libanjuta/anjuta-tabber.c b/libanjuta/anjuta-tabber.c
index ea5787f..7e7a7cf 100644
--- a/libanjuta/anjuta-tabber.c
+++ b/libanjuta/anjuta-tabber.c
@@ -313,6 +313,10 @@ anjuta_tabber_size_allocate(GtkWidget* widget, GtkAllocation* allocation)
 		/* Check if we have enough space for all widgets natural size */
 		child_equal = real_width / n_children - 
 			 n_children * 2 * (padding + tab_space) - 2 * tab_overlap;
+
+		if (child_equal < 0)
+			return;
+		
 		for (child = tabber->priv->children; child != NULL; child = g_list_next (child))
 		{
 			GtkWidget* child_widget = GTK_WIDGET (child->data);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]