Use string rather than bool for auto_apply
2000-12-17 Bradford Hovinen <hovinen@helixcode.com> * capplets/new-background-properties/preferences.c (preferences_load): (preferences_save): Use string rather than bool for auto_apply
This commit is contained in:
parent
8d8010f252
commit
394501074b
2 changed files with 11 additions and 4 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
* capplets/new-background-properties/preferences.c
|
* capplets/new-background-properties/preferences.c
|
||||||
(preferences_changed): Increased delay before autoapply
|
(preferences_changed): Increased delay before autoapply
|
||||||
|
(preferences_load):
|
||||||
|
(preferences_save): Use string rather than bool for auto_apply
|
||||||
|
|
||||||
* capplets/new-background-properties/prefs-widget.c
|
* capplets/new-background-properties/prefs-widget.c
|
||||||
(auto_apply_toggled_cb): Implement
|
(auto_apply_toggled_cb): Implement
|
||||||
|
|
|
@ -216,8 +216,13 @@ preferences_load (Preferences *prefs)
|
||||||
gnome_config_get_string
|
gnome_config_get_string
|
||||||
("/Background/Default/wallpapers_dir=./");
|
("/Background/Default/wallpapers_dir=./");
|
||||||
|
|
||||||
prefs->auto_apply =
|
string = gnome_config_get_string
|
||||||
gnome_config_get_bool ("/Background/Default/autoApply=true");
|
("/Background/Default/autoApply=true");
|
||||||
|
if (!g_strcasecmp (string, "true"))
|
||||||
|
prefs->auto_apply = TRUE;
|
||||||
|
else if (g_strcasecmp (string, "false"))
|
||||||
|
prefs->auto_apply = FALSE;
|
||||||
|
g_free (string);
|
||||||
|
|
||||||
if (!g_strcasecmp (prefs->wallpaper_filename, "none")) {
|
if (!g_strcasecmp (prefs->wallpaper_filename, "none")) {
|
||||||
g_free(prefs->wallpaper_filename);
|
g_free(prefs->wallpaper_filename);
|
||||||
|
@ -263,8 +268,8 @@ preferences_save (Preferences *prefs)
|
||||||
gnome_config_set_int ("/Background/Default/wallpaperAlign",
|
gnome_config_set_int ("/Background/Default/wallpaperAlign",
|
||||||
prefs->wallpaper_type);
|
prefs->wallpaper_type);
|
||||||
|
|
||||||
gnome_config_set_bool ("/Background/Default/autoApply",
|
gnome_config_set_string ("/Background/Default/autoApply",
|
||||||
prefs->auto_apply);
|
prefs->auto_apply ? "True" : "False");
|
||||||
|
|
||||||
gnome_config_sync ();
|
gnome_config_sync ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue