gnome-control-center r8453 - trunk/libbackground
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r8453 - trunk/libbackground
- Date: Wed, 6 Feb 2008 23:21:34 +0000 (GMT)
Author: vuntz
Date: Wed Feb 6 23:21:33 2008
New Revision: 8453
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8453&view=rev
Log:
2008-02-07 Vincent Untz <vuntz gnome org>
* preferences.c: (bg_preferences_load): don't pass a GError to the
gconf_client_*() calls since we don't use it anyway.
Fix bug #510421 since the crash happens because the GError wasn't
reset to NULL between two calls.
Modified:
trunk/libbackground/ChangeLog
trunk/libbackground/preferences.c
Modified: trunk/libbackground/preferences.c
==============================================================================
--- trunk/libbackground/preferences.c (original)
+++ trunk/libbackground/preferences.c Wed Feb 6 23:21:33 2008
@@ -236,7 +236,6 @@
bg_preferences_load (BGPreferences *prefs)
{
GConfClient *client;
- GError *error = NULL;
char *tmp;
g_return_if_fail (prefs != NULL);
@@ -244,8 +243,8 @@
client = gconf_client_get_default ();
- prefs->enabled = gconf_client_get_bool (client, BG_PREFERENCES_DRAW_BACKGROUND, &error);
- tmp = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_FILENAME, &error);
+ prefs->enabled = gconf_client_get_bool (client, BG_PREFERENCES_DRAW_BACKGROUND, NULL);
+ tmp = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_FILENAME, NULL);
if (tmp) {
if (g_utf8_validate (tmp, -1, NULL) &&
g_file_test (tmp, G_FILE_TEST_EXISTS))
@@ -258,21 +257,21 @@
if (prefs->color1 != NULL)
gdk_color_free (prefs->color1);
- tmp = gconf_client_get_string (client, BG_PREFERENCES_PRIMARY_COLOR, &error);
+ tmp = gconf_client_get_string (client, BG_PREFERENCES_PRIMARY_COLOR, NULL);
prefs->color1 = read_color_from_string (tmp);
g_free (tmp);
if (prefs->color2 != NULL)
gdk_color_free (prefs->color2);
- tmp = gconf_client_get_string (client, BG_PREFERENCES_SECONDARY_COLOR, &error);
+ tmp = gconf_client_get_string (client, BG_PREFERENCES_SECONDARY_COLOR, NULL);
prefs->color2 = read_color_from_string (tmp);
g_free (tmp);
- prefs->opacity = gconf_client_get_int (client, BG_PREFERENCES_PICTURE_OPACITY, &error);
+ prefs->opacity = gconf_client_get_int (client, BG_PREFERENCES_PICTURE_OPACITY, NULL);
if (prefs->opacity >= 100 || prefs->opacity < 0)
prefs->adjust_opacity = FALSE;
- tmp = gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, &error);
+ tmp = gconf_client_get_string (client, BG_PREFERENCES_COLOR_SHADING_TYPE, NULL);
prefs->orientation = read_orientation_from_string (tmp);
g_free (tmp);
@@ -281,7 +280,7 @@
else
prefs->gradient_enabled = TRUE;
- tmp = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, &error);
+ tmp = gconf_client_get_string (client, BG_PREFERENCES_PICTURE_OPTIONS, NULL);
prefs->wallpaper_type = read_wptype_from_string (tmp);
g_free (tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]