The setter should not set the property to values outside the allowed
range.
https://bugzilla.gnome.org/show_bug.cgi?id=663825
* of the bar. The fraction should be between 0.0 and 1.0,
* inclusive.
*
- **/
+ */
void
gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
gdouble fraction)
priv = pbar->priv;
- priv->fraction = fraction;
+ priv->fraction = CLAMP(fraction, 0.0, 1.0);
gtk_progress_bar_set_activity_mode (pbar, FALSE);
gtk_progress_bar_real_update (pbar);