]> Pileus Git - ~andy/gtk/blobdiff - demos/gtk-demo/toolpalette.c
gtk: remove "gboolean homogeneous" from gtk_box_new()
[~andy/gtk] / demos / gtk-demo / toolpalette.c
index 537fddd41a74e3564239faaa39011d63bf617b63..2431d6a4fe4f577fe713fbc0ba752c91e69b2b07 100644 (file)
@@ -84,15 +84,10 @@ static gboolean
 canvas_draw (GtkWidget *widget,
              cairo_t   *cr)
 {
-  GtkAllocation allocation;
   GList *iter;
-  gint width, height;
 
   cairo_set_source_rgb (cr, 1, 1, 1);
-  width = gtk_widget_get_allocated_width (widget);
-  height = gtk_widget_get_allocated_height (widget);
-  cairo_rectangle (cr, 0, 0, width, height);
-  cairo_fill (cr);
+  cairo_paint (cr);
 
   for (iter = canvas_items; iter; iter = iter->next)
     canvas_item_draw (iter->data, cr, FALSE);
@@ -443,7 +438,7 @@ do_toolpalette (GtkWidget *do_widget)
       gtk_container_set_border_width (GTK_CONTAINER (window), 8);
 
       /* Add widgets to control the ToolPalette appearance: */
-      box = gtk_vbox_new (FALSE, 6);
+      box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
       gtk_container_add (GTK_CONTAINER (window), box);
 
       /* Orientation combo box: */
@@ -512,7 +507,7 @@ do_toolpalette (GtkWidget *do_widget)
       gtk_box_pack_start (GTK_BOX (box), combo_style, FALSE, FALSE, 0);
 
       /* Add hbox */
-      hbox = gtk_hbox_new (FALSE, 5);
+      hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
       gtk_box_pack_start (GTK_BOX (box), hbox, TRUE, TRUE, 0);
 
       /* Add and fill the ToolPalette: */