diff options
author | Mike Engber <engber@src.gnome.org> | 2001-03-30 00:57:10 +0000 |
---|---|---|
committer | Mike Engber <engber@src.gnome.org> | 2001-03-30 00:57:10 +0000 |
commit | 3d58f957be1e26ae00c1c7126ec33e3686f90f74 (patch) | |
tree | f42155ce963b78e7c223de2eaa16bc415510c9a6 | |
parent | 43b5ad7a758d8dba2fd391459bf263c6bd5933c4 (diff) | |
download | nautilus-3d58f957be1e26ae00c1c7126ec33e3686f90f74.tar.gz |
Comment out call to gnome_canvas_set_dither because it no longer serves a
* libnautilus-extensions/nautilus-background-canvas-group.c:
Comment out call to gnome_canvas_set_dither because it no
longer serves a useful purpose and it removes our dependancy
on using a gnome-libs > 1.2.8 - bug 7922.
(nautilus_background_canvas_group_initialize_common):
* libnautilus-extensions/nautilus-background.c:
(nautilus_background_destroy):
* libnautilus-extensions/nautilus-background.h:
* libnautilus-extensions/nautilus-directory-background.c:
(theme_image_path_to_uri),
(nautilus_file_background_get_default_settings_for_theme),
(nautilus_file_background_get_default_settings),
(nautilus_file_background_read_desktop_settings),
(nautilus_file_background_write_desktop_settings),
(nautilus_file_background_write_desktop_default_settings),
(nautilus_file_background_matches_default_settings),
(nautilus_file_background_is_set), (background_changed_callback),
(initialize_background_from_settings):
* src/nautilus-sidebar.c: (background_settings_changed_callback),
(nautilus_sidebar_update_appearance):
Remove combine mode from nautilus-background. It no longer serves
any purpose (background always draw dithered now) - bug 2190 & 5516.
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-background-canvas-group.c | 7 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-background.c | 25 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-background.h | 3 | ||||
-rw-r--r-- | libnautilus-extensions/nautilus-directory-background.c | 75 | ||||
-rw-r--r-- | libnautilus-private/nautilus-background-canvas-group.c | 7 | ||||
-rw-r--r-- | libnautilus-private/nautilus-background.c | 25 | ||||
-rw-r--r-- | libnautilus-private/nautilus-background.h | 3 | ||||
-rw-r--r-- | libnautilus-private/nautilus-directory-background.c | 75 | ||||
-rw-r--r-- | src/nautilus-information-panel.c | 22 | ||||
-rw-r--r-- | src/nautilus-sidebar.c | 22 |
11 files changed, 84 insertions, 206 deletions
@@ -1,3 +1,29 @@ +2001-03-29 Michael Engber <engber@eazel.com> + + * libnautilus-extensions/nautilus-background-canvas-group.c: + Comment out call to gnome_canvas_set_dither because it no + longer serves a useful purpose and it removes our dependancy + on using a gnome-libs > 1.2.8 - bug 7922. + + (nautilus_background_canvas_group_initialize_common): + * libnautilus-extensions/nautilus-background.c: + (nautilus_background_destroy): + * libnautilus-extensions/nautilus-background.h: + * libnautilus-extensions/nautilus-directory-background.c: + (theme_image_path_to_uri), + (nautilus_file_background_get_default_settings_for_theme), + (nautilus_file_background_get_default_settings), + (nautilus_file_background_read_desktop_settings), + (nautilus_file_background_write_desktop_settings), + (nautilus_file_background_write_desktop_default_settings), + (nautilus_file_background_matches_default_settings), + (nautilus_file_background_is_set), (background_changed_callback), + (initialize_background_from_settings): + * src/nautilus-sidebar.c: (background_settings_changed_callback), + (nautilus_sidebar_update_appearance): + Remove combine mode from nautilus-background. It no longer serves + any purpose (background always draw dithered now) - bug 2190 & 5516. + 2001-03-29 Darin Adler <darin@eazel.com> reviewed by: John Sullivan <sullivan@eazel.com> diff --git a/libnautilus-extensions/nautilus-background-canvas-group.c b/libnautilus-extensions/nautilus-background-canvas-group.c index 09bbd0f6e..710d0fbd9 100644 --- a/libnautilus-extensions/nautilus-background-canvas-group.c +++ b/libnautilus-extensions/nautilus-background-canvas-group.c @@ -88,11 +88,18 @@ nautilus_background_canvas_group_initialize_class (gpointer klass) static void nautilus_background_canvas_group_initialize_common (NautilusBackgroundCanvasGroup *canvas_group) { +#if 0 /* gnome_canvas_set_dither is only available in gnome-libs > v 1.2.8 + * We're not doing this now because: + * - currently a version of gnome-libs > 1.2.8 is not widely available + * - originally, this dithering was to avoid striations in background + * gradients in 16 bit mode. This is no longer an issue because + * background now dither themselves (in both aa and non-aa mode). */ #ifdef HAVE_GNOME_CANVAS_SET_DITHER gnome_canvas_set_dither (GNOME_CANVAS_ITEM (canvas_group)->canvas, GDK_RGB_DITHER_MAX); #endif +#endif } static void diff --git a/libnautilus-extensions/nautilus-background.c b/libnautilus-extensions/nautilus-background.c index 4e253fcd1..4a86087e6 100644 --- a/libnautilus-extensions/nautilus-background.c +++ b/libnautilus-extensions/nautilus-background.c @@ -94,7 +94,6 @@ struct NautilusBackgroundDetails { int image_height_unscaled; NautilusPixbufLoadHandle *load_image_handle; gboolean emit_after_load; - gboolean combine_mode; NautilusBackgroundImagePlacement image_placement; /* The image_rect is the area (canvas relative) the image will cover. @@ -203,30 +202,6 @@ nautilus_background_destroy (GtkObject *object) NAUTILUS_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object)); } -/* handle the combine mode getting and setting */ - -gboolean -nautilus_background_get_combine_mode (NautilusBackground *background) -{ - g_return_val_if_fail (NAUTILUS_IS_BACKGROUND (background), - FALSE); - - return background->details->combine_mode; -} - -void -nautilus_background_set_combine_mode (NautilusBackground *background, gboolean new_combine_mode) -{ - g_return_if_fail (NAUTILUS_IS_BACKGROUND (background)); - g_return_if_fail (new_combine_mode == FALSE || new_combine_mode == TRUE); - - if (new_combine_mode != background->details->combine_mode) { - background->details->combine_mode = new_combine_mode; - gtk_signal_emit (GTK_OBJECT (background), signals[SETTINGS_CHANGED]); - gtk_signal_emit (GTK_OBJECT (background), signals[APPEARANCE_CHANGED]); - } -} - NautilusBackgroundImagePlacement nautilus_background_get_image_placement (NautilusBackground *background) { diff --git a/libnautilus-extensions/nautilus-background.h b/libnautilus-extensions/nautilus-background.h index ccd6e5262..9d5fb70e8 100644 --- a/libnautilus-extensions/nautilus-background.h +++ b/libnautilus-extensions/nautilus-background.h @@ -77,14 +77,11 @@ void nautilus_background_set_color void nautilus_background_set_image_uri (NautilusBackground *background, const char *image_uri); void nautilus_background_reset (NautilusBackground *background); -void nautilus_background_set_combine_mode (NautilusBackground *background, - gboolean combine); void nautilus_background_set_image_placement (NautilusBackground *background, NautilusBackgroundImagePlacement placement); /* Calls to interrogate the current state of a background. */ char * nautilus_background_get_color (NautilusBackground *background); char * nautilus_background_get_image_uri (NautilusBackground *background); -gboolean nautilus_background_get_combine_mode (NautilusBackground *background); NautilusBackgroundImagePlacement nautilus_background_get_image_placement (NautilusBackground *background); gboolean nautilus_background_is_dark (NautilusBackground *background); gboolean nautilus_background_is_set (NautilusBackground *background); diff --git a/libnautilus-extensions/nautilus-directory-background.c b/libnautilus-extensions/nautilus-directory-background.c index ce32ef1bf..129bd19b4 100644 --- a/libnautilus-extensions/nautilus-directory-background.c +++ b/libnautilus-extensions/nautilus-directory-background.c @@ -56,14 +56,12 @@ static void nautilus_file_update_desktop_pixmaps (NautilusBackground *background static void nautilus_file_background_write_desktop_settings (char *color, char *image, - NautilusBackgroundImagePlacement placement, - gboolean combine); + NautilusBackgroundImagePlacement placement); static gboolean nautilus_file_background_matches_default_settings ( const char* color, const char* default_color, const char* image, const char* default_image, - NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement, - gboolean combine, gboolean default_combine); + NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement); static void desktop_background_realized (NautilusIconContainer *icon_container, void *disconnect_signal) @@ -169,23 +167,14 @@ theme_image_path_to_uri (char *image_file, const char *theme_name) return image_uri; } - -/* FIXME bugzilla.eazel.com 2190: combine mode (image over gradient) does not work for the - * GNOME desktop. Two things to address are supporting it in the background capplet and - * in whatever code initializes the desktop. - * - * None of our themes currently specify this for the desktop. - */ static void nautilus_file_background_get_default_settings_for_theme (const char* theme_name, const char* theme_source, char **color, char **image, - NautilusBackgroundImagePlacement *placement, - gboolean *combine) + NautilusBackgroundImagePlacement *placement) { - char *combine_str; char *image_local_path; if (placement != NULL) { @@ -201,25 +190,18 @@ nautilus_file_background_get_default_settings_for_theme (const char* theme_name, *image = theme_image_path_to_uri (image_local_path, theme_name); g_free (image_local_path); } - - if (combine != NULL) { - combine_str = nautilus_theme_get_theme_data_from_theme (theme_source, "COMBINE", theme_name); - *combine = combine_str != NULL; - g_free (combine_str); - } } static void nautilus_file_background_get_default_settings (const char* theme_source, char **color, char **image, - NautilusBackgroundImagePlacement *placement, - gboolean *combine) + NautilusBackgroundImagePlacement *placement) { char *theme_name; theme_name = nautilus_theme_get_theme (); nautilus_file_background_get_default_settings_for_theme - (theme_name, theme_source, color, image, placement, combine); + (theme_name, theme_source, color, image, placement); g_free (theme_name); } @@ -246,8 +228,7 @@ enum { static void nautilus_file_background_read_desktop_settings (char **color, char **image, - NautilusBackgroundImagePlacement *placement, - gboolean *combine) + NautilusBackgroundImagePlacement *placement) { int image_alignment; char* image_local_path; @@ -275,12 +256,11 @@ nautilus_file_background_read_desktop_settings (char **color, if (no_theme_name_set) { nautilus_file_background_get_default_settings - (desktop_theme_source, &default_color, &default_image_uri, &default_placement, combine); + (desktop_theme_source, &default_color, &default_image_uri, &default_placement); } else { nautilus_file_background_get_default_settings_for_theme - (theme_name, desktop_theme_source, &default_color, &default_image_uri, &default_placement, combine); + (theme_name, desktop_theme_source, &default_color, &default_image_uri, &default_placement); } - /* note - value of combine comes from the theme, not currently setable in gnome_config */ image_local_path = gnome_config_get_string_with_default ("/Background/Default/wallpaper", &no_image_set); @@ -361,20 +341,19 @@ nautilus_file_background_read_desktop_settings (char **color, nautilus_file_background_matches_default_settings (*color, default_color, *image, default_image_uri, - *placement, default_placement, - *combine, *combine); + *placement, default_placement); if (switch_to_cur_theme_default) { g_free (*color); g_free (*image); - nautilus_file_background_get_default_settings (desktop_theme_source, color, image, placement, combine); + nautilus_file_background_get_default_settings (desktop_theme_source, color, image, placement); } if (switch_to_cur_theme_default || no_theme_name_set) { /* Writing out the actual settings for the current theme so that the * background capplet will show the right settings. */ - nautilus_file_background_write_desktop_settings (*color, *image, *placement, *combine); + nautilus_file_background_write_desktop_settings (*color, *image, *placement); } g_free (theme_name); @@ -384,7 +363,7 @@ nautilus_file_background_read_desktop_settings (char **color, } static void -nautilus_file_background_write_desktop_settings (char *color, char *image, NautilusBackgroundImagePlacement placement, gboolean combine) +nautilus_file_background_write_desktop_settings (char *color, char *image, NautilusBackgroundImagePlacement placement) { char *end_color; char *start_color; @@ -483,10 +462,9 @@ nautilus_file_background_write_desktop_default_settings () { char *color; char *image; - gboolean combine; NautilusBackgroundImagePlacement placement; - nautilus_file_background_get_default_settings (desktop_theme_source, &color, &image, &placement, &combine); - nautilus_file_background_write_desktop_settings (color, image, placement, combine); + nautilus_file_background_get_default_settings (desktop_theme_source, &color, &image, &placement); + nautilus_file_background_write_desktop_settings (color, image, placement); } static int @@ -726,8 +704,7 @@ static gboolean nautilus_file_background_matches_default_settings ( const char* color, const char* default_color, const char* image, const char* default_image, - NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement, - gboolean combine, gboolean default_combine) + NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement) { gboolean match_color; gboolean match_image; @@ -737,9 +714,8 @@ nautilus_file_background_matches_default_settings ( match_color = (default_color == NULL) || nautilus_strcmp (color, default_color) == 0; - match_image = (default_image == NULL) || ((nautilus_strcmp (image, default_image) == 0) && - (placement == default_placement) && - (combine == default_combine)); + match_image = (default_image == NULL) || + ((nautilus_strcmp (image, default_image) == 0) && (placement == default_placement)); return match_color && match_image; } @@ -753,25 +729,21 @@ nautilus_file_background_is_set (NautilusBackground *background) char *default_image; gboolean matches; - gboolean combine; - gboolean default_combine; NautilusBackgroundImagePlacement placement; NautilusBackgroundImagePlacement default_placement; color = nautilus_background_get_color (background); image = nautilus_background_get_image_uri (background); - combine = nautilus_background_get_combine_mode (background); placement = nautilus_background_get_image_placement (background); nautilus_file_background_get_default_settings ( nautilus_file_background_peek_theme_source (background), - &default_color, &default_image, &default_placement, &default_combine); + &default_color, &default_image, &default_placement); matches = nautilus_file_background_matches_default_settings (color, default_color, image, default_image, - placement, default_placement, - combine, default_combine); + placement, default_placement); g_free (color); g_free (image); @@ -798,7 +770,7 @@ background_changed_callback (NautilusBackground *background, image = nautilus_background_get_image_uri (background); if (nautilus_background_is_desktop (background)) { - nautilus_file_background_write_desktop_settings (color, image, nautilus_background_get_image_placement (background), nautilus_background_get_combine_mode (background)); + nautilus_file_background_write_desktop_settings (color, image, nautilus_background_get_image_placement (background)); } else { /* Block the other handler while we are writing metadata so it doesn't * try to change the background. @@ -837,7 +809,6 @@ initialize_background_from_settings (NautilusFile *file, { char *color; char *image; - gboolean combine; NautilusBackgroundImagePlacement placement; g_assert (NAUTILUS_IS_FILE (file)); @@ -846,7 +817,7 @@ initialize_background_from_settings (NautilusFile *file, == file); if (nautilus_background_is_desktop (background)) { - nautilus_file_background_read_desktop_settings (&color, &image, &placement, &combine); + nautilus_file_background_read_desktop_settings (&color, &image, &placement); } else { color = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_LOCATION_BACKGROUND_COLOR, @@ -855,13 +826,12 @@ initialize_background_from_settings (NautilusFile *file, NAUTILUS_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL); placement = NAUTILUS_BACKGROUND_TILED; /* non-tiled only avail for desktop, at least for now */ - combine = FALSE; /* only from theme, at least for now */ /* if there's none, read the default from the theme */ if (color == NULL && image == NULL) { nautilus_file_background_get_default_settings (nautilus_file_background_peek_theme_source (background), - &color, &image, &placement, &combine); + &color, &image, &placement); } } @@ -874,7 +844,6 @@ initialize_background_from_settings (NautilusFile *file, nautilus_background_set_color (background, color); nautilus_background_set_image_uri (background, image); - nautilus_background_set_combine_mode (background, combine); nautilus_background_set_image_placement (background, placement); /* Unblock the handler. */ diff --git a/libnautilus-private/nautilus-background-canvas-group.c b/libnautilus-private/nautilus-background-canvas-group.c index 09bbd0f6e..710d0fbd9 100644 --- a/libnautilus-private/nautilus-background-canvas-group.c +++ b/libnautilus-private/nautilus-background-canvas-group.c @@ -88,11 +88,18 @@ nautilus_background_canvas_group_initialize_class (gpointer klass) static void nautilus_background_canvas_group_initialize_common (NautilusBackgroundCanvasGroup *canvas_group) { +#if 0 /* gnome_canvas_set_dither is only available in gnome-libs > v 1.2.8 + * We're not doing this now because: + * - currently a version of gnome-libs > 1.2.8 is not widely available + * - originally, this dithering was to avoid striations in background + * gradients in 16 bit mode. This is no longer an issue because + * background now dither themselves (in both aa and non-aa mode). */ #ifdef HAVE_GNOME_CANVAS_SET_DITHER gnome_canvas_set_dither (GNOME_CANVAS_ITEM (canvas_group)->canvas, GDK_RGB_DITHER_MAX); #endif +#endif } static void diff --git a/libnautilus-private/nautilus-background.c b/libnautilus-private/nautilus-background.c index 4e253fcd1..4a86087e6 100644 --- a/libnautilus-private/nautilus-background.c +++ b/libnautilus-private/nautilus-background.c @@ -94,7 +94,6 @@ struct NautilusBackgroundDetails { int image_height_unscaled; NautilusPixbufLoadHandle *load_image_handle; gboolean emit_after_load; - gboolean combine_mode; NautilusBackgroundImagePlacement image_placement; /* The image_rect is the area (canvas relative) the image will cover. @@ -203,30 +202,6 @@ nautilus_background_destroy (GtkObject *object) NAUTILUS_CALL_PARENT (GTK_OBJECT_CLASS, destroy, (object)); } -/* handle the combine mode getting and setting */ - -gboolean -nautilus_background_get_combine_mode (NautilusBackground *background) -{ - g_return_val_if_fail (NAUTILUS_IS_BACKGROUND (background), - FALSE); - - return background->details->combine_mode; -} - -void -nautilus_background_set_combine_mode (NautilusBackground *background, gboolean new_combine_mode) -{ - g_return_if_fail (NAUTILUS_IS_BACKGROUND (background)); - g_return_if_fail (new_combine_mode == FALSE || new_combine_mode == TRUE); - - if (new_combine_mode != background->details->combine_mode) { - background->details->combine_mode = new_combine_mode; - gtk_signal_emit (GTK_OBJECT (background), signals[SETTINGS_CHANGED]); - gtk_signal_emit (GTK_OBJECT (background), signals[APPEARANCE_CHANGED]); - } -} - NautilusBackgroundImagePlacement nautilus_background_get_image_placement (NautilusBackground *background) { diff --git a/libnautilus-private/nautilus-background.h b/libnautilus-private/nautilus-background.h index ccd6e5262..9d5fb70e8 100644 --- a/libnautilus-private/nautilus-background.h +++ b/libnautilus-private/nautilus-background.h @@ -77,14 +77,11 @@ void nautilus_background_set_color void nautilus_background_set_image_uri (NautilusBackground *background, const char *image_uri); void nautilus_background_reset (NautilusBackground *background); -void nautilus_background_set_combine_mode (NautilusBackground *background, - gboolean combine); void nautilus_background_set_image_placement (NautilusBackground *background, NautilusBackgroundImagePlacement placement); /* Calls to interrogate the current state of a background. */ char * nautilus_background_get_color (NautilusBackground *background); char * nautilus_background_get_image_uri (NautilusBackground *background); -gboolean nautilus_background_get_combine_mode (NautilusBackground *background); NautilusBackgroundImagePlacement nautilus_background_get_image_placement (NautilusBackground *background); gboolean nautilus_background_is_dark (NautilusBackground *background); gboolean nautilus_background_is_set (NautilusBackground *background); diff --git a/libnautilus-private/nautilus-directory-background.c b/libnautilus-private/nautilus-directory-background.c index ce32ef1bf..129bd19b4 100644 --- a/libnautilus-private/nautilus-directory-background.c +++ b/libnautilus-private/nautilus-directory-background.c @@ -56,14 +56,12 @@ static void nautilus_file_update_desktop_pixmaps (NautilusBackground *background static void nautilus_file_background_write_desktop_settings (char *color, char *image, - NautilusBackgroundImagePlacement placement, - gboolean combine); + NautilusBackgroundImagePlacement placement); static gboolean nautilus_file_background_matches_default_settings ( const char* color, const char* default_color, const char* image, const char* default_image, - NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement, - gboolean combine, gboolean default_combine); + NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement); static void desktop_background_realized (NautilusIconContainer *icon_container, void *disconnect_signal) @@ -169,23 +167,14 @@ theme_image_path_to_uri (char *image_file, const char *theme_name) return image_uri; } - -/* FIXME bugzilla.eazel.com 2190: combine mode (image over gradient) does not work for the - * GNOME desktop. Two things to address are supporting it in the background capplet and - * in whatever code initializes the desktop. - * - * None of our themes currently specify this for the desktop. - */ static void nautilus_file_background_get_default_settings_for_theme (const char* theme_name, const char* theme_source, char **color, char **image, - NautilusBackgroundImagePlacement *placement, - gboolean *combine) + NautilusBackgroundImagePlacement *placement) { - char *combine_str; char *image_local_path; if (placement != NULL) { @@ -201,25 +190,18 @@ nautilus_file_background_get_default_settings_for_theme (const char* theme_name, *image = theme_image_path_to_uri (image_local_path, theme_name); g_free (image_local_path); } - - if (combine != NULL) { - combine_str = nautilus_theme_get_theme_data_from_theme (theme_source, "COMBINE", theme_name); - *combine = combine_str != NULL; - g_free (combine_str); - } } static void nautilus_file_background_get_default_settings (const char* theme_source, char **color, char **image, - NautilusBackgroundImagePlacement *placement, - gboolean *combine) + NautilusBackgroundImagePlacement *placement) { char *theme_name; theme_name = nautilus_theme_get_theme (); nautilus_file_background_get_default_settings_for_theme - (theme_name, theme_source, color, image, placement, combine); + (theme_name, theme_source, color, image, placement); g_free (theme_name); } @@ -246,8 +228,7 @@ enum { static void nautilus_file_background_read_desktop_settings (char **color, char **image, - NautilusBackgroundImagePlacement *placement, - gboolean *combine) + NautilusBackgroundImagePlacement *placement) { int image_alignment; char* image_local_path; @@ -275,12 +256,11 @@ nautilus_file_background_read_desktop_settings (char **color, if (no_theme_name_set) { nautilus_file_background_get_default_settings - (desktop_theme_source, &default_color, &default_image_uri, &default_placement, combine); + (desktop_theme_source, &default_color, &default_image_uri, &default_placement); } else { nautilus_file_background_get_default_settings_for_theme - (theme_name, desktop_theme_source, &default_color, &default_image_uri, &default_placement, combine); + (theme_name, desktop_theme_source, &default_color, &default_image_uri, &default_placement); } - /* note - value of combine comes from the theme, not currently setable in gnome_config */ image_local_path = gnome_config_get_string_with_default ("/Background/Default/wallpaper", &no_image_set); @@ -361,20 +341,19 @@ nautilus_file_background_read_desktop_settings (char **color, nautilus_file_background_matches_default_settings (*color, default_color, *image, default_image_uri, - *placement, default_placement, - *combine, *combine); + *placement, default_placement); if (switch_to_cur_theme_default) { g_free (*color); g_free (*image); - nautilus_file_background_get_default_settings (desktop_theme_source, color, image, placement, combine); + nautilus_file_background_get_default_settings (desktop_theme_source, color, image, placement); } if (switch_to_cur_theme_default || no_theme_name_set) { /* Writing out the actual settings for the current theme so that the * background capplet will show the right settings. */ - nautilus_file_background_write_desktop_settings (*color, *image, *placement, *combine); + nautilus_file_background_write_desktop_settings (*color, *image, *placement); } g_free (theme_name); @@ -384,7 +363,7 @@ nautilus_file_background_read_desktop_settings (char **color, } static void -nautilus_file_background_write_desktop_settings (char *color, char *image, NautilusBackgroundImagePlacement placement, gboolean combine) +nautilus_file_background_write_desktop_settings (char *color, char *image, NautilusBackgroundImagePlacement placement) { char *end_color; char *start_color; @@ -483,10 +462,9 @@ nautilus_file_background_write_desktop_default_settings () { char *color; char *image; - gboolean combine; NautilusBackgroundImagePlacement placement; - nautilus_file_background_get_default_settings (desktop_theme_source, &color, &image, &placement, &combine); - nautilus_file_background_write_desktop_settings (color, image, placement, combine); + nautilus_file_background_get_default_settings (desktop_theme_source, &color, &image, &placement); + nautilus_file_background_write_desktop_settings (color, image, placement); } static int @@ -726,8 +704,7 @@ static gboolean nautilus_file_background_matches_default_settings ( const char* color, const char* default_color, const char* image, const char* default_image, - NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement, - gboolean combine, gboolean default_combine) + NautilusBackgroundImagePlacement placement, NautilusBackgroundImagePlacement default_placement) { gboolean match_color; gboolean match_image; @@ -737,9 +714,8 @@ nautilus_file_background_matches_default_settings ( match_color = (default_color == NULL) || nautilus_strcmp (color, default_color) == 0; - match_image = (default_image == NULL) || ((nautilus_strcmp (image, default_image) == 0) && - (placement == default_placement) && - (combine == default_combine)); + match_image = (default_image == NULL) || + ((nautilus_strcmp (image, default_image) == 0) && (placement == default_placement)); return match_color && match_image; } @@ -753,25 +729,21 @@ nautilus_file_background_is_set (NautilusBackground *background) char *default_image; gboolean matches; - gboolean combine; - gboolean default_combine; NautilusBackgroundImagePlacement placement; NautilusBackgroundImagePlacement default_placement; color = nautilus_background_get_color (background); image = nautilus_background_get_image_uri (background); - combine = nautilus_background_get_combine_mode (background); placement = nautilus_background_get_image_placement (background); nautilus_file_background_get_default_settings ( nautilus_file_background_peek_theme_source (background), - &default_color, &default_image, &default_placement, &default_combine); + &default_color, &default_image, &default_placement); matches = nautilus_file_background_matches_default_settings (color, default_color, image, default_image, - placement, default_placement, - combine, default_combine); + placement, default_placement); g_free (color); g_free (image); @@ -798,7 +770,7 @@ background_changed_callback (NautilusBackground *background, image = nautilus_background_get_image_uri (background); if (nautilus_background_is_desktop (background)) { - nautilus_file_background_write_desktop_settings (color, image, nautilus_background_get_image_placement (background), nautilus_background_get_combine_mode (background)); + nautilus_file_background_write_desktop_settings (color, image, nautilus_background_get_image_placement (background)); } else { /* Block the other handler while we are writing metadata so it doesn't * try to change the background. @@ -837,7 +809,6 @@ initialize_background_from_settings (NautilusFile *file, { char *color; char *image; - gboolean combine; NautilusBackgroundImagePlacement placement; g_assert (NAUTILUS_IS_FILE (file)); @@ -846,7 +817,7 @@ initialize_background_from_settings (NautilusFile *file, == file); if (nautilus_background_is_desktop (background)) { - nautilus_file_background_read_desktop_settings (&color, &image, &placement, &combine); + nautilus_file_background_read_desktop_settings (&color, &image, &placement); } else { color = nautilus_file_get_metadata (file, NAUTILUS_METADATA_KEY_LOCATION_BACKGROUND_COLOR, @@ -855,13 +826,12 @@ initialize_background_from_settings (NautilusFile *file, NAUTILUS_METADATA_KEY_LOCATION_BACKGROUND_IMAGE, NULL); placement = NAUTILUS_BACKGROUND_TILED; /* non-tiled only avail for desktop, at least for now */ - combine = FALSE; /* only from theme, at least for now */ /* if there's none, read the default from the theme */ if (color == NULL && image == NULL) { nautilus_file_background_get_default_settings (nautilus_file_background_peek_theme_source (background), - &color, &image, &placement, &combine); + &color, &image, &placement); } } @@ -874,7 +844,6 @@ initialize_background_from_settings (NautilusFile *file, nautilus_background_set_color (background, color); nautilus_background_set_image_uri (background, image); - nautilus_background_set_combine_mode (background, combine); nautilus_background_set_image_placement (background, placement); /* Unblock the handler. */ diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c index 84ad4790d..31c066209 100644 --- a/src/nautilus-information-panel.c +++ b/src/nautilus-information-panel.c @@ -1112,18 +1112,6 @@ background_settings_changed_callback (NautilusBackground *background, NautilusSi NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_IMAGE, NULL, image); - - /* Block so this fn is not reinvoked due to nautilus_background_set_combine_mode */ - gtk_signal_handler_block_by_func (GTK_OBJECT (background), - background_settings_changed_callback, - sidebar); - /* Combine mode uses dithering to avoid striations in gradients. - */ - nautilus_background_set_combine_mode (background, nautilus_gradient_is_gradient (color)); - - gtk_signal_handler_unblock_by_func (GTK_OBJECT (background), - background_settings_changed_callback, - sidebar); g_free (color); g_free (image); @@ -1455,7 +1443,6 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) char *color_spec; char *background_color; char *background_image; - gboolean combine; g_return_if_fail (NAUTILUS_IS_SIDEBAR (sidebar)); @@ -1476,12 +1463,8 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) /* Set up the background color and image from the metadata. */ if (nautilus_sidebar_background_is_default (sidebar)) { - char* combine_str; background_color = g_strdup (sidebar->details->default_background_color); background_image = g_strdup (sidebar->details->default_background_image); - combine_str = nautilus_theme_get_theme_data ("sidebar", "combine"); - combine = combine_str != NULL; - g_free (combine_str); } else { background_color = nautilus_file_get_metadata (sidebar->details->file, NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_COLOR, @@ -1489,10 +1472,6 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) background_image = nautilus_file_get_metadata (sidebar->details->file, NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_IMAGE, NULL); - - /* Combine mode uses dithering to avoid striations in gradients. - */ - combine = nautilus_gradient_is_gradient (background_color); } /* Block so we don't write these settings out in response to our set calls below */ @@ -1502,7 +1481,6 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) nautilus_background_set_image_uri (background, background_image); nautilus_background_set_color (background, background_color); - nautilus_background_set_combine_mode (background, combine); g_free (background_color); g_free (background_image); diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c index 84ad4790d..31c066209 100644 --- a/src/nautilus-sidebar.c +++ b/src/nautilus-sidebar.c @@ -1112,18 +1112,6 @@ background_settings_changed_callback (NautilusBackground *background, NautilusSi NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_IMAGE, NULL, image); - - /* Block so this fn is not reinvoked due to nautilus_background_set_combine_mode */ - gtk_signal_handler_block_by_func (GTK_OBJECT (background), - background_settings_changed_callback, - sidebar); - /* Combine mode uses dithering to avoid striations in gradients. - */ - nautilus_background_set_combine_mode (background, nautilus_gradient_is_gradient (color)); - - gtk_signal_handler_unblock_by_func (GTK_OBJECT (background), - background_settings_changed_callback, - sidebar); g_free (color); g_free (image); @@ -1455,7 +1443,6 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) char *color_spec; char *background_color; char *background_image; - gboolean combine; g_return_if_fail (NAUTILUS_IS_SIDEBAR (sidebar)); @@ -1476,12 +1463,8 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) /* Set up the background color and image from the metadata. */ if (nautilus_sidebar_background_is_default (sidebar)) { - char* combine_str; background_color = g_strdup (sidebar->details->default_background_color); background_image = g_strdup (sidebar->details->default_background_image); - combine_str = nautilus_theme_get_theme_data ("sidebar", "combine"); - combine = combine_str != NULL; - g_free (combine_str); } else { background_color = nautilus_file_get_metadata (sidebar->details->file, NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_COLOR, @@ -1489,10 +1472,6 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) background_image = nautilus_file_get_metadata (sidebar->details->file, NAUTILUS_METADATA_KEY_SIDEBAR_BACKGROUND_IMAGE, NULL); - - /* Combine mode uses dithering to avoid striations in gradients. - */ - combine = nautilus_gradient_is_gradient (background_color); } /* Block so we don't write these settings out in response to our set calls below */ @@ -1502,7 +1481,6 @@ nautilus_sidebar_update_appearance (NautilusSidebar *sidebar) nautilus_background_set_image_uri (background, background_image); nautilus_background_set_color (background, background_color); - nautilus_background_set_combine_mode (background, combine); g_free (background_color); g_free (background_image); |