From 28376c26002cd7e9d353a9aadb880a54b7d3374d Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Tue, 4 Feb 2014 15:42:30 -0500 Subject: [PATCH] docs: Use markdown for section headings --- gtk/deprecated/gtkactiongroup.c | 17 ++++----- gtk/deprecated/gtkactivatable.c | 16 ++++---- gtk/deprecated/gtkcolorseldialog.c | 5 +-- gtk/deprecated/gtkfontsel.c | 5 +-- gtk/deprecated/gtkiconfactory.c | 14 +++---- gtk/deprecated/gtkuimanager.c | 61 ++++++++++++------------------ 6 files changed, 49 insertions(+), 69 deletions(-) diff --git a/gtk/deprecated/gtkactiongroup.c b/gtk/deprecated/gtkactiongroup.c index 9a2c9afdc4..b99644992a 100644 --- a/gtk/deprecated/gtkactiongroup.c +++ b/gtk/deprecated/gtkactiongroup.c @@ -44,7 +44,8 @@ * window's menus would be constructed from a combination of two action * groups. * - * + * ## Accelerators ## {#Action-Accel} + * * Accelerators are handled by the GTK+ accelerator map. All actions are * assigned an accelerator path (which normally has the form * <Actions>/group-name/action-name) @@ -52,11 +53,9 @@ * and toolitems take on this accelerator path. The GTK+ accelerator map * code makes sure that the correct shortcut is displayed next to the menu * item. - * * - * - * GtkActionGroup as GtkBuildable - * + * # GtkActionGroup as GtkBuildable # {#GtkActionGroup-BUILDER-UI} + * * The #GtkActionGroup implementation of the #GtkBuildable interface accepts * #GtkAction objects as <child> elements in UI definitions. * @@ -68,9 +67,8 @@ * modifiers and allows to specify accelerators. This is similar to the * <accelerator> element of #GtkWidget, the main difference is that * it doesn't allow you to specify a signal. - * - * - * A #GtkDialog UI definition fragment. + * + * ## A #GtkDialog UI definition fragment. ## * |[ * * @@ -83,8 +81,7 @@ * * * ]| - * - * + * */ #include "config.h" diff --git a/gtk/deprecated/gtkactivatable.c b/gtk/deprecated/gtkactivatable.c index c14a7242e3..3a0b8cbd39 100644 --- a/gtk/deprecated/gtkactivatable.c +++ b/gtk/deprecated/gtkactivatable.c @@ -25,9 +25,8 @@ * through its action, as they are responsible for activating their * related actions. * - * - * Implementing GtkActivatable - * + * # Implementing GtkActivatable + * * When extending a class that is already #GtkActivatable; it is only * necessary to implement the #GtkActivatable->sync_action_properties() * and #GtkActivatable->update() methods and chain up to the parent @@ -38,9 +37,9 @@ * the action pointer and boolean flag on your instance, and calling * gtk_activatable_do_set_related_action() and * gtk_activatable_sync_action_properties() at the appropriate times. - * - * - * A class fragment implementing #GtkActivatable + * + * ## A class fragment implementing #GtkActivatable + * * |[ * * enum { @@ -253,9 +252,8 @@ * foo_bar_set_label (button, gtk_action_get_label (action)); * * ... - * }]| - * - * + * } + * ]| */ #include "config.h" diff --git a/gtk/deprecated/gtkcolorseldialog.c b/gtk/deprecated/gtkcolorseldialog.c index 87408f7745..b5cd48d6cb 100644 --- a/gtk/deprecated/gtkcolorseldialog.c +++ b/gtk/deprecated/gtkcolorseldialog.c @@ -51,13 +51,12 @@ * for this widget's #GtkColorSelection::color-changed signal to be notified * when the color changes. * - * - * GtkColorSelectionDialog as GtkBuildable + * # GtkColorSelectionDialog as GtkBuildable # {#GtkColorSelectionDialog-BUILDER-UI} + * * The GtkColorSelectionDialog implementation of the GtkBuildable interface * exposes the embedded #GtkColorSelection as internal child with the * name "color_selection". It also exposes the buttons with the names * "ok_button", "cancel_button" and "help_button". - * */ diff --git a/gtk/deprecated/gtkfontsel.c b/gtk/deprecated/gtkfontsel.c index 9440c422ce..0ac6561836 100644 --- a/gtk/deprecated/gtkfontsel.c +++ b/gtk/deprecated/gtkfontsel.c @@ -1626,13 +1626,12 @@ gtk_font_selection_set_preview_text (GtkFontSelection *fontsel, * In GTK+ 3.2, #GtkFontSelectionDialog has been deprecated in favor of * #GtkFontChooserDialog. * - * - * GtkFontSelectionDialog as GtkBuildable + * # GtkFontSelectionDialog as GtkBuildable # {#GtkFontSelectionDialog-BUILDER-UI} + * * The GtkFontSelectionDialog implementation of the GtkBuildable interface * exposes the embedded #GtkFontSelection as internal child with the * name "font_selection". It also exposes the buttons with the names * "ok_button", "cancel_button" and "apply_button". - * */ static void gtk_font_selection_dialog_buildable_interface_init (GtkBuildableIface *iface); diff --git a/gtk/deprecated/gtkiconfactory.c b/gtk/deprecated/gtkiconfactory.c index accf8f1543..a5c2c892e5 100644 --- a/gtk/deprecated/gtkiconfactory.c +++ b/gtk/deprecated/gtkiconfactory.c @@ -70,12 +70,12 @@ * gtk_widget_render_icon(). These functions take the theme into account when * looking up the icon to use for a given stock ID. * - * - * GtkIconFactory as GtkBuildable - * + * # GtkIconFactory as GtkBuildable # {#GtkIconFactory-BUILDER-UI} + * * GtkIconFactory supports a custom <sources> element, which can contain * multiple <source> elements. * The following attributes are allowed: + * * * * stock-id @@ -120,8 +120,9 @@ * * * - * - * A #GtkIconFactory UI definition fragment. + * + * ## A #GtkIconFactory UI definition fragment. ## + * * |[ * * @@ -137,9 +138,6 @@ * * * ]| - * - * - * */ diff --git a/gtk/deprecated/gtkuimanager.c b/gtk/deprecated/gtkuimanager.c index 0b8df582b1..ddc844a192 100644 --- a/gtk/deprecated/gtkuimanager.c +++ b/gtk/deprecated/gtkuimanager.c @@ -60,9 +60,8 @@ * one or more UI definitions, which reference actions from one or more * action groups. * - * - * UI Definitions - * + * # UI Definitions # {#XML-UI} + * * The UI definitions are specified in an XML format which can be * roughly described by the following DTD. * @@ -108,6 +107,7 @@ * * ]| + * * There are some additional restrictions beyond those specified in the * DTD, e.g. every toolitem must have a toolbar in its anchestry and * every menuitem must have a menubar or popup in its anchestry. Since @@ -121,8 +121,8 @@ * enclosed in doublequotes, thus they must not '"' characters or references * to the " entity. * - * - * A UI definition + * ## A UI definition ## + * * |[ * * @@ -149,12 +149,12 @@ * * * ]| - * * * The constructed widget hierarchy is very similar to the element tree * of the XML, with the exception that placeholders are merged into their * parents. The correspondence of XML elements to widgets should be * almost obvious: + * * * * menubar @@ -197,11 +197,9 @@ * The "position" attribute determines where a constructed widget is positioned * wrt. to its siblings in the partially constructed tree. If it is * "top", the widget is prepended, otherwise it is appended. - * - * - * - * UI Merging - * + * + * # UI Merging # {#UI-Merging} + * * The most remarkable feature of #GtkUIManager is that it can overlay a set * of menuitems and toolitems over another one, and demerge them later. * @@ -211,20 +209,16 @@ * has the path /ui/menubar/JustifyMenu/Left and the * toolitem with the same name has path * /ui/toolbar1/JustifyToolItems/Left. - * - * - * - * Accelerators - * + * + * # Accelerators # + * * Every action has an accelerator path. Accelerators are installed together with * menuitem proxies, but they can also be explicitly added with <accelerator> * elements in the UI definition. This makes it possible to have accelerators for * actions even if they have no visible proxies. - * - * - * - * Smart Separators - * + * + * # Smart Separators # {#Smart-Separators} + * * The separators created by #GtkUIManager are "smart", i.e. they do not show up * in the UI unless they end up between two visible menu or tool items. Separators * which are located at the very beginning or end of the menu or toolbar @@ -236,14 +230,13 @@ * For separators in toolbars, you can set expand="true" to * turn them from a small, visible separator to an expanding, invisible one. * Toolitems following an expanding separator are effectively right-aligned. - * - * - * - * Empty Menus - * + * + * # Empty Menus + * * Submenus pose similar problems to separators inconnection with merging. It is * impossible to know in advance whether they will end up empty after merging. * #GtkUIManager offers two ways to treat empty submenus: + * * * * make them disappear by hiding the menu item they're attached to @@ -252,13 +245,12 @@ * add an insensitive "Empty" item * * + * * The behaviour is chosen based on the "hide_if_empty" property of the action * to which the submenu is associated. - * - * - * - * GtkUIManager as GtkBuildable - * + * + * # GtkUIManager as GtkBuildable # {#GtkUIManager-BUILDER-UI} + * * The GtkUIManager implementation of the GtkBuildable interface accepts * GtkActionGroup objects as <child> elements in UI definitions. * @@ -269,8 +261,8 @@ * other parts of the constructed user interface with the help of the * "constructor" attribute. See the example below. * - * - * An embedded GtkUIManager UI definition + * ## An embedded GtkUIManager UI definition + * * |[ * * @@ -295,9 +287,6 @@ * * * ]| - * - * - * */