From 4a2da6bcb81e407dbaa40d053cdda2e03a696c68 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Wed, 20 Aug 2014 22:55:54 +0200 Subject: Remember the value and notify after changing balance or fade --- libmatemixer/matemixer-stream-control.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libmatemixer/matemixer-stream-control.c b/libmatemixer/matemixer-stream-control.c index d2c756c..ef0f906 100644 --- a/libmatemixer/matemixer-stream-control.c +++ b/libmatemixer/matemixer-stream-control.c @@ -727,8 +727,12 @@ mate_mixer_stream_control_set_balance (MateMixerStreamControl *control, gfloat b klass = MATE_MIXER_STREAM_CONTROL_GET_CLASS (control); - if (G_LIKELY (klass->set_balance != NULL)) - return klass->set_balance (control, balance); + if (klass->set_balance == NULL || + klass->set_balance (control, balance) == FALSE) + return FALSE; + + _mate_mixer_stream_control_set_balance (control, balance); + return TRUE; } return FALSE; } @@ -766,8 +770,12 @@ mate_mixer_stream_control_set_fade (MateMixerStreamControl *control, gfloat fade klass = MATE_MIXER_STREAM_CONTROL_GET_CLASS (control); - if (klass->set_fade != NULL) - return klass->set_fade (control, fade); + if (klass->set_fade == NULL || + klass->set_fade (control, fade) == FALSE) + return FALSE; + + _mate_mixer_stream_control_set_fade (control, balance); + return TRUE; } return FALSE; } -- cgit v1.2.1