From 2dcddbe1397ab3ee2cdd84bd146d311d067b8729 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Fri, 22 Jul 2011 13:07:42 +0100 Subject: CallWindow: move the volume button to the bottom toolbar --- src/empathy-call-window.c | 25 +++++++++---------------- src/empathy-call-window.ui | 8 ++++++++ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 92baf6de0..f7eab4aea 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -122,7 +122,7 @@ struct _EmpathyCallWindowPriv GtkWidget *remote_user_avatar_widget; GtkWidget *sidebar; GtkWidget *statusbar; - GtkWidget *volume_button; + GtkWidget *volume_item; GtkWidget *redial_button; GtkWidget *mic_button; GtkWidget *camera_button; @@ -289,27 +289,19 @@ static void empathy_call_window_setup_toolbar (EmpathyCallWindow *self) { EmpathyCallWindowPriv *priv = GET_PRIV (self); - GtkToolItem *tool_item; - - /* Add an empty expanded GtkToolItem so the volume button is at the end of - * the toolbar. */ - tool_item = gtk_tool_item_new (); - gtk_tool_item_set_expand (tool_item, TRUE); - gtk_widget_show (GTK_WIDGET (tool_item)); - gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), tool_item, -1); + GtkWidget *volume_button; - priv->volume_button = gtk_volume_button_new (); + volume_button = gtk_volume_button_new (); /* FIXME listen to the audiosinks signals and update the button according to * that, for now starting out at 1.0 and assuming only the app changes the * volume will do */ - gtk_scale_button_set_value (GTK_SCALE_BUTTON (priv->volume_button), 1.0); - g_signal_connect (G_OBJECT (priv->volume_button), "value-changed", + gtk_scale_button_set_value (GTK_SCALE_BUTTON (volume_button), 1.0); + g_signal_connect (G_OBJECT (volume_button), "value-changed", G_CALLBACK (empathy_call_window_volume_changed_cb), self); - tool_item = gtk_tool_item_new (); - gtk_container_add (GTK_CONTAINER (tool_item), priv->volume_button); - gtk_widget_show_all (GTK_WIDGET (tool_item)); - gtk_toolbar_insert (GTK_TOOLBAR (priv->toolbar), tool_item, -1); + gtk_container_add (GTK_CONTAINER (priv->volume_item), + volume_button); + gtk_widget_show (GTK_WIDGET (volume_button)); } static void @@ -979,6 +971,7 @@ empathy_call_window_init (EmpathyCallWindow *self) "pane", &priv->pane, "statusbar", &priv->statusbar, "redial", &priv->redial_button, + "volume", &priv->volume_item, "microphone", &priv->mic_button, "camera", &priv->camera_button, "dialpad", &priv->dialpad_button, diff --git a/src/empathy-call-window.ui b/src/empathy-call-window.ui index 1d58bcbfb..3258ae6ba 100644 --- a/src/empathy-call-window.ui +++ b/src/empathy-call-window.ui @@ -206,6 +206,14 @@ True + + + True + + + True + + True -- cgit v1.2.3