aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 18:15:25 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 20:39:44 +0800
commit4121205c56393f8d51d59237adb001c108628365 (patch)
tree26d9e76c6a4bc30ee587cdeb45efc90019175b01
parentbe5274444c54eb5c529e592d130e362fd1728b4d (diff)
downloadgsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.tar
gsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.tar.gz
gsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.tar.bz2
gsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.tar.lz
gsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.tar.xz
gsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.tar.zst
gsoc2013-empathy-4121205c56393f8d51d59237adb001c108628365.zip
Add Echo cancellation preference
-rw-r--r--data/org.gnome.Empathy.gschema.xml.in5
-rw-r--r--libempathy/empathy-gsettings.h1
-rw-r--r--src/empathy-preferences.c8
-rw-r--r--src/empathy-preferences.ui13
4 files changed, 27 insertions, 0 deletions
diff --git a/data/org.gnome.Empathy.gschema.xml.in b/data/org.gnome.Empathy.gschema.xml.in
index 3f887feed..f51b51b00 100644
--- a/data/org.gnome.Empathy.gschema.xml.in
+++ b/data/org.gnome.Empathy.gschema.xml.in
@@ -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">
diff --git a/libempathy/empathy-gsettings.h b/libempathy/empathy-gsettings.h
index d6e5d9192..96c869da4 100644
--- a/libempathy/empathy-gsettings.h
+++ b/libempathy/empathy-gsettings.h
@@ -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"
diff --git a/src/empathy-preferences.c b/src/empathy-preferences.c
index e593c6f76..5618caeaf 100644
--- a/src/empathy-preferences.c
+++ b/src/empathy-preferences.c
@@ -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);
diff --git a/src/empathy-preferences.ui b/src/empathy-preferences.ui
index f8dc0a0d3..ab06b21bf 100644
--- a/src/empathy-preferences.ui
+++ b/src/empathy-preferences.ui
@@ -561,6 +561,19 @@
<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>