[nautilus] [src] GSEAL nautilus-side-pane.



commit 24b94447cb798ee03c9d21973f2d650c4cec2ad9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jun 11 13:23:16 2010 +0200

    [src] GSEAL nautilus-side-pane.

 src/nautilus-side-pane.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-side-pane.c b/src/nautilus-side-pane.c
index 85601ce..23dbb23 100644
--- a/src/nautilus-side-pane.c
+++ b/src/nautilus-side-pane.c
@@ -128,7 +128,7 @@ nautilus_side_pane_size_allocate (GtkWidget *widget,
 				  GtkAllocation *allocation)
 {
 	int width;
-	GtkAllocation child_allocation;
+	GtkAllocation child_allocation, frame_allocation;
 	NautilusSidePane *pane;
 	GtkWidget *frame;
 	GtkWidget *hbox;
@@ -143,8 +143,9 @@ nautilus_side_pane_size_allocate (GtkWidget *widget,
 	gtk_widget_get_child_requisition (hbox, &child_requisition);
 	width = child_requisition.width;
 
-	child_allocation = frame->allocation;
-	child_allocation.width = MAX (width, frame->allocation.width);
+	gtk_widget_get_allocation (frame, &frame_allocation);
+	child_allocation = frame_allocation;
+	child_allocation.width = MAX (width, frame_allocation.width);
 
 	gtk_widget_size_allocate (frame, &child_allocation);
 }
@@ -208,16 +209,18 @@ menu_position_under (GtkMenu *menu,
 		     gpointer user_data)
 {
 	GtkWidget *widget;
+	GtkAllocation allocation;
 	
 	g_return_if_fail (GTK_IS_BUTTON (user_data));
 	g_return_if_fail (!gtk_widget_get_has_window (GTK_WIDGET (user_data)));
 
 	widget = GTK_WIDGET (user_data);
 	
-	gdk_window_get_origin (widget->window, x, y);
+	gdk_window_get_origin (gtk_widget_get_window (widget), x, y);
+	gtk_widget_get_allocation (widget, &allocation);
 	
-	*x += widget->allocation.x;
-	*y += widget->allocation.y + widget->allocation.height;
+	*x += allocation.x;
+	*y += allocation.y + allocation.height;
 
 	*push_in = FALSE;
 }



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