[devhelp] Revert the introduction of the amtk library.



commit 4540f1c6897369fbbb7daa16bd3d100683a20299
Author: Günther Wagner <info gunibert de>
Date:   Thu Aug 16 20:18:40 2018 +0200

    Revert the introduction of the amtk library.
    
    This was done to manipulate menus by code and define the whole application gtk
    structure by code. As the maintainer is gone it is not certain that the library
    gets maintainance i reverted these patches. Less dependencies are even better
    for further maintaining of devhelp.
    
    Revert "amtk: create GtkShortcutsWindow with Amtk"
    This reverts commit 6461a5759b4510c24d15e3c1b1c28ff6ee0a76c1.
    Revert "amtk: call amtk_init/finalize()"
    This reverts commit 630acca65a0eebcf85a0c5c40aae9a9d91ad5058.
    Revert "amtk: use amtk_action_info_store_set_all_accels_to_app()"
    This reverts commit 7657544cae7c75a517eff11819cdebef35f50bec.
    Revert "amtk: add accels to the AmtkActionInfo's"
    This reverts commit fb80af1c06ffc349cf56fb8afbc5f29956f39a62.
    Revert "amtk: use sanity checks"
    This reverts commit 1947772e04ea67bdebee22b38040834dd5597c2b.
    Revert "amtk: create window menus with Amtk"
    This reverts commit 4de843d32fd119d8622216d2f1ea51f112df3da7.
    Revert "amtk: create app menu with Amtk"
    This reverts commit 53f587a2065358cdd98aecd59fe68563f0a3f950.

 .gitignore                     |   1 +
 README                         |   1 -
 flatpak/org.gnome.Devhelp.json |  11 --
 meson.build                    |   1 -
 po/POTFILES.in                 |   3 +
 src/dh-app.c                   | 239 +++++++++++--------------------------
 src/dh-app.h                   |   2 -
 src/dh-main.c                  |   3 -
 src/dh-window.c                | 260 +++++++----------------------------------
 src/dh-window.ui               | 245 ++++++++++++++++++++++++++++++++++++++
 src/dh.gresource.xml           |   5 +
 src/help-overlay.ui            | 117 +++++++++++++++++++
 src/menus.ui                   |  58 +++++++++
 13 files changed, 543 insertions(+), 403 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 567609b1..47656a4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 build/
+_build/
\ No newline at end of file
diff --git a/README b/README
index a243208a..5911ef8a 100644
--- a/README
+++ b/README
@@ -16,7 +16,6 @@ Dependencies
 - glib >= 2.56
 - gtk+ >= 3.22
 - webkit2gtk-4.0 >= 2.20
-- Amtk >= 5.0 - https://wiki.gnome.org/Projects/Amtk
 - gsettings-desktop-schemas
 
 Description
