aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-11 23:04:47 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-12 16:46:23 +0800
commit3535c55225076c649883aa4a497893b1f165a110 (patch)
tree0505d086d7352c05e9fb4b4dc510f9d008311baa /src/empathy-call-window.c
parent70fc920514af12b5c96e928a3178dfd9ddd8ed9e (diff)
downloadgsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.tar
gsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.tar.gz
gsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.tar.bz2
gsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.tar.lz
gsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.tar.xz
gsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.tar.zst
gsoc2013-empathy-3535c55225076c649883aa4a497893b1f165a110.zip
CallWindow: properly determine the sidebar width
The first time we show the sidebar, gtk_widget_get_allocation() doesn't return the correct width as the allocation hasn't been done yet. So use gtk_widget_get_preferred_width() as the minimum width is what is actually allocated.
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 5103eb901..091a6e3c7 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -2859,8 +2859,8 @@ empathy_call_window_show_sidebar (EmpathyCallWindow *window,
gboolean active)
{
EmpathyCallWindowPriv *priv = GET_PRIV (window);
- int w, h, handle_size;
- GtkAllocation allocation, sidebar_allocation;
+ int w, h, sidebar_width, handle_size;
+ GtkAllocation allocation;
gchar *page;
gboolean dialpad_shown;
@@ -2870,16 +2870,16 @@ empathy_call_window_show_sidebar (EmpathyCallWindow *window,
gtk_widget_style_get (priv->pane, "handle_size", &handle_size, NULL);
- gtk_widget_get_allocation (priv->sidebar, &sidebar_allocation);
+ gtk_widget_get_preferred_width (priv->sidebar, &sidebar_width, NULL);
if (active)
{
gtk_widget_show (priv->sidebar);
- w += sidebar_allocation.width + handle_size;
+ w += sidebar_width + handle_size;
}
else
{
- w -= sidebar_allocation.width + handle_size;
+ w -= sidebar_width + handle_size;
gtk_widget_hide (priv->sidebar);
}