aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-call-window.c
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-03-09 04:18:54 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-09 04:18:54 +0800
commit60f876b5bbcd43116d09e7655cd4be0b673a6ec2 (patch)
tree4d5b23f6acfa8f8a3e3091e497ca5aa94dee871c /src/empathy-call-window.c
parent1a4c1a5a31e2d2b7c8dc6c6f22100dd385132e05 (diff)
downloadgsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.tar
gsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.tar.gz
gsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.tar.bz2
gsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.tar.lz
gsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.tar.xz
gsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.tar.zst
gsoc2013-empathy-60f876b5bbcd43116d09e7655cd4be0b673a6ec2.zip
Make the sidebar nicely pop in and out
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2645
Diffstat (limited to 'src/empathy-call-window.c')
-rw-r--r--src/empathy-call-window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index cfa65f7d3..99b273fd4 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -1118,19 +1118,32 @@ empathy_call_window_sidebar_toggled_cb (GtkToggleButton *toggle,
{
EmpathyCallWindowPriv *priv = GET_PRIV (window);
GtkWidget *arrow;
+ GtkWidget *pane;
+ int w,h, handle_size;
+
+ w = GTK_WIDGET (window)->allocation.width;
+ h = GTK_WIDGET (window)->allocation.height;
+
+ pane = glade_xml_get_widget (priv->glade, "pane");
+ gtk_widget_style_get (pane, "handle_size", &handle_size, NULL);
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;
}
else
{
arrow = gtk_arrow_new (GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
+ w -= priv->sidebar->allocation.width + handle_size;
gtk_widget_hide (priv->sidebar);
}
gtk_button_set_image (GTK_BUTTON (priv->sidebar_button), arrow);
+
+ if (w > 0 && h > 0)
+ gtk_window_resize (GTK_WINDOW (window), w, h);
}
static void