Index: testgtk.c
===================================================================
RCS file: /cvs/gnome/gtk+/tests/testgtk.c,v
retrieving revision 1.334
diff -u -p -r1.334 testgtk.c
--- testgtk.c	1 Jul 2003 20:02:31 -0000	1.334
+++ testgtk.c	31 Jul 2003 20:51:20 -0000
@@ -1274,6 +1274,7 @@ create_statusbar (GtkWidget *widget)
   GtkWidget *button;
   GtkWidget *separator;
   GtkWidget *statusbar;
+  GtkWidget *grip;
 
   if (!window)
     {
@@ -1296,6 +1297,9 @@ create_statusbar (GtkWidget *widget)
       gtk_box_pack_start (GTK_BOX (box1), box2, TRUE, TRUE, 0);
 
       statusbar = gtk_statusbar_new ();
+      gtk_statusbar_set_has_resize_grip (GTK_STATUSBAR (statusbar), FALSE);
+      gtk_box_pack_end (GTK_BOX (statusbar), gtk_resize_grip_new (), FALSE, FALSE, 0);
+
       gtk_box_pack_end (GTK_BOX (box1), statusbar, TRUE, TRUE, 0);
       g_signal_connect (statusbar,
 			"text_popped",
@@ -2855,86 +2859,46 @@ create_resize_grips (GtkWidget *widget)
       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
 
       /* North west */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_NORTH_WEST);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_NORTH_WEST));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_NORTH_WEST));
       
       /* North */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_NORTH);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_NORTH));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_NORTH));
 
       /* North east */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_NORTH_EAST);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_NORTH_EAST));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_NORTH_EAST));
 
       hbox = gtk_hbox_new (FALSE, 0);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
 
       /* West */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_WEST);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_WEST));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_WEST));
 
       /* Middle */
       area = gtk_drawing_area_new ();
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
 
       /* East */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_EAST);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_EAST));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_EAST));
-
 
       hbox = gtk_hbox_new (FALSE, 0);
       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
 
       /* South west */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_SOUTH_WEST);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH_WEST));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH_WEST));
+
       /* South */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_SOUTH);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH));
       
       /* South east */
-      area = gtk_drawing_area_new ();
-      gtk_widget_add_events (area, GDK_BUTTON_PRESS_MASK);
+      area = gtk_resize_grip_new_with_edge (GDK_WINDOW_EDGE_SOUTH_EAST);
       gtk_box_pack_start (GTK_BOX (hbox), area, TRUE, TRUE, 0);
-      g_signal_connect (area, "expose_event", G_CALLBACK (grippy_expose),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH_EAST));
-      g_signal_connect (area, "button_press_event", G_CALLBACK (grippy_button_press),
-			GINT_TO_POINTER (GDK_WINDOW_EDGE_SOUTH_EAST));
     }
 
   if (!GTK_WIDGET_VISIBLE (window))
