diff options
-rw-r--r-- | ChangeLog | 25 | ||||
-rw-r--r-- | components/hardware/nautilus-hardware-view.c | 3 | ||||
-rw-r--r-- | components/notes/nautilus-notes.c | 7 | ||||
-rw-r--r-- | icons/gnome/gnome.xml | 16 | ||||
-rw-r--r-- | src/nautilus-information-panel.c | 20 | ||||
-rw-r--r-- | src/nautilus-property-browser.c | 9 | ||||
-rw-r--r-- | src/nautilus-sidebar.c | 20 |
7 files changed, 67 insertions, 33 deletions
@@ -1,3 +1,28 @@ +2002-07-19 Federico Mena Quintero <federico@ximian.com> + + Fixes the Nautilus part of #46238; see eel for the other part. + + * components/hardware/nautilus-hardware-view.c + (nautilus_hardware_view_init): Do not set a hardcoded background + color; just use the color from the GTK+ theme. We still set up + the EelBackground as this handles dragged colors, but it does not + save them anywhere. + + * components/notes/nautilus-notes.c (make_notes_view): Do not set + up an EelBackground at all for the text view; just let it use the + default color from the GTK+ theme. This code did not handle + dragged colors or anything, anyways. + + * src/nautilus-property-browser.c + (nautilus_property_browser_init): Do not set a hardcoded + background color. + + * src/nautilus-sidebar.c (nautilus_sidebar_style_set): + ::style_set() handler; we act as if the theme changed. + + * icons/gnome/gnome.xml: Removed hardcoded colors and background + images so that we follow the current GTK+ theme. It's bland but good. + 2002-07-17 Frank Worsley <fworsley@shaw.ca> * src/nautilus-application.c: (save_window_geometry_timeout), diff --git a/components/hardware/nautilus-hardware-view.c b/components/hardware/nautilus-hardware-view.c index 9edb9bd86..ec18606f5 100644 --- a/components/hardware/nautilus-hardware-view.c +++ b/components/hardware/nautilus-hardware-view.c @@ -95,8 +95,6 @@ static int update_uptime_text (gpointer callback_data); EEL_CLASS_BOILERPLATE (NautilusHardwareView, nautilus_hardware_view, GTK_TYPE_EVENT_BOX) -#define HARDWARE_DEFAULT_BACKGROUND_COLOR "#DDDDBB" - static void nautilus_hardware_view_class_init (NautilusHardwareViewClass *klass) { @@ -162,7 +160,6 @@ nautilus_hardware_view_init (NautilusHardwareView *hardware_view) G_CALLBACK (hardware_view_load_location_callback), hardware_view, 0); background = eel_get_widget_background (GTK_WIDGET (hardware_view)); - eel_background_set_color (background, HARDWARE_DEFAULT_BACKGROUND_COLOR); /* prepare ourselves to receive dropped objects */ gtk_drag_dest_set (GTK_WIDGET (hardware_view), diff --git a/components/notes/nautilus-notes.c b/components/notes/nautilus-notes.c index 835dbc698..80da5ace7 100644 --- a/components/notes/nautilus-notes.c +++ b/components/notes/nautilus-notes.c @@ -29,7 +29,6 @@ #include <config.h> -#include <eel/eel-background.h> #include <eel/eel-debug.h> #include <eel/eel-gtk-extensions.h> #include <eel/eel-string.h> @@ -54,8 +53,6 @@ #include <libnautilus-private/nautilus-undo-signal-handlers.h> #endif -#define NOTES_DEFAULT_BACKGROUND_COLOR "#FFFFBB" - #define SAVE_TIMEOUT (3 * 1000) /* property bag getting and setting routines */ @@ -358,7 +355,6 @@ make_notes_view () { GtkWidget *vbox; Notes *notes; - EelBackground *background; notes = g_new0 (Notes, 1); notes->uri = g_strdup (""); @@ -379,9 +375,6 @@ make_notes_view () GTK_WRAP_WORD); gtk_box_pack_start (GTK_BOX (vbox), notes->note_text_field, TRUE, TRUE, 0); - background = eel_get_widget_background (notes->note_text_field); - eel_background_set_color (background, NOTES_DEFAULT_BACKGROUND_COLOR); - g_signal_connect (notes->note_text_field, "focus_out_event", G_CALLBACK (on_text_field_focus_out_event), notes); g_signal_connect (notes->text_buffer, "changed", diff --git a/icons/gnome/gnome.xml b/icons/gnome/gnome.xml index f9376e65f..428e78487 100644 --- a/icons/gnome/gnome.xml +++ b/icons/gnome/gnome.xml @@ -2,24 +2,12 @@ <theme _name="GNOME" _description="A theme designed to fit well with the classic GNOME environment."> - <directory background_tile_image="patterns/gnome.jpg" - selection_box_color_rgba="0x00441140" - selection_box_color="#8d8173"/> - - <sidebar sidebar_background_color="#8d8173-#3f372e%80-#000000:h" - sidebar_background_tile_image="patterns/.striated.png" - tab_piece_images="sidebar_tab_pieces" combine="true" - left_offset="0" shadow_offset="1" text_h_offset="-4" - label_color="#FFFFFF" - tab_font="Helvetica Bold" /> + <sidebar tab_piece_images="sidebar_tab_pieces" combine="true" + left_offset="0" shadow_offset="1" text_h_offset="-4"/> <desktop background_tile_image="patterns/dark-gnome.jpg" background_color="#:F400/F200/e800"/> - <icon highlight_background_color="#000000" - highlight_text_color="#FFFFFF" - text_fill_color="#FFFFFF"/> - <thumbnails frame_offsets="3,3,6,6"/> <toolbar icon_theme="standard"/> <throbber frame_count="6" url="http://www.gnome.org"/> diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c index dcb32fd38..275280aa9 100644 --- a/src/nautilus-information-panel.c +++ b/src/nautilus-information-panel.c @@ -38,6 +38,7 @@ #include <bonobo/bonobo-exception.h> #include <eel/eel-background.h> +#include <eel/eel-background-style.h> #include <eel/eel-glib-extensions.h> #include <eel/eel-gtk-extensions.h> #include <eel/eel-gtk-macros.h> @@ -122,6 +123,8 @@ static void nautilus_sidebar_drag_data_received (GtkWidget *widget static void nautilus_sidebar_read_theme (NautilusSidebar *sidebar); static void nautilus_sidebar_size_allocate (GtkWidget *widget, GtkAllocation *allocation); +static void nautilus_sidebar_style_set (GtkWidget *widget, + GtkStyle *previous_style); static void nautilus_sidebar_theme_changed (gpointer user_data); static void nautilus_sidebar_confirm_trash_changed (gpointer user_data); static void nautilus_sidebar_update_appearance (NautilusSidebar *sidebar); @@ -200,6 +203,7 @@ nautilus_sidebar_class_init (GtkObjectClass *object_klass) widget_class->button_press_event = nautilus_sidebar_press_event; widget_class->button_release_event = nautilus_sidebar_release_event; widget_class->size_allocate = nautilus_sidebar_size_allocate; + widget_class->style_set = nautilus_sidebar_style_set; /* add the "location changed" signal */ signals[LOCATION_CHANGED] = g_signal_new @@ -1706,6 +1710,22 @@ nautilus_sidebar_size_allocate (GtkWidget *widget, } } +/* ::style_set handler for the sidebar */ +static void +nautilus_sidebar_style_set (GtkWidget *widget, GtkStyle *previous_style) +{ + NautilusSidebar *sidebar; + GtkStyle *style; + + sidebar = NAUTILUS_SIDEBAR (widget); + + style = gtk_widget_get_style (widget); + + /* This is slightly hackish */ + if (!EEL_IS_BACKGROUND_STYLE (style)) + nautilus_sidebar_theme_changed (sidebar); +} + void nautilus_sidebar_setup_width (NautilusSidebar *sidebar) { diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c index ccf9fc2ad..c708d4e39 100644 --- a/src/nautilus-property-browser.c +++ b/src/nautilus-property-browser.c @@ -32,7 +32,6 @@ #include "nautilus-property-browser.h" #include "nautilus-signaller.h" -#include <eel/eel-background.h> #include <eel/eel-gdk-extensions.h> #include <eel/eel-gdk-pixbuf-extensions.h> #include <eel/eel-glib-extensions.h> @@ -190,10 +189,6 @@ static void element_clicked_callback (GtkWidget gpointer callback_data); -#define BROWSER_BACKGROUND_COLOR "#FFFFFF" - -#define THEME_SELECT_COLOR "#FF9999" - #define BROWSER_CATEGORIES_FILE_NAME "browser.xml" #define PROPERTY_BROWSER_WIDTH 540 @@ -273,7 +268,6 @@ nautilus_property_browser_init (GtkObject *object) gtk_window_set_title (GTK_WINDOW (widget), _("Backgrounds and Emblems")); gtk_window_set_wmclass (GTK_WINDOW (widget), "property_browser", "Nautilus"); eel_gtk_window_set_up_close_accelerator (GTK_WINDOW (widget)); - /* create the main vbox. */ vbox = gtk_vbox_new (FALSE, 0); @@ -1961,7 +1955,6 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro { xmlNodePtr cur_node; xmlDocPtr document; - EelBackground *background; GtkWidget *viewport; GtkRadioButton *group; gboolean got_categories; @@ -1985,8 +1978,6 @@ nautilus_property_browser_update_contents (NautilusPropertyBrowser *property_bro viewport = gtk_viewport_new (NULL, NULL); gtk_widget_show(viewport); gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_IN); - background = eel_get_widget_background (viewport); - eel_background_set_color (background, BROWSER_BACKGROUND_COLOR); gtk_container_add (GTK_CONTAINER (property_browser->details->content_container), property_browser->details->content_frame); gtk_widget_show (property_browser->details->content_frame); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (property_browser->details->content_frame), diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c index dcb32fd38..275280aa9 100644 --- a/src/nautilus-sidebar.c +++ b/src/nautilus-sidebar.c @@ -38,6 +38,7 @@ #include <bonobo/bonobo-exception.h> #include <eel/eel-background.h> +#include <eel/eel-background-style.h> #include <eel/eel-glib-extensions.h> #include <eel/eel-gtk-extensions.h> #include <eel/eel-gtk-macros.h> @@ -122,6 +123,8 @@ static void nautilus_sidebar_drag_data_received (GtkWidget *widget static void nautilus_sidebar_read_theme (NautilusSidebar *sidebar); static void nautilus_sidebar_size_allocate (GtkWidget *widget, GtkAllocation *allocation); +static void nautilus_sidebar_style_set (GtkWidget *widget, + GtkStyle *previous_style); static void nautilus_sidebar_theme_changed (gpointer user_data); static void nautilus_sidebar_confirm_trash_changed (gpointer user_data); static void nautilus_sidebar_update_appearance (NautilusSidebar *sidebar); @@ -200,6 +203,7 @@ nautilus_sidebar_class_init (GtkObjectClass *object_klass) widget_class->button_press_event = nautilus_sidebar_press_event; widget_class->button_release_event = nautilus_sidebar_release_event; widget_class->size_allocate = nautilus_sidebar_size_allocate; + widget_class->style_set = nautilus_sidebar_style_set; /* add the "location changed" signal */ signals[LOCATION_CHANGED] = g_signal_new @@ -1706,6 +1710,22 @@ nautilus_sidebar_size_allocate (GtkWidget *widget, } } +/* ::style_set handler for the sidebar */ +static void +nautilus_sidebar_style_set (GtkWidget *widget, GtkStyle *previous_style) +{ + NautilusSidebar *sidebar; + GtkStyle *style; + + sidebar = NAUTILUS_SIDEBAR (widget); + + style = gtk_widget_get_style (widget); + + /* This is slightly hackish */ + if (!EEL_IS_BACKGROUND_STYLE (style)) + nautilus_sidebar_theme_changed (sidebar); +} + void nautilus_sidebar_setup_width (NautilusSidebar *sidebar) { |