Write to gnome-config to make nautilus happy. (applier_apply_prefs):

2001-07-24  Richard Hestilow  <hestilow@ximian.com>

	* applier.c (output_compat_prefs): Write to gnome-config to make
	nautilus happy.
	(applier_apply_prefs): Change of is_nautilus_running handling
	logic to still output legacy settings. Also, call
	output_compat_prefs if is_root
.
This commit is contained in:
Richard Hestilow 2001-07-25 05:37:36 +00:00 committed by Rachel Hestilow
parent a77902df64
commit 9ab051c8cf
2 changed files with 52 additions and 5 deletions

View file

@ -1,3 +1,11 @@
2001-07-24 Richard Hestilow <hestilow@ximian.com>
* applier.c (output_compat_prefs): Write to gnome-config to make
nautilus happy.
(applier_apply_prefs): Change of is_nautilus_running handling
logic to still output legacy settings. Also, call
output_compat_prefs if is_root
.
2001-07-24 Richard Hestilow <hestilow@ximian.com>
* main.c (main): Pass in legacy files to capplet_init.

View file

@ -201,6 +201,7 @@ static void applier_preferences_unref (ApplierPreferences *prefs);
static void applier_preferences_free (ApplierPreferences *prefs);
static GdkColor* bonobo_color_to_gdk (Bonobo_Config_Color *color);
static void output_compat_prefs (ApplierPreferences *prefs);
guint
applier_get_type (void)
@ -346,7 +347,6 @@ applier_apply_prefs (Applier *applier, Bonobo_PropertyBag pb, Bonobo_ConfigDatab
if (do_root && applier->private->nautilus_running) {
set_root_pixmap (-1);
do_root = FALSE;
}
if (pb != CORBA_OBJECT_NIL)
@ -418,10 +418,13 @@ applier_apply_prefs (Applier *applier, Bonobo_PropertyBag pb, Bonobo_ConfigDatab
if (applier->private->root_renderer == NULL)
applier->private->root_renderer = renderer_new (TRUE);
run_render_pipeline (applier->private->root_renderer,
applier->private->root_prefs,
prefs,
applier->private->wallpaper_pixbuf);
if (!applier->private->nautilus_running)
run_render_pipeline (applier->private->root_renderer,
applier->private->root_prefs,
prefs,
applier->private->wallpaper_pixbuf);
output_compat_prefs (prefs);
if (applier->private->root_prefs != NULL)
applier_preferences_unref (applier->private->root_prefs);
@ -1528,3 +1531,39 @@ bonobo_color_to_gdk (Bonobo_Config_Color *color)
return ret;
}
static void
output_compat_prefs (ApplierPreferences *prefs)
{
gchar *color;
gnome_config_pop_prefix ();
gnome_config_set_bool ("/Background/Default/Enabled", prefs->wallpaper_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);
color = g_strdup_printf ("#%02x%02x%02x",
prefs->color1->red >> 8,
prefs->color1->green >> 8,
prefs->color1->blue >> 8);
gnome_config_set_string ("/Background/Default/color1", color);
g_free (color);
color = g_strdup_printf ("#%02x%02x%02x",
prefs->color2->red >> 8,
prefs->color2->green >> 8,
prefs->color2->blue >> 8);
gnome_config_set_string ("/Background/Default/color2", color);
g_free (color);
gnome_config_set_string ("/Background/Default/simple",
(prefs->gradient_enabled) ? "gradient" : "solid");
gnome_config_set_string ("/Background/Default/gradient",
(prefs->orientation == ORIENTATION_VERT) ? "vertical" : "horizontal");
gnome_config_set_bool ("/Background/Default/adjustOpacity", prefs->adjust_opacity);
gnome_config_set_int ("/Background/Default/opacity", prefs->opacity);
gnome_config_sync ();
}