aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2009-11-13 13:29:35 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2009-11-17 07:53:40 +0800
commit6f9fe3b417a3870ce48288f1273843af05d39624 (patch)
treebf9836bcf0e67793ee18e3beca4835880ed656aa /src/empathy-call-window.c
parente836a987945a601d70082eef2c6f2fd6796c4fd3 (diff)
downloadgsoc2013-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-call-window.c')
-rw-r--r--src/empathy-call-window.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 07cad91f6..e1f8cd268 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2086,8 +2086,12 @@ empathy_call_window_state_event_cb (GtkWidget *widget,
if (set_fullscreen)
{
gboolean sidebar_was_visible;
- gint original_width = GTK_WIDGET (window)->allocation.width;
- gint original_height = GTK_WIDGET (window)->allocation.height;
+ GtkAllocation allocation;
+ gint original_width, original_height;
+
+ gtk_widget_get_allocation (GTK_WIDGET (window), &allocation);
+ original_width = allocation.width;
+ original_height = allocation.height;
g_object_get (priv->sidebar, "visible", &sidebar_was_visible, NULL);
@@ -2132,23 +2136,26 @@ empathy_call_window_sidebar_toggled_cb (GtkToggleButton *toggle,
{
EmpathyCallWindowPriv *priv = GET_PRIV (window);
GtkWidget *arrow;
- int w,h, handle_size;
+ int w, h, handle_size;
+ GtkAllocation allocation, sidebar_allocation;
- w = GTK_WIDGET (window)->allocation.width;
- h = GTK_WIDGET (window)->allocation.height;
+ gtk_widget_get_allocation (GTK_WIDGET (window), &allocation);
+ w = allocation.width;
+ h = allocation.height;
gtk_widget_style_get (priv->pane, "handle_size", &handle_size, NULL);
+ gtk_widget_get_allocation (priv->sidebar, &sidebar_allocation);
if (gtk_toggle_button_get_active (toggle))
{
arrow = gtk_arrow_new (GTK_ARROW_LEFT, GTK_SHADOW_NONE);
gtk_widget_show (priv->sidebar);
- w += priv->sidebar->allocation.width + handle_size;
+ w += sidebar_allocation.width + handle_size;
}
else
{
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
- w -= priv->sidebar->allocation.width + handle_size;
+ w -= sidebar_allocation.width + handle_size;
gtk_widget_hide (priv->sidebar);
}