Blame SOURCES/0001-Revert-Revert-Revert-the-introduction-of-the-amtk-li.patch

ce1861
From 7295e3ca5b6ce5061666c2da4c339853f0d16efc Mon Sep 17 00:00:00 2001
ce1861
From: Jordan Petridis <jordan@centricular.com>
ce1861
Date: Sat, 10 Apr 2021 01:57:50 +0300
ce1861
Subject: [PATCH] Revert "Revert "Revert the introduction of the amtk library""
ce1861
ce1861
This reverts commit 18369a6958664f10b68c9edb749dbd3af7cc731a.
ce1861
ce1861
amtk is now archived.
ce1861
---
ce1861
 .gitignore                     |   1 +
ce1861
 README.md                      |   1 -
ce1861
 flatpak/org.gnome.Devhelp.json |  45 ++++++
ce1861
 flatpak/org.gnome.Devhelp.yml  |  45 ------
ce1861
 meson.build                    |   2 +-
ce1861
 po/POTFILES.in                 |   3 +
ce1861
 src/dh-app.c                   | 255 ++++++++++-----------------------
ce1861
 src/dh-app.h                   |   2 -
ce1861
 src/dh-main.c                  |   3 -
ce1861
 src/dh-window.c                | 255 ++++++---------------------------
ce1861
 src/dh-window.ui               | 245 +++++++++++++++++++++++++++++++
ce1861
 src/dh.gresource.xml           |   5 +
ce1861
 src/help-overlay.ui            | 117 +++++++++++++++
ce1861
 src/menus.ui                   |  58 ++++++++
ce1861
 14 files changed, 599 insertions(+), 438 deletions(-)
ce1861
 create mode 100644 flatpak/org.gnome.Devhelp.json
ce1861
 delete mode 100644 flatpak/org.gnome.Devhelp.yml
ce1861
 create mode 100644 src/dh-window.ui
ce1861
 create mode 100644 src/help-overlay.ui
ce1861
 create mode 100644 src/menus.ui
ce1861
ce1861
\ No newline at end of file
ce1861
diff --git a/README.md b/README.md
ce1861
index 6057f78b..2d83a3c2 100644
ce1861
--- a/README.md
ce1861
+++ b/README.md
ce1861
@@ -1,54 +1,53 @@
ce1861
 Devhelp
ce1861
 =======
ce1861
 
ce1861
 The Devhelp web page:
ce1861
 
ce1861
 https://wiki.gnome.org/Apps/Devhelp
ce1861
 
ce1861
 Installation of the Devhelp Flatpak
ce1861
 -----------------------------------
ce1861
 
ce1861
 - [Devhelp on Flathub](https://flathub.org/apps/details/org.gnome.Devhelp)
ce1861
 
ce1861
 How to contribute
ce1861
 -----------------
ce1861
 
ce1861
 See the [HACKING](HACKING) file.
ce1861
 
ce1861
 Dependencies
ce1861
 ------------
ce1861
 
ce1861
 - GLib
ce1861
 - GTK
ce1861
 - WebKitGTK
ce1861
-- [Amtk](https://wiki.gnome.org/Projects/Amtk)
ce1861
 - gsettings-desktop-schemas
ce1861
 
ce1861
 Description
ce1861
 -----------
ce1861
 
ce1861
 Devhelp is a developer tool for browsing and searching API documentation.
ce1861
 It provides an easy way to navigate through libraries and to search by
ce1861
 function, struct, or macro.
ce1861
 
ce1861
 The documentation must be installed locally, so an internet connection is
ce1861
 not needed to use Devhelp.
ce1861
 
ce1861
 Devhelp works natively with GTK-Doc, so the GTK and GNOME libraries are
ce1861
 well supported. But other development platforms can be supported as well,
ce1861
 as long as the API documentation is available in HTML and a `*.devhelp2`
ce1861
 index file is generated.
ce1861
 
ce1861
 Devhelp integrates with other applications such as Glade, Builder or
ce1861
 Anjuta, and plugins are available for different text editors (gedit, Vim,
ce1861
 Emacs, Geany, …).
ce1861
 
ce1861
 Integration with other developer tools
ce1861
 --------------------------------------
ce1861
 
ce1861
 Devhelp provides some command line options, such as `--search` and
ce1861
 `--search-assistant`. A text editor plugin can for example launch the command
ce1861
 `devhelp --search function_name` when a keyboard shortcut is pressed, with the
ce1861
 `function_name` under the cursor.
ce1861
 
ce1861
 Devhelp also provides a shared library, to integrate the GTK widgets inside an
ce1861
diff --git a/flatpak/org.gnome.Devhelp.json b/flatpak/org.gnome.Devhelp.json
ce1861
new file mode 100644
ce1861
index 00000000..a2d1372d
ce1861
--- /dev/null
ce1861
+++ b/flatpak/org.gnome.Devhelp.json
ce1861
@@ -0,0 +1,45 @@
ce1861
+{
ce1861
+    "app-id" : "org.gnome.Devhelp",
ce1861
+    "runtime" : "org.gnome.Sdk",
ce1861
+    "runtime-version" : "master",
ce1861
+    "sdk" : "org.gnome.Sdk",
ce1861
+    "command" : "devhelp",
ce1861
+    "tags" : [
ce1861
+        "nightly"
ce1861
+    ],
ce1861
+    "desktop-file-name-prefix" : "(Nightly) ",
ce1861
+    "finish-args" : [
ce1861
+        "--share=ipc",
ce1861
+        "--socket=x11",
ce1861
+        "--socket=wayland",
ce1861
+        "--device=dri",
ce1861
+        "--filesystem=host:ro"
ce1861
+    ],
ce1861
+    "cleanup" : [
ce1861
+        "/include",
ce1861
+        "/lib/pkgconfig",
ce1861
+        "/share/pkgconfig",
ce1861
+        "share/aclocal",
ce1861
+        "man",
ce1861
+        "share/man",
ce1861
+        "*.la",
ce1861
+        "*.a"
ce1861
+    ],
ce1861
+    "modules" : [
ce1861
+        {
ce1861
+            "name" : "devhelp",
ce1861
+            "buildsystem" : "meson",
ce1861
+            "config-opts" : [
ce1861
+                "-Dflatpak_build=true"
ce1861
+            ],
ce1861
+            "run-tests" : true,
ce1861
+            "sources" : [
ce1861
+                {
ce1861
+                    "type" : "git",
ce1861
+                    "url" : "https://gitlab.gnome.org/GNOME/devhelp.git",
ce1861
+                    "branch" : "master"
ce1861
+                }
ce1861
+            ]
ce1861
+        }
ce1861
+    ]
ce1861
+}
ce1861
diff --git a/flatpak/org.gnome.Devhelp.yml b/flatpak/org.gnome.Devhelp.yml
ce1861
deleted file mode 100644
ce1861
index 49b838b7..00000000
ce1861
--- a/flatpak/org.gnome.Devhelp.yml
ce1861
+++ /dev/null
ce1861
@@ -1,45 +0,0 @@
ce1861
-app-id: org.gnome.Devhelp
ce1861
-runtime: org.gnome.Sdk
ce1861
-runtime-version: master
ce1861
-sdk: org.gnome.Sdk
ce1861
-command: devhelp
ce1861
-tags:
ce1861
-  - nightly
ce1861
-desktop-file-name-prefix: "(Nightly) "
ce1861
-
ce1861
-finish-args:
ce1861
-  # X11 + XShm access
ce1861
-  - --share=ipc
ce1861
-  - --socket=x11
ce1861
-  # Wayland access
ce1861
-  - --socket=wayland
ce1861
-  # OpenGL for Webkit
ce1861
-  - --device=dri
ce1861
-  # We want full fs access to see the API docs installed by traditional Linux
ce1861
-  # distro packages.
ce1861
-  - --filesystem=host:ro
ce1861
-
ce1861
-build-options:
ce1861
-  cflags: -O2 -g
ce1861
-  cxxflags: -O2 -g
ce1861
-
ce1861
-cleanup:
ce1861
-  - /share/man
ce1861
-  - /lib/pkgconfig
ce1861
-  - /include
ce1861
-
ce1861
-modules:
ce1861
-  - name: amtk
ce1861
-    buildsystem: meson
ce1861
-    run-tests: true
ce1861
-    sources:
ce1861
-      - type: git
ce1861
-        url: https://gitlab.gnome.org/GNOME/amtk.git
ce1861
-
ce1861
-  - name: devhelp
ce1861
-    buildsystem: meson
ce1861
-    config-opts: [ "-Dflatpak_build=true" ]
ce1861
-    run-tests: true
ce1861
-    sources:
ce1861
-      - type: git
ce1861
-        url: https://gitlab.gnome.org/GNOME/devhelp.git
ce1861
diff --git a/meson.build b/meson.build
ce1861
index bdd66056..d71d748d 100644
ce1861
--- a/meson.build
ce1861
+++ b/meson.build
ce1861
@@ -35,61 +35,61 @@ LIBDEVHELP_API_VERSION_FULL = '3.0'
ce1861
 #    changed since the last update, increment CURRENT and set REVISION
ce1861
 #    to 0.
ce1861
 # 3. If any exported functions or data have been added since the last
ce1861
 #    public release, increment AGE.
ce1861
 # 4. If any exported functions or data have been removed since the last
ce1861
 #    public release, set AGE to 0.
ce1861
 #
ce1861
 # When incrementing the API version (usually for a new major package version),
ce1861
 # set CURRENT, REVISION and AGE to 0 since it's like a new library.
ce1861
 lt_current = 6
ce1861
 lt_revision = 3
ce1861
 lt_age = 0
ce1861
 LIBDEVHELP_LT_VERSION = '@0@.@1@.@2@'.format(lt_current, lt_revision, lt_age)
ce1861
 
ce1861
 LIBDEVHELP_PUBLIC_DEPS = [
ce1861
   dependency('gio-2.0', version: '>= 2.64'),
ce1861
   dependency('gtk+-3.0', version: '>= 3.22'),
ce1861
   dependency('webkit2gtk-4.0', version: '>= 2.26'),
ce1861
 ]
ce1861
 LIBDEVHELP_PRIVATE_DEPS = [
ce1861
   dependency('gsettings-desktop-schemas'),
ce1861
 ]
ce1861
 LIBDEVHELP_DEPS = [
ce1861
   LIBDEVHELP_PUBLIC_DEPS,
ce1861
   LIBDEVHELP_PRIVATE_DEPS,
ce1861
   meson.get_compiler('c').find_library('m'),
ce1861
 ]
ce1861
 
ce1861
 DEVHELP_APP_DEPS = [
ce1861
   LIBDEVHELP_DEPS,
ce1861
-  dependency('amtk-5', version: '>= 5.0'),
ce1861
+  dependency('gsettings-desktop-schemas'),
ce1861
 ]
ce1861
 
ce1861
 # config.h
ce1861
 
ce1861
 config_data = configuration_data()
ce1861
 GETTEXT_PACKAGE_NAME = meson.project_name()
ce1861
 config_data.set_quoted('GETTEXT_PACKAGE', GETTEXT_PACKAGE_NAME)
ce1861
 config_data.set_quoted('DATADIR', get_option('prefix') / get_option('datadir'))
ce1861
 config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
ce1861
 config_data.set_quoted('PACKAGE_VERSION', meson.project_version())
ce1861
 config_data.set_quoted('LIBDEVHELP_API_VERSION', LIBDEVHELP_API_VERSION)
ce1861
 config_data.set10('FLATPAK_BUILD', get_option('flatpak_build'))
ce1861
 
ce1861
 configure_file(
ce1861
   output: 'config.h',
ce1861
   configuration: config_data
ce1861
 )
ce1861
 
ce1861
 # Misc
ce1861
 
ce1861
 # For #include <devhelp/something.h> or #include "config.h".
ce1861
 ROOT_INCLUDE_DIR = include_directories('.')
ce1861
 
ce1861
 add_project_arguments(
ce1861
   '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()),
ce1861
   language: 'c'
ce1861
 )
ce1861
 
ce1861
 #####
ce1861
 # CFLAGS
ce1861
diff --git a/po/POTFILES.in b/po/POTFILES.in
ce1861
index db463e9e..cd6e6ed8 100644
ce1861
--- a/po/POTFILES.in
ce1861
+++ b/po/POTFILES.in
ce1861
@@ -15,30 +15,33 @@ devhelp/dh-book-manager.c
ce1861
 devhelp/dh-book-tree.c
ce1861
 devhelp/dh-completion.c
ce1861
 devhelp/dh-error.c
ce1861
 devhelp/dh-init.c
ce1861
 devhelp/dh-keyword-model.c
ce1861
 devhelp/dh-link.c
ce1861
 devhelp/dh-notebook.c
ce1861
 devhelp/dh-parser.c
ce1861
 devhelp/dh-profile-builder.c
ce1861
 devhelp/dh-profile.c
ce1861
 devhelp/dh-search-bar.c
ce1861
 devhelp/dh-search-context.c
ce1861
 devhelp/dh-settings-builder.c
ce1861
 devhelp/dh-settings.c
ce1861
 devhelp/dh-sidebar.c
ce1861
 devhelp/dh-tab.c
ce1861
 devhelp/dh-tab-label.c
ce1861
 devhelp/dh-util-lib.c
ce1861
 devhelp/dh-web-view.c
ce1861
 plugins/gedit-plugin/devhelp.plugin.desktop.in
ce1861
 plugins/gedit-plugin/devhelp.py
ce1861
 src/dh-app.c
ce1861
 src/dh-assistant.c
ce1861
 src/dh-assistant.ui
ce1861
 src/dh-main.c
ce1861
 src/dh-preferences.c
ce1861
 src/dh-preferences.ui
ce1861
 src/dh-settings-app.c
ce1861
 src/dh-util-app.c
ce1861
 src/dh-window.c
ce1861
+src/dh-window.ui
ce1861
+src/help-overlay.ui
ce1861
+src/menus.ui
ce1861
diff --git a/src/dh-app.c b/src/dh-app.c
ce1861
index 9ceae7f0..da97158c 100644
ce1861
--- a/src/dh-app.c
ce1861
+++ b/src/dh-app.c
ce1861
@@ -1,200 +1,48 @@
ce1861
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
ce1861
 /* SPDX-FileCopyrightText: 2002 CodeFactory AB
ce1861
  * SPDX-FileCopyrightText: 2002 Mikael Hallendal <micke@imendio.com>
ce1861
  * SPDX-FileCopyrightText: 2004-2008 Imendio AB
ce1861
  * SPDX-FileCopyrightText: 2012 Aleksander Morgado <aleksander@gnu.org>
ce1861
  * SPDX-FileCopyrightText: 2017, 2018 Sébastien Wilmet <swilmet@gnome.org>
ce1861
  * SPDX-License-Identifier: GPL-3.0-or-later
ce1861
  */
ce1861
 
ce1861
 #include "config.h"
ce1861
 #include "dh-app.h"
ce1861
 #include <glib/gi18n.h>
ce1861
-#include <amtk/amtk.h>
ce1861
 #include "dh-assistant.h"
ce1861
 #include "dh-preferences.h"
ce1861
 #include "dh-settings-app.h"
ce1861
 #include "dh-util-app.h"
ce1861
 
ce1861
-struct _DhAppPrivate {
ce1861
-        /* AmtkActionInfoStore for actions that are present in a menu. */
ce1861
-        AmtkActionInfoStore *menu_action_info_store;
ce1861
-};
ce1861
-
ce1861
-G_DEFINE_TYPE_WITH_PRIVATE (DhApp, dh_app, GTK_TYPE_APPLICATION);
ce1861
-
ce1861
-/* This function adds the AmtkActionInfo's for the GActions that are present in
ce1861
- * a menu.
ce1861
- */
ce1861
-static void
ce1861
-add_menu_action_infos (DhApp *app)
ce1861
-{
ce1861
-        const gchar *accels[] = {NULL, NULL, NULL, NULL};
ce1861
-        AmtkActionInfo *action_info;
ce1861
-
ce1861
-        const AmtkActionInfoEntry entries[] = {
ce1861
-                /* action, icon, label, accel, tooltip */
ce1861
-
ce1861
-                /* Actions related to the whole application */
ce1861
-                { "app.new-window", NULL, N_("New _Window"), "<Control>n",
ce1861
-                  N_("Open a new window") },
ce1861
-                { "app.preferences", NULL, N_("_Preferences") },
ce1861
-                { "win.shortcuts-window", NULL, N_("_Keyboard Shortcuts"), "<Control>question",
ce1861
-                  N_("Show keyboard shortcuts") },
ce1861
-                { "app.help", NULL, N_("_Help"), "F1",
ce1861
-                  N_("Show help") },
ce1861
-                { "app.about", NULL, N_("_About Devhelp") },
ce1861
-                { "app.quit", NULL, N_("_Quit"), "<Control>q",
ce1861
-                  N_("Close all windows (quit the application)") },
ce1861
-
ce1861
-                /* Actions related to the current main window */
ce1861
-                { "win.show-sidebar", NULL, N_("_Side Panel"), "F9",
ce1861
-                  N_("Toggle side panel visibility") },
ce1861
-                { "win.print", NULL, N_("_Print"), "<Control>p" },
ce1861
-                { "win.find", NULL, N_("_Find"), "<Control>f",
ce1861
-                  N_("Find in current page") },
ce1861
-                { "win.zoom-in", NULL, N_("_Larger Text"), NULL,
ce1861
-                  N_("Larger text") },
ce1861
-                { "win.zoom-out", NULL, N_("S_maller Text"), NULL,
ce1861
-                  N_("Smaller text") },
ce1861
-                { "win.zoom-default", NULL, N_("_Normal Size"), NULL,
ce1861
-                  N_("Normal size") },
ce1861
-                { NULL }
ce1861
-        };
ce1861
-
ce1861
-        g_assert (app->priv->menu_action_info_store == NULL);
ce1861
-        app->priv->menu_action_info_store = amtk_action_info_store_new ();
ce1861
-
ce1861
-        amtk_action_info_store_add_entries (app->priv->menu_action_info_store,
ce1861
-                                            entries, -1,
ce1861
-                                            GETTEXT_PACKAGE);
ce1861
-
ce1861
-        /* The same as in Epiphany. */
ce1861
-        accels[0] = "<Control>minus";
ce1861
-        accels[1] = "<Control>KP_Subtract";
ce1861
-        action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, "win.zoom-out");
ce1861
-        amtk_action_info_set_accels (action_info, accels);
ce1861
-
ce1861
-        /* The same as in Epiphany. */
ce1861
-        accels[0] = "<Control>0";
ce1861
-        accels[1] = "<Control>KP_0";
ce1861
-        action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, "win.zoom-default");
ce1861
-        amtk_action_info_set_accels (action_info, accels);
ce1861
-
ce1861
-        /* For "<Control>equal": Epiphany also has this keyboard shortcut for
ce1861
-         * zoom-in. On keyboards the = and + are usually on the same key, but +
ce1861
-         * is less convenient to type because Shift must be pressed too.
ce1861
-         * Apparently it's usual on Windows to press Ctrl+= to zoom in.
ce1861
-         * https://bugzilla.gnome.org/show_bug.cgi?id=743704
ce1861
-         */
ce1861
-        accels[0] = "<Control>plus";
ce1861
-        accels[1] = "<Control>equal";
ce1861
-        accels[2] = "<Control>KP_Add";
ce1861
-        action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, "win.zoom-in");
ce1861
-        amtk_action_info_set_accels (action_info, accels);
ce1861
-
ce1861
-        amtk_action_info_store_set_all_accels_to_app (app->priv->menu_action_info_store,
ce1861
-                                                      GTK_APPLICATION (app));
ce1861
-}
ce1861
-
ce1861
-/* This function adds the AmtkActionInfo's for other GActions (GActions that are
ce1861
- * not present in a menu).
ce1861
- */
ce1861
-static void
ce1861
-add_other_action_infos (DhApp *app)
ce1861
-{
ce1861
-        AmtkActionInfoStore *store;
ce1861
-        AmtkActionInfo *action_info;
ce1861
-        const gchar *accels[] = {NULL, NULL, NULL, NULL};
ce1861
-
ce1861
-        const AmtkActionInfoEntry entries[] = {
ce1861
-                /* action, icon, label, accel, tooltip */
ce1861
-                { "win.new-tab", NULL, NULL, "<Control>t", N_("Open a new tab") },
ce1861
-                { "win.close-tab", NULL, NULL, "<Control>w", N_("Close the current tab") },
ce1861
-                { "win.go-back", NULL, NULL, NULL, N_("Go back") },
ce1861
-                { "win.go-forward", NULL, NULL, NULL, N_("Go forward") },
ce1861
-                { "win.focus-search", NULL, NULL, NULL, N_("Focus global search") },
ce1861
-                { NULL }
ce1861
-        };
ce1861
-
ce1861
-        store = amtk_action_info_store_new ();
ce1861
-        amtk_action_info_store_add_entries (store, entries, -1, GETTEXT_PACKAGE);
ce1861
-
ce1861
-        accels[0] = "<Alt>Left";
ce1861
-        accels[1] = "Back";
ce1861
-        action_info = amtk_action_info_store_lookup (store, "win.go-back");
ce1861
-        amtk_action_info_set_accels (action_info, accels);
ce1861
-
ce1861
-        accels[0] = "<Alt>Right";
ce1861
-        accels[1] = "Forward";
ce1861
-        action_info = amtk_action_info_store_lookup (store, "win.go-forward");
ce1861
-        amtk_action_info_set_accels (action_info, accels);
ce1861
-
ce1861
-        accels[0] = "<Control>k";
ce1861
-        accels[1] = "<Control>s";
ce1861
-        accels[2] = "<Control>l";
ce1861
-        action_info = amtk_action_info_store_lookup (store, "win.focus-search");
ce1861
-        amtk_action_info_set_accels (action_info, accels);
ce1861
-
ce1861
-        amtk_action_info_store_set_all_accels_to_app (store, GTK_APPLICATION (app));
ce1861
-        g_object_unref (store);
ce1861
-}
ce1861
-
ce1861
-/* This function adds the AmtkActionInfo's for things that have no related
ce1861
- * GActions.
ce1861
- */
ce1861
-static void
ce1861
-add_no_gaction_action_infos (void)
ce1861
-{
ce1861
-        AmtkActionInfoStore *store;
ce1861
-
ce1861
-        const AmtkActionInfoEntry entries[] = {
ce1861
-                /* action, icon, label, accel, tooltip */
ce1861
-                { "no-gaction-open-menu", NULL, NULL, "F10", N_("Open the menu") },
ce1861
-                { "no-gaction-prev-tab", NULL, NULL, "<Control>Page_Up", N_("Previous tab") },
ce1861
-                { "no-gaction-next-tab", NULL, NULL, "<Control>Page_Down", N_("Next tab") },
ce1861
-                { NULL }
ce1861
-        };
ce1861
-
ce1861
-        store = amtk_action_info_store_new ();
ce1861
-        amtk_action_info_store_add_entries (store, entries, -1, GETTEXT_PACKAGE);
ce1861
-        g_object_unref (store);
ce1861
-}
ce1861
-
ce1861
-static void
ce1861
-add_action_infos (DhApp *app)
ce1861
-{
ce1861
-        add_menu_action_infos (app);
ce1861
-        add_other_action_infos (app);
ce1861
-        add_no_gaction_action_infos ();
ce1861
-}
ce1861
+G_DEFINE_TYPE (DhApp, dh_app, GTK_TYPE_APPLICATION);
ce1861
 
