[gtk+/wip/gmenu] Some more menu-related docs



commit b5103e5c7a1a892ff70553ae91a752c9524c45d9
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 14 06:51:54 2011 -0500

    Some more menu-related docs

 gtk/gtkapplication.c |    6 ++++++
 gtk/gtkbuilder.c     |    8 ++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index ed14aa5..7ff1ed0 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -61,6 +61,12 @@
  * While GtkApplication works fine with plain #GtkWindows, it is recommended
  * to use it together with #GtkApplicationWindow.
  *
+ * To set an app menu on a GtkApplication, use g_application_set_app_menu().
+ * The #GMenuModel that this function expects is usually constructed using
+ * #GtkBuilder, as seen in the following example. To set a menubar that will
+ * be automatically picked up by #GApplicationWindows, use
+ * g_application_set_menubar().
+ *
  * <example id="gtkapplication"><title>A simple application</title>
  * <programlisting>
  * <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; parse="text" href="../../../../examples/bloatpad.c">
diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c
index de24427..fc8d0f9 100644
--- a/gtk/gtkbuilder.c
+++ b/gtk/gtkbuilder.c
@@ -240,6 +240,14 @@
  * <link linkend="GtkTextTagTable-BUILDER-UI">GtkTextTagTable</link>.
  * </para>
  * </refsect2>
+ * <refsect2 id="BUILDER-UI">
+ * <title>Embedding other XML</title>
+ * <para>
+ * Apart from the language for UI descriptions that has been explained
+ * in the previous section, GtkBuilder can also parse XML fragments
+ * of <link linkend="gio-GMenu-Markup">GMenu markup</link>. The resulting
+ * #GMenu object and its named submenus are available via
+ * gtk_builder_get_object() like other constructed objects.
  */
 
 #include "config.h"



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