2006-08-04 18:59:47 +00:00
|
|
|
--- nautilus-2.15.90/libnautilus-private/nautilus-directory-background.c.background 2006-08-04 14:58:29.000000000 -0400
|
|
|
|
+++ nautilus-2.15.90/libnautilus-private/nautilus-directory-background.c 2006-08-04 14:59:03.000000000 -0400
|
2006-08-04 18:50:03 +00:00
|
|
|
@@ -442,14 +442,13 @@
|
|
|
|
g_free (image);
|
|
|
|
}
|
|
|
|
|
|
|
|
-static gboolean
|
|
|
|
+static void
|
|
|
|
initialize_background_from_settings (NautilusFile *file,
|
|
|
|
EelBackground *background)
|
|
|
|
{
|
|
|
|
char *color, *old_color;
|
|
|
|
char *image, *old_image;
|
|
|
|
EelBackgroundImagePlacement placement, old_placement;
|
|
|
|
- gboolean changed;
|
|
|
|
|
|
|
|
g_assert (NAUTILUS_IS_FILE (file));
|
|
|
|
g_assert (EEL_IS_BACKGROUND (background));
|
|
|
|
@@ -482,33 +481,14 @@
|
|
|
|
G_CALLBACK (background_changed_callback),
|
|
|
|
file);
|
|
|
|
|
|
|
|
-
|
|
|
|
- changed = FALSE;
|
|
|
|
-
|
|
|
|
- old_color = eel_background_get_color (background);
|
|
|
|
- if (eel_strcmp (color, old_color) != 0) {
|
|
|
|
- eel_background_set_color (background, color);
|
|
|
|
- changed = TRUE;
|
2006-08-04 18:59:47 +00:00
|
|
|
+ eel_background_set_color (background, color);
|
|
|
|
+ if (eel_background_is_desktop(background)) {
|
|
|
|
+ eel_background_set_image_uri_sync (background, image);
|
|
|
|
}
|
2006-08-04 18:50:03 +00:00
|
|
|
- g_free (old_color);
|
|
|
|
-
|
|
|
|
- old_image = eel_background_get_image_uri (background);
|
|
|
|
- if (eel_strcmp (image, old_image) != 0) {
|
|
|
|
- if (eel_background_is_desktop(background)) {
|
|
|
|
- eel_background_set_image_uri_sync (background, image);
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- eel_background_set_image_uri (background, image);
|
|
|
|
- }
|
|
|
|
- changed = TRUE;
|
2006-08-04 18:59:47 +00:00
|
|
|
- }
|
2006-08-04 18:50:03 +00:00
|
|
|
- g_free (old_image);
|
|
|
|
-
|
|
|
|
- old_placement = eel_background_get_image_placement (background);
|
|
|
|
- if (old_placement != placement) {
|
|
|
|
- eel_background_set_image_placement (background, placement);
|
|
|
|
- changed = TRUE;
|
|
|
|
+ else {
|
|
|
|
+ eel_background_set_image_uri (background, image);
|
|
|
|
}
|
|
|
|
+ eel_background_set_image_placement (background, placement);
|
|
|
|
|
|
|
|
/* Unblock the handler. */
|
|
|
|
g_signal_handlers_unblock_by_func
|
2006-08-04 18:59:47 +00:00
|
|
|
@@ -518,8 +498,6 @@
|
|
|
|
|
|
|
|
g_free (color);
|
|
|
|
g_free (image);
|
|
|
|
-
|
|
|
|
- return changed;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* handle the file changed signal */
|
|
|
|
@@ -527,8 +505,7 @@
|
2006-08-04 18:50:03 +00:00
|
|
|
saved_settings_changed_callback (NautilusFile *file,
|
|
|
|
EelBackground *background)
|
|
|
|
{
|
|
|
|
- gboolean changed;
|
|
|
|
- changed = initialize_background_from_settings (file, background);
|
|
|
|
+ initialize_background_from_settings (file, background);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* handle the theme changing */
|