]> git.0d.be Git - empathy.git/commitdiff
Preferences: add a Calls tab
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Wed, 27 Jul 2011 11:20:54 +0000 (12:20 +0100)
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>
Thu, 28 Jul 2011 09:24:42 +0000 (10:24 +0100)
It only contains the micro volume for now.

src/empathy-preferences.c
src/empathy-preferences.ui

index 9db4739d6ed0d4d0c28b6c52613edaa6abad5bcb..121a090c41b61d67841746444181b8742430decf 100644 (file)
@@ -75,6 +75,8 @@ struct _EmpathyPreferencesPriv {
        GtkWidget *checkbutton_notifications_contact_signin;
        GtkWidget *checkbutton_notifications_contact_signout;
 
+       GtkWidget *adj_call_volume;
+
        GtkWidget *treeview_spell_checker;
 
        GtkWidget *checkbutton_location_publish;
@@ -93,6 +95,7 @@ struct _EmpathyPreferencesPriv {
 
        GSettings *gsettings;
        GSettings *gsettings_chat;
+       GSettings *gsettings_call;
        GSettings *gsettings_loc;
        GSettings *gsettings_notify;
        GSettings *gsettings_sound;
@@ -259,6 +262,12 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
                         "active",
                         G_SETTINGS_BIND_DEFAULT);
 
+       g_settings_bind (priv->gsettings_call,
+                        EMPATHY_PREFS_CALL_SOUND_VOLUME,
+                        priv->adj_call_volume,
+                        "value",
+                        G_SETTINGS_BIND_DEFAULT);
+
        g_settings_bind (priv->gsettings,
                         EMPATHY_PREFS_AUTOCONNECT,
                         priv->checkbutton_autoconnect,
@@ -1094,6 +1103,7 @@ empathy_preferences_finalize (GObject *self)
 
        g_object_unref (priv->gsettings);
        g_object_unref (priv->gsettings_chat);
+       g_object_unref (priv->gsettings_call);
        g_object_unref (priv->gsettings_loc);
        g_object_unref (priv->gsettings_notify);
        g_object_unref (priv->gsettings_sound);
@@ -1166,6 +1176,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
                "checkbutton_location_resource_network", &priv->checkbutton_location_resource_network,
                "checkbutton_location_resource_cell", &priv->checkbutton_location_resource_cell,
                "checkbutton_location_resource_gps", &priv->checkbutton_location_resource_gps,
+               "call_volume_adjustment", &priv->adj_call_volume,
                NULL);
        g_free (filename);
 
@@ -1176,6 +1187,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
 
        priv->gsettings = g_settings_new (EMPATHY_PREFS_SCHEMA);
        priv->gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA);
+       priv->gsettings_call = g_settings_new (EMPATHY_PREFS_CALL_SCHEMA);
        priv->gsettings_loc = g_settings_new (EMPATHY_PREFS_LOCATION_SCHEMA);
        priv->gsettings_notify = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA);
        priv->gsettings_sound = g_settings_new (EMPATHY_PREFS_SOUNDS_SCHEMA);
index 2549d51add4b1d86b036f055f7f44fcaceafe12d..eeb05fb11108adcb5ec6af1dc661bd208557aa52 100644 (file)
@@ -1,6 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="2.16"/>
+  <object class="GtkAdjustment" id="call_volume_adjustment">
+    <property name="upper">150</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">10</property>
+  </object>
   <object class="GtkNotebook" id="notebook">
     <property name="visible">True</property>
     <property name="can_focus">True</property>
         <property name="tab_fill">False</property>
       </packing>
     </child>
+    <child>
+      <object class="GtkBox" id="vbox6">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="border_width">12</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">18</property>
+        <child>
+          <object class="GtkFrame" id="frame2">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">none</property>
+            <child>
+              <object class="GtkAlignment" id="alignment3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkBox" id="box4">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkBox" id="box5">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label12">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Input volume</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkScale" id="scale2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="adjustment">call_volume_adjustment</property>
+                            <property name="round_digits">0</property>
+                            <property name="digits">0</property>
+                            <property name="value_pos">bottom</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkBox" id="box6">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="spacing">6</property>
+                        <child>
+                          <object class="GtkLabel" id="label13">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Input level</property>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkProgressBar" id="progressbar2">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                          </object>
+                          <packing>
+                            <property name="expand">True</property>
+                            <property name="fill">True</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label10">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="xalign">0</property>
+                <property name="label" translatable="yes">Audio</property>
+                <attributes>
+                  <attribute name="weight" value="bold"/>
+                </attributes>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+        <child>
+          <placeholder/>
+        </child>
+      </object>
+      <packing>
+        <property name="position">3</property>
+      </packing>
+    </child>
+    <child type="tab">
+      <object class="GtkLabel" id="label608">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">Calls</property>
+      </object>
+      <packing>
+        <property name="position">3</property>
+        <property name="tab_fill">False</property>
+      </packing>
+    </child>
     <child>
       <object class="GtkBox" id="vbox1">
         <property name="visible">True</property>
         </child>
       </object>
       <packing>
-        <property name="position">3</property>
+        <property name="position">4</property>
       </packing>
     </child>
     <child type="tab">
         <property name="label" translatable="yes">Location</property>
       </object>
       <packing>
-        <property name="position">3</property>
+        <property name="position">4</property>
         <property name="tab_fill">False</property>
       </packing>
     </child>
         </child>
       </object>
       <packing>
-        <property name="position">4</property>
+        <property name="position">5</property>
       </packing>
     </child>
     <child type="tab">
         <property name="label" translatable="yes">Spell Checking</property>
       </object>
       <packing>
-        <property name="position">4</property>
+        <property name="position">5</property>
         <property name="tab_fill">False</property>
       </packing>
     </child>
         </child>
       </object>
       <packing>
-        <property name="position">5</property>
+        <property name="position">6</property>
       </packing>
     </child>
     <child type="tab">
         <property name="label" translatable="yes">Themes</property>
       </object>
       <packing>
-        <property name="position">5</property>
+        <property name="position">6</property>
         <property name="tab_fill">False</property>
       </packing>
     </child>
   </object>
+  <object class="GtkSizeGroup" id="sizegroup1">
+    <widgets>
+      <widget name="label12"/>
+      <widget name="label13"/>
+    </widgets>
+  </object>
 </interface>