Commit 055e4722 authored by Matthias Clasen's avatar Matthias Clasen

Add the new exampleapp to the docs

parent 7265d9d9
......@@ -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
......
......@@ -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>
......@@ -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);
}
......
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