Manually add the GtkVolumeButton to the toolbar instead of fitting an empty hole...
authorGuillaume Desmottes <gdesmott@gnome.org>
Mon, 16 Feb 2009 21:24:50 +0000 (21:24 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 16 Feb 2009 21:24:50 +0000 (21:24 +0000)
From: Guillaume Desmottes <gdesmott@gnome.org>

svn path=/trunk/; revision=2481

src/empathy-call-window.c
src/empathy-call-window.glade

index 24d88e6465bc2ca57bd13f22f9f157422f862226..f8c32a9c80ec93c722e351a0fd2932b42a0f7c81 100644 (file)
@@ -120,9 +120,10 @@ empathy_call_window_setup_toolbar (EmpathyCallWindow *self)
   EmpathyCallWindowPriv *priv = GET_PRIV (self);
   GtkWidget *hangup;
   GtkWidget *mic;
-  GtkWidget *volume;
   GtkWidget *volume_button;
   GtkWidget *camera;
+  GtkWidget *toolbar;
+  GtkToolItem *tool_item;
 
   hangup = glade_xml_get_widget (priv->glade, "hangup");
 
@@ -132,10 +133,14 @@ empathy_call_window_setup_toolbar (EmpathyCallWindow *self)
   mic = glade_xml_get_widget (priv->glade, "microphone");
   gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (mic), TRUE);
 
-  volume = glade_xml_get_widget (priv->glade, "volume");
+  toolbar = glade_xml_get_widget (priv->glade, "toolbar1");
+
+  tool_item = gtk_tool_item_new ();
   volume_button = gtk_volume_button_new ();
-  gtk_container_add (GTK_CONTAINER (volume), volume_button);
+  gtk_container_add (GTK_CONTAINER (tool_item), volume_button);
   gtk_scale_button_set_value (GTK_SCALE_BUTTON (volume_button), 0.5);
+  gtk_widget_show_all (GTK_WIDGET (tool_item));
+  gtk_toolbar_insert (GTK_TOOLBAR (toolbar), tool_item, -1);
 
   camera = glade_xml_get_widget (priv->glade, "camera");
   gtk_toggle_tool_button_set_active (GTK_TOGGLE_TOOL_BUTTON (camera), FALSE);
index 8d119567546d1d6db636794fff71cd74adc0db32..c1238f32ee02194ab72ff62db8bef504bc8951d0 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Mon Feb 16 11:33:04 2009 -->
+<!--Generated with glade3 3.4.5 on Mon Feb 16 12:20:49 2009 -->
 <glade-interface>
   <widget class="GtkWindow" id="call_window">
     <child>
                 <property name="homogeneous">True</property>
               </packing>
             </child>
-            <child>
-              <widget class="GtkToolItem" id="volume">
-                <property name="visible">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-              <packing>
-                <property name="homogeneous">True</property>
-              </packing>
-            </child>
             <child>
               <widget class="GtkToggleToolButton" id="camera">
                 <property name="visible">True</property>