Revert previous leak fix from Kjartan Maraas as it seems to cause crashes

2006-08-21  Rodney Dawes  <dobey@novell.com>

	* preferences.c (bg_preferences_load): Revert previous leak fix from
	Kjartan Maraas as it seems to cause crashes in nautilus

	see bug #352279
This commit is contained in:
Rodney Dawes 2006-08-21 18:11:53 +00:00 committed by Rodney Dawes
parent d737308522
commit 0630f59b94
2 changed files with 11 additions and 7 deletions

View file

@ -237,7 +237,7 @@ bg_preferences_load (BGPreferences *prefs)
{
GConfClient *client;
GError *error = NULL;
char *tmp, *shading_type, *picture_options;
char *tmp;
g_return_if_fail (prefs != NULL);
g_return_if_fail (IS_BG_PREFERENCES (prefs));
@ -272,17 +272,14 @@ bg_preferences_load (BGPreferences *prefs)
if (prefs->opacity >= 100 || prefs->opacity < 0)
prefs->adjust_opacity = FALSE;
shading_type = gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, &error);
prefs->orientation = read_orientation_from_string (shading_type);
g_free (shading_type);
prefs->orientation = read_orientation_from_string (gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, &error));
if (prefs->orientation == ORIENTATION_SOLID)
prefs->gradient_enabled = FALSE;
else
prefs->gradient_enabled = TRUE;
picture_options = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, &error);
prefs->wallpaper_type = read_wptype_from_string (picture_options);
g_free (picture_options);
prefs->wallpaper_type = read_wptype_from_string (gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, &error));
if (prefs->wallpaper_type == WPTYPE_UNSET) {
prefs->wallpaper_enabled = FALSE;
prefs->wallpaper_type = WPTYPE_CENTERED;