diff --git a/.devhelp.metadata b/.devhelp.metadata new file mode 100644 index 0000000..27e54d2 --- /dev/null +++ b/.devhelp.metadata @@ -0,0 +1 @@ +d46047d74456a1c43958bbd0fc331f9c607dad45 SOURCES/devhelp-40.0.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86f55b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/devhelp-40.0.tar.xz diff --git a/SOURCES/0001-Revert-Revert-Revert-the-introduction-of-the-amtk-li.patch b/SOURCES/0001-Revert-Revert-Revert-the-introduction-of-the-amtk-li.patch new file mode 100644 index 0000000..74a74e7 --- /dev/null +++ b/SOURCES/0001-Revert-Revert-Revert-the-introduction-of-the-amtk-li.patch @@ -0,0 +1,2032 @@ +From 7295e3ca5b6ce5061666c2da4c339853f0d16efc Mon Sep 17 00:00:00 2001 +From: Jordan Petridis +Date: Sat, 10 Apr 2021 01:57:50 +0300 +Subject: [PATCH] Revert "Revert "Revert the introduction of the amtk library"" + +This reverts commit 18369a6958664f10b68c9edb749dbd3af7cc731a. + +amtk is now archived. +--- + .gitignore | 1 + + README.md | 1 - + flatpak/org.gnome.Devhelp.json | 45 ++++++ + flatpak/org.gnome.Devhelp.yml | 45 ------ + meson.build | 2 +- + po/POTFILES.in | 3 + + src/dh-app.c | 255 ++++++++++----------------------- + src/dh-app.h | 2 - + src/dh-main.c | 3 - + src/dh-window.c | 255 ++++++--------------------------- + src/dh-window.ui | 245 +++++++++++++++++++++++++++++++ + src/dh.gresource.xml | 5 + + src/help-overlay.ui | 117 +++++++++++++++ + src/menus.ui | 58 ++++++++ + 14 files changed, 599 insertions(+), 438 deletions(-) + create mode 100644 flatpak/org.gnome.Devhelp.json + delete mode 100644 flatpak/org.gnome.Devhelp.yml + create mode 100644 src/dh-window.ui + create mode 100644 src/help-overlay.ui + create mode 100644 src/menus.ui + +\ No newline at end of file +diff --git a/README.md b/README.md +index 6057f78b..2d83a3c2 100644 +--- a/README.md ++++ b/README.md +@@ -1,54 +1,53 @@ + Devhelp + ======= + + The Devhelp web page: + + https://wiki.gnome.org/Apps/Devhelp + + Installation of the Devhelp Flatpak + ----------------------------------- + + - [Devhelp on Flathub](https://flathub.org/apps/details/org.gnome.Devhelp) + + How to contribute + ----------------- + + See the [HACKING](HACKING) file. + + Dependencies + ------------ + + - GLib + - GTK + - WebKitGTK +-- [Amtk](https://wiki.gnome.org/Projects/Amtk) + - gsettings-desktop-schemas + + Description + ----------- + + Devhelp is a developer tool for browsing and searching API documentation. + It provides an easy way to navigate through libraries and to search by + function, struct, or macro. + + The documentation must be installed locally, so an internet connection is + not needed to use Devhelp. + + Devhelp works natively with GTK-Doc, so the GTK and GNOME libraries are + well supported. But other development platforms can be supported as well, + as long as the API documentation is available in HTML and a `*.devhelp2` + index file is generated. + + Devhelp integrates with other applications such as Glade, Builder or + Anjuta, and plugins are available for different text editors (gedit, Vim, + Emacs, Geany, …). + + Integration with other developer tools + -------------------------------------- + + Devhelp provides some command line options, such as `--search` and + `--search-assistant`. A text editor plugin can for example launch the command + `devhelp --search function_name` when a keyboard shortcut is pressed, with the + `function_name` under the cursor. + + Devhelp also provides a shared library, to integrate the GTK widgets inside an +diff --git a/flatpak/org.gnome.Devhelp.json b/flatpak/org.gnome.Devhelp.json +new file mode 100644 +index 00000000..a2d1372d +--- /dev/null ++++ b/flatpak/org.gnome.Devhelp.json +@@ -0,0 +1,45 @@ ++{ ++ "app-id" : "org.gnome.Devhelp", ++ "runtime" : "org.gnome.Sdk", ++ "runtime-version" : "master", ++ "sdk" : "org.gnome.Sdk", ++ "command" : "devhelp", ++ "tags" : [ ++ "nightly" ++ ], ++ "desktop-file-name-prefix" : "(Nightly) ", ++ "finish-args" : [ ++ "--share=ipc", ++ "--socket=x11", ++ "--socket=wayland", ++ "--device=dri", ++ "--filesystem=host:ro" ++ ], ++ "cleanup" : [ ++ "/include", ++ "/lib/pkgconfig", ++ "/share/pkgconfig", ++ "share/aclocal", ++ "man", ++ "share/man", ++ "*.la", ++ "*.a" ++ ], ++ "modules" : [ ++ { ++ "name" : "devhelp", ++ "buildsystem" : "meson", ++ "config-opts" : [ ++ "-Dflatpak_build=true" ++ ], ++ "run-tests" : true, ++ "sources" : [ ++ { ++ "type" : "git", ++ "url" : "https://gitlab.gnome.org/GNOME/devhelp.git", ++ "branch" : "master" ++ } ++ ] ++ } ++ ] ++} +diff --git a/flatpak/org.gnome.Devhelp.yml b/flatpak/org.gnome.Devhelp.yml +deleted file mode 100644 +index 49b838b7..00000000 +--- a/flatpak/org.gnome.Devhelp.yml ++++ /dev/null +@@ -1,45 +0,0 @@ +-app-id: org.gnome.Devhelp +-runtime: org.gnome.Sdk +-runtime-version: master +-sdk: org.gnome.Sdk +-command: devhelp +-tags: +- - nightly +-desktop-file-name-prefix: "(Nightly) " +- +-finish-args: +- # X11 + XShm access +- - --share=ipc +- - --socket=x11 +- # Wayland access +- - --socket=wayland +- # OpenGL for Webkit +- - --device=dri +- # We want full fs access to see the API docs installed by traditional Linux +- # distro packages. +- - --filesystem=host:ro +- +-build-options: +- cflags: -O2 -g +- cxxflags: -O2 -g +- +-cleanup: +- - /share/man +- - /lib/pkgconfig +- - /include +- +-modules: +- - name: amtk +- buildsystem: meson +- run-tests: true +- sources: +- - type: git +- url: https://gitlab.gnome.org/GNOME/amtk.git +- +- - name: devhelp +- buildsystem: meson +- config-opts: [ "-Dflatpak_build=true" ] +- run-tests: true +- sources: +- - type: git +- url: https://gitlab.gnome.org/GNOME/devhelp.git +diff --git a/meson.build b/meson.build +index bdd66056..d71d748d 100644 +--- a/meson.build ++++ b/meson.build +@@ -35,61 +35,61 @@ LIBDEVHELP_API_VERSION_FULL = '3.0' + # changed since the last update, increment CURRENT and set REVISION + # to 0. + # 3. If any exported functions or data have been added since the last + # public release, increment AGE. + # 4. If any exported functions or data have been removed since the last + # public release, set AGE to 0. + # + # When incrementing the API version (usually for a new major package version), + # set CURRENT, REVISION and AGE to 0 since it's like a new library. + lt_current = 6 + lt_revision = 3 + lt_age = 0 + LIBDEVHELP_LT_VERSION = '@0@.@1@.@2@'.format(lt_current, lt_revision, lt_age) + + LIBDEVHELP_PUBLIC_DEPS = [ + dependency('gio-2.0', version: '>= 2.64'), + dependency('gtk+-3.0', version: '>= 3.22'), + dependency('webkit2gtk-4.0', version: '>= 2.26'), + ] + LIBDEVHELP_PRIVATE_DEPS = [ + dependency('gsettings-desktop-schemas'), + ] + LIBDEVHELP_DEPS = [ + LIBDEVHELP_PUBLIC_DEPS, + LIBDEVHELP_PRIVATE_DEPS, + meson.get_compiler('c').find_library('m'), + ] + + DEVHELP_APP_DEPS = [ + LIBDEVHELP_DEPS, +- dependency('amtk-5', version: '>= 5.0'), ++ dependency('gsettings-desktop-schemas'), + ] + + # config.h + + config_data = configuration_data() + GETTEXT_PACKAGE_NAME = meson.project_name() + config_data.set_quoted('GETTEXT_PACKAGE', GETTEXT_PACKAGE_NAME) + config_data.set_quoted('DATADIR', get_option('prefix') / get_option('datadir')) + config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir')) + config_data.set_quoted('PACKAGE_VERSION', meson.project_version()) + config_data.set_quoted('LIBDEVHELP_API_VERSION', LIBDEVHELP_API_VERSION) + config_data.set10('FLATPAK_BUILD', get_option('flatpak_build')) + + configure_file( + output: 'config.h', + configuration: config_data + ) + + # Misc + + # For #include or #include "config.h". + ROOT_INCLUDE_DIR = include_directories('.') + + add_project_arguments( + '-DG_LOG_DOMAIN="@0@"'.format(meson.project_name()), + language: 'c' + ) + + ##### + # CFLAGS +diff --git a/po/POTFILES.in b/po/POTFILES.in +index db463e9e..cd6e6ed8 100644 +--- a/po/POTFILES.in ++++ b/po/POTFILES.in +@@ -15,30 +15,33 @@ devhelp/dh-book-manager.c + devhelp/dh-book-tree.c + devhelp/dh-completion.c + devhelp/dh-error.c + devhelp/dh-init.c + devhelp/dh-keyword-model.c + devhelp/dh-link.c + devhelp/dh-notebook.c + devhelp/dh-parser.c + devhelp/dh-profile-builder.c + devhelp/dh-profile.c + devhelp/dh-search-bar.c + devhelp/dh-search-context.c + devhelp/dh-settings-builder.c + devhelp/dh-settings.c + devhelp/dh-sidebar.c + devhelp/dh-tab.c + devhelp/dh-tab-label.c + devhelp/dh-util-lib.c + devhelp/dh-web-view.c + plugins/gedit-plugin/devhelp.plugin.desktop.in + plugins/gedit-plugin/devhelp.py + src/dh-app.c + src/dh-assistant.c + src/dh-assistant.ui + src/dh-main.c + src/dh-preferences.c + 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 9ceae7f0..da97158c 100644 +--- a/src/dh-app.c ++++ b/src/dh-app.c +@@ -1,200 +1,48 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + /* SPDX-FileCopyrightText: 2002 CodeFactory AB + * SPDX-FileCopyrightText: 2002 Mikael Hallendal + * SPDX-FileCopyrightText: 2004-2008 Imendio AB + * SPDX-FileCopyrightText: 2012 Aleksander Morgado + * SPDX-FileCopyrightText: 2017, 2018 Sébastien Wilmet + * SPDX-License-Identifier: GPL-3.0-or-later + */ + + #include "config.h" + #include "dh-app.h" + #include +-#include + #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); +- +-/* This function adds the AmtkActionInfo's for the GActions that are present in +- * a menu. +- */ +-static void +-add_menu_action_infos (DhApp *app) +-{ +- const gchar *accels[] = {NULL, NULL, NULL, NULL}; +- AmtkActionInfo *action_info; +- +- const AmtkActionInfoEntry entries[] = { +- /* action, icon, label, accel, tooltip */ +- +- /* Actions related to the whole application */ +- { "app.new-window", NULL, N_("New _Window"), "n", +- N_("Open a new window") }, +- { "app.preferences", NULL, N_("_Preferences") }, +- { "win.shortcuts-window", NULL, N_("_Keyboard Shortcuts"), "question", +- N_("Show keyboard shortcuts") }, +- { "app.help", NULL, N_("_Help"), "F1", +- N_("Show help") }, +- { "app.about", NULL, N_("_About Devhelp") }, +- { "app.quit", NULL, N_("_Quit"), "q", +- N_("Close all windows (quit the application)") }, +- +- /* Actions related to the current main window */ +- { "win.show-sidebar", NULL, N_("_Side Panel"), "F9", +- N_("Toggle side panel visibility") }, +- { "win.print", NULL, N_("_Print"), "p" }, +- { "win.find", NULL, N_("_Find"), "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"), NULL, +- N_("Smaller text") }, +- { "win.zoom-default", NULL, N_("_Normal Size"), NULL, +- 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); +- +- /* The same as in Epiphany. */ +- accels[0] = "minus"; +- accels[1] = "KP_Subtract"; +- action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, "win.zoom-out"); +- amtk_action_info_set_accels (action_info, accels); +- +- /* The same as in Epiphany. */ +- accels[0] = "0"; +- accels[1] = "KP_0"; +- action_info = amtk_action_info_store_lookup (app->priv->menu_action_info_store, "win.zoom-default"); +- amtk_action_info_set_accels (action_info, accels); +- +- /* For "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] = "plus"; +- accels[1] = "equal"; +- accels[2] = "KP_Add"; +- 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)); +-} +- +-/* This function adds the AmtkActionInfo's for other GActions (GActions that are +- * not present in a menu). +- */ +-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, "t", N_("Open a new tab") }, +- { "win.close-tab", NULL, NULL, "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] = "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] = "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] = "k"; +- accels[1] = "s"; +- accels[2] = "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); +-} +- +-/* This function adds the AmtkActionInfo's for things that have no related +- * GActions. +- */ +-static void +-add_no_gaction_action_infos (void) +-{ +- AmtkActionInfoStore *store; +- +- const AmtkActionInfoEntry entries[] = { +- /* action, icon, label, accel, tooltip */ +- { "no-gaction-open-menu", NULL, NULL, "F10", N_("Open the menu") }, +- { "no-gaction-prev-tab", NULL, NULL, "Page_Up", N_("Previous tab") }, +- { "no-gaction-next-tab", NULL, NULL, "Page_Down", N_("Next tab") }, +- { NULL } +- }; +- +- store = amtk_action_info_store_new (); +- amtk_action_info_store_add_entries (store, entries, -1, GETTEXT_PACKAGE); +- g_object_unref (store); +-} +- +-static void +-add_action_infos (DhApp *app) +-{ +- add_menu_action_infos (app); +- add_other_action_infos (app); +- add_no_gaction_action_infos (); +-} ++G_DEFINE_TYPE (DhApp, dh_app, GTK_TYPE_APPLICATION); + + static DhAssistant * + get_active_assistant_window (DhApp *app) + { + GList *windows; + GList *l; + + windows = gtk_application_get_windows (GTK_APPLICATION (app)); + + for (l = windows; l != NULL; l = l->next) { + GtkWindow *cur_window = GTK_WINDOW (l->data); + + if (DH_IS_ASSISTANT (cur_window)) + return DH_ASSISTANT (cur_window); + } + + return NULL; + } + + static void + save_active_main_window_gsettings (DhApp *app) + { + DhWindow *active_window; + DhSettingsApp *settings; + + active_window = dh_app_get_active_main_window (app, FALSE); + if (active_window == NULL) + return; + + settings = dh_settings_app_get_singleton (); +@@ -202,62 +50,60 @@ save_active_main_window_gsettings (DhApp *app) + dh_settings_app_peek_window_settings (settings)); + } + + static void + save_active_assistant_window_gsettings (DhApp *app) + { + DhAssistant *active_assistant; + DhSettingsApp *settings; + + active_assistant = get_active_assistant_window (app); + if (active_assistant == NULL) + return; + + settings = dh_settings_app_get_singleton (); + dh_util_window_settings_save (GTK_WINDOW (active_assistant), + dh_settings_app_peek_assistant_settings (settings)); + } + + static void + new_window_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhApp *app = DH_APP (user_data); + GtkWidget *new_window; + + save_active_main_window_gsettings (app); + + 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 + preferences_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhApp *app = DH_APP (user_data); + GtkWindow *parent_window; + + parent_window = (GtkWindow *) dh_app_get_active_main_window (app, FALSE); + dh_preferences_show_dialog (parent_window); + } + + static void + help_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhApp *app = DH_APP (user_data); + GtkWindow *window; + GError *error = NULL; + + window = (GtkWindow *) dh_app_get_active_main_window (app, FALSE); + + gtk_show_uri_on_window (window, "help:devhelp", GDK_CURRENT_TIME, &error); + + if (error != NULL) { + g_warning ("Failed to open the documentation: %s", error->message); + g_clear_error (&error); +@@ -364,127 +210,195 @@ raise_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhApp *app = DH_APP (user_data); + GtkWindow *window; + + window = gtk_application_get_active_window (GTK_APPLICATION (app)); + if (window == NULL) + window = (GtkWindow *) dh_app_get_active_main_window (app, TRUE); + + gtk_window_present (window); + } + + static void + add_action_entries (DhApp *app) + { + const GActionEntry app_entries[] = { + /* General actions */ + { "new-window", new_window_cb }, + { "preferences", preferences_cb }, + { "help", help_cb }, + { "about", about_cb }, + { "quit", quit_cb }, + + /* Additional commandline-specific actions */ + { "search", search_cb, "s" }, + { "search-assistant", search_assistant_cb, "s" }, + { "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 + setup_go_to_tab_accelerators (GtkApplication *app) + { + const gchar *accels[] = {NULL, NULL}; + gint key_num; + + for (key_num = 1; key_num <= 9; key_num++) { + gchar *accel; + gchar *detailed_action_name; + + accel = g_strdup_printf ("%d", key_num); + accels[0] = accel; + + detailed_action_name = g_strdup_printf ("win.go-to-tab(uint16 %d)", key_num - 1); + + gtk_application_set_accels_for_action (app, detailed_action_name, accels); + + g_free (accel); + g_free (detailed_action_name); + } + + /* On a typical keyboard the 0 is after 9, so it's the equivalent of 10 + * (9 starting from 0). + */ + accels[0] = "0"; + gtk_application_set_accels_for_action (app, "win.go-to-tab(uint16 9)", accels); + } + + 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] = "0"; ++ gtk_application_set_accels_for_action (app, "win.zoom-default", accels); ++ ++ accels[0] = "minus"; ++ gtk_application_set_accels_for_action (app, "win.zoom-out", accels); ++ ++ /* For "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] = "plus"; ++ accels[1] = "equal"; ++ gtk_application_set_accels_for_action (app, "win.zoom-in", accels); ++ accels[1] = NULL; ++ ++ accels[0] = "f"; ++ gtk_application_set_accels_for_action (app, "win.find", accels); ++ + accels[0] = "c"; + gtk_application_set_accels_for_action (app, "win.copy", accels); + ++ accels[0] = "p"; ++ gtk_application_set_accels_for_action (app, "win.print", accels); ++ ++ accels[0] = "t"; ++ gtk_application_set_accels_for_action (app, "win.new-tab", accels); ++ ++ accels[0] = "n"; ++ gtk_application_set_accels_for_action (app, "app.new-window", accels); ++ + accels[0] = "Page_Down"; + gtk_application_set_accels_for_action (app, "win.next-tab", accels); + + accels[0] = "Page_Up"; + gtk_application_set_accels_for_action (app, "win.prev-tab", accels); + ++ accels[0] = "w"; ++ gtk_application_set_accels_for_action (app, "win.close-tab", accels); ++ ++ accels[0] = "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); ++ ++ accels[0] = "Right"; ++ accels[1] = "Forward"; ++ gtk_application_set_accels_for_action (app, "win.go-forward", accels); ++ ++ accels[0] = "Left"; ++ accels[1] = "Back"; ++ gtk_application_set_accels_for_action (app, "win.go-back", accels); ++ ++ accels[0] = "k"; ++ accels[1] = "s"; ++ accels[2] = "l"; ++ gtk_application_set_accels_for_action (app, "win.focus-search", accels); ++} ++ ++static void ++set_app_menu_if_needed (GtkApplication *app) ++{ ++ GMenu *manual_app_menu; ++ ++ manual_app_menu = gtk_application_get_menu_by_id (app, "manual-app-menu"); ++ ++ /* Have the g_return in all cases, to catch problems in all cases. */ ++ g_return_if_fail (manual_app_menu != NULL); ++ ++ if (gtk_application_prefers_app_menu (app)) ++ gtk_application_set_app_menu (app, G_MENU_MODEL (manual_app_menu)); + } + + static void + dh_app_startup (GApplication *application) + { + DhApp *app = DH_APP (application); + + g_application_set_resource_base_path (application, "/org/gnome/devhelp"); + + 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)); ++ setup_accelerators (GTK_APPLICATION (app)); ++ set_app_menu_if_needed (GTK_APPLICATION (app)); + } + + static void + dh_app_activate (GApplication *app) + { + g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL); + } + + static gboolean option_version; + + static GOptionEntry options[] = { + { "new-window", 'n', + 0, G_OPTION_ARG_NONE, NULL, + N_("Opens a new Devhelp window"), + NULL + }, + { "search", 's', + 0, G_OPTION_ARG_STRING, NULL, + N_("Search for a keyword"), + N_("KEYWORD") + }, + { "search-assistant", 'a', + 0, G_OPTION_ARG_STRING, NULL, + N_("Search and display any hit in the assistant window"), + N_("KEYWORD") + }, + { "version", 'v', + 0, G_OPTION_ARG_NONE, &option_version, + N_("Display the version and exit"), + NULL +@@ -523,89 +437,74 @@ dh_app_command_line (GApplication *g_app, + options_dict = g_application_command_line_get_options_dict (command_line); + + g_variant_dict_lookup (options_dict, "new-window", "b", &option_new_window); + g_variant_dict_lookup (options_dict, "search", "&s", &option_search); + g_variant_dict_lookup (options_dict, "search-assistant", "&s", &option_search_assistant); + g_variant_dict_lookup (options_dict, "quit", "b", &option_quit); + + if (option_quit) { + g_action_group_activate_action (G_ACTION_GROUP (app), "quit", NULL); + return 0; + } + + if (option_new_window) + g_action_group_activate_action (G_ACTION_GROUP (app), "new-window", NULL); + + if (option_search != NULL) + g_action_group_activate_action (G_ACTION_GROUP (app), + "search", + g_variant_new_string (option_search)); + + if (option_search_assistant != NULL) + g_action_group_activate_action (G_ACTION_GROUP (app), + "search-assistant", + g_variant_new_string (option_search_assistant)); + + g_action_group_activate_action (G_ACTION_GROUP (app), "raise", NULL); + + 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; + application_class->command_line = dh_app_command_line; + } + + 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). + */ + g_set_application_name (_("Devhelp")); + gtk_window_set_default_icon_name ("org.gnome.Devhelp"); + + g_application_add_main_option_entries (G_APPLICATION (app), options); + } + + DhApp * + dh_app_new (void) + { + return g_object_new (DH_TYPE_APP, + "application-id", "org.gnome.Devhelp", + "flags", G_APPLICATION_HANDLES_COMMAND_LINE, + NULL); + } + + /* Returns: (transfer none) (nullable). */ + DhWindow * + dh_app_get_active_main_window (DhApp *app, + gboolean create_if_none) + { + GList *windows; + GList *l; + + g_return_val_if_fail (DH_IS_APP (app), NULL); + + windows = gtk_application_get_windows (GTK_APPLICATION (app)); + +diff --git a/src/dh-app.h b/src/dh-app.h +index d7ce15ba..5be3d939 100644 +--- a/src/dh-app.h ++++ b/src/dh-app.h +@@ -1,44 +1,42 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + /* SPDX-FileCopyrightText: 2012 Aleksander Morgado + * SPDX-FileCopyrightText: 2017 Sébastien Wilmet + * SPDX-License-Identifier: GPL-3.0-or-later + */ + + #ifndef DH_APP_H + #define DH_APP_H + + #include + #include "dh-window.h" + + G_BEGIN_DECLS + + #define DH_TYPE_APP (dh_app_get_type ()) + #define DH_APP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DH_TYPE_APP, DhApp)) + #define DH_APP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), DH_TYPE_APP, DhAppClass)) + #define DH_IS_APP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DH_TYPE_APP)) + #define DH_IS_APP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DH_TYPE_APP)) + #define DH_APP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DH_TYPE_APP, DhAppClass)) + + typedef struct _DhApp DhApp; + typedef struct _DhAppClass DhAppClass; +-typedef struct _DhAppPrivate DhAppPrivate; + + struct _DhApp { + GtkApplication parent_instance; +- DhAppPrivate *priv; + }; + + struct _DhAppClass { + GtkApplicationClass parent_class; + }; + + GType dh_app_get_type (void) G_GNUC_CONST; + + DhApp * dh_app_new (void); + + DhWindow * dh_app_get_active_main_window (DhApp *app, + gboolean create_if_none); + + G_END_DECLS + + #endif /* DH_APP_H */ +diff --git a/src/dh-main.c b/src/dh-main.c +index 50d21974..f28aefde 100644 +--- a/src/dh-main.c ++++ b/src/dh-main.c +@@ -1,36 +1,33 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + /* SPDX-FileCopyrightText: 2001-2003 CodeFactory AB + * SPDX-FileCopyrightText: 2001-2008 Imendio AB + * SPDX-License-Identifier: GPL-3.0-or-later + */ + + #include "config.h" + #include + #include + #include +-#include + #include "dh-app.h" + #include "dh-settings-app.h" + + int + main (int argc, char **argv) + { + DhApp *application; + gint status; + + setlocale (LC_ALL, ""); + 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 (); + + return status; + } +diff --git a/src/dh-window.c b/src/dh-window.c +index 6dea6209..f29d5d62 100644 +--- a/src/dh-window.c ++++ b/src/dh-window.c +@@ -1,96 +1,109 @@ + /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ + /* SPDX-FileCopyrightText: 2001-2008 Imendio AB + * SPDX-FileCopyrightText: 2012 Aleksander Morgado + * SPDX-FileCopyrightText: 2012 Thomas Bechtold + * SPDX-FileCopyrightText: 2015-2020 Sébastien Wilmet + * SPDX-License-Identifier: GPL-3.0-or-later + */ + + #include "dh-window.h" + #include + #include + #include +-#include + #include "dh-settings-app.h" + #include "dh-util-app.h" + + typedef struct { + GtkHeaderBar *header_bar; +- GtkMenuButton *menu_button; ++ GtkMenuButton *window_menu_button; ++ GMenuModel *window_menu_plus_app_menu; ++ ++ GtkPaned *hpaned; ++ GtkWidget *grid_sidebar; ++ GtkWidget *grid_documents; + + DhSidebar *sidebar; + DhSearchBar *search_bar; + DhNotebook *notebook; + } DhWindowPrivate; + + G_DEFINE_TYPE_WITH_PRIVATE (DhWindow, dh_window, GTK_TYPE_APPLICATION_WINDOW); + + static gboolean + dh_window_delete_event (GtkWidget *widget, + GdkEventAny *event) + { + DhSettingsApp *settings; + + settings = dh_settings_app_get_singleton (); + dh_util_window_settings_save (GTK_WINDOW (widget), + dh_settings_app_peek_window_settings (settings)); + + if (GTK_WIDGET_CLASS (dh_window_parent_class)->delete_event == NULL) + return GDK_EVENT_PROPAGATE; + + return GTK_WIDGET_CLASS (dh_window_parent_class)->delete_event (widget, event); + } + + static void + dh_window_dispose (GObject *object) + { + DhWindowPrivate *priv = dh_window_get_instance_private (DH_WINDOW (object)); + + priv->header_bar = NULL; +- priv->menu_button = NULL; ++ priv->window_menu_button = NULL; + priv->sidebar = NULL; + priv->search_bar = NULL; + priv->notebook = NULL; + + G_OBJECT_CLASS (dh_window_parent_class)->dispose (object); + } + + static void + dh_window_class_init (DhWindowClass *klass) + { + GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (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 + * handle the NULL case with the return value of this function. + */ + static DhWebView * + get_active_web_view (DhWindow *window) + { + DhWindowPrivate *priv = dh_window_get_instance_private (window); + + return dh_notebook_get_active_web_view (priv->notebook); + } + + static void + update_window_title (DhWindow *window) + { + DhWindowPrivate *priv = dh_window_get_instance_private (window); + DhWebView *web_view; + const gchar *title; + + web_view = get_active_web_view (window); + if (web_view == NULL) + return; + + title = dh_web_view_get_devhelp_title (web_view); + gtk_header_bar_set_title (priv->header_bar, title); + } + + static void + update_zoom_actions_sensitivity (DhWindow *window) +@@ -198,62 +211,67 @@ go_to_tab_cb (GSimpleAction *action, + gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->notebook), tab_num); + } + + static void + print_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhWindow *window = DH_WINDOW (user_data); + DhWebView *web_view; + WebKitPrintOperation *print_operation; + + web_view = get_active_web_view (window); + if (web_view == NULL) + return; + + print_operation = webkit_print_operation_new (WEBKIT_WEB_VIEW (web_view)); + webkit_print_operation_run_dialog (print_operation, GTK_WINDOW (window)); + g_object_unref (print_operation); + } + + static void + close_tab_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhWindow *window = DH_WINDOW (user_data); + 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 + copy_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhWindow *window = DH_WINDOW (user_data); + DhWindowPrivate *priv = dh_window_get_instance_private (window); + GtkWidget *widget; + + widget = gtk_window_get_focus (GTK_WINDOW (window)); + + if (GTK_IS_EDITABLE (widget)) { + gtk_editable_copy_clipboard (GTK_EDITABLE (widget)); + } else if (GTK_IS_TREE_VIEW (widget) && + gtk_widget_is_ancestor (widget, GTK_WIDGET (priv->sidebar))) { + DhLink *link; + + link = dh_sidebar_get_selected_link (priv->sidebar); + if (link != NULL) { + GtkClipboard *clipboard; + + clipboard = gtk_widget_get_clipboard (widget, GDK_SELECTION_CLIPBOARD); + gtk_clipboard_set_text (clipboard, dh_link_get_name (link), -1); + dh_link_unref (link); + } + } else { + DhWebView *web_view; + +@@ -327,285 +345,108 @@ focus_search_cb (GSimpleAction *action, + + dh_sidebar_set_search_focus (priv->sidebar); + } + + static void + go_back_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhWindow *window = DH_WINDOW (user_data); + DhWebView *web_view; + + web_view = get_active_web_view (window); + if (web_view != NULL) + webkit_web_view_go_back (WEBKIT_WEB_VIEW (web_view)); + } + + static void + go_forward_cb (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) + { + DhWindow *window = DH_WINDOW (user_data); + DhWebView *web_view; + + web_view = get_active_web_view (window); + if (web_view != NULL) + 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); +- +- group = amtk_shortcuts_group_new (_("Search")); +- 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 (section, GTK_WIDGET (group)); +- +- group = amtk_shortcuts_group_new (_("History")); +- 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 (section, GTK_WIDGET (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)); +- +- group = amtk_shortcuts_group_new (_("Tabs and Windows")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.new-tab")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.new-window")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "no-gaction-prev-tab")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "no-gaction-next-tab")); +- 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)); +- +- group = amtk_shortcuts_group_new (_("Miscellaneous")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.print")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.show-sidebar")); +- gtk_container_add (section, GTK_WIDGET (group)); +- +- group = amtk_shortcuts_group_new (_("General")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "app.help")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "no-gaction-open-menu")); +- gtk_container_add (group, amtk_factory_create_shortcut (factory, "win.shortcuts-window")); +- 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) + { + DhWindowPrivate *priv = dh_window_get_instance_private (window); + GPropertyAction *property_action; + + const GActionEntry win_entries[] = { + /* Tabs */ + { "new-tab", new_tab_cb }, + { "next-tab", next_tab_cb }, + { "prev-tab", prev_tab_cb }, + { "go-to-tab", go_to_tab_cb, "q" }, + { "print", print_cb }, + { "close-tab", close_tab_cb }, + + /* Edit */ + { "copy", copy_cb }, + { "find", find_cb }, + + /* View */ + { "zoom-in", zoom_in_cb }, + { "zoom-out", zoom_out_cb }, + { "zoom-default", zoom_default_cb }, + { "focus-search", focus_search_cb }, + + /* 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); + + property_action = g_property_action_new ("show-window-menu", +- priv->menu_button, ++ priv->window_menu_button, + "active"); + g_action_map_add_action (G_ACTION_MAP (window), G_ACTION (property_action)); + g_object_unref (property_action); + } + +-static GMenuModel * +-create_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_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")); +- /* Keep the Quit menu item. The GNOME goal recommends to remove it: +- * https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement +- * “There is no need for the Quit menu item and the recommendation is to +- * remove it from all locations.” +- * In Devhelp, there *is* a need for the Quit menu item: after +- * installing/uninstalling books on the filesystem, it may be necessary +- * to restart Devhelp because the file monitoring is not perfect, see +- * the class description of DhBookListDirectory. Instead of closing the +- * Devhelp windows one by one, it's simpler to quit the whole +- * application at once. But this can be fixed by adding a “reload books” +- * action. +- * Another use-case with the Quit menu item is when the app bugs, just +- * restarting the app will most probably fix the problem (and then the +- * user needs to avoid repeating the actions that make the app to bug). +- */ +- 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_hbox; +- GtkStyleContext *style_context; +- GtkWidget *back_button; +- GtkWidget *forward_button; +- GMenuModel *menu; +- GtkWidget *new_tab_button; +- +- g_assert (priv->header_bar == NULL); +- g_assert (priv->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_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); +- style_context = gtk_widget_get_style_context (back_forward_hbox); +- // Test also in RTL (right-to-left) text. It needs to be a GtkBox. +- 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_hbox), back_button); +- gtk_container_add (GTK_CONTAINER (back_forward_hbox), forward_button); +- gtk_header_bar_pack_start (priv->header_bar, back_forward_hbox); +- +- /* Menu */ +- priv->menu_button = GTK_MENU_BUTTON (gtk_menu_button_new ()); +- gtk_menu_button_set_direction (priv->menu_button, GTK_ARROW_NONE); +- gtk_header_bar_pack_end (priv->header_bar, GTK_WIDGET (priv->menu_button)); +- +- menu = create_menu (); +- gtk_menu_button_set_menu_model (priv->menu_button, menu); +- g_object_unref (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, + DhWindow *window) + { + if (web_view == get_active_web_view (window)) + update_window_title (window); + } + + static void + web_view_zoom_level_notify_cb (DhWebView *web_view, + GParamSpec *pspec, + DhWindow *window) + { + if (web_view == get_active_web_view (window)) + update_zoom_actions_sensitivity (window); + } + + static void + notebook_page_added_after_cb (GtkNotebook *notebook, + GtkWidget *child, + guint page_num, + DhWindow *window) + { + DhTab *tab; + DhWebView *web_view; + WebKitBackForwardList *back_forward_list; + + g_return_if_fail (DH_IS_TAB (child)); + +@@ -628,118 +469,116 @@ notebook_page_added_after_cb (GtkNotebook *notebook, + G_CALLBACK (update_back_forward_actions_sensitivity), + window, + G_CONNECT_AFTER | G_CONNECT_SWAPPED); + } + + static void + notebook_page_removed_after_cb (GtkNotebook *notebook, + GtkWidget *child, + guint page_num, + DhWindow *window) + { + if (gtk_notebook_get_n_pages (notebook) == 0) + gtk_window_close (GTK_WINDOW (window)); + } + + static void + notebook_switch_page_after_cb (GtkNotebook *notebook, + GtkWidget *new_page, + guint new_page_num, + DhWindow *window) + { + update_window_title (window); + update_zoom_actions_sensitivity (window); + update_back_forward_actions_sensitivity (window); + } + + 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)); ++ ++ add_actions (window); + +- /* Horizontal paned */ +- hpaned = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_HORIZONTAL)); ++ 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); + + g_signal_connect_after (priv->notebook, + "page-added", + G_CALLBACK (notebook_page_added_after_cb), + window); + + g_signal_connect_after (priv->notebook, + "page-removed", + G_CALLBACK (notebook_page_removed_after_cb), + window); + + g_signal_connect_after (priv->notebook, + "switch-page", + G_CALLBACK (notebook_switch_page_after_cb), + 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); + + dh_notebook_open_new_tab (priv->notebook, NULL, TRUE); + + /* Focus search in sidebar by default. */ + dh_sidebar_set_search_focus (priv->sidebar); + } + + GtkWidget * + dh_window_new (GtkApplication *application) + { + DhWindow *window; + DhSettingsApp *settings; + + g_return_val_if_fail (GTK_IS_APPLICATION (application), NULL); + + window = g_object_new (DH_TYPE_WINDOW, + "application", application, + NULL); + + settings = dh_settings_app_get_singleton (); + gtk_widget_realize (GTK_WIDGET (window)); + dh_util_window_settings_restore (GTK_WINDOW (window), + dh_settings_app_peek_window_settings (settings)); + + return GTK_WIDGET (window); + } + + void +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 @@ ++ ++ ++ ++ ++
++ ++ _Side Panel ++ win.show-sidebar ++ ++
++
++ ++ _Print ++ win.print ++ ++ ++ _Find ++ win.find ++ ++
++
++ ++ _Larger Text ++ win.zoom-in ++ ++ ++ S_maller Text ++ win.zoom-out ++ ++ ++ _Normal Size ++ win.zoom-default ++ ++
++
++ ++
++ ++ New _Window ++ app.new-window ++ ++
++
++ ++ _Side Panel ++ win.show-sidebar ++ ++
++
++ ++ _Print ++ win.print ++ ++ ++ _Find ++ win.find ++ ++
++
++ ++ _Larger Text ++ win.zoom-in ++ ++ ++ S_maller Text ++ win.zoom-out ++ ++ ++ _Normal Size ++ win.zoom-default ++ ++
++
++ ++ _Preferences ++ app.preferences ++ ++
++
++ ++ _Keyboard Shortcuts ++ win.show-help-overlay ++ ++ ++ _Help ++ app.help ++ ++ ++ _About Devhelp ++ app.about ++ ++ ++ _Quit ++ app.quit ++ ++
++
++ ++
+diff --git a/src/dh.gresource.xml b/src/dh.gresource.xml +index 78fda590..d59c7663 100644 +--- a/src/dh.gresource.xml ++++ b/src/dh.gresource.xml +@@ -1,15 +1,20 @@ + + + + + dh-assistant.ui + dh-preferences.ui ++ dh-window.ui ++ ++ ++ help-overlay.ui ++ menus.ui + + +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 @@ ++ ++ ++ ++ ++ 1 ++ ++ ++ 1 ++ shortcuts ++ 10 ++ ++ ++ 1 ++ General ++ ++ ++ 1 ++ <Control>K ++ Focus global search ++ ++ ++ ++ ++ 1 ++ <Control>F ++ Find in current page ++ ++ ++ ++ ++ 1 ++ <Control>N ++ Open a new window ++ ++ ++ ++ ++ 1 ++ <Control>T ++ Open a new tab ++ ++ ++ ++ ++ 1 ++ F9 ++ Toggle side panel visibility ++ ++ ++ ++ ++ 1 ++ <alt>Left ++ Go back ++ ++ ++ ++ ++ 1 ++ <alt>Right ++ Go forward ++ ++ ++ ++ ++ 1 ++ <Control>P ++ Print ++ ++ ++ ++ ++ 1 ++ <Control>W ++ Close the current window ++ ++ ++ ++ ++ 1 ++ <Control>Q ++ Close all windows ++ ++ ++ ++ ++ ++ ++ 1 ++ Zoom ++ ++ ++ 1 ++ <ctrl>plus ++ Zoom in ++ ++ ++ ++ ++ 1 ++ <ctrl>minus ++ Zoom out ++ ++ ++ ++ ++ 1 ++ <ctrl>0 ++ Reset Zoom ++ ++ ++ ++ ++ ++ ++ ++ +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 @@ ++ ++ ++ ++ ++ ++ ++ ++
++ ++ New _Window ++ app.new-window ++ ++
++
++ ++ _Preferences ++ app.preferences ++ ++
++
++ ++ _Keyboard Shortcuts ++ win.show-help-overlay ++ ++ ++ _Help ++ app.help ++ ++ ++ _About ++ app.about ++ ++ ++ _Quit ++ app.quit ++ ++
++
++
+-- +2.31.1 + diff --git a/SPECS/devhelp.spec b/SPECS/devhelp.spec new file mode 100644 index 0000000..4fc4d86 --- /dev/null +++ b/SPECS/devhelp.spec @@ -0,0 +1,847 @@ +%global tarball_version %%(echo %{version} | tr '~' '.') + +Name: devhelp +Epoch: 1 +Version: 40.0 +Release: 3%{?dist} +Summary: API documentation browser + +License: GPLv3+ +URL: https://wiki.gnome.org/Apps/Devhelp +Source0: https://download.gnome.org/sources/%{name}/40/%{name}-%{tarball_version}.tar.xz + +BuildRequires: chrpath +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: gobject-introspection-devel +BuildRequires: gtk-doc +BuildRequires: itstool +BuildRequires: meson +BuildRequires: pkgconfig(gsettings-desktop-schemas) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(webkit2gtk-4.0) +BuildRequires: libappstream-glib + +Requires: devhelp-libs%{?_isa} = %{epoch}:%{version}-%{release} + +# https://gitlab.gnome.org/GNOME/devhelp/-/merge_requests/21 +Patch10001: 0001-Revert-Revert-Revert-the-introduction-of-the-amtk-li.patch + +%description +Devhelp is an API documentation browser for the GNOME desktop. +It works natively with API documentation generated by gtk-doc. + +%package libs +Summary: Library to embed Devhelp in other applications + +%description libs +Devhelp is an API documentation browser for the GNOME desktop. +This package contains a library that can be used for embedding devhelp +into other applications such as IDEs. + +%package devel +Summary: Library to embed Devhelp in other applications - Development files +Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} + +%description devel +Devhelp is an API documentation browser for the GNOME desktop. +This package contains the development files for the library that can be used +for embedding devhelp into other applications such as IDEs. + +%prep +%autosetup -p1 -n %{name}-%{tarball_version} + +%build +%meson \ +%if 0%{?flatpak} + -Dflatpak_build=true \ +%endif + -Dgtk_doc=true \ + -Dplugin_gedit=true \ + %{nil} + +%meson_build + +%install +%meson_install + +mkdir -p $RPM_BUILD_ROOT%{_datadir}/devhelp/books + +chrpath --delete $RPM_BUILD_ROOT%{_bindir}/devhelp + +%find_lang devhelp --with-gnome + +%check +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/org.gnome.Devhelp.appdata.xml +desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Devhelp.desktop + +%files +%doc AUTHORS NEWS README.md +%license LICENSES/* + +%{_bindir}/devhelp + +%{_datadir}/applications/org.gnome.Devhelp.desktop +%{_datadir}/dbus-1/services/org.gnome.Devhelp.service +%{_datadir}/devhelp +%{_datadir}/glib-2.0/schemas/org.gnome.devhelp.gschema.xml +%{_datadir}/icons/hicolor/scalable/apps/org.gnome.Devhelp.svg +%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Devhelp-symbolic.svg +%{_datadir}/metainfo/org.gnome.Devhelp.appdata.xml + +%dir %{_libdir}/gedit +%dir %{_libdir}/gedit/plugins +%{_libdir}/gedit/plugins/devhelp.* +%{_mandir}/man1/devhelp.1* + +%files libs -f devhelp.lang +%{_libdir}/libdevhelp-3.so.6* +%{_libdir}/girepository-1.0/Devhelp-3.0.typelib +%{_datadir}/glib-2.0/schemas/org.gnome.libdevhelp-3.gschema.xml + +%files devel +%{_includedir}/devhelp-3/ +%{_libdir}/libdevhelp-3.so +%{_libdir}/pkgconfig/* +%{_datadir}/gtk-doc/* +%{_datadir}/gir-1.0/Devhelp-3.0.gir + +%changelog +* Mon Aug 09 2021 Mohan Boddu - 1:40.0-3 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Mon Jun 14 2021 Eike Rathke - 1:40.0-2 +- Resolves: rhbz#1971430 Update license to GPLv3+ + +* Thu Apr 15 2021 Ray Strode - 1:40.0-1 +- Update to 40.0 +- Drop amtk dependency + Related: #1948445 + +* Thu Apr 15 2021 Mohan Boddu - 1:40~alpha-2 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Fri Feb 19 2021 Kalev Lember - 1:40~alpha-1 +- Update to 40.alpha + +* Tue Jan 26 2021 Fedora Release Engineering - 1:3.38.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Nov 25 2020 Kalev Lember - 1:3.38.1-1 +- Update to 3.38.1 + +* Fri Sep 11 2020 Kalev Lember - 1:3.38.0-1 +- Update to 3.38.0 + +* Mon Jul 27 2020 Fedora Release Engineering - 1:3.37.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri May 29 2020 Kalev Lember - 1:3.37.1-1 +- Update to 3.37.1 + +* Sat Apr 25 2020 Kalev Lember - 1:3.36.2-1 +- Update to 3.36.2 + +* Fri Mar 27 2020 Kalev Lember - 1:3.36.1-1 +- Update to 3.36.1 + +* Thu Mar 05 2020 Kalev Lember - 1:3.36.0-1 +- Update to 3.36.0 + +* Tue Feb 04 2020 Kalev Lember - 1:3.35.90-1 +- Update to 3.35.90 + +* Tue Jan 28 2020 Fedora Release Engineering - 1:3.34.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Sep 09 2019 Kalev Lember - 1:3.34.0-1 +- Update to 3.34.0 + +* Wed Jul 24 2019 Fedora Release Engineering - 1:3.32.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Mar 11 2019 Kalev Lember - 1:3.32.0-1 +- Update to 3.32.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 1:3.30.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Oct 31 2018 Kalev Lember - 1:3.30.1-2 +- Fix typo that prevented macro expansion + +* Fri Oct 26 2018 Kalev Lember - 1:3.30.1-1 +- Update to 3.30.1 + +* Fri Sep 07 2018 Kalev Lember - 1:3.30.0-2 +- Rebuilt against fixed atk (#1626575) + +* Fri Sep 07 2018 Kalev Lember - 1:3.30.0-1 +- Update to 3.30.0 +- Switch to the meson build system +- Use upstream screenshots in appdata +- Drop ldconfig scriptlets + +* Thu Jul 12 2018 Fedora Release Engineering - 1:3.28.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Apr 08 2018 Kalev Lember - 1:3.28.1-1 +- Update to 3.28.1 + +* Sun Mar 11 2018 Kalev Lember - 1:3.28.0-1 +- Update to 3.28.0 + +* Tue Mar 06 2018 Kalev Lember - 1:3.27.90-1 +- Update to 3.27.90 + +* Wed Feb 07 2018 Fedora Release Engineering - 1:3.26.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 1:3.26.1-3 +- Switch to %%ldconfig_scriptlets + +* Fri Jan 05 2018 Igor Gnatenko - 1:3.26.1-2 +- Remove obsolete scriptlets + +* Mon Dec 11 2017 Kalev Lember - 1:3.26.1-1 +- Update to 3.26.1 + +* Sun Sep 10 2017 Kalev Lember - 1:3.26.0-1 +- Update to 3.26.0 + +* Fri Aug 25 2017 Kalev Lember - 1:3.25.91-1 +- Update to 3.25.91 + +* Sun Aug 06 2017 Kalev Lember - 1:3.25.2-1 +- Update to 3.25.2 +- Tighten soname globs + +* Wed Aug 02 2017 Fedora Release Engineering - 1:3.25.2-0.3.git56f8389 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1:3.25.2-0.2.git56f8389 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Kalev Lember - 1:3.25.2-0.1.git56f8389 +- Update to 3.25.2 git snapshot + +* Mon Jun 12 2017 Kalev Lember - 1:3.25.1-1 +- Update to 3.25.1 + +* Tue Mar 21 2017 Kalev Lember - 1:3.24.0-1 +- Update to 3.24.0 + +* Thu Mar 16 2017 Kalev Lember - 1:3.23.92-1 +- Update to 3.23.92 + +* Mon Feb 27 2017 Richard Hughes - 1:3.23.91-1 +- Update to 3.23.91 + +* Fri Feb 10 2017 Fedora Release Engineering - 1:3.22.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Sep 19 2016 Kalev Lember - 1:3.22.0-1 +- Update to 3.22.0 + +* Thu Sep 15 2016 Kalev Lember - 1:3.21.92-1 +- Update to 3.21.92 + +* Wed Aug 31 2016 David King - 3.21.91-1 +- Update to 3.21.91 + +* Wed Aug 17 2016 Kalev Lember - 1:3.21.90-1 +- Update to 3.21.90 + +* Wed Aug 17 2016 Kalev Lember - 1:3.20.0-3 +- Run ldconfig for the new -libs subpackage + +* Sat Apr 02 2016 Mathieu Bridon - 1:3.20.0-2 +- Split the libs into their own subpackages, so that installing a dependent + application (e.g Builder) does not bring in the Devhelp app. + +* Sun Mar 20 2016 Kalev Lember - 1:3.20.0-1 +- Update to 3.20.0 + +* Tue Mar 15 2016 Richard Hughes - 1:3.19.92-1 +- Update to 3.19.92 + +* Mon Feb 15 2016 David King - 3.19.90-1 +- Update to 3.19.90 + +* Wed Feb 03 2016 Fedora Release Engineering - 1:3.19.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Dec 14 2015 Kalev Lember - 1:3.19.3-1 +- Update to 3.19.3 + +* Tue Oct 13 2015 Kalev Lember - 1:3.18.1-1 +- Update to 3.18.1 + +* Mon Sep 21 2015 Kalev Lember - 1:3.18.0-1 +- Update to 3.18.0 + +* Tue Sep 01 2015 Kalev Lember - 1:3.17.91-1 +- Update to 3.17.91 +- Use make_install macro + +* Wed Jun 24 2015 David King - 1:3.17.3-1 +- Update to 3.17.3 +- Add AppData validation in check +- Preserve timestamps during install + +* Wed Jun 17 2015 Fedora Release Engineering - 1:3.16.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Apr 14 2015 Kalev Lember - 1:3.16.1-1 +- Update to 3.16.1 + +* Mon Mar 30 2015 Richard Hughes - 1:3.16.0-2 +- Use better AppData screenshots + +* Mon Mar 23 2015 Kalev Lember - 1:3.16.0-1 +- Update to 3.16.0 + +* Tue Mar 17 2015 Kalev Lember - 1:3.15.92-1 +- Update to 3.15.92 + +* Wed Mar 04 2015 Kalev Lember - 1:3.15.91-1 +- Update to 3.15.91 + +* Mon Feb 16 2015 David King - 1:3.15.90-1 +- Update to 3.15.90 +- Update URL +- Use license macro for COPYING +- Use pkgconfig for BuildRequires + +* Mon Sep 22 2014 Kalev Lember - 1:3.14.0-1 +- Update to 3.14.0 + +* Tue Sep 16 2014 Kalev Lember - 1:3.13.92-1 +- Update to 3.13.92 + +* Sun Aug 24 2014 Kalev Lember - 1:3.13.90-1 +- Update to 3.13.90 + +* Fri Aug 22 2014 Kalev Lember - 1:3.13.4-4 +- Update pkgconfig deps for webkitgtk4 + +* Fri Aug 22 2014 Kalev Lember - 1:3.13.4-3 +- Switch to webkitgtk4 +- Remove lib64 rpaths + +* Sat Aug 16 2014 Fedora Release Engineering - 1:3.13.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jul 22 2014 Kalev Lember - 1:3.13.4-1 +- Update to 3.13.4 + +* Sat Jun 07 2014 Fedora Release Engineering - 1:3.12.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Apr 16 2014 Kalev Lember - 1:3.12.1-1 +- Update to 3.12.1 + +* Mon Mar 24 2014 Richard Hughes - 1:3.12.0-1 +- Update to 3.12.0 + +* Tue Mar 18 2014 Richard Hughes - 1:3.11.92-1 +- Update to 3.11.92 + +* Tue Mar 04 2014 Richard Hughes - 1:3.11.91-1 +- Update to 3.11.91 + +* Wed Jan 15 2014 Richard Hughes - 1:3.11.4-1 +- Update to 3.11.4 + +* Thu Nov 14 2013 Richard Hughes - 1:3.10.2-1 +- Update to 3.10.2 + +* Sun Oct 13 2013 Matthew Barnes - 1:3.10.0-2 +- Package vim and emacs support files. (#980448) + +* Wed Sep 25 2013 Kalev Lember - 1:3.10.0-1 +- Update to 3.10.0 + +* Tue Sep 03 2013 Kalev Lember - 1:3.9.91-1 +- Update to 3.9.91 + +* Thu Aug 22 2013 Kalev Lember - 1:3.9.90-1 +- Update to 3.9.90 + +* Fri Aug 09 2013 Kalev Lember - 1:3.9.5-1 +- Update to 3.9.5 + +* Sat Aug 03 2013 Fedora Release Engineering - 1:3.9.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 16 2013 Matthias Clasen - 1:3.9.4-2 +- Update url + +* Tue Jul 16 2013 Richard Hughes - 1:3.9.4-1 +- Update to 3.9.4 + +* Wed May 22 2013 Kalev Lember - 1:3.8.2-1 +- Update to 3.8.2 + +* Wed Apr 17 2013 Richard Hughes - 1:3.8.1-1 +- Update to 3.8.1 + +* Wed Mar 27 2013 Kalev Lember - 1:3.8.0-2 +- Rebuilt for libwebkit2gtk soname bump + +* Tue Mar 26 2013 Kalev Lember - 1:3.8.0-1 +- Update to 3.8.0 + +* Thu Mar 7 2013 Matthias Clasen - 1:3.7.91-1 +- Update to 3.7.91 + +* Fri Feb 22 2013 Kalev Lember - 1:3.7.5-2 +- Rebuilt for libwebkit2gtk soname bump + +* Wed Feb 06 2013 Kalev Lember - 1:3.7.5-1 +- Update to 3.7.5 +- Remove the desktop file vendor prefix + +* Fri Dec 21 2012 Kalev Lember - 1:3.7.3-1 +- Update to 3.7.3 +- Adapt for the GConf to gsettings conversion + +* Wed Nov 14 2012 Kalev Lember - 1:3.6.1-1 +- Update to 3.6.1 +- Drop manual requires from -devel package; these are all picked up + automatically with recent rpmbuild + +* Tue Sep 25 2012 Richard Hughes - 1:3.6.0-1 +- Update to 3.6.0 + +* Tue Sep 18 2012 Kalev Lember - 1:3.5.92-1 +- Update to 3.5.92 + +* Tue Aug 21 2012 Richard Hughes - 1:3.5.5-1 +- Update to 3.5.5 + +* Mon Jul 23 2012 Matthias Clasen - 1:3.4.1-3 +- Fix build (don't install icon cache) + +* Wed Jul 18 2012 Fedora Release Engineering - 1:3.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Apr 16 2012 Richard Hughes - 1:3.4.1-1 +- Update to 3.4.1 + +* Tue Mar 27 2012 Debarshi Ray - 1:3.4.0-1 +- Update to 3.4.0 + +* Tue Mar 6 2012 Matthias Clasen - 1:3.3.91-1 +- Update to 3.3.91 + +* Fri Jan 13 2012 Fedora Release Engineering - 1:3.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Dec 21 2011 Matthias Clasen - 1:3.3.3-1 +- Update to 3.3.3 + +* Tue Oct 11 2011 Matthew Barnes - 1:3.2.0-2 +- Own /usr/lib/gedit and /usr/lib/gedit/plugins (RH bug #744884). + +* Tue Sep 27 2011 Ray - 1:3.2.0-1 +- Update to 3.2.0 + +* Sat May 07 2011 Christopher Aillon - 1:3.0.0-2 +- Update icon cache scriptlet + +* Mon Apr 4 2011 Tomas Bzatek - 3.0.0-1 +- Update to 3.0.0 + +* Wed Mar 23 2011 Matthias Clasen - 2.91.92-1 +- Update to 2.91.92 + +* Tue Mar 8 2011 Matthias Clasen - 2.91.91.2-1 +- Update to 2.91.91.2 + +* Tue Mar 8 2011 Matthias Clasen - 2.91.91.1-1 +- Update to 2.91.91.1 + +* Tue Mar 8 2011 Matthias Clasen - 2.91.91-1 +- Update to 2.91.91 + +* Tue Feb 22 2011 Matthias Clasen - 2.91.90-1 +- 2.91.90 + +* Thu Feb 10 2011 Matthias Clasen - 2.91.5-4 +- Rebuild for newer gtk + +* Tue Feb 08 2011 Fedora Release Engineering - 1:2.91.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Feb 2 2011 Matthias Clasen - 2.91.5-2 +- Rebuild + +* Mon Jan 10 2011 Matthias Clasen - 2.91.5-1 +- Update to 2.91.5 + +* Sun Jan 9 2011 Matthias Clasen - 2.91.4-1 +- Update to 2.91.4 + +* Fri Dec 3 2010 Matthias Clasen - 2.91.3-1 +- Update to 2.91.3 + +* Mon Nov 15 2010 Kalev Lember - 2.90.5-6 +- Carry epoch over from F14 branch to preserve upgrade path +- Backported upstream patches to fix build with latest gtk3 + +* Thu Sep 09 2010 Bastien Nocera 2.90.5-5 +- Fix broken schemas file, and "disabled_books" usage (#624198) + +* Mon Aug 23 2010 Matthias Clasen - 2.90.5-4 +- Incorporate a few upstream fixes + +* Wed Aug 11 2010 David Malcolm - 2.90.5-3 +- recompiling .py files against Python 2.7 (rhbz#623286) + +* Wed Jul 14 2010 Matthias Clasen - 2.90.5-2 +- Fix platform check to work with GTK3 + +* Wed Jul 14 2010 Matthias Clasen - 2.90.5-1 +- Update to 2.90.5 + +* Sat Jul 3 2010 Matthias Clasen - 2.30.0-2 +- Rebuild against new webkit + +* Mon Mar 29 2010 Matthias Clasen - 2.30.0-1 +- Update to 2.30.0 + +* Mon Feb 08 2010 Matthew Barnes - 2.29.90-1 +- Update to 2.29.90 +- Remove patch for RH bug #543177 (fixed upstream). + +* Wed Dec 02 2009 Matthew Barnes - 2.29.3-2 +- Add patch for RH bug #543177 (missing webkit-1.0 requirement). + +* Tue Dec 01 2009 Bastien Nocera 2.29.3-1 +- Update to 2.29.3 + +* Mon Sep 21 2009 Matthias Clasen - 2.28.0-1 +- Update to 2.28.0 + +* Mon Sep 7 2009 Matthias Clasen - 2.27.92-1 +- Update to 2.27.92 + +* Fri Aug 21 2009 Matthew Barnes - 0.23.1-2 +- Remove patch for GNOME bug #572022 to help fix RH bug #518481. + +* Wed Aug 12 2009 Matthew Barnes - 0.23.1-1 +- Update to 0.23.1 +- Remove patch for GNOME bug #588655 (fixed upstream). + +* Fri Jul 24 2009 Fedora Release Engineering - 0.23-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 15 2009 Matthew Barnes - 0.23-8 +- Add patch for GNOME bug #588655 (work around GLib deprecations). + +* Thu Jul 2 2009 Matthias Clasen - 0.23-7 +- Shrink GConf schemas + +* Sun Mar 08 2009 Rakesh Pandit - 0.23-6 +Bumped to consume new soname in webkit library. + +* Tue Feb 24 2009 Fedora Release Engineering - 0.23-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 16 2009 Matthew Barnes - 0.23-4 +- Disable strict-aliasing checks due to what looks like GLib breakage. + +* Mon Feb 16 2009 - Bastien Nocera - 0.23-3 +- Fix displaying web pages, WebKit doesn't like local filenames as URIs +- Add missing Gconf2-devel BR + +* Fri Jan 23 2009 Matthias Clasen - 0.23-2 +- Cosmetic spec fixes + +* Mon Jan 19 2009 Matthew Barnes - 0.23-1 +- Update to 0.23 + +* Fri Dec 05 2008 Matthew Barnes - 0.22-2 +- Drop the gecko requirement, since it uses WebKit now. + +* Mon Dec 01 2008 Matthew Barnes - 0.22-1 +- Update to 0.22 +- Add BR: WebKit-gtk-devel + +* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 0.21-4 +- Rebuild for Python 2.6 + +* Fri Nov 21 2008 Matthias Clasen - 0.21-3 +- Tweak description + +* Wed Sep 24 2008 Matthias Clasen - 0.21-2 +- Rebuild against newer gecko + +* Mon Sep 22 2008 Matthias Clasen - 0.21-1 +- Update to 0.21 + +* Mon Sep 8 2008 Matthias Clasen - 0.20-1 +- Update to 0.20 + +* Wed Jul 23 2008 Christopher Aillon - 0.19.1-3 +- Rebuild against newer gecko + +* Mon Jul 07 2008 Matthew Barnes - 0.19.1-2 +- Rebuild, just to keep up with F9 package. + +* Mon May 26 2008 Matthew Barnes - 0.19.1-1 +- Update to 0.19.1 + +* Sun May 4 2008 Matthias Clasen - 0.19-5 +- Fix source url + +* Tue Feb 26 2008 Martin Stransky - 0.19-4 +- Rebuild against xulrunner + +* Tue Feb 19 2008 Fedora Release Engineering - 0.19-3 +- Autorebuild for GCC 4.3 + +* Sun Feb 17 2008 Matthew Barnes - 0.19-2.fc9 +- Rebuild with GCC 4.3 + +* Thu Feb 07 2008 Matthew Barnes - 0.19-1.fc9 +- Update to 0.19 + +* Wed Jan 30 2008 Matthias Clasen - 0.18-1 +- Update to 0.18 + +* Wed Jan 16 2008 Matthew Barnes - 0.17-2.fc9 +- Update version requirements based on configure.in. + +* Mon Jan 07 2008 Matthew Barnes - 0.17-1.fc9 +- Update to 0.17 +- Remove patch for GNOME bug #499050 (fixed upstream). + +* Mon Dec 31 2007 Jeremy Katz - 0.16.1-5 +- Rebuild against newer xulrunner + +* Thu Nov 22 2007 Martin Stransky - 0.16.1-4.fc9 +- Rebuild against xulrunner + +* Fri Nov 09 2007 Matthew Barnes - 0.16.1-3.fc9 +- Rebuild against gecko-libs 1.8.1.9. + +* Thu Nov 01 2007 Matthew Barnes - 0.16.1-2.fc9 +- Rebuild against gecko-libs 1.8.1.8. + +* Sat Oct 06 2007 Matthew Barnes - 0.16.1-1.fc8 +- Update to 0.16.1 + +* Tue Sep 11 2007 Matthew Barnes - 0.16-1.fc8 +- Update to 0.16 + +* Wed Aug 8 2007 Christopher Aillon - 0.15-4 +- Rebuild against newer gecko + +* Mon Aug 6 2007 Matthias Clasen - 0.15-3 +- Update license field + +* Fri Jul 20 2007 Kai Engert - 0.15-2.fc8 +- Rebuild against newer gecko + +* Mon Jun 18 2007 Matthew Barnes - 0.15-1.fc8 +- Update to 0.15 + +* Tue Jun 05 2007 - Bastien Nocera - 0.14-4 +- Rebuild again + +* Mon Jun 04 2007 - Bastien Nocera - 0.14-3 +- Rebuild against new libwnck + +* Fri May 25 2007 Christopher Aillon - 0.14-2 +- Rebuild against newer gecko + +* Fri May 18 2007 Matthew Barnes - 0.14-1.fc8 +- Update to 0.14 +- Remove patch for RH bug #230837 (fixed upstream). + +* Mon Apr 23 2007 Matthew Barnes - 0.13-7.fc7 +- Add patch for RH bug #230837 (initialize GThread). + +* Sat Apr 21 2007 Matthias Clasen - 0.13-6 +- Don't install INSTALL + +* Fri Mar 23 2007 Christopher Aillon - 0.13-5 +- Rebuild against newer gecko + +* Wed Feb 28 2007 Matthew Barnes - 0.13-4 +- Rebuild against newer gecko. + +* Mon Feb 5 2007 Matthias Clasen - 0.13-3 +- Fix scriptlet errors + +* Sun Feb 04 2007 Matthew Barnes - 0.13-2.fc7 +- Incorporate suggestions from package review. + +* Sat Feb 03 2007 Matthew Barnes - 0.13-1.fc7 +- Update to 0.13 +- Clean up the spec file. +- Remove devhelp-0.12-transparent.patch (fixed upstream). + +* Thu Dec 21 2006 Christopher Aillon 0.12-10 +- Rebuild against newer gecko + +* Sat Nov 25 2006 Matthias Clasen - 0.12-9 +- Own the /usr/share/devhelp/books directory + +* Fri Oct 27 2006 Christopher Aillon - 0.12-8 +- Rebuild against newer gecko + +* Wed Oct 18 2006 Matthias Clasen - 0.12-7 +- Fix scripts according to the packaging guidelines +- Require pkgconfig in the -devel package + +* Thu Oct 12 2006 Christopher Aillon - 0.12-6.fc6 +- Update requires to the virtual gecko version instead of a specific app + +* Thu Sep 14 2006 Christopher Aillon - 0.12-5.fc6 +- Rebuild + +* Mon Aug 14 2006 Matthias Clasen - 0.12-4.fc6 +- Fix transparent headers + +* Mon Aug 14 2006 Matthew Barnes - 0.12-3 +- Add missing Requires to devel package. + +* Thu Aug 10 2006 Matthew Barnes - 0.12-2 +- Rebuild against firefox, again. + +* Sat Jul 29 2006 Matthias Clasen - 0.12-1 +- Update to 0.12 +- Rebuild against firefox + +* Wed Jul 12 2006 Jesse Keating - 0.11-4 +- rebuild +- bump mozver + +* Sun Feb 12 2006 Christopher Aillon - 0.11-2 +- Rebuild + +* Tue Feb 07 2006 Jesse Keating - 0.11-1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Sun Dec 18 2005 Ray Strode - 0.11-1 +- Update to 0.11 + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Tue Oct 18 2005 Christopher Aillon - 0.10-6 +- Build on ppc64 + +* Wed Aug 17 2005 Jeremy Katz - 0.10-5 +- fix the build + +* Wed Aug 17 2005 Ray Strode 0.10.0-4 +- rebuild + +* Sun Jul 31 2005 Christopher Aillon 0.10.0-3 +- Rebuild against new mozilla + +* Tue Jul 19 2005 Christopher Aillon 0.10.0-2 +- Rebuild against new mozilla +- Add builds for ia64 s390 s390x + +* Thu May 19 2005 Ray Strode 0.10.0-1 +- Update to 0.10.0 (bug #157753) + +* Fri May 13 2005 Christopher Aillon 0.9.3-7 +- Depend on mozilla 1.7.8 + +* Sat Apr 16 2005 Christopher Aillon 0.9.3-6 +- Depend on mozilla 1.7.7 + +* Thu Apr 14 2005 Ray Strode 0.9.3-5 +- Don't crash on typeahead (bug #154398) + +* Wed Mar 9 2005 Christopher Aillon 0.9.3-4 +- Depend on mozilla 1.7.6 + +* Sat Mar 5 2005 Christopher Aillon 0.9.3-3 +- Rebuild against GCC 4.0 + +* Sun Dec 19 2004 Christopher Aillon 0.9.3-2 +- Require mozilla 1.7.5 + +* Sun Dec 19 2004 Christopher Aillon 0.9.3-1 +- Update to 0.9.3 + +* Mon Oct 11 2004 Christopher Aillon 0.9.2-2 +- Rebuild to add ppc once again. + +* Wed Sep 29 2004 Christopher Aillon 0.9.2-1 +- Update to 0.9.2 +- Remove accel patch; its upstreamed now. + +* Sun Sep 26 2004 Christopher Blizzard 0.9.1-6 +- Rebuild without explicit mozilla release + +* Fri Sep 24 2004 Christopher Blizzard 0.9.1-5 +- Rebuild with explicit Mozilla version requires + +* Wed Sep 22 2004 Christopher Aillon 0.9.1-4 +- Rebuilt to pick up new mozilla changes +- Drop ppc from the build since mozilla doesn't build there anymore. + +* Wed Aug 25 2004 Christopher Aillon 0.9.1-3 +- Add Johan Svedberg's patch to add accelerators for back and forward + +* Mon Aug 09 2004 Christopher Aillon +- Rebuild + +* Wed Aug 04 2004 Christopher Aillon +- Update to 0.9.1 +- Remove ld-library patch. It is upstream now. + +* Wed Jun 23 2004 Christopher Aillon +- Update ExclusiveArch + +* Tue Jun 22 2004 Christopher Aillon +- rebuilt + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Wed Apr 21 2004 Colin Walters 0.9-3 +- Update patch to avoid (unlikely) security issue noticed + by Jeremy Katz. + +* Thu Apr 15 2004 Colin Walters 0.9-2 +- Apply patch from George Karabin to + export LD_LIBRARY_PATH (closes bug 120220). + +* Fri Apr 2 2004 Mark McLoughlin 0.9-1 +- Update to 0.9 +- Install the schemas correctly +- Package /usr/bin/devhelp-bin +- Update requires/buildrequires +- Only build on platforms where mozilla is available + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Thu Feb 26 2004 Alexander Larsson 0.8.1-1 +- update to 0.8.1 + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Dec 1 2003 Jonathan Blandford 0.7.0-1 +- new version +- Remove .la and .a files. + +* Wed Jul 30 2003 Jonathan Blandford +- remove original devhelp desktop file. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Sat May 24 2003 Florian La Roche +- add find_lang