Don't adjust the opacity if the opacity setting is invalid

2001-08-28  Bradford Hovinen  <hovinen@ximian.com>

	* preferences.c (preferences_load_from_bonobo_pbag): Don't adjust
	the opacity if the opacity setting is invalid
	(preferences_load_from_bonobo_db): Ditto
This commit is contained in:
Bradford Hovinen 2001-08-28 13:32:01 +00:00 committed by Bradford Hovinen (Gdict maintainer)
parent a82ec1573c
commit 3c6740ca6f
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2001-08-28 Bradford Hovinen <hovinen@ximian.com>
* preferences.c (preferences_load_from_bonobo_pbag): Don't adjust
the opacity if the opacity setting is invalid
(preferences_load_from_bonobo_db): Ditto
2001-08-27 Bradford Hovinen <hovinen@ximian.com>
* background-properties-capplet.c (setup_dialog): Initialize/free

View file

@ -247,7 +247,7 @@ preferences_load_from_bonobo_pbag (Preferences *prefs,
prefs->color2 = bonobo_color_to_gdk ((Bonobo_Config_Color *)(PB_GET_VALUE ("color2"))->_value);
prefs->opacity = BONOBO_ARG_GET_LONG (PB_GET_VALUE ("opacity"));
if (prefs->opacity >= 100)
if (prefs->opacity >= 100 || prefs->opacity < 0)
prefs->adjust_opacity = FALSE;
prefs->orientation = bonobo_property_bag_client_get_value_gulong (pb, "orientation", ev);
@ -305,7 +305,7 @@ preferences_load_from_bonobo_db (Preferences *prefs,
prefs->color2 = bonobo_color_to_gdk ((Bonobo_Config_Color *)(DB_GET_VALUE ("/main/color2"))->_value);
prefs->opacity = BONOBO_ARG_GET_LONG (DB_GET_VALUE ("/main/opacity"));
if (prefs->opacity >= 100)
if (prefs->opacity >= 100 || prefs->opacity < 0)
prefs->adjust_opacity = FALSE;
}