diff options
Diffstat (limited to 'mate-volume-control/gvc-channel-bar.c')
-rw-r--r-- | mate-volume-control/gvc-channel-bar.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/mate-volume-control/gvc-channel-bar.c b/mate-volume-control/gvc-channel-bar.c index 7feb0dd..89fa3a5 100644 --- a/mate-volume-control/gvc-channel-bar.c +++ b/mate-volume-control/gvc-channel-bar.c @@ -401,18 +401,11 @@ update_adjustment_value (GvcChannelBar *bar) else value = mate_mixer_stream_control_get_volume (bar->priv->control); - gdouble maximum = gtk_adjustment_get_upper (bar->priv->adjustment); - gdouble minimum = gtk_adjustment_get_lower (bar->priv->adjustment); - gdouble range = maximum - minimum; - - /* round value to nearest hundreth of the range */ - gdouble new_value = minimum + round (((value - minimum) / range) * 100) * (range / 100); - g_signal_handlers_block_by_func (G_OBJECT (bar->priv->adjustment), on_adjustment_value_changed, bar); - gtk_adjustment_set_value (bar->priv->adjustment, new_value); + gtk_adjustment_set_value (bar->priv->adjustment, value); g_signal_handlers_unblock_by_func (G_OBJECT (bar->priv->adjustment), on_adjustment_value_changed, |