diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-12-17 14:53:43 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-12-17 14:53:43 -0500 |
commit | 33fb60e050719d8f3dfed20474003ca44694f0af (patch) | |
tree | 615be27082921fc455e363a2d7892d0d7830e5b6 /docs | |
parent | 55a0f8700fc55aa882203d34d51caf5f6efafdd7 (diff) | |
download | gtk+-33fb60e050719d8f3dfed20474003ca44694f0af.tar.gz |
Fix an escaping problem
& must be escaped as & in examples.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/gtk/tmpl/gtkdrawingarea.sgml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml index ae46d2bc54..0986d02d1b 100644 --- a/docs/reference/gtk/tmpl/gtkdrawingarea.sgml +++ b/docs/reference/gtk/tmpl/gtkdrawingarea.sgml @@ -60,24 +60,26 @@ draw_callback (GtkWidget *widget, cairo_t *cr, gpointer data) width = gtk_widget_get_allocated_width (widget); height = gtk_widget_get_allocated_height (widget); - cairo_arc (cr, + cairo_arc (cr, width / 2.0, height / 2.0, MIN (width, height) / 2.0, 0, 2 * G_PI); gtk_style_context_get_color (gtk_widget_get_style_context (widget), 0, - &color); - gdk_cairo_set_source_rgba (cr, &color); + &color); + gdk_cairo_set_source_rgba (cr, &color); cairo_fill (cr); return FALSE; } -[...] + + /* ... */ + GtkWidget *drawing_area = gtk_drawing_area_new (<!-- -->); gtk_widget_set_size_request (drawing_area, 100, 100); - g_signal_connect (G_OBJECT (drawing_area), "draw", + g_signal_connect (G_OBJECT (drawing_area), "draw", G_CALLBACK (draw_callback), NULL); </programlisting> </example> |