summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog25
-rw-r--r--configure.in1
-rw-r--r--data/backgrounds/.striated.pngbin0 -> 561 bytes
-rw-r--r--data/backgrounds/Makefile.am1
-rw-r--r--icons/Makefile.am2
-rw-r--r--icons/arlo/.cvsignore2
-rw-r--r--icons/arlo/Makefile.am9
-rw-r--r--icons/arlo/arlo.xml5
-rw-r--r--icons/arlo/i-directory.pngbin0 -> 2954 bytes
-rw-r--r--icons/arlo/i-regular.pngbin0 -> 2450 bytes
-rw-r--r--icons/arlo/sidebar_tab_pieces.pngbin0 -> 5123 bytes
-rw-r--r--libnautilus-extensions/nautilus-background.c66
-rw-r--r--libnautilus-extensions/nautilus-background.h2
-rw-r--r--libnautilus-extensions/nautilus-directory-background.c19
-rw-r--r--libnautilus-private/nautilus-background.c66
-rw-r--r--libnautilus-private/nautilus-background.h2
-rw-r--r--libnautilus-private/nautilus-directory-background.c19
-rw-r--r--src/nautilus-information-panel.c13
-rw-r--r--src/nautilus-property-browser.c90
-rw-r--r--src/nautilus-sidebar.c13
20 files changed, 268 insertions, 67 deletions
diff --git a/ChangeLog b/ChangeLog
index bd6eb6e80..22423c746 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2000-06-30 Andy Hertzfeld <andy@eazel.com>
+
+ * configure.in:
+ * data/backgrounds/Makefile.am:
+ * icons/Makefile.am:
+ * icons/arlo/.cvsignore:
+ * icons/arlo/Makefile.am:
+ * icons/arlo/arlo.xml:
+ added a new theme for Arlo
+ * libnautilus-extensions/nautilus-background.c,h:
+ (nautilus_background_get_combine_mode),
+ (nautilus_background_set_combine_mode), (nautilus_background_draw),
+ (nautilus_background_draw_aa):
+ added "combine" mode where it draws a background overlayed with a
+ semi-transparent image.
+ * libnautilus-extensions/nautilus-directory-background.c:
+ (directory_changed_callback), (background_reset_callback):
+ set up combine_mode if necessary
+ * src/nautilus-property-browser.c:
+ (make_properties_from_directory_path):
+ don't display images whose name starts with "."
+ * src/nautilus-sidebar.c: (background_reset_callback),
+ (nautilus_sidebar_update_info):
+ set up combine mode if necessary
+
2000-06-29 Eskil Heyn Olsen <eskil@eazel.com>
* components/services/install/command-line/Makefile.am:
diff --git a/configure.in b/configure.in
index 96c02803b..984ad6585 100644
--- a/configure.in
+++ b/configure.in
@@ -355,6 +355,7 @@ AC_OUTPUT([
nautilus.spec
Makefile
icons/Makefile
+icons/arlo/Makefile
icons/eazel/Makefile
icons/vector/Makefile
data/Makefile
diff --git a/data/backgrounds/.striated.png b/data/backgrounds/.striated.png
new file mode 100644
index 000000000..4a14740c8
--- /dev/null
+++ b/data/backgrounds/.striated.png
Binary files differ
diff --git a/data/backgrounds/Makefile.am b/data/backgrounds/Makefile.am
index cae0ff772..60a0ca94f 100644
--- a/data/backgrounds/Makefile.am
+++ b/data/backgrounds/Makefile.am
@@ -3,6 +3,7 @@ NULL=
backdir = $(datadir)/nautilus/backgrounds
back_DATA = \
+ .striated.png \
beige_tile.jpg \
blue_sky.png \
bricks.jpg \
diff --git a/icons/Makefile.am b/icons/Makefile.am
index 50c5e09e4..f9abaf09e 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -1,6 +1,6 @@
NULL=
-SUBDIRS = eazel vector
+SUBDIRS = arlo eazel vector
icondir = $(datadir)/pixmaps/nautilus
diff --git a/icons/arlo/.cvsignore b/icons/arlo/.cvsignore
new file mode 100644
index 000000000..282522db0
--- /dev/null
+++ b/icons/arlo/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/icons/arlo/Makefile.am b/icons/arlo/Makefile.am
new file mode 100644
index 000000000..d03b9c3d9
--- /dev/null
+++ b/icons/arlo/Makefile.am
@@ -0,0 +1,9 @@
+arlodir = $(datadir)/pixmaps/nautilus/arlo
+
+arlo_DATA = \
+ arlo.xml \
+ i-directory.png \
+ i-regular.png \
+ sidebar_tab_pieces.png
+
+EXTRA_DIST = $(arlo_DATA)
diff --git a/icons/arlo/arlo.xml b/icons/arlo/arlo.xml
new file mode 100644
index 000000000..de0ebddb7
--- /dev/null
+++ b/icons/arlo/arlo.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<theme name="arlo">
+ <directory BACKGROUND_TILE_IMAGE="backgrounds/white_ribs.png"/>
+ <sidebar SIDEBAR_BACKGROUND_COLOR="rgb:DDDD/FFFF/BBBB-rgb:7777/DDDD/3333:h" SIDEBAR_BACKGROUND_TILE_IMAGE="backgrounds/.striated.png" COMBINE="TRUE"/>
+ </theme>
diff --git a/icons/arlo/i-directory.png b/icons/arlo/i-directory.png
new file mode 100644
index 000000000..08e704b82
--- /dev/null
+++ b/icons/arlo/i-directory.png
Binary files differ
diff --git a/icons/arlo/i-regular.png b/icons/arlo/i-regular.png
new file mode 100644
index 000000000..0e71b37bb
--- /dev/null
+++ b/icons/arlo/i-regular.png
Binary files differ
diff --git a/icons/arlo/sidebar_tab_pieces.png b/icons/arlo/sidebar_tab_pieces.png
new file mode 100644
index 000000000..5e11bb23c
--- /dev/null
+++ b/icons/arlo/sidebar_tab_pieces.png
Binary files differ
diff --git a/libnautilus-extensions/nautilus-background.c b/libnautilus-extensions/nautilus-background.c
index f0cf88a4e..6c80da946 100644
--- a/libnautilus-extensions/nautilus-background.c
+++ b/libnautilus-extensions/nautilus-background.c
@@ -76,6 +76,7 @@ struct NautilusBackgroundDetails {
GdkPixmap *tile_pixmap;
GdkPixbuf *tile_image;
NautilusPixbufLoadHandle *load_tile_image_handle;
+ gboolean combine_mode;
};
static void
@@ -150,24 +151,78 @@ nautilus_background_destroy (GtkObject *object)
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
}
+/* handle the combine mode getting and setting */
+
+gboolean
+nautilus_background_get_combine_mode (NautilusBackground *background)
+{
+ return background->details->combine_mode;
+}
+
+void
+nautilus_background_set_combine_mode (NautilusBackground *background, gboolean new_combine_mode)
+{
+ 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]);
+ }
+}
+
NautilusBackground *
nautilus_background_new (void)
{
return NAUTILUS_BACKGROUND (gtk_type_new (NAUTILUS_TYPE_BACKGROUND));
}
+/* this routine is for gdk style rendering, which doesn't naturally support transparency, so we
+ draw into a pixbuf offscreen if necessary (coming soon */
+
void
nautilus_background_draw (NautilusBackground *background,
- GdkDrawable *drawable,
+ GdkDrawable *drawable,
GdkGC *gc,
const GdkRectangle *rectangle,
int origin_x,
int origin_y)
{
+ GdkPixbuf *pixbuf;
+ GnomeCanvasBuf buffer;
char *start_color_spec, *end_color_spec;
guint32 start_rgb, end_rgb;
gboolean horizontal_gradient;
+ if (background->details->combine_mode) {
+ /* allocate a pixbuf the size of the rectangle */
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, rectangle->width, rectangle->height);
+
+ /* contrive a CanvasBuf structure to point to it */
+ buffer.buf = gdk_pixbuf_get_pixels (pixbuf);
+ buffer.buf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ buffer.rect.x0 = rectangle->x;
+ buffer.rect.y0 = rectangle->y;
+ buffer.rect.x1 = rectangle->x + rectangle->width;
+ buffer.rect.y1 = rectangle->y + rectangle->height;
+ buffer.bg_color = 0xFFFFFFFF;
+
+ /* invoke the anti-aliased code to do the work */
+ nautilus_background_draw_aa (background, &buffer, rectangle->width, rectangle->height);
+
+ /* blit the pixbuf to the drawable */
+ gdk_pixbuf_render_to_drawable (pixbuf, drawable, gc,
+ 0, 0,
+ rectangle->x, rectangle->y, rectangle->width, rectangle->height,
+ GDK_RGB_DITHER_NORMAL, origin_x, origin_y);
+
+ /* free things up and we're done */
+ gdk_pixbuf_unref (pixbuf);
+
+ return;
+ }
+
if (background->details->tile_image != NULL) {
nautilus_gdk_pixbuf_render_to_drawable_tiled (background->details->tile_image,
drawable,
@@ -283,9 +338,7 @@ void nautilus_background_draw_aa (NautilusBackground *background,
gboolean horizontal_gradient;
if (!buffer->is_buf) {
- if (background->details->tile_image) {
- draw_pixbuf_tiled_aa (background->details->tile_image, buffer);
- } else {
+ if (background->details->combine_mode || (background->details->tile_image == NULL)) {
start_color_spec = nautilus_gradient_get_start_color_spec (background->details->color);
end_color_spec = nautilus_gradient_get_end_color_spec (background->details->color);
horizontal_gradient = nautilus_gradient_is_horizontal (background->details->color);
@@ -304,6 +357,11 @@ void nautilus_background_draw_aa (NautilusBackground *background,
} else
gnome_canvas_buf_ensure_buf(buffer);
}
+
+ if (background->details->tile_image) {
+ draw_pixbuf_tiled_aa (background->details->tile_image, buffer);
+ }
+
buffer->is_buf = TRUE;
}
}
diff --git a/libnautilus-extensions/nautilus-background.h b/libnautilus-extensions/nautilus-background.h
index da5db1446..25bab695a 100644
--- a/libnautilus-extensions/nautilus-background.h
+++ b/libnautilus-extensions/nautilus-background.h
@@ -68,10 +68,12 @@ void nautilus_background_set_color (Nautil
void nautilus_background_set_tile_image_uri (NautilusBackground *background,
const char *image_uri);
void nautilus_background_reset (NautilusBackground *background);
+void nautilus_background_set_combine_mode (NautilusBackground *background, gboolean combine);
/* Calls to interrogate the current state of a background. */
char * nautilus_background_get_color (NautilusBackground *background);
char * nautilus_background_get_tile_image_uri (NautilusBackground *background);
+gboolean nautilus_background_get_combine_mode (NautilusBackground *background);
gboolean nautilus_background_is_set (NautilusBackground *background);
/* Explicitly fills a rectangle with a background. */
diff --git a/libnautilus-extensions/nautilus-directory-background.c b/libnautilus-extensions/nautilus-directory-background.c
index 35abc0b76..04b75bee7 100644
--- a/libnautilus-extensions/nautilus-directory-background.c
+++ b/libnautilus-extensions/nautilus-directory-background.c
@@ -104,7 +104,7 @@ static void
directory_changed_callback (NautilusDirectory *directory,
NautilusBackground *background)
{
- char *color, *image;
+ char *color, *image, *combine;
g_assert (NAUTILUS_IS_DIRECTORY (directory));
g_assert (NAUTILUS_IS_BACKGROUND (background));
@@ -125,20 +125,25 @@ directory_changed_callback (NautilusDirectory *directory,
image = nautilus_directory_get_metadata (directory,
NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_IMAGE,
NULL);
-
+ combine = NULL; /* only from theme, at least for now */
+
/* if there's none, read the default from the theme */
if (color == NULL && image == NULL) {
color = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_COLOR);
image = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_IMAGE);
+ combine = nautilus_theme_get_theme_data ("directory", "COMBINE");
+
image = local_data_file_to_uri(image);
}
nautilus_background_set_color (background, color);
nautilus_background_set_tile_image_uri (background, image);
+ nautilus_background_set_combine_mode (background, combine != NULL);
g_free (color);
g_free (image);
-
+ g_free (combine);
+
/* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
background_changed_callback,
@@ -165,12 +170,13 @@ static void
background_reset_callback (NautilusBackground *background,
NautilusDirectory *directory)
{
- char *color, *image;
+ char *color, *image, *combine;
color = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_COLOR);
image = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_IMAGE);
- image = local_data_file_to_uri(image);
+ combine = nautilus_theme_get_theme_data ("directory", "COMBINE");
+ image = local_data_file_to_uri(image);
/* block the handler so we don't write metadata */
gtk_signal_handler_block_by_func (GTK_OBJECT (background),
background_changed_callback,
@@ -178,14 +184,15 @@ background_reset_callback (NautilusBackground *background,
nautilus_background_set_color (background, color);
nautilus_background_set_tile_image_uri (background, image);
+ nautilus_background_set_combine_mode (background, combine != NULL);
/* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
background_changed_callback,
directory);
-
g_free (color);
g_free (image);
+ g_free (combine);
/* reset the metadata */
nautilus_directory_set_metadata (directory,
diff --git a/libnautilus-private/nautilus-background.c b/libnautilus-private/nautilus-background.c
index f0cf88a4e..6c80da946 100644
--- a/libnautilus-private/nautilus-background.c
+++ b/libnautilus-private/nautilus-background.c
@@ -76,6 +76,7 @@ struct NautilusBackgroundDetails {
GdkPixmap *tile_pixmap;
GdkPixbuf *tile_image;
NautilusPixbufLoadHandle *load_tile_image_handle;
+ gboolean combine_mode;
};
static void
@@ -150,24 +151,78 @@ nautilus_background_destroy (GtkObject *object)
NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object));
}
+/* handle the combine mode getting and setting */
+
+gboolean
+nautilus_background_get_combine_mode (NautilusBackground *background)
+{
+ return background->details->combine_mode;
+}
+
+void
+nautilus_background_set_combine_mode (NautilusBackground *background, gboolean new_combine_mode)
+{
+ 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]);
+ }
+}
+
NautilusBackground *
nautilus_background_new (void)
{
return NAUTILUS_BACKGROUND (gtk_type_new (NAUTILUS_TYPE_BACKGROUND));
}
+/* this routine is for gdk style rendering, which doesn't naturally support transparency, so we
+ draw into a pixbuf offscreen if necessary (coming soon */
+
void
nautilus_background_draw (NautilusBackground *background,
- GdkDrawable *drawable,
+ GdkDrawable *drawable,
GdkGC *gc,
const GdkRectangle *rectangle,
int origin_x,
int origin_y)
{
+ GdkPixbuf *pixbuf;
+ GnomeCanvasBuf buffer;
char *start_color_spec, *end_color_spec;
guint32 start_rgb, end_rgb;
gboolean horizontal_gradient;
+ if (background->details->combine_mode) {
+ /* allocate a pixbuf the size of the rectangle */
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, rectangle->width, rectangle->height);
+
+ /* contrive a CanvasBuf structure to point to it */
+ buffer.buf = gdk_pixbuf_get_pixels (pixbuf);
+ buffer.buf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+ buffer.rect.x0 = rectangle->x;
+ buffer.rect.y0 = rectangle->y;
+ buffer.rect.x1 = rectangle->x + rectangle->width;
+ buffer.rect.y1 = rectangle->y + rectangle->height;
+ buffer.bg_color = 0xFFFFFFFF;
+
+ /* invoke the anti-aliased code to do the work */
+ nautilus_background_draw_aa (background, &buffer, rectangle->width, rectangle->height);
+
+ /* blit the pixbuf to the drawable */
+ gdk_pixbuf_render_to_drawable (pixbuf, drawable, gc,
+ 0, 0,
+ rectangle->x, rectangle->y, rectangle->width, rectangle->height,
+ GDK_RGB_DITHER_NORMAL, origin_x, origin_y);
+
+ /* free things up and we're done */
+ gdk_pixbuf_unref (pixbuf);
+
+ return;
+ }
+
if (background->details->tile_image != NULL) {
nautilus_gdk_pixbuf_render_to_drawable_tiled (background->details->tile_image,
drawable,
@@ -283,9 +338,7 @@ void nautilus_background_draw_aa (NautilusBackground *background,
gboolean horizontal_gradient;
if (!buffer->is_buf) {
- if (background->details->tile_image) {
- draw_pixbuf_tiled_aa (background->details->tile_image, buffer);
- } else {
+ if (background->details->combine_mode || (background->details->tile_image == NULL)) {
start_color_spec = nautilus_gradient_get_start_color_spec (background->details->color);
end_color_spec = nautilus_gradient_get_end_color_spec (background->details->color);
horizontal_gradient = nautilus_gradient_is_horizontal (background->details->color);
@@ -304,6 +357,11 @@ void nautilus_background_draw_aa (NautilusBackground *background,
} else
gnome_canvas_buf_ensure_buf(buffer);
}
+
+ if (background->details->tile_image) {
+ draw_pixbuf_tiled_aa (background->details->tile_image, buffer);
+ }
+
buffer->is_buf = TRUE;
}
}
diff --git a/libnautilus-private/nautilus-background.h b/libnautilus-private/nautilus-background.h
index da5db1446..25bab695a 100644
--- a/libnautilus-private/nautilus-background.h
+++ b/libnautilus-private/nautilus-background.h
@@ -68,10 +68,12 @@ void nautilus_background_set_color (Nautil
void nautilus_background_set_tile_image_uri (NautilusBackground *background,
const char *image_uri);
void nautilus_background_reset (NautilusBackground *background);
+void nautilus_background_set_combine_mode (NautilusBackground *background, gboolean combine);
/* Calls to interrogate the current state of a background. */
char * nautilus_background_get_color (NautilusBackground *background);
char * nautilus_background_get_tile_image_uri (NautilusBackground *background);
+gboolean nautilus_background_get_combine_mode (NautilusBackground *background);
gboolean nautilus_background_is_set (NautilusBackground *background);
/* Explicitly fills a rectangle with a background. */
diff --git a/libnautilus-private/nautilus-directory-background.c b/libnautilus-private/nautilus-directory-background.c
index 35abc0b76..04b75bee7 100644
--- a/libnautilus-private/nautilus-directory-background.c
+++ b/libnautilus-private/nautilus-directory-background.c
@@ -104,7 +104,7 @@ static void
directory_changed_callback (NautilusDirectory *directory,
NautilusBackground *background)
{
- char *color, *image;
+ char *color, *image, *combine;
g_assert (NAUTILUS_IS_DIRECTORY (directory));
g_assert (NAUTILUS_IS_BACKGROUND (background));
@@ -125,20 +125,25 @@ directory_changed_callback (NautilusDirectory *directory,
image = nautilus_directory_get_metadata (directory,
NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_IMAGE,
NULL);
-
+ combine = NULL; /* only from theme, at least for now */
+
/* if there's none, read the default from the theme */
if (color == NULL && image == NULL) {
color = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_COLOR);
image = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_IMAGE);
+ combine = nautilus_theme_get_theme_data ("directory", "COMBINE");
+
image = local_data_file_to_uri(image);
}
nautilus_background_set_color (background, color);
nautilus_background_set_tile_image_uri (background, image);
+ nautilus_background_set_combine_mode (background, combine != NULL);
g_free (color);
g_free (image);
-
+ g_free (combine);
+
/* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
background_changed_callback,
@@ -165,12 +170,13 @@ static void
background_reset_callback (NautilusBackground *background,
NautilusDirectory *directory)
{
- char *color, *image;
+ char *color, *image, *combine;
color = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_COLOR);
image = nautilus_theme_get_theme_data ("directory", NAUTILUS_METADATA_KEY_DIRECTORY_BACKGROUND_IMAGE);
- image = local_data_file_to_uri(image);
+ combine = nautilus_theme_get_theme_data ("directory", "COMBINE");
+ image = local_data_file_to_uri(image);
/* block the handler so we don't write metadata */
gtk_signal_handler_block_by_func (GTK_OBJECT (background),
background_changed_callback,
@@ -178,14 +184,15 @@ background_reset_callback (NautilusBackground *background,
nautilus_background_set_color (background, color);
nautilus_background_set_tile_image_uri (background, image);
+ nautilus_background_set_combine_mode (background, combine != NULL);
/* Unblock the handler. */
gtk_signal_handler_unblock_by_func (GTK_OBJECT (background),
background_changed_callback,
directory);
-
g_free (color);
g_free (image);
+ g_free (combine);
/* reset the metadata */
nautilus_directory_set_metadata (directory,
diff --git a/src/nautilus-information-panel.c b/src/nautilus-information-panel.c
index 96628b249..83089480c 100644
--- a/src/nautilus-information-panel.c
+++ b/src/nautilus-information-panel.c
@@ -1010,6 +1010,8 @@ background_appearance_changed_callback (NautilusBackground *background, Nautilus
static void
background_reset_callback (NautilusBackground *background, NautilusSidebar *sidebar)
{
+ char *combine_mode;
+
if (sidebar->details->directory == NULL) {
return;
}
@@ -1020,6 +1022,11 @@ background_reset_callback (NautilusBackground *background, NautilusSidebar *side
sidebar);
nautilus_background_set_color (background, sidebar->details->default_background_color);
nautilus_background_set_tile_image_uri (background, sidebar->details->default_background_image);
+
+ combine_mode = nautilus_theme_get_theme_data ("sidebar", "COMBINE");
+ nautilus_background_set_combine_mode (background, combine_mode != NULL);
+ g_free (combine_mode);
+
gtk_signal_handler_unblock_by_func (GTK_OBJECT(background),
background_settings_changed_callback,
sidebar);
@@ -1258,7 +1265,7 @@ nautilus_sidebar_update_info (NautilusSidebar *sidebar,
NautilusDirectory *directory;
NautilusBackground *background;
char *background_color, *color_spec;
- char *background_image;
+ char *background_image, *combine_mode;
if (sidebar->details->uri == NULL) {
directory = NULL;
@@ -1309,6 +1316,10 @@ nautilus_sidebar_update_info (NautilusSidebar *sidebar,
nautilus_background_set_tile_image_uri (background, background_image);
g_free (background_image);
+
+ combine_mode = nautilus_theme_get_theme_data ("sidebar", "COMBINE");
+ nautilus_background_set_combine_mode (background, combine_mode != NULL);
+ g_free (combine_mode);
/* set up the color for the tabs */
color_spec = nautilus_directory_get_metadata (directory,
diff --git a/src/nautilus-property-browser.c b/src/nautilus-property-browser.c
index 17079d495..f19ae0fe1 100644
--- a/src/nautilus-property-browser.c
+++ b/src/nautilus-property-browser.c
@@ -1195,55 +1195,57 @@ make_properties_from_directory_path(NautilusPropertyBrowser *property_browser, c
GtkWidget *event_box, *temp_vbox;
GtkWidget *pixmap_widget, *label;
- image_file_name = g_strdup_printf("%s/%s", directory_uri+7, current_file_info->name);
- pixbuf = gdk_pixbuf_new_from_file(image_file_name);
- g_free(image_file_name);
+ if (current_file_info->name[0] != '.') {
+ image_file_name = g_strdup_printf("%s/%s", directory_uri+7, current_file_info->name);
+ pixbuf = gdk_pixbuf_new_from_file(image_file_name);
+ g_free(image_file_name);
- if (!strcmp(property_browser->details->category, "backgrounds")) {
- pixbuf = gdk_pixbuf_scale_simple (pixbuf, MAX_ICON_WIDTH, MAX_ICON_HEIGHT, GDK_INTERP_BILINEAR);
- } else {
- pixbuf = nautilus_gdk_pixbuf_scale_to_fit (pixbuf, MAX_ICON_WIDTH, MAX_ICON_HEIGHT);
- }
+ if (!strcmp(property_browser->details->category, "backgrounds")) {
+ pixbuf = gdk_pixbuf_scale_simple (pixbuf, MAX_ICON_WIDTH, MAX_ICON_HEIGHT, GDK_INTERP_BILINEAR);
+ } else {
+ pixbuf = nautilus_gdk_pixbuf_scale_to_fit (pixbuf, MAX_ICON_WIDTH, MAX_ICON_HEIGHT);
+ }
- /* make a pixmap and mask to pass to the widget */
- gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 128);
- gdk_pixbuf_unref (pixbuf);
+ /* make a pixmap and mask to pass to the widget */
+ gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, 128);
+ gdk_pixbuf_unref (pixbuf);
- /* allocate a pixmap and insert it into the table */
- temp_vbox = gtk_vbox_new(FALSE, 0);
- gtk_widget_show(temp_vbox);
+ /* allocate a pixmap and insert it into the table */
+ temp_vbox = gtk_vbox_new(FALSE, 0);
+ gtk_widget_show(temp_vbox);
- event_box = gtk_event_box_new();
- gtk_widget_show(event_box);
-
- background = nautilus_get_widget_background (GTK_WIDGET (event_box));
- nautilus_background_set_color (background, BROWSER_BACKGROUND_COLOR);
-
- pixmap_widget = GTK_WIDGET (gtk_pixmap_new (pixmap, mask));
- gtk_widget_show (pixmap_widget);
- gtk_container_add(GTK_CONTAINER(event_box), pixmap_widget);
- gtk_box_pack_start(GTK_BOX(temp_vbox), event_box, FALSE, FALSE, 0);
-
- filtered_name = strip_extension(current_file_info->name);
- label = gtk_label_new(filtered_name);
- g_free(filtered_name);
- gtk_box_pack_start (GTK_BOX(temp_vbox), label, FALSE, FALSE, 0);
- gtk_widget_show(label);
-
- gtk_object_set_user_data (GTK_OBJECT(event_box), property_browser);
- gtk_signal_connect_full
- (GTK_OBJECT (event_box),
- "button_press_event",
- GTK_SIGNAL_FUNC (element_clicked_callback),
- NULL,
- g_strdup (current_file_info->name),
- g_free,
- FALSE,
- FALSE);
+ event_box = gtk_event_box_new();
+ gtk_widget_show(event_box);
- /* put the reset item in the pole position */
- add_to_content_table(property_browser, temp_vbox,
- strcmp(current_file_info->name, RESET_IMAGE_NAME) ? index++ : 0, 2);
+ background = nautilus_get_widget_background (GTK_WIDGET (event_box));
+ nautilus_background_set_color (background, BROWSER_BACKGROUND_COLOR);
+
+ pixmap_widget = GTK_WIDGET (gtk_pixmap_new (pixmap, mask));
+ gtk_widget_show (pixmap_widget);
+ gtk_container_add(GTK_CONTAINER(event_box), pixmap_widget);
+ gtk_box_pack_start(GTK_BOX(temp_vbox), event_box, FALSE, FALSE, 0);
+
+ filtered_name = strip_extension(current_file_info->name);
+ label = gtk_label_new(filtered_name);
+ g_free(filtered_name);
+ gtk_box_pack_start (GTK_BOX(temp_vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show(label);
+
+ gtk_object_set_user_data (GTK_OBJECT(event_box), property_browser);
+ gtk_signal_connect_full
+ (GTK_OBJECT (event_box),
+ "button_press_event",
+ GTK_SIGNAL_FUNC (element_clicked_callback),
+ NULL,
+ g_strdup (current_file_info->name),
+ g_free,
+ FALSE,
+ FALSE);
+
+ /* put the reset item in the pole position */
+ add_to_content_table(property_browser, temp_vbox,
+ strcmp(current_file_info->name, RESET_IMAGE_NAME) ? index++ : 0, 2);
+ }
}
current_file_info = gnome_vfs_directory_list_next(list);
diff --git a/src/nautilus-sidebar.c b/src/nautilus-sidebar.c
index 96628b249..83089480c 100644
--- a/src/nautilus-sidebar.c
+++ b/src/nautilus-sidebar.c
@@ -1010,6 +1010,8 @@ background_appearance_changed_callback (NautilusBackground *background, Nautilus
static void
background_reset_callback (NautilusBackground *background, NautilusSidebar *sidebar)
{
+ char *combine_mode;
+
if (sidebar->details->directory == NULL) {
return;
}
@@ -1020,6 +1022,11 @@ background_reset_callback (NautilusBackground *background, NautilusSidebar *side
sidebar);
nautilus_background_set_color (background, sidebar->details->default_background_color);
nautilus_background_set_tile_image_uri (background, sidebar->details->default_background_image);
+
+ combine_mode = nautilus_theme_get_theme_data ("sidebar", "COMBINE");
+ nautilus_background_set_combine_mode (background, combine_mode != NULL);
+ g_free (combine_mode);
+
gtk_signal_handler_unblock_by_func (GTK_OBJECT(background),
background_settings_changed_callback,
sidebar);
@@ -1258,7 +1265,7 @@ nautilus_sidebar_update_info (NautilusSidebar *sidebar,
NautilusDirectory *directory;
NautilusBackground *background;
char *background_color, *color_spec;
- char *background_image;
+ char *background_image, *combine_mode;
if (sidebar->details->uri == NULL) {
directory = NULL;
@@ -1309,6 +1316,10 @@ nautilus_sidebar_update_info (NautilusSidebar *sidebar,
nautilus_background_set_tile_image_uri (background, background_image);
g_free (background_image);
+
+ combine_mode = nautilus_theme_get_theme_data ("sidebar", "COMBINE");
+ nautilus_background_set_combine_mode (background, combine_mode != NULL);
+ g_free (combine_mode);
/* set up the color for the tabs */
color_spec = nautilus_directory_get_metadata (directory,