diff options
author | gm10 <[email protected]> | 2019-07-27 11:23:47 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-07-27 16:06:03 +0200 |
commit | 962c75b3cf9d301227d7f584fa913ef21f28bd78 (patch) | |
tree | 7d9a47ed60e2f4af09011eab67d64700bd82d57f /plugins/media-keys/msd-media-keys-manager.c | |
parent | f7eb962919d338d2b64efb197eeb997ecf5770a2 (diff) | |
download | mate-settings-daemon-962c75b3cf9d301227d7f584fa913ef21f28bd78.tar.bz2 mate-settings-daemon-962c75b3cf9d301227d7f584fa913ef21f28bd78.tar.xz |
Change media-keys volume-step default from 6 to 5 in the gschema and use only that instead of a redundant constant in the code.
Diffstat (limited to 'plugins/media-keys/msd-media-keys-manager.c')
-rw-r--r-- | plugins/media-keys/msd-media-keys-manager.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index a68835f..b1fe2dc 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -58,8 +58,6 @@ #define TOUCHPAD_SCHEMA "org.mate.peripherals-touchpad" #define TOUCHPAD_ENABLED_KEY "touchpad-enabled" -#define VOLUME_STEP 6 - #define MSD_MEDIA_KEYS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MSD_TYPE_MEDIA_KEYS_MANAGER, MsdMediaKeysManagerPrivate)) typedef struct { @@ -732,9 +730,11 @@ do_sound_action (MsdMediaKeysManager *manager, volume_max = mate_mixer_stream_control_get_normal_volume (control); volume_step = g_settings_get_int (manager->priv->settings, "volume-step"); - if (volume_step <= 0 || - volume_step > 100) - volume_step = VOLUME_STEP; + if (volume_step <= 0 || volume_step > 100) { + GVariant *variant = g_settings_get_default_value (manager->priv->settings, "volume-step"); + volume_step = g_variant_get_int32 (variant); + g_variant_unref (variant); + } /* Scale the volume step size accordingly to the range used by the control */ volume_step = (volume_max - volume_min) * volume_step / 100; |