diff --git a/flatpak/org.gnome.Devhelp.json b/flatpak/org.gnome.Devhelp.json
index 99a4fd02..db8825e3 100644
--- a/flatpak/org.gnome.Devhelp.json
+++ b/flatpak/org.gnome.Devhelp.json
@@ -37,17 +37,6 @@
         "*.a"
     ],
     "modules" : [
-        {
-            "name" : "amtk",
-            "run-tests" : true,
-            "sources" : [
-                {
-                    "type" : "git",
-                    "url" : "https://gitlab.gnome.org/GNOME/amtk.git";,
-                    "branch" : "master"
-                }
-            ]
-        },
         {
             "name" : "devhelp",
             "buildsystem" : "meson",
diff --git a/meson.build b/meson.build
index 26a6604d..51c4f770 100644
--- a/meson.build
+++ b/meson.build
@@ -49,7 +49,6 @@ endforeach
 
 DEVHELP_APP_DEPS = [
         LIBDEVHELP_DEPS,
-        dependency('amtk-5', version : '>= 5.0'),
         dependency('gsettings-desktop-schemas'),
 ]
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index db463e9e..cd6e6ed8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -42,3 +42,6 @@ src/dh-preferences.ui
 src/dh-settings-app.c
 src/dh-util-app.c
 src/dh-window.c
+src/dh-window.ui
+src/help-overlay.ui
+src/menus.ui
diff --git a/src/dh-app.c b/src/dh-app.c
index 26f280c1..a9c3dfb9 100644
--- a/src/dh-app.c
+++ b/src/dh-app.c
@@ -25,126 +25,12 @@
 #include "config.h"
 #include "dh-app.h"
 #include <glib/gi18n.h>
-#include <amtk/amtk.h>
 #include "dh-assistant.h"
 #include "dh-preferences.h"
 #include "dh-settings-app.h"
 #include "dh-util-app.h"
 
-struct _DhAppPrivate {
-        /* AmtkActionInfoStore for actions that are present in a menu. */
-        AmtkActionInfoStore *menu_action_info_store;
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE (DhApp, dh_app, GTK_TYPE_APPLICATION);
-
-static void
-add_menu_action_infos (DhApp *app)
-{
-        const gchar *accels[] = {NULL, NULL, NULL};
-        AmtkActionInfo *action_info;
-
-        const AmtkActionInfoEntry entries[] = {
-                /* action, icon, label, accel, tooltip */
-
-                /* App menu */
-                { "app.new-window", NULL, N_("New _Window"), "<Control>n",
-                  N_("Open a new window") },
-                { "app.preferences", NULL, N_("_Preferences") },
-                { "win.shortcuts-window", NULL, N_("_Keyboard Shortcuts") },
-                { "app.help", NULL, N_("_Help"), "F1" },
-                { "app.about", NULL, N_("_About") },
-                { "app.quit", NULL, N_("_Quit"), "<Control>q",
-                  N_("Close all windows") },
-
-                /* Window menu */
-                { "win.show-sidebar", NULL, N_("_Side Panel"), "F9",
-                  N_("Toggle side panel visibility") },
-                { "win.print", NULL, N_("_Print"), "<Control>p" },
-                { "win.find", NULL, N_("_Find"), "<Control>f",
-                  N_("Find in current page") },
-                { "win.zoom-in", NULL, N_("_Larger Text"), NULL,
-                  N_("Larger text") },
-                { "win.zoom-out", NULL, N_("S_maller Text"), "<Control>minus",
-                  N_("Smaller text") },
-                { "win.zoom-default", NULL, N_("_Normal Size"), "<Control>0",
-                  N_("Normal size") },
-                { NULL }
-        };
-
-        g_assert (app->priv->menu_action_info_store == NULL);
-        app->priv->menu_action_info_store = amtk_action_info_store_new ();
-
-        amtk_action_info_store_add_entries (app->priv->menu_action_info_store,
-                                            entries, -1,
-                                            GETTEXT_PACKAGE);
-
-        accels[0] = "<Control>F1";
-        accels[1] = "<Control>question";
-        action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, 
"win.shortcuts-window");
-        amtk_action_info_set_accels (action_info, accels);
-
-        /* For "<Control>equal": Epiphany also has this keyboard shortcut for
-         * zoom-in. On keyboards the = and + are usually on the same key, but +
-         * is less convenient to type because Shift must be pressed too.
-         * Apparently it's usual on Windows to press Ctrl+= to zoom in.
-         * https://bugzilla.gnome.org/show_bug.cgi?id=743704
-         */
-        accels[0] = "<Control>plus";
-        accels[1] = "<Control>equal";
-        action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, "win.zoom-in");
-        amtk_action_info_set_accels (action_info, accels);
-
-        amtk_action_info_store_set_all_accels_to_app (app->priv->menu_action_info_store,
-                                                      GTK_APPLICATION (app));
-}
-
-static void
-add_other_action_infos (DhApp *app)
-{
-        AmtkActionInfoStore *store;
-        AmtkActionInfo *action_info;
-        const gchar *accels[] = {NULL, NULL, NULL, NULL};
-
-        const AmtkActionInfoEntry entries[] = {
-                /* action, icon, label, accel, tooltip */
-                { "win.new-tab", NULL, NULL, "<Control>t", N_("Open a new tab") },
-                { "win.close-tab", NULL, NULL, "<Control>w", N_("Close the current tab") },
-                { "win.go-back", NULL, NULL, NULL, N_("Go back") },
-                { "win.go-forward", NULL, NULL, NULL, N_("Go forward") },
-                { "win.focus-search", NULL, NULL, NULL, N_("Focus global search") },
-                { NULL }
-        };
-
-        store = amtk_action_info_store_new ();
-        amtk_action_info_store_add_entries (store, entries, -1, GETTEXT_PACKAGE);
-
-        accels[0] = "<Alt>Left";
-        accels[1] = "Back";
-        action_info = amtk_action_info_store_lookup (store, "win.go-back");
-        amtk_action_info_set_accels (action_info, accels);
-
-        accels[0] = "<Alt>Right";
-        accels[1] = "Forward";
-        action_info = amtk_action_info_store_lookup (store, "win.go-forward");
-        amtk_action_info_set_accels (action_info, accels);
-
-        accels[0] = "<Control>k";
-        accels[1] = "<Control>s";
-        accels[2] = "<Control>l";
-        action_info = amtk_action_info_store_lookup (store, "win.focus-search");
-        amtk_action_info_set_accels (action_info, accels);
-
-        amtk_action_info_store_set_all_accels_to_app (store, GTK_APPLICATION (app));
-        g_object_unref (store);
-}
-
-static void
-add_action_infos (DhApp *app)
-{
-        add_menu_action_infos (app);
-        add_other_action_infos (app);
-}
+G_DEFINE_TYPE (DhApp, dh_app, GTK_TYPE_APPLICATION);
 
 static DhAssistant *
 get_active_assistant_window (DhApp *app)
@@ -206,8 +92,6 @@ new_window_cb (GSimpleAction *action,
 
         new_window = dh_window_new (GTK_APPLICATION (app));
         gtk_widget_show_all (new_window);
-
-        amtk_action_info_store_check_all_used (app->priv->menu_action_info_store);
 }
 
 static void
@@ -368,10 +252,10 @@ add_action_entries (DhApp *app)
                 { "raise", raise_cb },
         };
 
