Don't leak gconf strings.
2006-08-21 Kjartan Maraas <kmaraas@gnome.org> * preferences.c: (bg_preferences_load): Don't leak gconf strings.
This commit is contained in:
parent
d55831d57b
commit
d737308522
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2006-08-21 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
|
* preferences.c: (bg_preferences_load): Don't leak gconf strings.
|
||||||
|
|
||||||
2006-06-27 Sergey Udaltsov <svu@gnome.org>
|
2006-06-27 Sergey Udaltsov <svu@gnome.org>
|
||||||
|
|
||||||
* Makefile.am: redundant GNOMELOCALEDIR removed. Patch from #345178
|
* Makefile.am: redundant GNOMELOCALEDIR removed. Patch from #345178
|
||||||
|
|
|
@ -237,7 +237,7 @@ bg_preferences_load (BGPreferences *prefs)
|
||||||
{
|
{
|
||||||
GConfClient *client;
|
GConfClient *client;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
char *tmp;
|
char *tmp, *shading_type, *picture_options;
|
||||||
|
|
||||||
g_return_if_fail (prefs != NULL);
|
g_return_if_fail (prefs != NULL);
|
||||||
g_return_if_fail (IS_BG_PREFERENCES (prefs));
|
g_return_if_fail (IS_BG_PREFERENCES (prefs));
|
||||||
|
@ -272,14 +272,17 @@ bg_preferences_load (BGPreferences *prefs)
|
||||||
if (prefs->opacity >= 100 || prefs->opacity < 0)
|
if (prefs->opacity >= 100 || prefs->opacity < 0)
|
||||||
prefs->adjust_opacity = FALSE;
|
prefs->adjust_opacity = FALSE;
|
||||||
|
|
||||||
prefs->orientation = read_orientation_from_string (gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, &error));
|
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);
|
||||||
if (prefs->orientation == ORIENTATION_SOLID)
|
if (prefs->orientation == ORIENTATION_SOLID)
|
||||||
prefs->gradient_enabled = FALSE;
|
prefs->gradient_enabled = FALSE;
|
||||||
else
|
else
|
||||||
prefs->gradient_enabled = TRUE;
|
prefs->gradient_enabled = TRUE;
|
||||||
|
|
||||||
prefs->wallpaper_type = read_wptype_from_string (gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, &error));
|
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);
|
||||||
if (prefs->wallpaper_type == WPTYPE_UNSET) {
|
if (prefs->wallpaper_type == WPTYPE_UNSET) {
|
||||||
prefs->wallpaper_enabled = FALSE;
|
prefs->wallpaper_enabled = FALSE;
|
||||||
prefs->wallpaper_type = WPTYPE_CENTERED;
|
prefs->wallpaper_type = WPTYPE_CENTERED;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue