aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-22 20:07:42 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-07-28 16:00:38 +0800
commit2dcddbe1397ab3ee2cdd84bd146d311d067b8729 (patch)
treea47f8049f00ad0100ea9c458347a8df88563bdf9 /src
parent7cedbcb6d8b8264ba5a35ebb692605fc047e4f27 (diff)
downloadgsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.tar
gsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.tar.gz
gsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.tar.bz2
gsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.tar.lz
gsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.tar.xz
gsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.tar.zst
gsoc2013-empathy-2dcddbe1397ab3ee2cdd84bd146d311d067b8729.zip
CallWindow: move the volume button to the bottom toolbar
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c25
-rw-r--r--src/empathy-call-window.ui8
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
@@ -207,6 +207,14 @@
</packing>
</child>
<child>
+ <object class="GtkToolItem" id="volume">
+ <property name="visible">True</property>
+ </object>
+ <packing>
+ <property name="homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkToggleToolButton" id="microphone">
<property name="visible">True</property>
<property name="active">True</property>