-        amtk_action_map_add_action_entries_check_dups (G_ACTION_MAP (app),
-                                                       app_entries,
-                                                       G_N_ELEMENTS (app_entries),
-                                                       app);
+        g_action_map_add_action_entries (G_ACTION_MAP (app),
+                                         app_entries,
+                                         G_N_ELEMENTS (app_entries),
+                                         app);
 }
 
 static void
@@ -403,58 +287,91 @@ setup_go_to_tab_accelerators (GtkApplication *app)
 }
 
 static void
-setup_additional_accelerators (GtkApplication *app)
+setup_accelerators (GtkApplication *app)
 {
-        const gchar *accels[] = {NULL, NULL};
+        const gchar *accels[] = {NULL, NULL, NULL, NULL};
 
         setup_go_to_tab_accelerators (app);
 
+        accels[0] = "<Control>0";
+        gtk_application_set_accels_for_action (app, "win.zoom-default", accels);
+
+        accels[0] = "<Control>minus";
+        gtk_application_set_accels_for_action (app, "win.zoom-out", accels);
+
+        /* For "<Control>equal": Epiphany also has this keyboard shortcut for
+         * zoom-in. On keyboards the = and + are usually on the same key, but +
+         * is less convenient to type because Shift must be pressed too.
+         * Apparently it's usual on Windows to press Ctrl+= to zoom in.
+         * https://bugzilla.gnome.org/show_bug.cgi?id=743704
+         */
+        accels[0] = "<Control>plus";
+        accels[1] = "<Control>equal";
+        gtk_application_set_accels_for_action (app, "win.zoom-in", accels);
+        accels[1] = NULL;
+
+        accels[0] = "<Control>f";
+        gtk_application_set_accels_for_action (app, "win.find", accels);
+
         accels[0] = "<Control>c";
         gtk_application_set_accels_for_action (app, "win.copy", accels);
 
+        accels[0] = "<Control>p";
+        gtk_application_set_accels_for_action (app, "win.print", accels);
+
+        accels[0] = "<Control>t";
+        gtk_application_set_accels_for_action (app, "win.new-tab", accels);
+
+        accels[0] = "<Control>n";
+        gtk_application_set_accels_for_action (app, "app.new-window", accels);
+
         accels[0] = "<Control>Page_Down";
         gtk_application_set_accels_for_action (app, "win.next-tab", accels);
 
         accels[0] = "<Control>Page_Up";
         gtk_application_set_accels_for_action (app, "win.prev-tab", accels);
 
+        accels[0] = "<Control>w";
+        gtk_application_set_accels_for_action (app, "win.close-tab", accels);
+
+        accels[0] = "<Control>q";
+        gtk_application_set_accels_for_action (app, "app.quit", accels);
+
+        accels[0] = "F1";
+        gtk_application_set_accels_for_action (app, "app.help", accels);
+
+        accels[0] = "F9";
+        gtk_application_set_accels_for_action (app, "win.show-sidebar", accels);
+
         accels[0] = "F10";
         gtk_application_set_accels_for_action (app, "win.show-window-menu", accels);
-}
 
-static void
-create_app_menu_if_needed (GtkApplication *app)
-{
-        GMenu *app_menu;
-        GMenu *section;
-        AmtkFactory *factory;
-
-        if (!gtk_application_prefers_app_menu (app))
-                return;
+        accels[0] = "<Alt>Right";
+        accels[1] = "Forward";
+        gtk_application_set_accels_for_action (app, "win.go-forward", accels);
 
-        app_menu = g_menu_new ();
-        factory = amtk_factory_new (NULL);
+        accels[0] = "<Alt>Left";
+        accels[1] = "Back";
+        gtk_application_set_accels_for_action (app, "win.go-back", accels);
 
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.new-window"));
-        amtk_gmenu_append_section (app_menu, NULL, section);
+        accels[0] = "<Control>k";
+        accels[1] = "<Control>s";
+        accels[2] = "<Control>l";
+        gtk_application_set_accels_for_action (app, "win.focus-search", accels);
+}
 
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.preferences"));
-        amtk_gmenu_append_section (app_menu, NULL, section);
+static void
+set_app_menu_if_needed (GtkApplication *app)
+{
+        GMenu *manual_app_menu;
 
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.shortcuts-window"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.help"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.about"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.quit"));
-        amtk_gmenu_append_section (app_menu, NULL, section);
+        manual_app_menu = gtk_application_get_menu_by_id (app, "manual-app-menu");
 
-        g_object_unref (factory);
-        g_menu_freeze (app_menu);
+        /* Have the g_return in all cases, to catch problems in all cases. */
+        g_return_if_fail (manual_app_menu != NULL);
 
-        gtk_application_set_app_menu (app, G_MENU_MODEL (app_menu));
-        g_object_unref (app_menu);
+        if (gtk_application_prefers_app_menu (app))
+                gtk_application_set_app_menu (app, G_MENU_MODEL (manual_app_menu));
 }
 
 static void
@@ -467,10 +384,9 @@ dh_app_startup (GApplication *application)
         if (G_APPLICATION_CLASS (dh_app_parent_class)->startup != NULL)
                 G_APPLICATION_CLASS (dh_app_parent_class)->startup (application);
 
-        add_action_infos (app);
         add_action_entries (app);
-        setup_additional_accelerators (GTK_APPLICATION (app));
-        create_app_menu_if_needed (GTK_APPLICATION (app));
+        setup_accelerators (GTK_APPLICATION (app));
+        set_app_menu_if_needed (GTK_APPLICATION (app));
 }
 
 static void
@@ -563,24 +479,11 @@ dh_app_command_line (GApplication            *g_app,
         return 0;
 }
 
-static void
-dh_app_dispose (GObject *object)
-{
-        DhApp *app = DH_APP (object);
-
-        g_clear_object (&app->priv->menu_action_info_store);
-
-        G_OBJECT_CLASS (dh_app_parent_class)->dispose (object);
-}
-
 static void
 dh_app_class_init (DhAppClass *klass)
 {
-        GObjectClass *object_class = G_OBJECT_CLASS (klass);
         GApplicationClass *application_class = G_APPLICATION_CLASS (klass);
 
-        object_class->dispose = dh_app_dispose;
-
         application_class->startup = dh_app_startup;
         application_class->activate = dh_app_activate;
         application_class->handle_local_options = dh_app_handle_local_options;
@@ -590,8 +493,6 @@ dh_app_class_init (DhAppClass *klass)
 static void
 dh_app_init (DhApp *app)
 {
-        app->priv = dh_app_get_instance_private (app);
-
         /* Translators: please don't translate "Devhelp" (it's marked as
          * translatable for transliteration only).
          */
diff --git a/src/dh-app.h b/src/dh-app.h
index 986b55ec..1d60918e 100644
--- a/src/dh-app.h
+++ b/src/dh-app.h
@@ -36,11 +36,9 @@ G_BEGIN_DECLS
 
 typedef struct _DhApp        DhApp;
 typedef struct _DhAppClass   DhAppClass;
-typedef struct _DhAppPrivate DhAppPrivate;
 
 struct _DhApp {
         GtkApplication parent_instance;
-        DhAppPrivate *priv;
 };
 
 struct _DhAppClass {
diff --git a/src/dh-main.c b/src/dh-main.c
index 86510f62..545cf622 100644
--- a/src/dh-main.c
+++ b/src/dh-main.c
@@ -23,7 +23,6 @@
 #include <locale.h>
 #include <glib/gi18n.h>
 #include <devhelp/devhelp.h>
-#include <amtk/amtk.h>
 #include "dh-app.h"
 #include "dh-settings-app.h"
 
@@ -37,13 +36,11 @@ main (int argc, char **argv)
         textdomain (GETTEXT_PACKAGE);
 
         dh_init ();
-        amtk_init ();
 
         application = dh_app_new ();
         status = g_application_run (G_APPLICATION (application), argc, argv);
         g_object_unref (application);
 
-        amtk_finalize ();
         dh_finalize ();
         dh_settings_app_unref_singleton ();
 
diff --git a/src/dh-window.c b/src/dh-window.c
index 2b1f596e..460e7815 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -25,13 +25,17 @@
 #include <glib/gi18n.h>
 #include <webkit2/webkit2.h>
 #include <devhelp/devhelp.h>
-#include <amtk/amtk.h>
 #include "dh-settings-app.h"
 #include "dh-util-app.h"
 
 typedef struct {
         GtkHeaderBar *header_bar;
         GtkMenuButton *window_menu_button;
+        GMenuModel *window_menu_plus_app_menu;
+
+        GtkPaned *hpaned;
+        GtkWidget *grid_sidebar;
+        GtkWidget *grid_documents;
 
         DhSidebar *sidebar;
         DhSearchBar *search_bar;
@@ -61,8 +65,6 @@ dh_window_dispose (GObject *object)
 {
         DhWindowPrivate *priv = dh_window_get_instance_private (DH_WINDOW (object));
 
-        priv->header_bar = NULL;
-        priv->window_menu_button = NULL;
         priv->sidebar = NULL;
         priv->search_bar = NULL;
         priv->notebook = NULL;
@@ -79,6 +81,15 @@ dh_window_class_init (DhWindowClass *klass)
         widget_class->delete_event = dh_window_delete_event;
 
         object_class->dispose = dh_window_dispose;
+
+        /* Bind class to template */
+        gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/devhelp/dh-window.ui");
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, header_bar);
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, window_menu_button);
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, window_menu_plus_app_menu);
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, hpaned);
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, grid_sidebar);
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, grid_documents);
 }
 
 /* Can return NULL during initialization and finalization, so it's better to
@@ -240,8 +251,13 @@ close_tab_cb (GSimpleAction *action,
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
         gint page_num;
 
-        page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
-        gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), page_num);
+        /* FIXME: the code here closes the current *tab*, but in help-overlay.ui
+         * it is documented as "Close the current window". Look for example at
+         * what gedit does, or other GNOME apps with a GtkNotebook plus Ctrl+W
+         * shortcut, and do the same.
+         */
+        page_num = gtk_notebook_get_current_page (priv->notebook);
+        gtk_notebook_remove_page (priv->notebook, page_num);
 }
 
 static void
@@ -368,54 +384,6 @@ go_forward_cb (GSimpleAction *action,
                 webkit_web_view_go_forward (WEBKIT_WEB_VIEW (web_view));
 }
 
-static void
-shortcuts_window_cb (GSimpleAction *action,
-                     GVariant      *parameter,
-                     gpointer       user_data)
-{
-        DhWindow *app_window = DH_WINDOW (user_data);
-        GtkShortcutsWindow *shortcuts_window;
-        GtkContainer *section;
-        GtkContainer *group;
-        AmtkFactory *factory;
-
-        shortcuts_window = amtk_shortcuts_window_new (GTK_WINDOW (app_window));
-
-        section = amtk_shortcuts_section_new (NULL);
-        g_object_set (section,
-                      "max-height", 10,
-                      NULL);
-
-        factory = amtk_factory_new (NULL);
-        amtk_factory_set_default_flags (factory, AMTK_FACTORY_IGNORE_GACTION);
-
-        /* General group */
-        group = amtk_shortcuts_group_new (_("General"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.focus-search"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.find"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.new-window"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.new-tab"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.show-sidebar"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.go-back"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.go-forward"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.print"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.close-tab"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.quit"));
-        gtk_container_add (section, GTK_WIDGET (group));
-
-        /* Zoom group */
-        group = amtk_shortcuts_group_new (_("Zoom"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.zoom-in"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.zoom-out"));
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.zoom-default"));
-        gtk_container_add (section, GTK_WIDGET (group));
-
-        g_object_unref (factory);
-
-        gtk_container_add (GTK_CONTAINER (shortcuts_window), GTK_WIDGET (section));
-        gtk_widget_show_all (GTK_WIDGET (shortcuts_window));
-}
-
 static void
 add_actions (DhWindow *window)
 {
@@ -444,18 +412,15 @@ add_actions (DhWindow *window)
                 /* Go */
                 { "go-back", go_back_cb },
                 { "go-forward", go_forward_cb },
-
-                /* Help */
-                { "shortcuts-window", shortcuts_window_cb },
         };
 
-        amtk_action_map_add_action_entries_check_dups (G_ACTION_MAP (window),
-                                                       win_entries,
-                                                       G_N_ELEMENTS (win_entries),
-                                                       window);
+        g_action_map_add_action_entries (G_ACTION_MAP (window),
+                                         win_entries,
+                                         G_N_ELEMENTS (win_entries),
+                                         window);
 
         property_action = g_property_action_new ("show-sidebar",
-                                                 priv->sidebar,
+                                                 priv->grid_sidebar,
                                                  "visible");
         g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (property_action));
         g_object_unref (property_action);
@@ -467,141 +432,6 @@ add_actions (DhWindow *window)
         g_object_unref (property_action);
 }
 
