diff --git a/0001-gl-application.c-add-four-shortcuts.patch b/0001-gl-application.c-add-four-shortcuts.patch new file mode 100644 index 0000000..3b24d6e --- /dev/null +++ b/0001-gl-application.c-add-four-shortcuts.patch @@ -0,0 +1,101 @@ +From 8b7f222e75d006cc3573c9b545c26d6fac56b5ce Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sabri=20=C3=9Cnal?= +Date: Fri, 3 Apr 2020 15:09:26 +0300 +Subject: [PATCH 1/2] gl-application.c: add four shortcuts + +F1: Help +Ctrl+E: Export +Ctrl+N: New window +Ctrl+question: Keyboard shortcuts +--- + src/gl-application.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/gl-application.c b/src/gl-application.c +index c20052c..b2ef1f7 100644 +--- a/src/gl-application.c ++++ b/src/gl-application.c +@@ -178,67 +178,80 @@ on_monospace_font_name_changed (GSettings *settings, + } + } + + static GActionEntry actions[] = { + { "new-window", on_new_window }, + { "help", on_help }, + { "about", on_about } + }; + + static void + gl_application_startup (GApplication *application) + { + g_action_map_add_action_entries (G_ACTION_MAP (application), actions, + G_N_ELEMENTS (actions), application); + + /* Calls gtk_init() with no arguments. */ + G_APPLICATION_CLASS (gl_application_parent_class)->startup (application); + + /* gtk_init() calls setlocale(), so gettext must be called after that. */ + g_set_application_name (_(PACKAGE_NAME)); + gtk_window_set_default_icon_name (PACKAGE_TARNAME); + } + + static void + gl_application_activate (GApplication *application) + { + GtkWidget *window; + GlApplicationPrivate *priv; + const gchar * const close_accel[] = { "w", NULL }; + const gchar * const search_accel[] = { "f", NULL }; ++ const gchar * const export_accel[] = { "e", NULL }; ++ const gchar * const help_accel[] = { "F1", NULL }; ++ const gchar * const new_window_accel[] = { "n", NULL }; ++ const gchar * const help_overlay_accel[] = { "question", NULL }; + + window = gl_window_new (GTK_APPLICATION (application)); + gtk_widget_show (window); + gtk_application_set_accels_for_action (GTK_APPLICATION (application), + "win.close", close_accel); + gtk_application_set_accels_for_action (GTK_APPLICATION (application), + "win.search", search_accel); ++ gtk_application_set_accels_for_action (GTK_APPLICATION (application), ++ "win.export", export_accel); ++ gtk_application_set_accels_for_action (GTK_APPLICATION (application), ++ "app.help", help_accel); ++ gtk_application_set_accels_for_action (GTK_APPLICATION (application), ++ "app.new-window", new_window_accel); ++ gtk_application_set_accels_for_action (GTK_APPLICATION (application), ++ "win.show-help-overlay", ++ help_overlay_accel); + + priv = gl_application_get_instance_private (GL_APPLICATION (application)); + + on_monospace_font_name_changed (priv->desktop, DESKTOP_MONOSPACE_FONT_NAME, + priv); + } + + static const GOptionEntry options[] = + { + { "version", 'v', 0, G_OPTION_ARG_NONE, NULL, + N_("Print version information and exit"), NULL }, + { NULL } + }; + + static gint + gl_application_handle_local_options (GApplication *application, + GVariantDict *options) + { + if (g_variant_dict_contains (options, "version")) + { + g_print ("%s - Version %s\n", g_get_application_name (), PACKAGE_VERSION); + return 0; + } + + return -1; + } + + static void + gl_application_finalize (GObject *object) + { +-- +2.35.1 + diff --git a/0002-help-overlay.ui-Add-three-shortcuts.patch b/0002-help-overlay.ui-Add-three-shortcuts.patch new file mode 100644 index 0000000..0c3a2d1 --- /dev/null +++ b/0002-help-overlay.ui-Add-three-shortcuts.patch @@ -0,0 +1,84 @@ +From df0c7e7e2475c05acac5bb491788e72eb5b850cb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sabri=20=C3=9Cnal?= +Date: Fri, 3 Apr 2020 15:17:28 +0300 +Subject: [PATCH 2/2] help-overlay.ui: Add three shortcuts + +F1: Show help +Ctrl+question: Keyboard shortcuts +Ctrl+e: Export logs to a file +--- + data/help-overlay.ui | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +diff --git a/data/help-overlay.ui b/data/help-overlay.ui +index 881503e..4427e7c 100644 +--- a/data/help-overlay.ui ++++ b/data/help-overlay.ui +@@ -1,42 +1,63 @@ + + + + + True + + + General + True + + + <Primary>n + Open a new window + True + + + + + <Primary>w + Close a window + True + + ++ ++ ++ F1 ++ Show help ++ True ++ ++ ++ ++ ++ <Primary>question ++ Keyboard shorcuts ++ True ++ ++ + + + + +- Search ++ Application + True + + + <Primary>f + Find + True + + ++ ++ ++ <Primary>e ++ Export logs to a file ++ True ++ ++ + + + + + + +-- +2.35.1 + diff --git a/gnome-logs.spec b/gnome-logs.spec index 0da9e8c..ee659b3 100644 --- a/gnome-logs.spec +++ b/gnome-logs.spec @@ -1,6 +1,6 @@ Name: gnome-logs Version: 3.36.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Log viewer for the systemd journal License: GPLv3+ @@ -11,6 +11,7 @@ BuildRequires: desktop-file-utils BuildRequires: docbook-dtds BuildRequires: docbook-style-xsl BuildRequires: gcc +BuildRequires: git BuildRequires: itstool BuildRequires: libxslt BuildRequires: meson @@ -19,11 +20,14 @@ BuildRequires: pkgconfig(libsystemd) BuildRequires: /usr/bin/appstream-util Requires: gsettings-desktop-schemas +Patch10001: 0001-gl-application.c-add-four-shortcuts.patch +Patch10002: 0002-help-overlay.ui-Add-three-shortcuts.patch + %description A log viewer for the systemd journal. %prep -%setup -q +%autosetup -S git %build @@ -55,6 +59,10 @@ A log viewer for the systemd journal. %changelog +* Wed Dec 14 2022 Ray Strode - 3.36.0-7 +- Fix shortcuts + Resolves: #2062860 + * Mon Aug 09 2021 Mohan Boddu - 3.36.0-6 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688