diff options
author | Javier Jardón <jjardon@gnome.org> | 2009-11-13 13:29:35 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2009-11-17 07:53:40 +0800 |
commit | 6f9fe3b417a3870ce48288f1273843af05d39624 (patch) | |
tree | bf9836bcf0e67793ee18e3beca4835880ed656aa /src/empathy-sidebar.c | |
parent | e836a987945a601d70082eef2c6f2fd6796c4fd3 (diff) | |
download | gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.gz gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.bz2 gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.lz gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.xz gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.tar.zst gsoc2013-empathy-6f9fe3b417a3870ce48288f1273843af05d39624.zip |
Use accessor functions instead direct access.
Some functions still remaining because there is not API
in GTK+ 2.19.0 yet.
http://bugzilla.gnome.org/show_bug.cgi?id=586476
Reviewed-By: Danielle Madeley <danielle.madeley@collabora.co.uk>
Diffstat (limited to 'src/empathy-sidebar.c')
-rw-r--r-- | src/empathy-sidebar.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/empathy-sidebar.c b/src/empathy-sidebar.c index 11fcbd6bb..7960c4ad9 100644 --- a/src/empathy-sidebar.c +++ b/src/empathy-sidebar.c @@ -238,16 +238,18 @@ empathy_sidebar_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_NO_WINDOW (user_data)); + g_return_if_fail (gtk_widget_get_has_window (user_data)); widget = GTK_WIDGET (user_data); gdk_window_get_origin (gtk_widget_get_window (widget), x, y); - *x += widget->allocation.x; - *y += widget->allocation.y + widget->allocation.height; + gtk_widget_get_allocation (widget, &allocation); + *x += allocation.x; + *y += allocation.y + allocation.height; *push_in = FALSE; } @@ -263,8 +265,10 @@ empathy_sidebar_select_button_press_cb (GtkWidget *widget, { GtkRequisition requisition; gint width; + GtkAllocation allocation; - width = widget->allocation.width; + gtk_widget_get_allocation (widget, &allocation); + width = allocation.width; gtk_widget_set_size_request (sidebar->priv->menu, -1, -1); gtk_widget_size_request (sidebar->priv->menu, &requisition); |