-static GMenuModel *
-create_window_menu_simple (void)
-{
-        GMenu *menu;
-        GMenu *section;
-        AmtkFactory *factory;
-
-        menu = g_menu_new ();
-        factory = amtk_factory_new (NULL);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.show-sidebar"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.print"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.find"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-in"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-out"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-default"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        g_object_unref (factory);
-        g_menu_freeze (menu);
-
-        return G_MENU_MODEL (menu);
-}
-
-static GMenuModel *
-create_window_menu_plus_app_menu (void)
-{
-        GMenu *menu;
-        GMenu *section;
-        AmtkFactory *factory;
-
-        menu = g_menu_new ();
-        factory = amtk_factory_new (NULL);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.new-window"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.show-sidebar"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.print"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.find"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-in"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-out"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-default"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.preferences"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        section = g_menu_new ();
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.shortcuts-window"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.help"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.about"));
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.quit"));
-        amtk_gmenu_append_section (menu, NULL, section);
-
-        g_object_unref (factory);
-        g_menu_freeze (menu);
-
-        return G_MENU_MODEL (menu);
-}
-
-static void
-init_header_bar (DhWindow *window)
-{
-        DhWindowPrivate *priv = dh_window_get_instance_private (window);
-        GtkWidget *back_forward_hgrid;
-        GtkStyleContext *style_context;
-        GtkWidget *back_button;
-        GtkWidget *forward_button;
-        GtkApplication *app;
-        GMenuModel *window_menu;
-        GtkWidget *new_tab_button;
-
-        g_assert (priv->header_bar == NULL);
-        g_assert (priv->window_menu_button == NULL);
-
-        priv->header_bar = GTK_HEADER_BAR (gtk_header_bar_new ());
-        gtk_header_bar_set_show_close_button (priv->header_bar, TRUE);
-
-        /* Back/forward buttons */
-        back_forward_hgrid = gtk_grid_new ();
-        style_context = gtk_widget_get_style_context (back_forward_hgrid);
-        gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_LINKED);
-
-        back_button = gtk_button_new_from_icon_name ("go-previous-symbolic", GTK_ICON_SIZE_BUTTON);
-        gtk_actionable_set_action_name (GTK_ACTIONABLE (back_button), "win.go-back");
-        gtk_widget_set_tooltip_text (back_button, _("Back"));
-
-        forward_button = gtk_button_new_from_icon_name ("go-next-symbolic", GTK_ICON_SIZE_BUTTON);
-        gtk_actionable_set_action_name (GTK_ACTIONABLE (forward_button), "win.go-forward");
-        gtk_widget_set_tooltip_text (forward_button, _("Forward"));
-
-        gtk_container_add (GTK_CONTAINER (back_forward_hgrid), back_button);
-        gtk_container_add (GTK_CONTAINER (back_forward_hgrid), forward_button);
-        gtk_header_bar_pack_start (priv->header_bar, back_forward_hgrid);
-
-        /* Menu */
-        priv->window_menu_button = GTK_MENU_BUTTON (gtk_menu_button_new ());
-        gtk_menu_button_set_direction (priv->window_menu_button, GTK_ARROW_NONE);
-        gtk_header_bar_pack_end (priv->header_bar, GTK_WIDGET (priv->window_menu_button));
-
-        app = GTK_APPLICATION (g_application_get_default ());
-        if (gtk_application_prefers_app_menu (app))
-                window_menu = create_window_menu_simple ();
-        else
-                window_menu = create_window_menu_plus_app_menu ();
-
-        gtk_menu_button_set_menu_model (priv->window_menu_button, window_menu);
-        g_object_unref (window_menu);
-
-        /* New tab button */
-        new_tab_button = gtk_button_new_from_icon_name ("tab-new-symbolic", GTK_ICON_SIZE_BUTTON);
-        gtk_actionable_set_action_name (GTK_ACTIONABLE (new_tab_button), "win.new-tab");
-        gtk_widget_set_tooltip_text (new_tab_button, _("New Tab"));
-        gtk_header_bar_pack_end (priv->header_bar, new_tab_button);
-
-        gtk_widget_show_all (GTK_WIDGET (priv->header_bar));
-}
-
 static void
 web_view_title_notify_cb (DhWebView  *web_view,
                           GParamSpec *param_spec,
@@ -678,34 +508,36 @@ static void
 dh_window_init (DhWindow *window)
 {
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
-        GtkPaned *hpaned;
+        GtkApplication *app;
         DhSettingsApp *settings;
         GSettings *paned_settings;
-        GtkWidget *contents_vgrid;
 
-        /* Header bar */
-        init_header_bar (window);
-        gtk_window_set_titlebar (GTK_WINDOW (window), GTK_WIDGET (priv->header_bar));
+        gtk_widget_init_template (GTK_WIDGET (window));
 
-        /* Horizontal paned */
-        hpaned = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
+        add_actions (window);
+
+        app = GTK_APPLICATION (g_application_get_default ());
+        if (!gtk_application_prefers_app_menu (app)) {
+                gtk_menu_button_set_menu_model (priv->window_menu_button,
+                                                priv->window_menu_plus_app_menu);
+        }
 
         settings = dh_settings_app_get_singleton ();
         paned_settings = dh_settings_app_peek_paned_settings (settings);
         g_settings_bind (paned_settings, "position",
-                         hpaned, "position",
+                         priv->hpaned, "position",
                          G_SETTINGS_BIND_DEFAULT |
                          G_SETTINGS_BIND_NO_SENSITIVITY);
 
-        /* Left side of hpaned */
+        /* Sidebar */
         priv->sidebar = dh_sidebar_new2 (NULL);
-
-        /* Right side of hpaned */
-        contents_vgrid = gtk_grid_new ();
-        gtk_orientable_set_orientation (GTK_ORIENTABLE (contents_vgrid), GTK_ORIENTATION_VERTICAL);
+        gtk_widget_show (GTK_WIDGET (priv->sidebar));
+        gtk_container_add (GTK_CONTAINER (priv->grid_sidebar),
+                           GTK_WIDGET (priv->sidebar));
 
         // DhNotebook
         priv->notebook = dh_notebook_new (NULL);
+        gtk_widget_show (GTK_WIDGET (priv->notebook));
 
         dh_application_window_bind_sidebar_and_notebook (priv->sidebar, priv->notebook);
 
@@ -726,16 +558,12 @@ dh_window_init (DhWindow *window)
 
         // DhSearchBar
         priv->search_bar = dh_search_bar_new (priv->notebook);
+        gtk_widget_show (GTK_WIDGET (priv->search_bar));
 
-        /* Packing */
-        gtk_container_add (GTK_CONTAINER (contents_vgrid),
+        gtk_container_add (GTK_CONTAINER (priv->grid_documents),
                            GTK_WIDGET (priv->search_bar));
-        gtk_container_add (GTK_CONTAINER (contents_vgrid),
+        gtk_container_add (GTK_CONTAINER (priv->grid_documents),
                            GTK_WIDGET (priv->notebook));
-        gtk_paned_pack1 (hpaned, GTK_WIDGET (priv->sidebar), FALSE, FALSE);
-        gtk_paned_add2 (hpaned, contents_vgrid);
-        gtk_widget_show_all (GTK_WIDGET (hpaned));
-        gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (hpaned));
 
         add_actions (window);
 
diff --git a/src/dh-window.ui b/src/dh-window.ui
new file mode 100644
index 00000000..cff68898
--- /dev/null
+++ b/src/dh-window.ui
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.8 -->
+  <menu id="window_menu_simple">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Side Panel</attribute>
+        <attribute name="action">win.show-sidebar</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Print</attribute>
+        <attribute name="action">win.print</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Find</attribute>
+        <attribute name="action">win.find</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Larger Text</attribute>
+        <attribute name="action">win.zoom-in</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">S_maller Text</attribute>
+        <attribute name="action">win.zoom-out</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Normal Size</attribute>
+        <attribute name="action">win.zoom-default</attribute>
+      </item>
+    </section>
+  </menu>
+  <menu id="window_menu_plus_app_menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">New _Window</attribute>
+        <attribute name="action">app.new-window</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Side Panel</attribute>
+        <attribute name="action">win.show-sidebar</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Print</attribute>
+        <attribute name="action">win.print</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Find</attribute>
+        <attribute name="action">win.find</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Larger Text</attribute>
+        <attribute name="action">win.zoom-in</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">S_maller Text</attribute>
+        <attribute name="action">win.zoom-out</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Normal Size</attribute>
+        <attribute name="action">win.zoom-default</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
+        <attribute name="action">win.show-help-overlay</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Help</attribute>
+        <attribute name="action">app.help</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_About Devhelp</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+  <template class="DhWindow" parent="GtkApplicationWindow">
+    <property name="can_focus">False</property>
+    <property name="has_focus">False</property>
+    <property name="is_focus">False</property>
+    <child type="titlebar">
+      <object class="GtkHeaderBar" id="header_bar">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="vexpand">False</property>
+        <property name="show_close_button">True</property>
+        <child>
+          <object class="GtkBox" id="box">
+            <property name="visible">True</property>
+            <property name="valign">center</property>
+            <property name="can_focus">False</property>
+            <style>
+              <class name="linked"/>
+            </style>
+            <child>
+              <object class="GtkButton" id="back_button">
+                <property name="visible">True</property>
+                <property name="valign">center</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes">Back</property>
+                <property name="action_name">win.go-back</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
+                <child>
+                  <object class="GtkImage" id="back_button_image">
+                    <property name="visible">True</property>
+                    <property name="icon_size">1</property>
+                    <property name="icon_name">go-previous-symbolic</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="forward_button">
+                <property name="visible">True</property>
+                <property name="valign">center</property>
+                <property name="can_focus">False</property>
+                <property name="tooltip_text" translatable="yes">Forward</property>
+                <property name="action_name">win.go-forward</property>
+                <style>
+                  <class name="image-button"/>
+                </style>
+                <child>
+                  <object class="GtkImage" id="forward_button_image">
+                    <property name="visible">True</property>
+                    <property name="icon_size">1</property>
+                    <property name="icon_name">go-next-symbolic</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="pack_type">start</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkMenuButton" id="window_menu_button">
+            <property name="visible">True</property>
+            <property name="valign">center</property>
+            <property name="can_focus">False</property>
+            <property name="menu_model">window_menu_simple</property>
+            <property name="use_popover">True</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="window_menu_image">
+                <property name="visible">True</property>
+                <property name="icon_size">1</property>
+                <property name="icon_name">open-menu-symbolic</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="new_tab_button">
+            <property name="visible">True</property>
+            <property name="valign">center</property>
+            <property name="can_focus">False</property>
+            <property name="tooltip_text" translatable="yes">New Tab</property>
+            <property name="action_name">win.new-tab</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="new_tab_button_image">
+                <property name="visible">True</property>
+                <property name="icon_size">1</property>
+                <property name="icon_name">tab-new-symbolic</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <child>
+      <object class="GtkGrid" id="grid">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="has_focus">False</property>
+        <property name="is_focus">False</property>
+        <child>
+          <object class="GtkPaned" id="hpaned">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="has_focus">False</property>
+            <property name="is_focus">False</property>
+            <child>
+              <object class="GtkGrid" id="grid_sidebar">
+                <property name="visible">True</property>
+                <style>
+                  <class name="sidebar"/>
+                </style>
+              </object>
+              <packing>
+               <property name="shrink">False</property>
+             </packing>
+            </child>
+            <child>
+              <object class="GtkGrid" id="grid_documents">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="left_attach">0</property>
+            <property name="top_attach">1</property>
+            <property name="width">1</property>
+            <property name="height">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/src/dh.gresource.xml b/src/dh.gresource.xml
index c063d879..6f58d062 100644
--- a/src/dh.gresource.xml
+++ b/src/dh.gresource.xml
@@ -3,5 +3,10 @@
   <gresource prefix="/org/gnome/devhelp">
     <file preprocess="xml-stripblanks">dh-assistant.ui</file>
     <file preprocess="xml-stripblanks">dh-preferences.ui</file>
+    <file preprocess="xml-stripblanks">dh-window.ui</file>
+  </gresource>
+  <gresource prefix="/org/gnome/devhelp/gtk">
+    <file preprocess="xml-stripblanks">help-overlay.ui</file>
+    <file preprocess="xml-stripblanks">menus.ui</file>
   </gresource>
 </gresources>
diff --git a/src/help-overlay.ui b/src/help-overlay.ui
new file mode 100644
index 00000000..80eea36c
--- /dev/null
+++ b/src/help-overlay.ui
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <requires lib="gtk+" version="3.20"/>
+  <object class="GtkShortcutsWindow" id="help_overlay">
+    <property name="modal">1</property>
+    <child>
+      <object class="GtkShortcutsSection">
+        <property name="visible">1</property>
+        <property name="section-name">shortcuts</property>
+        <property name="max-height">10</property>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes" context="shortcut window">General</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;K</property>
+                <property name="title" translatable="yes" context="shortcut window">Focus global 
search</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;F</property>
+                <property name="title" translatable="yes" context="shortcut window">Find in current 
page</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;N</property>
+                <property name="title" translatable="yes" context="shortcut window">Open a new 
window</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;T</property>
+                <property name="title" translatable="yes" context="shortcut window">Open a new tab</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">F9</property>
+                <property name="title" translatable="yes" context="shortcut window">Toggle side panel 
visibility</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;alt&gt;Left</property>
+                <property name="title" translatable="yes" context="shortcut window">Go back</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;alt&gt;Right</property>
+                <property name="title" translatable="yes" context="shortcut window">Go forward</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;P</property>
+                <property name="title" translatable="yes" context="shortcut window">Print</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;W</property>
+                <property name="title" translatable="yes" context="shortcut window">Close the current 
window</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;Control&gt;Q</property>
+                <property name="title" translatable="yes" context="shortcut window">Close all 
windows</property>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child>
+          <object class="GtkShortcutsGroup">
+            <property name="visible">1</property>
+            <property name="title" translatable="yes" context="shortcut window">Zoom</property>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;plus</property>
+                <property name="title" translatable="yes" context="shortcut window">Zoom in</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;minus</property>
+                <property name="title" translatable="yes" context="shortcut window">Zoom out</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkShortcutsShortcut">
+                <property name="visible">1</property>
+                <property name="accelerator">&lt;ctrl&gt;0</property>
+                <property name="title" translatable="yes" context="shortcut window">Reset Zoom</property>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/src/menus.ui b/src/menus.ui
new file mode 100644
index 00000000..a2d53483
--- /dev/null
+++ b/src/menus.ui
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  This file is part of Devhelp.
+
+  Copyright (C) 2010 Imendio AB
+  Copyright (C) 2012 Aleksander Morgado <aleksander gnu org>
+  Copyright (C) 2017, 2018 Sébastien Wilmet <swilmet gnome org>
+
+  Devhelp is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published
+  by the Free Software Foundation, either version 3 of the License,
+  or (at your option) any later version.
+
+  Devhelp is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with Devhelp.  If not, see <http://www.gnu.org/licenses/>.
+-->
+
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <!-- The app menu is set manually if needed. -->
+  <menu id="manual-app-menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">New _Window</attribute>
+        <attribute name="action">app.new-window</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Preferences</attribute>
+        <attribute name="action">app.preferences</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
+        <attribute name="action">win.show-help-overlay</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Help</attribute>
+        <attribute name="action">app.help</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_About</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+</interface>


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