[gtk+/gtk-3-22] StyleContext: Fix CSS snippet language, node names



commit 491eea568011fbafe15b99b6a20a512e76b309e2
Author: Daniel Boles <dboles src gnome org>
Date:   Thu Oct 12 19:40:19 2017 +0100

    StyleContext: Fix CSS snippet language, node names
    
    The language is useful for parsing tools, such as that of gtkmm, which
    otherwise assumes these are C snippets and elides them from its
    generated documentation.
    
    The old GtkBlah node names are just plain obsolete.

 gtk/gtkstylecontext.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index b85b473..4ef6d57 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -1325,13 +1325,13 @@ gtk_style_context_restore (GtkStyleContext *context)
  * In the CSS file format, a #GtkEntry defining a “search”
  * class, would be matched by:
  *
- * |[
+ * |[ <!-- language="CSS" -->
  * entry.search { ... }
  * ]|
  *
  * While any widget defining a “search” class would be
  * matched by:
- * |[
+ * |[ <!-- language="CSS" -->
  * .search { ... }
  * ]|
  *
@@ -1495,15 +1495,15 @@ _gtk_style_context_check_region_name (const gchar *str)
  * In the CSS file format, a #GtkTreeView defining a “row”
  * region, would be matched by:
  *
- * |[
- * GtkTreeView row { ... }
+ * |[ <!-- language="CSS" -->
+ * treeview row { ... }
  * ]|
  *
  * Pseudo-classes are used for matching @flags, so the two
  * following rules:
- * |[
- * GtkTreeView row:nth-child(even) { ... }
- * GtkTreeView row:nth-child(odd) { ... }
+ * |[ <!-- language="CSS" -->
+ * treeview row:nth-child(even) { ... }
+ * treeview row:nth-child(odd) { ... }
  * ]|
  *
  * would apply to even and odd rows, respectively.
@@ -2257,7 +2257,7 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
  *
  * As a practical example, a #GtkButton notifying a state transition on
  * the prelight state:
- * |[<!-- language="C" -->
+ * |[ <!-- language="C" -->
  * gtk_style_context_notify_state_change (context,
  *                                        gtk_widget_get_window (widget),
  *                                        NULL,
@@ -2266,12 +2266,12 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
  * ]|
  *
  * Can be handled in the CSS file like this:
- * |[
- * GtkButton {
+ * |[ <!-- language="CSS" -->
+ * button {
  *     background-color: #f00
  * }
  *
- * GtkButton:hover {
+ * button:hover {
  *     background-color: #fff;
  *     transition: 200ms linear
  * }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]