2010-01-18 14:20:07 +01:00
|
|
|
Index: data/apps_gnome_settings_daemon_keybindings.schemas.in
|
2009-02-20 22:09:29 +01:00
|
|
|
===================================================================
|
2010-04-01 03:30:18 +02:00
|
|
|
--- data/apps_gnome_settings_daemon_keybindings.schemas.in.orig
|
|
|
|
+++ data/apps_gnome_settings_daemon_keybindings.schemas.in
|
|
|
|
@@ -25,6 +25,17 @@
|
2009-02-20 22:09:29 +01:00
|
|
|
</schema>
|
|
|
|
|
|
|
|
<schema>
|
|
|
|
+ <key>/schemas/apps/gnome_settings_daemon/toggle_mute</key>
|
|
|
|
+ <applyto>/apps/gnome_settings_daemon/toggle_mute</applyto>
|
|
|
|
+ <type>bool</type>
|
|
|
|
+ <default>TRUE</default>
|
|
|
|
+ <locale name="C">
|
|
|
|
+ <short>Toggle Mute</short>
|
|
|
|
+ <long>Toggle the sound mixer's mute status when then mute button is pressed.</long>
|
|
|
|
+ </locale>
|
|
|
|
+ </schema>
|
|
|
|
+
|
|
|
|
+ <schema>
|
|
|
|
<key>/schemas/apps/gnome_settings_daemon/keybindings/volume_mute</key>
|
|
|
|
<applyto>/apps/gnome_settings_daemon/keybindings/volume_mute</applyto>
|
|
|
|
<type>string</type>
|
2010-01-18 14:20:07 +01:00
|
|
|
Index: plugins/media-keys/gsd-media-keys-manager.c
|
2009-02-20 22:09:29 +01:00
|
|
|
===================================================================
|
2010-04-01 03:30:18 +02:00
|
|
|
--- plugins/media-keys/gsd-media-keys-manager.c.orig
|
|
|
|
+++ plugins/media-keys/gsd-media-keys-manager.c
|
|
|
|
@@ -681,9 +681,11 @@ do_sound_action (GsdMediaKeysManager *ma
|
2009-02-20 22:09:29 +01:00
|
|
|
int type)
|
|
|
|
{
|
|
|
|
gboolean muted;
|
|
|
|
+ gboolean toggle_mute;
|
|
|
|
guint vol, norm_vol_step;
|
|
|
|
int vol_step;
|
2010-04-01 03:30:18 +02:00
|
|
|
gboolean sound_changed;
|
2009-02-20 22:09:29 +01:00
|
|
|
+ GError *error;
|
|
|
|
|
|
|
|
if (manager->priv->stream == NULL)
|
|
|
|
return;
|
2010-04-01 03:30:18 +02:00
|
|
|
@@ -704,7 +706,21 @@ do_sound_action (GsdMediaKeysManager *ma
|
|
|
|
|
2009-02-20 22:09:29 +01:00
|
|
|
switch (type) {
|
|
|
|
case MUTE_KEY:
|
2010-04-01 03:30:18 +02:00
|
|
|
- muted = !muted;
|
2009-02-20 22:09:29 +01:00
|
|
|
+ error = NULL;
|
|
|
|
+ toggle_mute = gconf_client_get_bool (manager->priv->conf_client,
|
|
|
|
+ GCONF_MISC_DIR "/toggle_mute",
|
|
|
|
+ &error);
|
|
|
|
+
|
|
|
|
+ if (error) {
|
|
|
|
+ toggle_mute = TRUE;
|
|
|
|
+ g_error_free (error);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (toggle_mute)
|
2010-04-01 03:30:18 +02:00
|
|
|
+ muted = !muted;
|
2009-02-20 22:09:29 +01:00
|
|
|
+ else
|
2010-04-01 03:30:18 +02:00
|
|
|
+ muted = TRUE;
|
|
|
|
+
|
|
|
|
gvc_mixer_stream_change_is_muted (manager->priv->stream, muted);
|
|
|
|
sound_changed = TRUE;
|
2009-02-20 22:09:29 +01:00
|
|
|
break;
|