[gtk+] Add the new exampleapp to the docs



commit 055e4722f52311f7be090a56ce8fe5fcb505c650
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Nov 16 17:03:01 2013 -0500

    Add the new exampleapp to the docs

 docs/reference/gtk/Makefile.am                     |    1 +
 docs/reference/gtk/getting_started.xml             |   32 +++++++++++++++++++-
 .../reference/gtk/images/getting-started-app10.png |  Bin 0 -> 102678 bytes
 examples/application10/exampleappwin.c             |    1 -
 4 files changed, 32 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index c1afc06..848bcd7 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -421,6 +421,7 @@ HTML_IMAGES = \
        $(srcdir)/images/getting-started-app7.png                       \
        $(srcdir)/images/getting-started-app8.png                       \
        $(srcdir)/images/getting-started-app9.png                       \
+       $(srcdir)/images/getting-started-app10.png                      \
        $(srcdir)/images/exampleapp.png                                 \
        $(srcdir)/images/flow-box.png
 
diff --git a/docs/reference/gtk/getting_started.xml b/docs/reference/gtk/getting_started.xml
index 3ba58e8..ee86358 100644
--- a/docs/reference/gtk/getting_started.xml
+++ b/docs/reference/gtk/getting_started.xml
@@ -959,7 +959,7 @@ example_app_window_init (ExampleAppWindow *win)
       <ulink url="https://git.gnome.org/browse/gtk+/tree/examples/application9/exampleappwin.c";>full 
source</ulink>
       if you are interested in the details.</para>
 
-      <para>This brings our example application to its final appearance:</para>
+      <para>This brings our example application to this appearance:</para>
 
       <informalfigure>
         <mediaobject>
@@ -969,5 +969,35 @@ example_app_window_init (ExampleAppWindow *win)
         </mediaobject>
       </informalfigure>
     </section>
+    <section>
+      <title>Header bar</title>
+
+      <para>Our application already uses a GtkHeaderBar, but so far it
+      still gets a 'normal' window titlebar on top of that. This is a
+      bit redundant, and we will now tell GTK+ to use the header bar
+      as replacement for the titlebar. To do so, we move it around to
+      be a direct child of the window, and set its type to be titlebar.</para>
+
+      <informalexample>
+        <programlisting><xi:include href="../../../../examples/application10/window.ui" 
parse="text"><xi:fallback>FIXME: MISSING XINCLUDE CONTENT</xi:fallback></xi:include></programlisting>
+      </informalexample>
+
+      <para>A small extra refinement that we have added here is to allow
+      the header bar to provide a fallback application menu, by setting
+      the show-fallback-app-menu property to TRUE. Here is how the
+      application now looks, if this fallback is used.</para>
+
+      <informalfigure>
+        <mediaobject>
+          <imageobject>
+            <imagedata fileref="getting-started-app10.png" format="PNG"/>
+          </imageobject>
+        </mediaobject>
+      </informalfigure>
+
+      <para>If we set up the window icon for our window, the menu button
+      will use that instead of the generic placeholder icon you see
+      here.
+    </section>
   </section>
 </chapter>
diff --git a/docs/reference/gtk/images/getting-started-app10.png 
b/docs/reference/gtk/images/getting-started-app10.png
new file mode 100644
index 0000000..5e11c4c
Binary files /dev/null and b/docs/reference/gtk/images/getting-started-app10.png differ
diff --git a/examples/application10/exampleappwin.c b/examples/application10/exampleappwin.c
index 5e7a278..4c0efc6 100644
--- a/examples/application10/exampleappwin.c
+++ b/examples/application10/exampleappwin.c
@@ -241,7 +241,6 @@ example_app_window_init (ExampleAppWindow *win)
                           priv->lines_label, "visible",
                           G_BINDING_DEFAULT);
 
-  gtk_window_set_icon_name (GTK_WINDOW (win), "sunny");
   g_object_set (gtk_settings_get_default (), "gtk-shell-shows-app-menu", FALSE, NULL);
   gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (win), TRUE);
 }


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