From 4a761386807ed96949d9c8e38e01a17a4349a490 Mon Sep 17 00:00:00 2001 From: Richard Hestilow Date: Fri, 27 Jul 2001 19:34:55 +0000 Subject: [PATCH] Only draw disabled message if do_preview. Actually, the user will never 2001-07-27 Richard Hestilow * applier.c (applier_apply_prefs): Only draw disabled message if do_preview. Actually, the user will never see this because the correct behavior (which is done) is to assume if they're running capplet, prefs->enable should be TRUE. This is because we are only honoring enable as a hacker-only setting. (output_compat_prefs): Output the correct "Enable" setting. * background-properties-capplet.c (get_legacy_settings): Support the "Enabled" flag. * preferences.c (preferences_new_from_bonobo_db): Import the "enabled" flag. Note that this is not bothered with in the _pbag function, because that's from the Proxy settings, which is only used for the GUI capplet, which always sets enabled to True, because this is a hacker-only option. Got it? --- capplets/background/ChangeLog | 18 ++++++++++++++++++ capplets/background/applier.c | 5 +++-- .../background/background-properties-capplet.c | 1 + capplets/background/preferences.c | 1 + 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index 25090c74d..9c52db2c1 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,21 @@ +2001-07-27 Richard Hestilow + + * applier.c (applier_apply_prefs): Only draw disabled message + if do_preview. Actually, the user will never see this because + the correct behavior (which is done) is to assume if they're + running capplet, prefs->enable should be TRUE. This is because + we are only honoring enable as a hacker-only setting. + (output_compat_prefs): Output the correct "Enable" setting. + + * background-properties-capplet.c (get_legacy_settings): Support + the "Enabled" flag. + + * preferences.c (preferences_new_from_bonobo_db): Import the + "enabled" flag. Note that this is not bothered with in the _pbag + function, because that's from the Proxy settings, which is only + used for the GUI capplet, which always sets enabled to True, because + this is a hacker-only option. Got it? + 2001-07-27 Bradford Hovinen * background-properties-capplet.c (get_legacy_settings): Fix diff --git a/capplets/background/applier.c b/capplets/background/applier.c index 74d12fa9a..a45ee908b 100644 --- a/capplets/background/applier.c +++ b/capplets/background/applier.c @@ -315,7 +315,8 @@ applier_apply_prefs (Applier *applier, Preferences *prefs, } if (!prefs->enabled) { - draw_disabled_message (applier_get_preview_widget (applier)); + if (do_preview) + draw_disabled_message (applier_get_preview_widget (applier)); return; } @@ -1386,7 +1387,7 @@ output_compat_prefs (Preferences *prefs) gchar *color; gnome_config_pop_prefix (); - gnome_config_set_bool ("/Background/Default/Enabled", prefs->wallpaper_enabled); + gnome_config_set_bool ("/Background/Default/Enabled", prefs->enabled); gnome_config_set_string ("/Background/Default/wallpaper", (prefs->wallpaper_filename) ? prefs->wallpaper_filename : "none"); gnome_config_set_int ("/Background/Default/wallpaperAlign", prefs->wallpaper_type); diff --git a/capplets/background/background-properties-capplet.c b/capplets/background/background-properties-capplet.c index 86f5da6cf..c9e08bbec 100644 --- a/capplets/background/background-properties-capplet.c +++ b/capplets/background/background-properties-capplet.c @@ -150,6 +150,7 @@ get_legacy_settings (Bonobo_ConfigDatabase db) gchar *val_string, *val_filename; int val_ulong, val_long; + COPY_FROM_LEGACY (boolean, "/main/enabled", bool, "/Background/Default/Enabled=true"); COPY_FROM_LEGACY (filename, "/main/wallpaper_filename", string, "/Background/Default/wallpaper=none"); COPY_FROM_LEGACY (ulong, "/main/wallpaper_type", int, "/Background/Default/wallpaperAlign=0"); copy_color_from_legacy (db, "/main/color1", "/Background/Default/color1"); diff --git a/capplets/background/preferences.c b/capplets/background/preferences.c index 948c42f78..3e53a5c95 100644 --- a/capplets/background/preferences.c +++ b/capplets/background/preferences.c @@ -256,6 +256,7 @@ preferences_new_from_bonobo_db (Bonobo_ConfigDatabase db, CORBA_Environment *ev) prefs = PREFERENCES (preferences_new ()); + prefs->enabled = bonobo_config_get_boolean (db, "/main/enabled", NULL); prefs->orientation = bonobo_config_get_ulong (db, "/main/orientation", NULL); if (prefs->orientation != ORIENTATION_SOLID)