]> git.0d.be Git - empathy.git/commitdiff
CallWindow: move the volume button to the bottom toolbar
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Fri, 22 Jul 2011 12:07:42 +0000 (13:07 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 28 Jul 2011 08:00:38 +0000 (09:00 +0100)
src/empathy-call-window.c
src/empathy-call-window.ui

index 92baf6de0e86f7f1fe9ef0b9da8fe9f8df916292..f7eab4aea006c2fa37d4e8b49410123f91fff906 100644 (file)
@@ -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,
index 1d58bcbfbacb07f6e03a352007134e5fe75d4cd0..3258ae6ba395e21eebe7d8e3464bb77a9d3c4e8b 100644 (file)
                 <property name="homogeneous">True</property>
               </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>