From 0a908b7fe481dd3bf216021fd8e04489f5f2aa66 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 11 Mar 2000 00:32:15 +0000 Subject: Designed a new system for doing hierarchical displays in the canvas. Adds 2000-03-10 Christopher James Lahey * e-util/e-canvas.c, e-util/e-canvas.h: Designed a new system for doing hierarchical displays in the canvas. Adds an extra idle loop to the canvas system. * widgets/e-minicard/e-minicard.c, widgets/e-minicard/e-minicard-label.c, widgets/e-minicard/e-minicard-label.h, widgets/e-minicard/e-reflow.c, widgets/e-minicard/test-reflow.c, widgets/e-text/e-text.c, widgets/e-text/e-text.h: Adapted to use the new e-canvas reflow system. svn path=/trunk/; revision=2096 --- widgets/e-minicard/test-reflow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'widgets/e-minicard/test-reflow.c') diff --git a/widgets/e-minicard/test-reflow.c b/widgets/e-minicard/test-reflow.c index 319a3f5626..8cedbaac28 100644 --- a/widgets/e-minicard/test-reflow.c +++ b/widgets/e-minicard/test-reflow.c @@ -55,14 +55,14 @@ static void allocate_callback(GtkWidget *canvas, GtkAllocation *allocation, gpoi NULL ); } -static void resize(GnomeCanvasItem *item, gpointer data) +static void resize(GnomeCanvas *canvas, gpointer data) { double width; gtk_object_get(GTK_OBJECT(reflow), - "width", &width, + "width", &width, NULL); width = MAX(width, last_alloc.width); - gnome_canvas_set_scroll_region(item->canvas , 0, 0, width, last_alloc.height ); + gnome_canvas_set_scroll_region(canvas , 0, 0, width, last_alloc.height ); gnome_canvas_item_set( rect, "x2", (double) width, "y2", (double) last_alloc.height, @@ -121,7 +121,7 @@ int main( int argc, char *argv[] ) "height", (double) 100, "minimum_width", (double) 100, NULL ); - gtk_signal_connect( GTK_OBJECT( reflow ), "resize", + gtk_signal_connect( GTK_OBJECT( canvas ), "reflow", GTK_SIGNAL_FUNC( resize ), ( gpointer ) app); for ( i = 0; i < 200; i++ ) -- cgit