ce1861
 static DhAssistant *
ce1861
 get_active_assistant_window (DhApp *app)
ce1861
 {
ce1861
         GList *windows;
ce1861
         GList *l;
ce1861
 
ce1861
         windows = gtk_application_get_windows (GTK_APPLICATION (app));
ce1861
 
ce1861
         for (l = windows; l != NULL; l = l->next) {
ce1861
                 GtkWindow *cur_window = GTK_WINDOW (l->data);
ce1861
 
ce1861
                 if (DH_IS_ASSISTANT (cur_window))
ce1861
                         return DH_ASSISTANT (cur_window);
ce1861
         }
ce1861
 
ce1861
         return NULL;
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 save_active_main_window_gsettings (DhApp *app)
ce1861
 {
ce1861
         DhWindow *active_window;
ce1861
         DhSettingsApp *settings;
ce1861
 
ce1861
         active_window = dh_app_get_active_main_window (app, FALSE);
ce1861
         if (active_window == NULL)
ce1861
                 return;
ce1861
 
ce1861
         settings = dh_settings_app_get_singleton ();
ce1861
@@ -202,62 +50,60 @@ save_active_main_window_gsettings (DhApp *app)
ce1861
                                       dh_settings_app_peek_window_settings (settings));
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 save_active_assistant_window_gsettings (DhApp *app)
ce1861
 {
ce1861
         DhAssistant *active_assistant;
ce1861
         DhSettingsApp *settings;
ce1861
 
ce1861
         active_assistant = get_active_assistant_window (app);
ce1861
         if (active_assistant == NULL)
ce1861
                 return;
ce1861
 
ce1861
         settings = dh_settings_app_get_singleton ();
ce1861
         dh_util_window_settings_save (GTK_WINDOW (active_assistant),
ce1861
                                       dh_settings_app_peek_assistant_settings (settings));
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 new_window_cb (GSimpleAction *action,
ce1861
                GVariant      *parameter,
ce1861
                gpointer       user_data)
ce1861
 {
ce1861
         DhApp *app = DH_APP (user_data);
ce1861
         GtkWidget *new_window;
ce1861
 
ce1861
         save_active_main_window_gsettings (app);
ce1861
 
ce1861
         new_window = dh_window_new (GTK_APPLICATION (app));
ce1861
         gtk_widget_show_all (new_window);
ce1861
-
ce1861
-        amtk_action_info_store_check_all_used (app->priv->menu_action_info_store);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 preferences_cb (GSimpleAction *action,
ce1861
                 GVariant      *parameter,
ce1861
                 gpointer       user_data)
ce1861
 {
ce1861
         DhApp *app = DH_APP (user_data);
ce1861
         GtkWindow *parent_window;
ce1861
 
ce1861
         parent_window = (GtkWindow *) dh_app_get_active_main_window (app, FALSE);
ce1861
         dh_preferences_show_dialog (parent_window);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 help_cb (GSimpleAction *action,
ce1861
          GVariant      *parameter,
ce1861
          gpointer       user_data)
ce1861
 {
ce1861
         DhApp *app = DH_APP (user_data);
ce1861
         GtkWindow *window;
ce1861
         GError *error = NULL;
ce1861
 
ce1861
         window = (GtkWindow *) dh_app_get_active_main_window (app, FALSE);
ce1861
 
ce1861
         gtk_show_uri_on_window (window, "help:devhelp", GDK_CURRENT_TIME, &error);
ce1861
 
ce1861
         if (error != NULL) {
ce1861
                 g_warning ("Failed to open the documentation: %s", error->message);
ce1861
                 g_clear_error (&error);
ce1861
@@ -364,127 +210,195 @@ raise_cb (GSimpleAction *action,
ce1861
           GVariant      *parameter,
ce1861
           gpointer       user_data)
ce1861
 {
ce1861
         DhApp *app = DH_APP (user_data);
ce1861
         GtkWindow *window;
ce1861
 
ce1861
         window = gtk_application_get_active_window (GTK_APPLICATION (app));
ce1861
         if (window == NULL)
ce1861
                 window = (GtkWindow *) dh_app_get_active_main_window (app, TRUE);
ce1861
 
ce1861
         gtk_window_present (window);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 add_action_entries (DhApp *app)
ce1861
 {
ce1861
         const GActionEntry app_entries[] = {
ce1861
                 /* General actions */
ce1861
                 { "new-window", new_window_cb },
ce1861
                 { "preferences", preferences_cb },
ce1861
                 { "help", help_cb },
ce1861
                 { "about", about_cb },
ce1861
                 { "quit", quit_cb },
ce1861
 
ce1861
                 /* Additional commandline-specific actions */
ce1861
                 { "search", search_cb, "s" },
ce1861
                 { "search-assistant", search_assistant_cb, "s" },
ce1861
                 { "raise", raise_cb },
ce1861
         };
ce1861
 
ce1861
-        amtk_action_map_add_action_entries_check_dups (G_ACTION_MAP (app),
ce1861
-                                                       app_entries,
ce1861
-                                                       G_N_ELEMENTS (app_entries),
ce1861
-                                                       app);
ce1861
+        g_action_map_add_action_entries (G_ACTION_MAP (app),
ce1861
+                                         app_entries,
ce1861
+                                         G_N_ELEMENTS (app_entries),
ce1861
+                                         app);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 setup_go_to_tab_accelerators (GtkApplication *app)
ce1861
 {
ce1861
         const gchar *accels[] = {NULL, NULL};
ce1861
         gint key_num;
ce1861
 
ce1861
         for (key_num = 1; key_num <= 9; key_num++) {
ce1861
                 gchar *accel;
ce1861
                 gchar *detailed_action_name;
ce1861
 
ce1861
                 accel = g_strdup_printf ("<Alt>%d", key_num);
ce1861
                 accels[0] = accel;
ce1861
 
ce1861
                 detailed_action_name = g_strdup_printf ("win.go-to-tab(uint16 %d)", key_num - 1);
ce1861
 
ce1861
                 gtk_application_set_accels_for_action (app, detailed_action_name, accels);
ce1861
 
ce1861
                 g_free (accel);
ce1861
                 g_free (detailed_action_name);
ce1861
         }
ce1861
 
ce1861
         /* On a typical keyboard the 0 is after 9, so it's the equivalent of 10
ce1861
          * (9 starting from 0).
ce1861
          */
ce1861
         accels[0] = "<Alt>0";
ce1861
         gtk_application_set_accels_for_action (app, "win.go-to-tab(uint16 9)", accels);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
-setup_additional_accelerators (GtkApplication *app)
ce1861
+setup_accelerators (GtkApplication *app)
ce1861
 {
ce1861
-        const gchar *accels[] = {NULL, NULL};
ce1861
+        const gchar *accels[] = {NULL, NULL, NULL, NULL};
ce1861
 
ce1861
         setup_go_to_tab_accelerators (app);
ce1861
 
ce1861
+        accels[0] = "<Control>0";
ce1861
+        gtk_application_set_accels_for_action (app, "win.zoom-default", accels);
ce1861
+
ce1861
+        accels[0] = "<Control>minus";
ce1861
+        gtk_application_set_accels_for_action (app, "win.zoom-out", accels);
ce1861
+
ce1861
+        /* For "<Control>equal": Epiphany also has this keyboard shortcut for
ce1861
+         * zoom-in. On keyboards the = and + are usually on the same key, but +
ce1861
+         * is less convenient to type because Shift must be pressed too.
ce1861
+         * Apparently it's usual on Windows to press Ctrl+= to zoom in.
ce1861
+         * https://bugzilla.gnome.org/show_bug.cgi?id=743704
ce1861
+         */
ce1861
+        accels[0] = "<Control>plus";
ce1861
+        accels[1] = "<Control>equal";
ce1861
+        gtk_application_set_accels_for_action (app, "win.zoom-in", accels);
ce1861
+        accels[1] = NULL;
ce1861
+
ce1861
+        accels[0] = "<Control>f";
ce1861
+        gtk_application_set_accels_for_action (app, "win.find", accels);
ce1861
+
ce1861
         accels[0] = "<Control>c";
ce1861
         gtk_application_set_accels_for_action (app, "win.copy", accels);
ce1861
 
ce1861
+        accels[0] = "<Control>p";
ce1861
+        gtk_application_set_accels_for_action (app, "win.print", accels);
ce1861
+
ce1861
+        accels[0] = "<Control>t";
ce1861
+        gtk_application_set_accels_for_action (app, "win.new-tab", accels);
ce1861
+
ce1861
+        accels[0] = "<Control>n";
ce1861
+        gtk_application_set_accels_for_action (app, "app.new-window", accels);
ce1861
+
ce1861
         accels[0] = "<Control>Page_Down";
ce1861
         gtk_application_set_accels_for_action (app, "win.next-tab", accels);
ce1861
 
ce1861
         accels[0] = "<Control>Page_Up";
ce1861
         gtk_application_set_accels_for_action (app, "win.prev-tab", accels);
ce1861
 
ce1861
+        accels[0] = "<Control>w";
ce1861
+        gtk_application_set_accels_for_action (app, "win.close-tab", accels);
ce1861
+
ce1861
+        accels[0] = "<Control>q";
ce1861
+        gtk_application_set_accels_for_action (app, "app.quit", accels);
ce1861
+
ce1861
+        accels[0] = "F1";
ce1861
+        gtk_application_set_accels_for_action (app, "app.help", accels);
ce1861
+
ce1861
+        accels[0] = "F9";
ce1861
+        gtk_application_set_accels_for_action (app, "win.show-sidebar", accels);
ce1861
+
ce1861
         accels[0] = "F10";
ce1861
         gtk_application_set_accels_for_action (app, "win.show-window-menu", accels);
ce1861
+
ce1861
+        accels[0] = "<Alt>Right";
ce1861
+        accels[1] = "Forward";
ce1861
+        gtk_application_set_accels_for_action (app, "win.go-forward", accels);
ce1861
+
ce1861
+        accels[0] = "<Alt>Left";
ce1861
+        accels[1] = "Back";
ce1861
+        gtk_application_set_accels_for_action (app, "win.go-back", accels);
ce1861
+
ce1861
+        accels[0] = "<Control>k";
ce1861
+        accels[1] = "<Control>s";
ce1861
+        accels[2] = "<Control>l";
ce1861
+        gtk_application_set_accels_for_action (app, "win.focus-search", accels);
ce1861
+}
ce1861
+
ce1861
+static void
ce1861
+set_app_menu_if_needed (GtkApplication *app)
ce1861
+{
ce1861
+        GMenu *manual_app_menu;
ce1861
+
ce1861
+        manual_app_menu = gtk_application_get_menu_by_id (app, "manual-app-menu");
ce1861
+
ce1861
+        /* Have the g_return in all cases, to catch problems in all cases. */
ce1861
+        g_return_if_fail (manual_app_menu != NULL);
ce1861
+
ce1861
+        if (gtk_application_prefers_app_menu (app))
ce1861
+                gtk_application_set_app_menu (app, G_MENU_MODEL (manual_app_menu));
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 dh_app_startup (GApplication *application)
ce1861
 {
ce1861
         DhApp *app = DH_APP (application);
ce1861
 
ce1861
         g_application_set_resource_base_path (application, "/org/gnome/devhelp");
ce1861
 
ce1861
         if (G_APPLICATION_CLASS (dh_app_parent_class)->startup != NULL)
ce1861
                 G_APPLICATION_CLASS (dh_app_parent_class)->startup (application);
ce1861
 
ce1861
-        add_action_infos (app);
ce1861
         add_action_entries (app);
ce1861
-        setup_additional_accelerators (GTK_APPLICATION (app));
ce1861
+        setup_accelerators (GTK_APPLICATION (app));
ce1861
+        set_app_menu_if_needed (GTK_APPLICATION (app));
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 dh_app_activate (GApplication *app)
ce1861
 {
ce1861
         g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
ce1861
 }
ce1861
 
ce1861
 static gboolean option_version;
ce1861
 
ce1861
 static GOptionEntry options[] = {
ce1861
         { "new-window", 'n',
ce1861
           0, G_OPTION_ARG_NONE, NULL,
ce1861
           N_("Opens a new Devhelp window"),
ce1861
           NULL
ce1861
         },
ce1861
         { "search", 's',
ce1861
           0, G_OPTION_ARG_STRING, NULL,
ce1861
           N_("Search for a keyword"),
ce1861
           N_("KEYWORD")
ce1861
         },
ce1861
         { "search-assistant", 'a',
ce1861
           0, G_OPTION_ARG_STRING, NULL,
ce1861
           N_("Search and display any hit in the assistant window"),
ce1861
           N_("KEYWORD")
ce1861
         },
ce1861
         { "version", 'v',
ce1861
           0, G_OPTION_ARG_NONE, &option_version,
ce1861
           N_("Display the version and exit"),
ce1861
           NULL
ce1861
@@ -523,89 +437,74 @@ dh_app_command_line (GApplication            *g_app,
ce1861
         options_dict = g_application_command_line_get_options_dict (command_line);
ce1861
 
ce1861
         g_variant_dict_lookup (options_dict, "new-window", "b", &option_new_window);
ce1861
         g_variant_dict_lookup (options_dict, "search", "&s", &option_search);
ce1861
         g_variant_dict_lookup (options_dict, "search-assistant", "&s", &option_search_assistant);
ce1861
         g_variant_dict_lookup (options_dict, "quit", "b", &option_quit);
ce1861
 
ce1861
         if (option_quit) {
ce1861
                 g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL);
ce1861
                 return 0;
ce1861
         }
ce1861
 
ce1861
         if (option_new_window)
ce1861
                 g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL);
ce1861
 
ce1861
         if (option_search != NULL)
ce1861
                 g_action_group_activate_action (G_ACTION_GROUP (app),
ce1861
                                                 "search",
ce1861
                                                 g_variant_new_string (option_search));
ce1861
 
ce1861
         if (option_search_assistant != NULL)
ce1861
                 g_action_group_activate_action (G_ACTION_GROUP (app),
ce1861
                                                 "search-assistant",
ce1861
                                                 g_variant_new_string (option_search_assistant));
ce1861
 
ce1861
         g_action_group_activate_action (G_ACTION_GROUP (app), "raise", NULL);
ce1861
 
ce1861
         return 0;
ce1861
 }
ce1861
 
ce1861
-static void
ce1861
-dh_app_dispose (GObject *object)
ce1861
-{
ce1861
-        DhApp *app = DH_APP (object);
ce1861
-
ce1861
-        g_clear_object (&app->priv->menu_action_info_store);
ce1861
-
ce1861
-        G_OBJECT_CLASS (dh_app_parent_class)->dispose (object);
ce1861
-}
ce1861
-
ce1861
 static void
ce1861
 dh_app_class_init (DhAppClass *klass)
ce1861
 {
ce1861
-        GObjectClass *object_class = G_OBJECT_CLASS (klass);
ce1861
         GApplicationClass *application_class = G_APPLICATION_CLASS (klass);
ce1861
 
ce1861
-        object_class->dispose = dh_app_dispose;
ce1861
-
ce1861
         application_class->startup = dh_app_startup;
ce1861
         application_class->activate = dh_app_activate;
ce1861
         application_class->handle_local_options = dh_app_handle_local_options;
ce1861
         application_class->command_line = dh_app_command_line;
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 dh_app_init (DhApp *app)
ce1861
 {
ce1861
-        app->priv = dh_app_get_instance_private (app);
ce1861
-
ce1861
         /* Translators: please don't translate "Devhelp" (it's marked as
ce1861
          * translatable for transliteration only).
ce1861
          */
ce1861
         g_set_application_name (_("Devhelp"));
ce1861
         gtk_window_set_default_icon_name ("org.gnome.Devhelp");
ce1861
 
ce1861
         g_application_add_main_option_entries (G_APPLICATION (app), options);
ce1861
 }
ce1861
 
ce1861
 DhApp *
ce1861
 dh_app_new (void)
ce1861
 {
ce1861
         return g_object_new (DH_TYPE_APP,
ce1861
                              "application-id", "org.gnome.Devhelp",
ce1861
                              "flags", G_APPLICATION_HANDLES_COMMAND_LINE,
ce1861
                              NULL);
ce1861
 }
ce1861
 
ce1861
 /* Returns: (transfer none) (nullable). */
ce1861
 DhWindow *
ce1861
 dh_app_get_active_main_window (DhApp    *app,
ce1861
                                gboolean  create_if_none)
ce1861
 {
ce1861
         GList *windows;
ce1861
         GList *l;
ce1861
 
ce1861
         g_return_val_if_fail (DH_IS_APP (app), NULL);
ce1861
 
ce1861
         windows = gtk_application_get_windows (GTK_APPLICATION (app));
ce1861
 
ce1861
diff --git a/src/dh-app.h b/src/dh-app.h
ce1861
index d7ce15ba..5be3d939 100644
ce1861
--- a/src/dh-app.h
ce1861
+++ b/src/dh-app.h
ce1861
@@ -1,44 +1,42 @@
ce1861
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
ce1861
 /* SPDX-FileCopyrightText: 2012 Aleksander Morgado <aleksander@gnu.org>
ce1861
  * SPDX-FileCopyrightText: 2017 Sébastien Wilmet <swilmet@gnome.org>
ce1861
  * SPDX-License-Identifier: GPL-3.0-or-later
ce1861
  */
ce1861
 
ce1861
 #ifndef DH_APP_H
ce1861
 #define DH_APP_H
ce1861
 
ce1861
 #include <gtk/gtk.h>
ce1861
 #include "dh-window.h"
ce1861
 
ce1861
 G_BEGIN_DECLS
ce1861
 
ce1861
 #define DH_TYPE_APP         (dh_app_get_type ())
ce1861
 #define DH_APP(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), DH_TYPE_APP, DhApp))
ce1861
 #define DH_APP_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), DH_TYPE_APP, DhAppClass))
ce1861
 #define DH_IS_APP(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), DH_TYPE_APP))
ce1861
 #define DH_IS_APP_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), DH_TYPE_APP))
ce1861
 #define DH_APP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DH_TYPE_APP, DhAppClass))
ce1861
 
ce1861
 typedef struct _DhApp        DhApp;
ce1861
 typedef struct _DhAppClass   DhAppClass;
ce1861
-typedef struct _DhAppPrivate DhAppPrivate;
ce1861
 
ce1861
 struct _DhApp {
ce1861
         GtkApplication parent_instance;
ce1861
-        DhAppPrivate *priv;
ce1861
 };
ce1861
 
ce1861
 struct _DhAppClass {
ce1861
         GtkApplicationClass parent_class;
ce1861
 };
ce1861
 
ce1861
 GType           dh_app_get_type                 (void) G_GNUC_CONST;
ce1861
 
ce1861
 DhApp *         dh_app_new                      (void);
ce1861
 
ce1861
 DhWindow *      dh_app_get_active_main_window   (DhApp    *app,
ce1861
                                                  gboolean  create_if_none);
ce1861
 
ce1861
 G_END_DECLS
ce1861
 
ce1861
 #endif /* DH_APP_H */
ce1861
diff --git a/src/dh-main.c b/src/dh-main.c
ce1861
index 50d21974..f28aefde 100644
ce1861
--- a/src/dh-main.c
ce1861
+++ b/src/dh-main.c
ce1861
@@ -1,36 +1,33 @@
ce1861
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
ce1861
 /* SPDX-FileCopyrightText: 2001-2003 CodeFactory AB
ce1861
  * SPDX-FileCopyrightText: 2001-2008 Imendio AB
ce1861
  * SPDX-License-Identifier: GPL-3.0-or-later
ce1861
  */
ce1861
 
ce1861
 #include "config.h"
ce1861
 #include <locale.h>
ce1861
 #include <glib/gi18n.h>
ce1861
 #include <devhelp/devhelp.h>
ce1861
-#include <amtk/amtk.h>
ce1861
 #include "dh-app.h"
ce1861
 #include "dh-settings-app.h"
ce1861
 
ce1861
 int
ce1861
 main (int argc, char **argv)
ce1861
 {
ce1861
         DhApp *application;
ce1861
         gint status;
ce1861
 
ce1861
         setlocale (LC_ALL, "");
ce1861
         textdomain (GETTEXT_PACKAGE);
ce1861
 
ce1861
         dh_init ();
ce1861
-        amtk_init ();
ce1861
 
ce1861
         application = dh_app_new ();
ce1861
         status = g_application_run (G_APPLICATION (application), argc, argv);
ce1861
         g_object_unref (application);
ce1861
 
ce1861
-        amtk_finalize ();
ce1861
         dh_finalize ();
ce1861
         dh_settings_app_unref_singleton ();
ce1861
 
ce1861
         return status;
ce1861
 }
ce1861
diff --git a/src/dh-window.c b/src/dh-window.c
ce1861
index 6dea6209..f29d5d62 100644
ce1861
--- a/src/dh-window.c
ce1861
+++ b/src/dh-window.c
ce1861
@@ -1,96 +1,109 @@
ce1861
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
ce1861
 /* SPDX-FileCopyrightText: 2001-2008 Imendio AB
ce1861
  * SPDX-FileCopyrightText: 2012 Aleksander Morgado <aleksander@gnu.org>
ce1861
  * SPDX-FileCopyrightText: 2012 Thomas Bechtold <toabctl@gnome.org>
ce1861
  * SPDX-FileCopyrightText: 2015-2020 Sébastien Wilmet <swilmet@gnome.org>
ce1861
  * SPDX-License-Identifier: GPL-3.0-or-later
ce1861
  */
ce1861
 
ce1861
 #include "dh-window.h"
ce1861
 #include <glib/gi18n.h>
ce1861
 #include <webkit2/webkit2.h>
ce1861
 #include <devhelp/devhelp.h>
ce1861
-#include <amtk/amtk.h>
ce1861
 #include "dh-settings-app.h"
ce1861
 #include "dh-util-app.h"
ce1861
 
ce1861
 typedef struct {
ce1861
         GtkHeaderBar *header_bar;
ce1861
-        GtkMenuButton *menu_button;
ce1861
+        GtkMenuButton *window_menu_button;
ce1861
+        GMenuModel *window_menu_plus_app_menu;
ce1861
+
ce1861
+        GtkPaned *hpaned;
ce1861
+        GtkWidget *grid_sidebar;
ce1861
+        GtkWidget *grid_documents;
ce1861
 
ce1861
         DhSidebar *sidebar;
ce1861
         DhSearchBar *search_bar;
ce1861
         DhNotebook *notebook;
ce1861
 } DhWindowPrivate;
ce1861
 
ce1861
 G_DEFINE_TYPE_WITH_PRIVATE (DhWindow, dh_window, GTK_TYPE_APPLICATION_WINDOW);
ce1861
 
ce1861
 static gboolean
ce1861
 dh_window_delete_event (GtkWidget   *widget,
ce1861
                         GdkEventAny *event)
ce1861
 {
ce1861
         DhSettingsApp *settings;
ce1861
 
ce1861
         settings = dh_settings_app_get_singleton ();
ce1861
         dh_util_window_settings_save (GTK_WINDOW (widget),
ce1861
                                       dh_settings_app_peek_window_settings (settings));
ce1861
 
ce1861
         if (GTK_WIDGET_CLASS (dh_window_parent_class)->delete_event == NULL)
ce1861
                 return GDK_EVENT_PROPAGATE;
ce1861
 
ce1861
         return GTK_WIDGET_CLASS (dh_window_parent_class)->delete_event (widget, event);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 dh_window_dispose (GObject *object)
ce1861
 {
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (DH_WINDOW (object));
ce1861
 
ce1861
         priv->header_bar = NULL;
ce1861
-        priv->menu_button = NULL;
ce1861
+        priv->window_menu_button = NULL;
ce1861
         priv->sidebar = NULL;
ce1861
         priv->search_bar = NULL;
ce1861
         priv->notebook = NULL;
ce1861
 
ce1861
         G_OBJECT_CLASS (dh_window_parent_class)->dispose (object);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 dh_window_class_init (DhWindowClass *klass)
ce1861
 {
ce1861
         GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
ce1861
         GObjectClass *object_class = G_OBJECT_CLASS (klass);
ce1861
 
ce1861
         widget_class->delete_event = dh_window_delete_event;
ce1861
 
ce1861
         object_class->dispose = dh_window_dispose;
ce1861
+
ce1861
+        /* Bind class to template */
ce1861
+        gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/devhelp/dh-window.ui");
ce1861
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, header_bar);
ce1861
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, window_menu_button);
ce1861
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, window_menu_plus_app_menu);
ce1861
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, hpaned);
ce1861
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, grid_sidebar);
ce1861
+        gtk_widget_class_bind_template_child_private (widget_class, DhWindow, grid_documents);
ce1861
 }
ce1861
 
ce1861
 /* Can return NULL during initialization and finalization, so it's better to
ce1861
  * handle the NULL case with the return value of this function.
ce1861
  */
ce1861
 static DhWebView *
ce1861
 get_active_web_view (DhWindow *window)
ce1861
 {
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
 
ce1861
         return dh_notebook_get_active_web_view (priv->notebook);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 update_window_title (DhWindow *window)
ce1861
 {
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
         DhWebView *web_view;
ce1861
         const gchar *title;
ce1861
 
ce1861
         web_view = get_active_web_view (window);
ce1861
         if (web_view == NULL)
ce1861
                 return;
ce1861
 
ce1861
         title = dh_web_view_get_devhelp_title (web_view);
ce1861
         gtk_header_bar_set_title (priv->header_bar, title);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 update_zoom_actions_sensitivity (DhWindow *window)
ce1861
@@ -198,62 +211,67 @@ go_to_tab_cb (GSimpleAction *action,
ce1861
         gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), tab_num);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 print_cb (GSimpleAction *action,
ce1861
           GVariant      *parameter,
ce1861
           gpointer       user_data)
ce1861
 {
ce1861
         DhWindow *window = DH_WINDOW (user_data);
ce1861
         DhWebView *web_view;
ce1861
         WebKitPrintOperation *print_operation;
ce1861
 
ce1861
         web_view = get_active_web_view (window);
ce1861
         if (web_view == NULL)
ce1861
                 return;
ce1861
 
ce1861
         print_operation = webkit_print_operation_new (WEBKIT_WEB_VIEW (web_view));
ce1861
         webkit_print_operation_run_dialog (print_operation, GTK_WINDOW (window));
ce1861
         g_object_unref (print_operation);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 close_tab_cb (GSimpleAction *action,
ce1861
               GVariant      *parameter,
ce1861
               gpointer       user_data)
ce1861
 {
ce1861
         DhWindow *window = DH_WINDOW (user_data);
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
         gint page_num;
ce1861
 
ce1861
-        page_num = gtk_notebook_get_current_page (GTK_NOTEBOOK (priv->notebook));
ce1861
-        gtk_notebook_remove_page (GTK_NOTEBOOK (priv->notebook), page_num);
ce1861
+        /* FIXME: the code here closes the current *tab*, but in help-overlay.ui
ce1861
+         * it is documented as "Close the current window". Look for example at
ce1861
+         * what gedit does, or other GNOME apps with a GtkNotebook plus Ctrl+W
ce1861
+         * shortcut, and do the same.
ce1861
+         */
ce1861
+        page_num = gtk_notebook_get_current_page (priv->notebook);
ce1861
+        gtk_notebook_remove_page (priv->notebook, page_num);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 copy_cb (GSimpleAction *action,
ce1861
          GVariant      *parameter,
ce1861
          gpointer       user_data)
ce1861
 {
ce1861
         DhWindow *window = DH_WINDOW (user_data);
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
         GtkWidget *widget;
ce1861
 
ce1861
         widget = gtk_window_get_focus (GTK_WINDOW (window));
ce1861
 
ce1861
         if (GTK_IS_EDITABLE (widget)) {
ce1861
                 gtk_editable_copy_clipboard (GTK_EDITABLE (widget));
ce1861
         } else if (GTK_IS_TREE_VIEW (widget) &&
ce1861
                    gtk_widget_is_ancestor (widget, GTK_WIDGET (priv->sidebar))) {
ce1861
                 DhLink *link;
ce1861
 
ce1861
                 link = dh_sidebar_get_selected_link (priv->sidebar);
ce1861
                 if (link != NULL) {
ce1861
                         GtkClipboard *clipboard;
ce1861
 
ce1861
                         clipboard = gtk_widget_get_clipboard (widget, GDK_SELECTION_CLIPBOARD);
ce1861
                         gtk_clipboard_set_text (clipboard, dh_link_get_name (link), -1);
ce1861
                         dh_link_unref (link);
ce1861
                 }
ce1861
         } else {
ce1861
                 DhWebView *web_view;
ce1861
 
ce1861
@@ -327,285 +345,108 @@ focus_search_cb (GSimpleAction *action,
ce1861
 
ce1861
         dh_sidebar_set_search_focus (priv->sidebar);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 go_back_cb (GSimpleAction *action,
ce1861
             GVariant      *parameter,
ce1861
             gpointer       user_data)
ce1861
 {
ce1861
         DhWindow *window = DH_WINDOW (user_data);
ce1861
         DhWebView *web_view;
ce1861
 
ce1861
         web_view = get_active_web_view (window);
ce1861
         if (web_view != NULL)
ce1861
                 webkit_web_view_go_back (WEBKIT_WEB_VIEW (web_view));
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 go_forward_cb (GSimpleAction *action,
ce1861
                GVariant      *parameter,
ce1861
                gpointer       user_data)
ce1861
 {
ce1861
         DhWindow *window = DH_WINDOW (user_data);
ce1861
         DhWebView *web_view;
ce1861
 
ce1861
         web_view = get_active_web_view (window);
ce1861
         if (web_view != NULL)
ce1861
                 webkit_web_view_go_forward (WEBKIT_WEB_VIEW (web_view));
ce1861
 }
ce1861
 
ce1861
-static void
ce1861
-shortcuts_window_cb (GSimpleAction *action,
ce1861
-                     GVariant      *parameter,
ce1861
-                     gpointer       user_data)
ce1861
-{
ce1861
-        DhWindow *app_window = DH_WINDOW (user_data);
ce1861
-        GtkShortcutsWindow *shortcuts_window;
ce1861
-        GtkContainer *section;
ce1861
-        GtkContainer *group;
ce1861
-        AmtkFactory *factory;
ce1861
-
ce1861
-        shortcuts_window = amtk_shortcuts_window_new (GTK_WINDOW (app_window));
ce1861
-
ce1861
-        section = amtk_shortcuts_section_new (NULL);
ce1861
-        g_object_set (section,
ce1861
-                      "max-height", 10,
ce1861
-                      NULL);
ce1861
-
ce1861
-        factory = amtk_factory_new (NULL);
ce1861
-        amtk_factory_set_default_flags (factory, AMTK_FACTORY_IGNORE_GACTION);
ce1861
-
ce1861
-        group = amtk_shortcuts_group_new (_("Search"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.focus-search"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.find"));
ce1861
-        gtk_container_add (section, GTK_WIDGET (group));
ce1861
-
ce1861
-        group = amtk_shortcuts_group_new (_("History"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.go-back"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.go-forward"));
ce1861
-        gtk_container_add (section, GTK_WIDGET (group));
ce1861
-
ce1861
-        group = amtk_shortcuts_group_new (_("Zoom"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.zoom-in"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.zoom-out"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.zoom-default"));
ce1861
-        gtk_container_add (section, GTK_WIDGET (group));
ce1861
-
ce1861
-        group = amtk_shortcuts_group_new (_("Tabs and Windows"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.new-tab"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.new-window"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "no-gaction-prev-tab"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "no-gaction-next-tab"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.close-tab"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.quit"));
ce1861
-        gtk_container_add (section, GTK_WIDGET (group));
ce1861
-
ce1861
-        group = amtk_shortcuts_group_new (_("Miscellaneous"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.print"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.show-sidebar"));
ce1861
-        gtk_container_add (section, GTK_WIDGET (group));
ce1861
-
ce1861
-        group = amtk_shortcuts_group_new (_("General"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.help"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "no-gaction-open-menu"));
ce1861
-        gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.shortcuts-window"));
ce1861
-        gtk_container_add (section, GTK_WIDGET (group));
ce1861
-
ce1861
-        g_object_unref (factory);
ce1861
-
ce1861
-        gtk_container_add (GTK_CONTAINER (shortcuts_window), GTK_WIDGET (section));
ce1861
-        gtk_widget_show_all (GTK_WIDGET (shortcuts_window));
ce1861
-}
ce1861
-
ce1861
 static void
ce1861
 add_actions (DhWindow *window)
ce1861
 {
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
         GPropertyAction *property_action;
ce1861
 
ce1861
         const GActionEntry win_entries[] = {
ce1861
                 /* Tabs */
ce1861
                 { "new-tab", new_tab_cb },
ce1861
                 { "next-tab", next_tab_cb },
ce1861
                 { "prev-tab", prev_tab_cb },
ce1861
                 { "go-to-tab", go_to_tab_cb, "q" },
ce1861
                 { "print", print_cb },
ce1861
                 { "close-tab", close_tab_cb },
ce1861
 
ce1861
                 /* Edit */
ce1861
                 { "copy", copy_cb },
ce1861
                 { "find", find_cb },
ce1861
 
ce1861
                 /* View */
ce1861
                 { "zoom-in", zoom_in_cb },
ce1861
                 { "zoom-out", zoom_out_cb },
ce1861
                 { "zoom-default", zoom_default_cb },
ce1861
                 { "focus-search", focus_search_cb },
ce1861
 
ce1861
                 /* Go */
ce1861
                 { "go-back", go_back_cb },
ce1861
                 { "go-forward", go_forward_cb },
ce1861
-
ce1861
-                /* Help */
ce1861
-                { "shortcuts-window", shortcuts_window_cb },
ce1861
         };
ce1861
 
ce1861
-        amtk_action_map_add_action_entries_check_dups (G_ACTION_MAP (window),
ce1861
-                                                       win_entries,
ce1861
-                                                       G_N_ELEMENTS (win_entries),
ce1861
-                                                       window);
ce1861
+        g_action_map_add_action_entries (G_ACTION_MAP (window),
ce1861
+                                         win_entries,
ce1861
+                                         G_N_ELEMENTS (win_entries),
ce1861
+                                         window);
ce1861
 
ce1861
         property_action = g_property_action_new ("show-sidebar",
ce1861
-                                                 priv->sidebar,
ce1861
+                                                 priv->grid_sidebar,
ce1861
                                                  "visible");
ce1861
         g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (property_action));
ce1861
         g_object_unref (property_action);
ce1861
 
ce1861
         property_action = g_property_action_new ("show-window-menu",
ce1861
-                                                 priv->menu_button,
ce1861
+                                                 priv->window_menu_button,
ce1861
                                                  "active");
ce1861
         g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (property_action));
ce1861
         g_object_unref (property_action);
ce1861
 }
ce1861
 
ce1861
-static GMenuModel *
ce1861
-create_menu (void)
ce1861
-{
ce1861
-        GMenu *menu;
ce1861
-        GMenu *section;
ce1861
-        AmtkFactory *factory;
ce1861
-
ce1861
-        menu = g_menu_new ();
ce1861
-        factory = amtk_factory_new (NULL);
ce1861
-
ce1861
-        section = g_menu_new ();
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.new-window"));
ce1861
-        amtk_gmenu_append_section (menu, NULL, section);
ce1861
-
ce1861
-        section = g_menu_new ();
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.show-sidebar"));
ce1861
-        amtk_gmenu_append_section (menu, NULL, section);
ce1861
-
ce1861
-        section = g_menu_new ();
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.print"));
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.find"));
ce1861
-        amtk_gmenu_append_section (menu, NULL, section);
ce1861
-
ce1861
-        section = g_menu_new ();
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-in"));
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-out"));
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.zoom-default"));
ce1861
-        amtk_gmenu_append_section (menu, NULL, section);
ce1861
-
ce1861
-        section = g_menu_new ();
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.preferences"));
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "win.shortcuts-window"));
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.help"));
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.about"));
ce1861
-        /* Keep the Quit menu item. The GNOME goal recommends to remove it:
ce1861
-         * https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
ce1861
-         * “There is no need for the Quit menu item and the recommendation is to
ce1861
-         * remove it from all locations.”
ce1861
-         * In Devhelp, there *is* a need for the Quit menu item: after
ce1861
-         * installing/uninstalling books on the filesystem, it may be necessary
ce1861
-         * to restart Devhelp because the file monitoring is not perfect, see
ce1861
-         * the class description of DhBookListDirectory. Instead of closing the
ce1861
-         * Devhelp windows one by one, it's simpler to quit the whole
ce1861
-         * application at once. But this can be fixed by adding a “reload books”
ce1861
-         * action.
ce1861
-         * Another use-case with the Quit menu item is when the app bugs, just
ce1861
-         * restarting the app will most probably fix the problem (and then the
ce1861
-         * user needs to avoid repeating the actions that make the app to bug).
ce1861
-         */
ce1861
-        amtk_gmenu_append_item (section, amtk_factory_create_gmenu_item (factory, "app.quit"));
ce1861
-        amtk_gmenu_append_section (menu, NULL, section);
ce1861
-
ce1861
-        g_object_unref (factory);
ce1861
-        g_menu_freeze (menu);
ce1861
-
ce1861
-        return G_MENU_MODEL (menu);
ce1861
-}
ce1861
-
ce1861
-static void
ce1861
-init_header_bar (DhWindow *window)
ce1861
-{
ce1861
-        DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
-        GtkWidget *back_forward_hbox;
ce1861
-        GtkStyleContext *style_context;
ce1861
-        GtkWidget *back_button;
ce1861
-        GtkWidget *forward_button;
ce1861
-        GMenuModel *menu;
ce1861
-        GtkWidget *new_tab_button;
ce1861
-
ce1861
-        g_assert (priv->header_bar == NULL);
ce1861
-        g_assert (priv->menu_button == NULL);
ce1861
-
ce1861
-        priv->header_bar = GTK_HEADER_BAR (gtk_header_bar_new ());
ce1861
-        gtk_header_bar_set_show_close_button (priv->header_bar, TRUE);
ce1861
-
ce1861
-        /* Back/forward buttons */
ce1861
-        back_forward_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
ce1861
-        style_context = gtk_widget_get_style_context (back_forward_hbox);
ce1861
-        // Test also in RTL (right-to-left) text. It needs to be a GtkBox.
ce1861
-        gtk_style_context_add_class (style_context, GTK_STYLE_CLASS_LINKED);
ce1861
-
ce1861
-        back_button = gtk_button_new_from_icon_name ("go-previous-symbolic", GTK_ICON_SIZE_BUTTON);
ce1861
-        gtk_actionable_set_action_name (GTK_ACTIONABLE (back_button), "win.go-back");
ce1861
-        gtk_widget_set_tooltip_text (back_button, _("Back"));
ce1861
-
ce1861
-        forward_button = gtk_button_new_from_icon_name ("go-next-symbolic", GTK_ICON_SIZE_BUTTON);
ce1861
-        gtk_actionable_set_action_name (GTK_ACTIONABLE (forward_button), "win.go-forward");
ce1861
-        gtk_widget_set_tooltip_text (forward_button, _("Forward"));
ce1861
-
ce1861
-        gtk_container_add (GTK_CONTAINER (back_forward_hbox), back_button);
ce1861
-        gtk_container_add (GTK_CONTAINER (back_forward_hbox), forward_button);
ce1861
-        gtk_header_bar_pack_start (priv->header_bar, back_forward_hbox);
ce1861
-
ce1861
-        /* Menu */
ce1861
-        priv->menu_button = GTK_MENU_BUTTON (gtk_menu_button_new ());
ce1861
-        gtk_menu_button_set_direction (priv->menu_button, GTK_ARROW_NONE);
ce1861
-        gtk_header_bar_pack_end (priv->header_bar, GTK_WIDGET (priv->menu_button));
ce1861
-
ce1861
-        menu = create_menu ();
ce1861
-        gtk_menu_button_set_menu_model (priv->menu_button, menu);
ce1861
-        g_object_unref (menu);
ce1861
-
ce1861
-        /* New tab button */
ce1861
-        new_tab_button = gtk_button_new_from_icon_name ("tab-new-symbolic", GTK_ICON_SIZE_BUTTON);
ce1861
-        gtk_actionable_set_action_name (GTK_ACTIONABLE (new_tab_button), "win.new-tab");
ce1861
-        gtk_widget_set_tooltip_text (new_tab_button, _("New Tab"));
ce1861
-        gtk_header_bar_pack_end (priv->header_bar, new_tab_button);
ce1861
-
ce1861
-        gtk_widget_show_all (GTK_WIDGET (priv->header_bar));
ce1861
-}
ce1861
-
ce1861
 static void
ce1861
 web_view_title_notify_cb (DhWebView  *web_view,
ce1861
                           GParamSpec *param_spec,
ce1861
                           DhWindow   *window)
ce1861
 {
ce1861
         if (web_view == get_active_web_view (window))
ce1861
                 update_window_title (window);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 web_view_zoom_level_notify_cb (DhWebView  *web_view,
ce1861
                                GParamSpec *pspec,
ce1861
                                DhWindow   *window)
ce1861
 {
ce1861
         if (web_view == get_active_web_view (window))
ce1861
                 update_zoom_actions_sensitivity (window);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 notebook_page_added_after_cb (GtkNotebook *notebook,
ce1861
                               GtkWidget   *child,
ce1861
                               guint        page_num,
ce1861
                               DhWindow    *window)
ce1861
 {
ce1861
         DhTab *tab;
ce1861
         DhWebView *web_view;
ce1861
         WebKitBackForwardList *back_forward_list;
ce1861
 
ce1861
         g_return_if_fail (DH_IS_TAB (child));
ce1861
 
ce1861
@@ -628,118 +469,116 @@ notebook_page_added_after_cb (GtkNotebook *notebook,
ce1861
                                  G_CALLBACK (update_back_forward_actions_sensitivity),
ce1861
                                  window,
ce1861
                                  G_CONNECT_AFTER | G_CONNECT_SWAPPED);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 notebook_page_removed_after_cb (GtkNotebook *notebook,
ce1861
                                 GtkWidget   *child,
ce1861
                                 guint        page_num,
ce1861
                                 DhWindow    *window)
ce1861
 {
ce1861
         if (gtk_notebook_get_n_pages (notebook) == 0)
ce1861
                 gtk_window_close (GTK_WINDOW (window));
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 notebook_switch_page_after_cb (GtkNotebook *notebook,
ce1861
                                GtkWidget   *new_page,
ce1861
                                guint        new_page_num,
ce1861
                                DhWindow    *window)
ce1861
 {
ce1861
         update_window_title (window);
ce1861
         update_zoom_actions_sensitivity (window);
ce1861
         update_back_forward_actions_sensitivity (window);
ce1861
 }
ce1861
 
ce1861
 static void
ce1861
 dh_window_init (DhWindow *window)
ce1861
 {
ce1861
         DhWindowPrivate *priv = dh_window_get_instance_private (window);
ce1861
-        GtkPaned *hpaned;
ce1861
+        GtkApplication *app;
ce1861
         DhSettingsApp *settings;
ce1861
         GSettings *paned_settings;
ce1861
-        GtkWidget *contents_vgrid;
ce1861
 
ce1861
-        /* Header bar */
ce1861
-        init_header_bar (window);
ce1861
-        gtk_window_set_titlebar (GTK_WINDOW (window), GTK_WIDGET (priv->header_bar));
ce1861
+        gtk_widget_init_template (GTK_WIDGET (window));
ce1861
+
ce1861
+        add_actions (window);
ce1861
 
ce1861
-        /* Horizontal paned */
ce1861
-        hpaned = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL));
ce1861
+        app = GTK_APPLICATION (g_application_get_default ());
ce1861
+        if (!gtk_application_prefers_app_menu (app)) {
ce1861
+                gtk_menu_button_set_menu_model (priv->window_menu_button,
ce1861
+                                                priv->window_menu_plus_app_menu);
ce1861
+        }
ce1861
 
ce1861
         settings = dh_settings_app_get_singleton ();
ce1861
         paned_settings = dh_settings_app_peek_paned_settings (settings);
ce1861
         g_settings_bind (paned_settings, "position",
ce1861
-                         hpaned, "position",
ce1861
+                         priv->hpaned, "position",
ce1861
                          G_SETTINGS_BIND_DEFAULT |
ce1861
                          G_SETTINGS_BIND_NO_SENSITIVITY);
ce1861
 
ce1861
-        /* Left side of hpaned */
ce1861
+        /* Sidebar */
ce1861
         priv->sidebar = dh_sidebar_new2 (NULL);
ce1861
-
ce1861
-        /* Right side of hpaned */
ce1861
-        contents_vgrid = gtk_grid_new ();
ce1861
-        gtk_orientable_set_orientation (GTK_ORIENTABLE (contents_vgrid), GTK_ORIENTATION_VERTICAL);
ce1861
+        gtk_widget_show (GTK_WIDGET (priv->sidebar));
ce1861
+        gtk_container_add (GTK_CONTAINER (priv->grid_sidebar),
ce1861
+                           GTK_WIDGET (priv->sidebar));
ce1861
 
ce1861
         // DhNotebook
ce1861
         priv->notebook = dh_notebook_new (NULL);
ce1861
+        gtk_widget_show (GTK_WIDGET (priv->notebook));
ce1861
 
ce1861
         dh_application_window_bind_sidebar_and_notebook (priv->sidebar, priv->notebook);
ce1861
 
ce1861
         g_signal_connect_after (priv->notebook,
ce1861
                                 "page-added",
ce1861
                                 G_CALLBACK (notebook_page_added_after_cb),
ce1861
                                 window);
ce1861
 
ce1861
         g_signal_connect_after (priv->notebook,
ce1861
                                 "page-removed",
ce1861
                                 G_CALLBACK (notebook_page_removed_after_cb),
ce1861
                                 window);
ce1861
 
ce1861
         g_signal_connect_after (priv->notebook,
ce1861
                                 "switch-page",
ce1861
                                 G_CALLBACK (notebook_switch_page_after_cb),
ce1861
                                 window);
ce1861
 
ce1861
         // DhSearchBar
ce1861
         priv->search_bar = dh_search_bar_new (priv->notebook);
ce1861
+        gtk_widget_show (GTK_WIDGET (priv->search_bar));
ce1861
 
ce1861
-        /* Packing */
ce1861
-        gtk_container_add (GTK_CONTAINER (contents_vgrid),
ce1861
+        gtk_container_add (GTK_CONTAINER (priv->grid_documents),
ce1861
                            GTK_WIDGET (priv->search_bar));
ce1861
-        gtk_container_add (GTK_CONTAINER (contents_vgrid),
ce1861
+        gtk_container_add (GTK_CONTAINER (priv->grid_documents),
ce1861
                            GTK_WIDGET (priv->notebook));
ce1861
-        gtk_paned_pack1 (hpaned, GTK_WIDGET (priv->sidebar), FALSE, FALSE);
ce1861
-        gtk_paned_add2 (hpaned, contents_vgrid);
ce1861
-        gtk_widget_show_all (GTK_WIDGET (hpaned));
ce1861
-        gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (hpaned));
ce1861
 
ce1861
         add_actions (window);
ce1861
 
ce1861
         dh_notebook_open_new_tab (priv->notebook, NULL, TRUE);
ce1861
 
ce1861
         /* Focus search in sidebar by default. */
ce1861
         dh_sidebar_set_search_focus (priv->sidebar);
ce1861
 }
ce1861
 
ce1861
 GtkWidget *
ce1861
 dh_window_new (GtkApplication *application)
ce1861
 {
ce1861
         DhWindow *window;
ce1861
         DhSettingsApp *settings;
ce1861
 
ce1861
         g_return_val_if_fail (GTK_IS_APPLICATION (application), NULL);
ce1861
 
ce1861
         window = g_object_new (DH_TYPE_WINDOW,
ce1861
                                "application", application,
ce1861
                                NULL);
ce1861
 
ce1861
         settings = dh_settings_app_get_singleton ();
ce1861
         gtk_widget_realize (GTK_WIDGET (window));
ce1861
         dh_util_window_settings_restore (GTK_WINDOW (window),
ce1861
                                          dh_settings_app_peek_window_settings (settings));
ce1861
 
ce1861
         return GTK_WIDGET (window);
ce1861
 }
ce1861
 
ce1861
 void
ce1861
diff --git a/src/dh-window.ui b/src/dh-window.ui
ce1861
new file mode 100644
ce1861
index 00000000..cff68898
ce1861
--- /dev/null
ce1861
+++ b/src/dh-window.ui
ce1861
@@ -0,0 +1,245 @@
ce1861
+
ce1861
+<interface>
ce1861
+  
ce1861
+  <menu id="window_menu_simple">
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Side Panel</attribute>
ce1861
+        <attribute name="action">win.show-sidebar</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Print</attribute>
ce1861
+        <attribute name="action">win.print</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Find</attribute>
ce1861
+        <attribute name="action">win.find</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Larger Text</attribute>
ce1861
+        <attribute name="action">win.zoom-in</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">S_maller Text</attribute>
ce1861
+        <attribute name="action">win.zoom-out</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Normal Size</attribute>
ce1861
+        <attribute name="action">win.zoom-default</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+  </menu>
ce1861
+  <menu id="window_menu_plus_app_menu">
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">New _Window</attribute>
ce1861
+        <attribute name="action">app.new-window</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Side Panel</attribute>
ce1861
+        <attribute name="action">win.show-sidebar</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Print</attribute>
ce1861
+        <attribute name="action">win.print</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Find</attribute>
ce1861
+        <attribute name="action">win.find</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Larger Text</attribute>
ce1861
+        <attribute name="action">win.zoom-in</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">S_maller Text</attribute>
ce1861
+        <attribute name="action">win.zoom-out</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Normal Size</attribute>
ce1861
+        <attribute name="action">win.zoom-default</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Preferences</attribute>
ce1861
+        <attribute name="action">app.preferences</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
ce1861
+        <attribute name="action">win.show-help-overlay</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Help</attribute>
ce1861
+        <attribute name="action">app.help</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_About Devhelp</attribute>
ce1861
+        <attribute name="action">app.about</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Quit</attribute>
ce1861
+        <attribute name="action">app.quit</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+  </menu>
ce1861
+  <template class="DhWindow" parent="GtkApplicationWindow">
ce1861
+    <property name="can_focus">False</property>
ce1861
+    <property name="has_focus">False</property>
ce1861
+    <property name="is_focus">False</property>
ce1861
+    <child type="titlebar">
ce1861
+      <object class="GtkHeaderBar" id="header_bar">
ce1861
+        <property name="visible">True</property>
ce1861
+        <property name="can_focus">False</property>
ce1861
+        <property name="vexpand">False</property>
ce1861
+        <property name="show_close_button">True</property>
ce1861
+        <child>
ce1861
+          <object class="GtkBox" id="box">
ce1861
+            <property name="visible">True</property>
ce1861
+            <property name="valign">center</property>
ce1861
+            <property name="can_focus">False</property>
ce1861
+            <style>
ce1861
+              <class name="linked"/>
ce1861
+            </style>
ce1861
+            <child>
ce1861
+              <object class="GtkButton" id="back_button">
ce1861
+                <property name="visible">True</property>
ce1861
+                <property name="valign">center</property>
ce1861
+                <property name="can_focus">False</property>
ce1861
+                <property name="tooltip_text" translatable="yes">Back</property>
ce1861
+                <property name="action_name">win.go-back</property>
ce1861
+                <style>
ce1861
+                  <class name="image-button"/>
ce1861
+                </style>
ce1861
+                <child>
ce1861
+                  <object class="GtkImage" id="back_button_image">
ce1861
+                    <property name="visible">True</property>
ce1861
+                    <property name="icon_size">1</property>
ce1861
+                    <property name="icon_name">go-previous-symbolic</property>
ce1861
+                  </object>
ce1861
+                </child>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkButton" id="forward_button">
ce1861
+                <property name="visible">True</property>
ce1861
+                <property name="valign">center</property>
ce1861
+                <property name="can_focus">False</property>
ce1861
+                <property name="tooltip_text" translatable="yes">Forward</property>
ce1861
+                <property name="action_name">win.go-forward</property>
ce1861
+                <style>
ce1861
+                  <class name="image-button"/>
ce1861
+                </style>
ce1861
+                <child>
ce1861
+                  <object class="GtkImage" id="forward_button_image">
ce1861
+                    <property name="visible">True</property>
ce1861
+                    <property name="icon_size">1</property>
ce1861
+                    <property name="icon_name">go-next-symbolic</property>
ce1861
+                  </object>
ce1861
+                </child>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+          </object>
ce1861
+          <packing>
ce1861
+            <property name="pack_type">start</property>
ce1861
+          </packing>
ce1861
+        </child>
ce1861
+        <child>
ce1861
+          <object class="GtkMenuButton" id="window_menu_button">
ce1861
+            <property name="visible">True</property>
ce1861
+            <property name="valign">center</property>
ce1861
+            <property name="can_focus">False</property>
ce1861
+            <property name="menu_model">window_menu_simple</property>
ce1861
+            <property name="use_popover">True</property>
ce1861
+            <style>
ce1861
+              <class name="image-button"/>
ce1861
+            </style>
ce1861
+            <child>
ce1861
+              <object class="GtkImage" id="window_menu_image">
ce1861
+                <property name="visible">True</property>
ce1861
+                <property name="icon_size">1</property>
ce1861
+                <property name="icon_name">open-menu-symbolic</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+          </object>
ce1861
+          <packing>
ce1861
+            <property name="pack_type">end</property>
ce1861
+          </packing>
ce1861
+        </child>
ce1861
+        <child>
ce1861
+          <object class="GtkButton" id="new_tab_button">
ce1861
+            <property name="visible">True</property>
ce1861
+            <property name="valign">center</property>
ce1861
+            <property name="can_focus">False</property>
ce1861
+            <property name="tooltip_text" translatable="yes">New Tab</property>
ce1861
+            <property name="action_name">win.new-tab</property>
ce1861
+            <style>
ce1861
+              <class name="image-button"/>
ce1861
+            </style>
ce1861
+            <child>
ce1861
+              <object class="GtkImage" id="new_tab_button_image">
ce1861
+                <property name="visible">True</property>
ce1861
+                <property name="icon_size">1</property>
ce1861
+                <property name="icon_name">tab-new-symbolic</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+          </object>
ce1861
+          <packing>
ce1861
+            <property name="pack_type">end</property>
ce1861
+          </packing>
ce1861
+        </child>
ce1861
+      </object>
ce1861
+    </child>
ce1861
+    <child>
ce1861
+      <object class="GtkGrid" id="grid">
ce1861
+        <property name="visible">True</property>
ce1861
+        <property name="can_focus">False</property>
ce1861
+        <property name="has_focus">False</property>
ce1861
+        <property name="is_focus">False</property>
ce1861
+        <child>
ce1861
+          <object class="GtkPaned" id="hpaned">
ce1861
+            <property name="visible">True</property>
ce1861
+            <property name="can_focus">True</property>
ce1861
+            <property name="has_focus">False</property>
ce1861
+            <property name="is_focus">False</property>
ce1861
+            <child>
ce1861
+              <object class="GtkGrid" id="grid_sidebar">
ce1861
+                <property name="visible">True</property>
ce1861
+                <style>
ce1861
+                  <class name="sidebar"/>
ce1861
+                </style>
ce1861
+              </object>
ce1861
+              <packing>
ce1861
+		<property name="shrink">False</property>
ce1861
+	      </packing>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkGrid" id="grid_documents">
ce1861
+                <property name="visible">True</property>
ce1861
+                <property name="orientation">vertical</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+          </object>
ce1861
+          <packing>
ce1861
+            <property name="left_attach">0</property>
ce1861
+            <property name="top_attach">1</property>
ce1861
+            <property name="width">1</property>
ce1861
+            <property name="height">1</property>
ce1861
+          </packing>
ce1861
+        </child>
ce1861
+      </object>
ce1861
+    </child>
ce1861
+  </template>
ce1861
+</interface>
ce1861
diff --git a/src/dh.gresource.xml b/src/dh.gresource.xml
ce1861
index 78fda590..d59c7663 100644
ce1861
--- a/src/dh.gresource.xml
ce1861
+++ b/src/dh.gresource.xml
ce1861
@@ -1,15 +1,20 @@
ce1861
 
ce1861
 
ce1861
   SPDX-FileCopyrightText: 2013 Thomas Bechtold <thomasbechtold@jpberlin.de>
ce1861
   SPDX-FileCopyrightText: 2013 Ignacio Casal Quinteiro <ignacio.casal@nice-software.com>
ce1861
   SPDX-FileCopyrightText: 2016 Frédéric Péters <fpeters@0d.be>
ce1861
   SPDX-FileCopyrightText: 2018 Günther Wagner <info@gunibert.de>
ce1861
   SPDX-FileCopyrightText: 2018 Sébastien Wilmet <swilmet@gnome.org>
ce1861
   SPDX-License-Identifier: GPL-3.0-or-later
ce1861
 -->
ce1861
 <gresources>
ce1861
   <gresource prefix="/org/gnome/devhelp">
ce1861
     <file preprocess="xml-stripblanks">dh-assistant.ui</file>
ce1861
     <file preprocess="xml-stripblanks">dh-preferences.ui</file>
ce1861
+    <file preprocess="xml-stripblanks">dh-window.ui</file>
ce1861
+  </gresource>
ce1861
+  <gresource prefix="/org/gnome/devhelp/gtk">
ce1861
+    <file preprocess="xml-stripblanks">help-overlay.ui</file>
ce1861
+    <file preprocess="xml-stripblanks">menus.ui</file>
ce1861
   </gresource>
ce1861
 </gresources>
ce1861
diff --git a/src/help-overlay.ui b/src/help-overlay.ui
ce1861
new file mode 100644
ce1861
index 00000000..80eea36c
ce1861
--- /dev/null
ce1861
+++ b/src/help-overlay.ui
ce1861
@@ -0,0 +1,117 @@
ce1861
+
ce1861
+<interface>
ce1861
+  <requires lib="gtk+" version="3.20"/>
ce1861
+  <object class="GtkShortcutsWindow" id="help_overlay">
ce1861
+    <property name="modal">1</property>
ce1861
+    <child>
ce1861
+      <object class="GtkShortcutsSection">
ce1861
+        <property name="visible">1</property>
ce1861
+        <property name="section-name">shortcuts</property>
ce1861
+        <property name="max-height">10</property>
ce1861
+        <child>
ce1861
+          <object class="GtkShortcutsGroup">
ce1861
+            <property name="visible">1</property>
ce1861
+            <property name="title" translatable="yes" context="shortcut window">General</property>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>K</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Focus global search</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>F</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Find in current page</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>N</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Open a new window</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>T</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Open a new tab</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator">F9</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Toggle side panel visibility</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><alt>Left</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Go back</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><alt>Right</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Go forward</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>P</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Print</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>W</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Close the current window</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><Control>Q</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Close all windows</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+          </object>
ce1861
+        </child>
ce1861
+        <child>
ce1861
+          <object class="GtkShortcutsGroup">
ce1861
+            <property name="visible">1</property>
ce1861
+            <property name="title" translatable="yes" context="shortcut window">Zoom</property>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><ctrl>plus</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Zoom in</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><ctrl>minus</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Zoom out</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+            <child>
ce1861
+              <object class="GtkShortcutsShortcut">
ce1861
+                <property name="visible">1</property>
ce1861
+                <property name="accelerator"><ctrl>0</property>
ce1861
+                <property name="title" translatable="yes" context="shortcut window">Reset Zoom</property>
ce1861
+              </object>
ce1861
+            </child>
ce1861
+          </object>
ce1861
+        </child>
ce1861
+      </object>
ce1861
+    </child>
ce1861
+  </object>
ce1861
+</interface>
ce1861
diff --git a/src/menus.ui b/src/menus.ui
ce1861
new file mode 100644
ce1861
index 00000000..a2d53483
ce1861
--- /dev/null
ce1861
+++ b/src/menus.ui
ce1861
@@ -0,0 +1,58 @@
ce1861
+
ce1861
+
ce1861
+  This file is part of Devhelp.
ce1861
+
ce1861
+  Copyright (C) 2010 Imendio AB
ce1861
+  Copyright (C) 2012 Aleksander Morgado <aleksander@gnu.org>
ce1861
+  Copyright (C) 2017, 2018 Sébastien Wilmet <swilmet@gnome.org>
ce1861
+
ce1861
+  Devhelp is free software: you can redistribute it and/or modify
ce1861
+  it under the terms of the GNU General Public License as published
ce1861
+  by the Free Software Foundation, either version 3 of the License,
ce1861
+  or (at your option) any later version.
ce1861
+
ce1861
+  Devhelp is distributed in the hope that it will be useful,
ce1861
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
ce1861
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ce1861
+  GNU General Public License for more details.
ce1861
+
ce1861
+  You should have received a copy of the GNU General Public License
ce1861
+  along with Devhelp.  If not, see <http://www.gnu.org/licenses/>.
ce1861
+-->
ce1861
+
ce1861
+<interface>
ce1861
+  <requires lib="gtk+" version="3.0"/>
ce1861
+  
ce1861
+  <menu id="manual-app-menu">
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">New _Window</attribute>
ce1861
+        <attribute name="action">app.new-window</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Preferences</attribute>
ce1861
+        <attribute name="action">app.preferences</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+    <section>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
ce1861
+        <attribute name="action">win.show-help-overlay</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Help</attribute>
ce1861
+        <attribute name="action">app.help</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_About</attribute>
ce1861
+        <attribute name="action">app.about</attribute>
ce1861
+      </item>
ce1861
+      <item>
ce1861
+        <attribute name="label" translatable="yes">_Quit</attribute>
ce1861
+        <attribute name="action">app.quit</attribute>
ce1861
+      </item>
ce1861
+    </section>
ce1861
+  </menu>
ce1861
+</interface>
ce1861
-- 
ce1861
2.31.1
ce1861