libbonoboui toolbar bugs



Hi Michael,
	Here's a patch to fix some weirdness with the bonobo toolbars
- you can reproduce the weirdness by playing around with
samples/bonoboui/bonobo-hello.

	May I commit?

Cheers,
Mark.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libbonoboui/ChangeLog,v
retrieving revision 1.162
diff -u -p -r1.162 ChangeLog
--- ChangeLog	2001/11/04 23:09:30	1.162
+++ ChangeLog	2001/11/05 15:04:26
@@ -1,3 +1,12 @@
+2001-11-05  Mark McLoughlin  <mark skynet ie>
+
+	* bonobo/bonobo-ui-toolbar.c: (size_allocate_helper):
+	don't assume we have to be the last widget on the list to
+	be the last visible widget.
+
+	* bonobo/bonobo-ui-toolbar-popup-item.c: (impl_set_orientation):
+	don't unref pixbuf.
+
 2001-11-05  Michael Meeks  <michael ximian com>

 	* Version 1.106.0
Index: bonobo/bonobo-ui-toolbar-popup-item.c
===================================================================
RCS file: /cvs/gnome/libbonoboui/bonobo/bonobo-ui-toolbar-popup-item.c,v
retrieving revision 1.6
diff -u -p -r1.6 bonobo-ui-toolbar-popup-item.c
--- bonobo/bonobo-ui-toolbar-popup-item.c	2001/04/24 21:40:07	1.6
+++ bonobo/bonobo-ui-toolbar-popup-item.c	2001/11/05 15:04:26
@@ -93,7 +93,6 @@ impl_set_orientation (BonoboUIToolbarIte

 	icon = get_icon_for_orientation (popup_item);
 	image = gtk_image_new_from_pixbuf (icon);
-	gdk_pixbuf_unref (icon);

 	bonobo_ui_toolbar_button_item_set_image (BONOBO_UI_TOOLBAR_BUTTON_ITEM (item), image);
 }
Index: bonobo/bonobo-ui-toolbar.c
===================================================================
RCS file: /cvs/gnome/libbonoboui/bonobo/bonobo-ui-toolbar.c,v
retrieving revision 1.45
diff -u -p -r1.45 bonobo-ui-toolbar.c
--- bonobo/bonobo-ui-toolbar.c	2001/11/04 23:09:31	1.45
+++ bonobo/bonobo-ui-toolbar.c	2001/11/05 15:04:26
@@ -603,7 +603,8 @@ size_allocate_helper (BonoboUIToolbar *t
 	child_allocation.y = allocation->y + border_width;

 	for (p = priv->items; p != NULL; p = p->next) {
-		int item_size;
+		int    item_size;
+		GList *l;

 		item = BONOBO_UI_TOOLBAR_ITEM (p->data);
 		if (! GTK_WIDGET_VISIBLE (item) || GTK_WIDGET (item)->parent != GTK_WIDGET (toolbar) ||
@@ -617,7 +618,16 @@ size_allocate_helper (BonoboUIToolbar *t
 		else
 			item_size = child_requisition.height;

-		if (p->next == NULL) {
+		for (l = p->next; l; l = l->next) {
+			GtkWidget *widget = GTK_WIDGET (l->data);
+
+			if (GTK_WIDGET_VISIBLE (widget) &&
+			    widget->parent == GTK_WIDGET (toolbar) &&
+			    ! bonobo_ui_toolbar_item_get_pack_end (BONOBO_UI_TOOLBAR_ITEM (widget)))
+				break;
+		}
+
+		if (!l) {
 			if (space_required + item_size > available_space)
 				break;
 		} else {




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