Commit e31ebda1 authored by William Jon McCann's avatar William Jon McCann

docs: don't escape entities in example code

https://bugzilla.gnome.org/show_bug.cgi?id=723119
parent 48b359ea
......@@ -71,8 +71,8 @@
* |[
* @binding-set MoveCursor3
* {
* bind "<Control>Right" { "move-cursor" (visual-positions, 3, 0) };
* bind "<Control>Left" { "move-cursor" (visual-positions, -3, 0) };
* bind "<Control>Right" { "move-cursor" (visual-positions, 3, 0) };
* bind "<Control>Left" { "move-cursor" (visual-positions, -3, 0) };
* }
* GtkEntry
* {
......@@ -94,8 +94,8 @@
* |[
* @binding-set MoveCursor3
* {
* bind "&lt;Control&gt;Right" { };
* bind "&lt;Control&gt;Left" { };
* bind "<Control>Right" { };
* bind "<Control>Left" { };
* }
* GtkEntry
* {
......@@ -115,8 +115,8 @@
* |[
* @binding-set MoveCursor3
* {
* unbind "&lt;Control&gt;Right";
* unbind "&lt;Control&gt;Left";
* unbind "<Control>Right";
* unbind "<Control>Left";
* }
* GtkEntry
* {
......
......@@ -90,7 +90,7 @@
* <example><title>A rule set with two selectors</title>
* |[
* GtkButton, GtkEntry {
* color: &num;ff00ea;
* color: #ff00ea;
* font: Comic Sans 12
* }
* ]|
......@@ -129,12 +129,12 @@
* |[
* /&ast; Theme labels that are descendants of a window &ast;/
* GtkWindow GtkLabel {
* background-color: &num;898989
* background-color: #898989
* }
*
* /&ast; Theme notebooks, and anything that's within these &ast;/
* GtkNotebook {
* background-color: &num;a939f0
* background-color: #a939f0
* }
*
* /&ast; Theme combo boxes, and entries that
......@@ -142,7 +142,7 @@
* GtkComboBox,
* GtkNotebook > GtkEntry {
* color: @fg_color;
* background-color: &num;1209a2
* background-color: #1209a2
* }
*
* /&ast; Theme any widget within a GtkBin &ast;/
......@@ -151,13 +151,13 @@
* }
*
* /&ast; Theme a label named title-label &ast;/
* GtkLabel&num;title-label {
* GtkLabel#title-label {
* font: Sans 15
* }
*
* /&ast; Theme any widget named main-entry &ast;/
* &num;main-entry {
* background-color: &num;f0a810
* #main-entry {
* background-color: #f0a810
* }
* ]|
* </example>
......@@ -182,12 +182,12 @@
* |[
* /&ast; Theme all widgets defining the class entry &ast;/
* .entry {
* color: &num;39f1f9;
* color: #39f1f9;
* }
*
* /&ast; Theme spinbuttons' entry &ast;/
* GtkSpinButton.entry {
* color: &num;900185
* color: #900185
* }
* ]|
* </example>
......@@ -216,19 +216,19 @@
* |[
* /&ast; Theme any label within a notebook &ast;/
* GtkNotebook GtkLabel {
* color: &num;f90192;
* color: #f90192;
* }
*
* /&ast; Theme labels within notebook tabs &ast;/
* GtkNotebook tab GtkLabel {
* color: &num;703910;
* color: #703910;
* }
*
* /&ast; Theme labels in the any first notebook
* tab, both selectors are equivalent &ast;/
* GtkNotebook tab:nth-child(first) GtkLabel,
* GtkNotebook tab:first-child GtkLabel {
* color: &num;89d012;
* color: #89d012;
* }
* ]|
* </example>
......@@ -244,35 +244,35 @@
* |[
* /&ast; Theme active (pressed) buttons &ast;/
* GtkButton:active {
* background-color: &num;0274d9;
* background-color: #0274d9;
* }
*
* /&ast; Theme buttons with the mouse pointer on it,
* both are equivalent &ast;/
* GtkButton:hover,
* GtkButton:prelight {
* background-color: &num;3085a9;
* background-color: #3085a9;
* }
*
* /&ast; Theme insensitive widgets, both are equivalent &ast;/
* :insensitive,
* *:insensitive {
* background-color: &num;320a91;
* background-color: #320a91;
* }
*
* /&ast; Theme selection colors in entries &ast;/
* GtkEntry:selected {
* background-color: &num;56f9a0;
* background-color: #56f9a0;
* }
*
* /&ast; Theme focused labels &ast;/
* GtkLabel:focused {
* background-color: &num;b4940f;
* background-color: #b4940f;
* }
*
* /&ast; Theme inconsistent checkbuttons &ast;/
* GtkCheckButton:inconsistent {
* background-color: &num;20395a;
* background-color: #20395a;
* }
* ]|
* </example>
......@@ -296,7 +296,7 @@
* <example>
* <title>Using the &commat;import rule</title>
* |[
* &commat;import url ("path/to/common.css");
* @import url ("path/to/common.css");
* ]|
* </example>
* <para id="css-binding-set">
......@@ -315,14 +315,14 @@
* <example>
* <title>Using the &commat;binding rule</title>
* |[
* &commat;binding-set binding-set1 {
* bind "&lt;alt&gt;Left" { "move-cursor" (visual-positions, -3, 0) };
* @binding-set binding-set1 {
* bind "<alt>Left" { "move-cursor" (visual-positions, -3, 0) };
* unbind "End";
* };
*
* &commat;binding-set binding-set2 {
* bind "&lt;alt&gt;Right" { "move-cursor" (visual-positions, 3, 0) };
* bind "&lt;alt&gt;KP_space" { "delete-from-cursor" (whitespace, 1)
* @binding-set binding-set2 {
* bind "<alt>Right" { "move-cursor" (visual-positions, 3, 0) };
* bind "<alt>KP_space" { "delete-from-cursor" (whitespace, 1)
* "insert-at-cursor" (" ") };
* };
*
......@@ -340,10 +340,10 @@
* <example>
* <title>Defining colors</title>
* |[
* &commat;define-color bg_color &num;f9a039;
* @define-color bg_color #f9a039;
*
* &ast; {
* background-color: &commat;bg_color;
* * {
* background-color: @bg_color;
* }
* ]|
* </example>
......@@ -359,15 +359,15 @@
* <example>
* <title>Using symbolic colors</title>
* |[
* &commat;define-color entry-color shade (&commat;bg_color, 0.7);
* @define-color entry-color shade (@bg_color, 0.7);
*
* GtkEntry {
* background-color: @entry-color;
* }
*
* GtkEntry:focused {
* background-color: mix (&commat;entry-color,
* shade (&num;fff, 0.5),
* background-color: mix (@entry-color,
* shade (#fff, 0.5),
* 0.8);
* }
* ]|
......
......@@ -93,8 +93,8 @@
*
* gtk_style_context_get_color (gtk_widget_get_style_context (widget),
* 0,
* &amp;color);
* gdk_cairo_set_source_rgba (cr, &amp;color);
* &color);
* gdk_cairo_set_source_rgba (cr, &color);
*
* cairo_fill (cr);
*
......
......@@ -40,16 +40,16 @@
* <example>
* <title>Forcing entry to uppercase.</title>
* |[<!-- language="C" -->
* #include &lt;ctype.h&gt;
* #include <ctype.h>;
*
* void
* insert_text_handler (GtkEditable &ast;editable,
* const gchar &ast;text,
* insert_text_handler (GtkEditable *editable,
* const gchar *text,
* gint length,
* gint &ast;position,
* gint *position,
* gpointer data)
* {
* gchar &ast;result = g_utf8_strup (text, length);
* gchar *result = g_utf8_strup (text, length);
*
* g_signal_handlers_block_by_func (editable,
* (gpointer) insert_text_handler, data);
......
......@@ -53,7 +53,7 @@
* <object class="GtkFileFilter">
* <mime-types>
* <mime-type>text/plain</mime-type>
* <mime-type>image/&ast;</mime-type>
* <mime-type>image/*</mime-type>
* </mime-types>
* <patterns>
* <pattern>*.txt</pattern>
......
......@@ -1829,14 +1829,14 @@ gtk_main_do_event (GdkEvent *event)
* <example>
* <title>A persistent window</title>
* |[<!-- language="C" -->
* #include &lt;gtk/gtk.h>&lt;
* #include <gtk/gtk.h>
*
* int
* main (int argc, char **argv)
* {
* GtkWidget *win, *but;
*
* gtk_init (&amp;argc, &amp;argv);
* gtk_init (&argc, &argv);
*
* win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
* g_signal_connect (win, "delete-event",
......
......@@ -59,10 +59,10 @@
* GError *error = NULL;
*
* manager = gtk_recent_manager_get_default ();
* info = gtk_recent_manager_lookup_item (manager, file_uri, &amp;error);
* info = gtk_recent_manager_lookup_item (manager, file_uri, &error);
* if (error)
* {
* g_warning ("Could not find the file: &percnt;s", error-&gt;message);
* g_warning ("Could not find the file: %s", error->message);
* g_error_free (error);
* }
* else
......
......@@ -2951,11 +2951,11 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
* Can be handled in the CSS file like this:
* |[
* GtkButton {
* background-color: &num;f00
* background-color: #f00
* }
*
* GtkButton:hover {
* background-color: &num;fff;
* background-color: #fff;
* transition: 200ms linear
* }
* ]|
......
......@@ -123,19 +123,19 @@
* GtkTreeIter parent_iter;
*
* /&ast; get the iterator from a string &ast;/
* gtk_tree_model_get_iter_from_string (model, &amp;iter, "3:2:5");
* gtk_tree_model_get_iter_from_string (model, &iter, "3:2:5");
*
* /&ast; get the iterator from a path &ast;/
* path = gtk_tree_path_new_from_string ("3:2:5");
* gtk_tree_model_get_iter (model, &amp;iter, path);
* gtk_tree_model_get_iter (model, &iter, path);
* gtk_tree_path_free (path);
*
* /&ast; walk the tree to find the iterator &ast;/
* gtk_tree_model_iter_nth_child (model, &amp;iter, NULL, 3);
* gtk_tree_model_iter_nth_child (model, &iter, NULL, 3);
* parent_iter = iter;
* gtk_tree_model_iter_nth_child (model, &amp;iter, &amp;parent_iter, 2);
* gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 2);
* parent_iter = iter;
* gtk_tree_model_iter_nth_child (model, &amp;iter, &amp;parent_iter, 5);
* gtk_tree_model_iter_nth_child (model, &iter, &parent_iter, 5);
* ]|
* </example>
*
......@@ -170,9 +170,9 @@
*
* /&ast; Get the first iter in the list, check it is valid and walk
* &ast; through the list, reading each row. &ast;/
* for (valid = gtk_tree_model_get_iter_first (list_store, &amp;iter);
* for (valid = gtk_tree_model_get_iter_first (list_store, &iter);
* valid;
* valid = gtk_tree_model_iter_next (list_store, &amp;iter))
* valid = gtk_tree_model_iter_next (list_store, &iter))
* {
* gchar *str_data;
* gint int_data;
......@@ -180,9 +180,9 @@
* /&ast; Make sure you terminate calls to gtk_tree_model_get()
* &ast; with a '-1' value
* &ast;/
* gtk_tree_model_get (list_store, &amp;iter,
* STRING_COLUMN, &amp;str_data,
* INT_COLUMN, &amp;int_data,
* gtk_tree_model_get (list_store, &iter,
* STRING_COLUMN, &str_data,
* INT_COLUMN, &int_data,
* -1);
*
* /&ast; Do something with the data &ast;/
......
......@@ -11384,7 +11384,7 @@ gtk_XParseGeometry (const char *string,
* GDK_HINT_BASE_SIZE |
* GDK_HINT_RESIZE_INC);
*
* if (argc &gt; 1)
* if (argc > 1)
* {
* if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
* fprintf (stderr, "Failed to parse '%s'\n", argv[1]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment