]> git.0d.be Git - empathy.git/commitdiff
Add Echo cancellation preference
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Aug 2011 10:15:25 +0000 (12:15 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 15 Aug 2011 12:39:44 +0000 (14:39 +0200)
data/org.gnome.Empathy.gschema.xml.in
libempathy/empathy-gsettings.h
src/empathy-preferences.c
src/empathy-preferences.ui

index 3f887feed9d3fbb88ad2182cfb87fdfaa8a56f02..f51b51b00ade1b1c43e1a5bb3efb6a2e567049cb 100644 (file)
@@ -236,6 +236,11 @@ present them to the user immediately.</_description>
       <_summary>Camera device</_summary>
       <_description>Default camera device to use in video calls, e.g. /dev/video0.</_description>
     </key>
+    <key name="echo-cancellation" type="b">
+      <default>true</default>
+      <_summary>Echo cancellation support</_summary>
+      <_description>Whether to enable Pulseaudio's echo cancellation filter.</_description>
+    </key>
   </schema>
   <schema id="org.gnome.Empathy.hints" path="/org/gnome/empathy/hints/">
     <key name="close-main-window" type="b">
index d6e5d9192d006dbc329c8025bd4e612ba82ae1b2..96c869da4f5dbfc840b6109b18bc13bd77e35a05 100644 (file)
@@ -54,6 +54,7 @@ G_BEGIN_DECLS
 #define EMPATHY_PREFS_CALL_SCHEMA EMPATHY_PREFS_SCHEMA ".call"
 #define EMPATHY_PREFS_CALL_SOUND_VOLUME            "volume"
 #define EMPATHY_PREFS_CALL_CAMERA_DEVICE           "camera-device"
+#define EMPATHY_PREFS_CALL_ECHO_CANCELLATION       "echo-cancellation"
 
 #define EMPATHY_PREFS_CHAT_SCHEMA EMPATHY_PREFS_SCHEMA ".conversation"
 #define EMPATHY_PREFS_CHAT_SHOW_SMILEYS            "graphical-smileys"
index e593c6f7673f4564a97136db14b26ca919de7a48..5618caeaf8a72d7e69fb33feeb5843def10535ae 100644 (file)
@@ -88,6 +88,7 @@ struct _EmpathyPreferencesPriv {
 
        GtkWidget *scale_call_volume;
        GtkWidget *adj_call_volume;
+       GtkWidget *echo_cancellation;
 
        GtkWidget *treeview_spell_checker;
 
@@ -280,6 +281,12 @@ preferences_setup_widgets (EmpathyPreferences *preferences)
                         "value",
                         G_SETTINGS_BIND_DEFAULT);
 
+       g_settings_bind (priv->gsettings_call,
+                        EMPATHY_PREFS_CALL_ECHO_CANCELLATION,
+                        priv->echo_cancellation,
+                        "active",
+                        G_SETTINGS_BIND_DEFAULT);
+
        g_settings_bind (priv->gsettings,
                         EMPATHY_PREFS_AUTOCONNECT,
                         priv->checkbutton_autoconnect,
@@ -1197,6 +1204,7 @@ empathy_preferences_init (EmpathyPreferences *preferences)
                "checkbutton_location_resource_gps", &priv->checkbutton_location_resource_gps,
                "call_volume_scale", &priv->scale_call_volume,
                "call_volume_adjustment", &priv->adj_call_volume,
+               "call_echo_cancellation", &priv->echo_cancellation,
                NULL);
        g_free (filename);
 
index f8dc0a0d3ecee36bb38d555edaf3a35a674007d5..ab06b21bf21d7edf96b141f10e41a9842767314b 100644 (file)
                         <property name="position">1</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkCheckButton" id="call_echo_cancellation">
+                        <property name="label">_Echo Cancellation</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="use_underline">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
                   </object>
                 </child>
               </object>