GNOME Bugzilla – Bug 451866
GtkVolumeButton range
Last modified: 2007-06-28 14:34:27 UTC
GtkVolumeButton's default range is 0 to 100. While the percentage is a convenient way to present the volume to the user, it's not so convenient for the programmer. IMHO the default range should be 0.0 (mute) to 1.0 (full). Also, GtkVolumeButton is a GtkScaleButton and as such you can use gtk_scale_button_get_adjustment to set a different range on it. If you do that however, the volume button's tooltip becomes incorrect, since gtk_volume_button_update_tooltip assumes the range is 0..100.
Created attachment 90802 [details] [review] change default range, and fix tooltips
Looks good to me.
Looks good to me too.
* gtk/gtkvolumebutton.c: (gtk_volume_button_class_init), (gtk_volume_button_init), (gtk_volume_button_dispose), (gtk_volume_button_update_tooltip): Make the volume button use range 0.0 to 1.0 by default, and fix tooltips code to cope with different ranges. Bug #451866.