summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-background.c
diff options
context:
space:
mode:
authorMike Engber <engber@src.gnome.org>2001-01-10 23:54:58 +0000
committerMike Engber <engber@src.gnome.org>2001-01-10 23:54:58 +0000
commit49b199f24a0e2c262f59f56b50a9dea71d4ab800 (patch)
tree06ba53124f12e65a9b9dfb457f14f20a72b9c429 /libnautilus-private/nautilus-background.c
parent74728e1fe28a1ecd5e6205ea109c44b972bf6f2f (diff)
downloadnautilus-49b199f24a0e2c262f59f56b50a9dea71d4ab800.tar.gz
reviewed by: John Harper
reviewed by: John Harper * configure.in: * libnautilus-extensions/nautilus-background-canvas-group.c: (nautilus_background_canvas_group_initialize_common), (nautilus_background_canvas_group_initialize), (nautilus_background_canvas_group_supplant_root_class): * libnautilus-extensions/nautilus-background-canvas-group.h: * libnautilus-extensions/nautilus-background.c: (nautilus_background_set_up_canvas): Turned on dithering for canvases (aa mode). We no longer expose NautilusBackgroundCanvasGroupClass, in nautilus-background-canvas- group.h. Now we just provide an API to do the class change.
Diffstat (limited to 'libnautilus-private/nautilus-background.c')
-rw-r--r--libnautilus-private/nautilus-background.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/libnautilus-private/nautilus-background.c b/libnautilus-private/nautilus-background.c
index b7cfb52ff..316113d79 100644
--- a/libnautilus-private/nautilus-background.c
+++ b/libnautilus-private/nautilus-background.c
@@ -1335,29 +1335,8 @@ nautilus_background_reset (NautilusBackground *background)
static void
nautilus_background_set_up_canvas (GtkWidget *widget)
{
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- /* Attach ourselves to a canvas in a way that will work.
- Changing the style is not sufficient.
-
- Since there's no signal to override in GnomeCanvas to control
- drawing the background, we change the class of the canvas root.
- This gives us a chance to draw the background before any of the
- objects draw themselves, and has no effect on the bounds or
- anything related to scrolling.
-
- We settled on this after less-than-thrilling results using a
- canvas item as the background. The canvas item contributed to
- the bounds of the canvas and had to constantly be resized.
- */
if (GNOME_IS_CANVAS (widget)) {
- g_assert (GTK_OBJECT (GNOME_CANVAS (widget)->root)->klass
- == gtk_type_class (GNOME_TYPE_CANVAS_GROUP)
- || GTK_OBJECT (GNOME_CANVAS (widget)->root)->klass
- == gtk_type_class (NAUTILUS_TYPE_BACKGROUND_CANVAS_GROUP));
-
- GTK_OBJECT (GNOME_CANVAS (widget)->root)->klass =
- gtk_type_class (NAUTILUS_TYPE_BACKGROUND_CANVAS_GROUP);
+ nautilus_background_canvas_group_supplant_root_class (GNOME_CANVAS (widget));
}
}