2009-09-04 02:03:30 +02:00
|
|
|
Index: gnome-settings-daemon-2.25.90/data/apps_gnome_settings_daemon_keybindings.schemas.in
|
2009-02-20 22:09:29 +01:00
|
|
|
===================================================================
|
2009-09-04 02:03:30 +02:00
|
|
|
--- gnome-settings-daemon-2.25.90.orig/data/apps_gnome_settings_daemon_keybindings.schemas.in
|
|
|
|
+++ gnome-settings-daemon-2.25.90/data/apps_gnome_settings_daemon_keybindings.schemas.in
|
2009-02-20 22:09:29 +01:00
|
|
|
@@ -14,6 +14,17 @@
|
|
|
|
</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>
|
2009-09-04 02:03:30 +02:00
|
|
|
Index: gnome-settings-daemon-2.25.90/plugins/media-keys/gsd-media-keys-manager.c
|
2009-02-20 22:09:29 +01:00
|
|
|
===================================================================
|
2009-09-04 02:03:30 +02:00
|
|
|
--- gnome-settings-daemon-2.25.90.orig/plugins/media-keys/gsd-media-keys-manager.c
|
|
|
|
+++ gnome-settings-daemon-2.25.90/plugins/media-keys/gsd-media-keys-manager.c
|
|
|
|
@@ -656,8 +656,10 @@ 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;
|
|
|
|
+ GError *error;
|
|
|
|
|
|
|
|
if (manager->priv->stream == NULL)
|
|
|
|
return;
|
2009-09-04 02:03:30 +02:00
|
|
|
@@ -680,8 +682,23 @@ do_sound_action (GsdMediaKeysManager *ma
|
|
|
|
|
2009-02-20 22:09:29 +01:00
|
|
|
switch (type) {
|
|
|
|
case MUTE_KEY:
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+
|
2009-09-04 02:03:30 +02:00
|
|
|
manager->priv->num_expected_update_signals = 1;
|
|
|
|
- gvc_mixer_stream_change_is_muted (manager->priv->stream, !muted);
|
2009-02-20 22:09:29 +01:00
|
|
|
+ if (toggle_mute)
|
|
|
|
+ gvc_mixer_stream_change_is_muted (manager->priv->stream,
|
2009-09-04 02:03:30 +02:00
|
|
|
+ !muted);
|
2009-02-20 22:09:29 +01:00
|
|
|
+ else
|
|
|
|
+ gvc_mixer_stream_change_is_muted (manager->priv->stream,
|
|
|
|
+ TRUE);
|
|
|
|
break;
|
|
|
|
case VOLUME_DOWN_KEY:
|
|
|
|
if (!muted && (vol <= norm_vol_step)) {
|