diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-03-31 19:09:00 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-03-31 19:09:00 (GMT) |
commit | 80aa207c49dda77a013f0df2a2e2a393062a96b6 (patch) | |
tree | 8bc68cd259cd466866c1713547fd32f12654201a /shell/ev-sidebar.c | |
parent | 7e11393f41b7c3df86e1562bcc08a42b05c19a6f (diff) |
[shell] Fix build with GSEAL_ENABLE
Diffstat (limited to 'shell/ev-sidebar.c')
-rw-r--r-- | shell/ev-sidebar.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/shell/ev-sidebar.c b/shell/ev-sidebar.c index 23d51f9..fd977e0 100644 --- a/shell/ev-sidebar.c +++ b/shell/ev-sidebar.c @@ -205,17 +205,19 @@ ev_sidebar_menu_position_under (GtkMenu *menu, gboolean *push_in, gpointer user_data) { - GtkWidget *widget; + 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; } @@ -229,9 +231,11 @@ ev_sidebar_select_button_press_cb (GtkWidget *widget, if (event->button == 1) { GtkRequisition requisition; + GtkAllocation allocation; gint width; - - width = widget->allocation.width; + + gtk_widget_get_allocation (widget, &allocation); + width = allocation.width; gtk_widget_set_size_request (ev_sidebar->priv->menu, -1, -1); gtk_widget_size_request (ev_sidebar->priv->menu, &requisition); gtk_widget_set_size_request (ev_sidebar->priv->menu, |