File gnome-settings-daemon-bnc462640-mute-action.patch of Package gnome-settings-daemon

Index: data/apps_gnome_settings_daemon_keybindings.schemas.in
===================================================================
--- data/apps_gnome_settings_daemon_keybindings.schemas.in.orig
+++ data/apps_gnome_settings_daemon_keybindings.schemas.in
@@ -25,6 +25,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>
Index: plugins/media-keys/gsd-media-keys-manager.c
===================================================================
--- 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
                  int                  type)
 {
         gboolean muted;
+        gboolean toggle_mute;
         guint vol, norm_vol_step;
         int vol_step;
         gboolean sound_changed;
+        GError *error;
 
         if (manager->priv->stream == NULL)
                 return;
@@ -704,7 +706,21 @@ do_sound_action (GsdMediaKeysManager *ma
 
         switch (type) {
         case MUTE_KEY:
-                muted = !muted;
+                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)
+                        muted = !muted;
+                else
+                        muted = TRUE;
+
                 gvc_mixer_stream_change_is_muted (manager->priv->stream, muted);
                 sound_changed = TRUE;
                 break;
openSUSE Build Service is sponsored by