[gthumb] shortcuts: make search and slideshow shortcuts customizable
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] shortcuts: make search and slideshow shortcuts customizable
- Date: Sun, 24 Nov 2019 12:33:08 +0000 (UTC)
commit 06c8f0921f2403039af86747a6017102907fdb9d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Nov 16 10:43:36 2019 +0100
shortcuts: make search and slideshow shortcuts customizable
extensions/search/callbacks.c | 12 +++++++++++-
extensions/slideshow/callbacks.c | 11 ++++++++++-
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/extensions/search/callbacks.c b/extensions/search/callbacks.c
index a5315ce5..e3bb7030 100644
--- a/extensions/search/callbacks.c
+++ b/extensions/search/callbacks.c
@@ -40,6 +40,11 @@ static const GActionEntry actions[] = {
};
+static const GthShortcut shortcuts[] = {
+ { "find", N_("Find files"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER, GTH_SHORTCUT_CATEGORY_FILE_MANAGER,
"<Primary>f" },
+};
+
+
typedef struct {
GtkWidget *refresh_button;
} BrowserData;
@@ -63,12 +68,17 @@ search__gth_browser_construct_cb (GthBrowser *browser)
actions,
G_N_ELEMENTS (actions),
browser);
+
+ gth_window_add_shortcuts (GTH_WINDOW (browser),
+ shortcuts,
+ G_N_ELEMENTS (shortcuts));
+
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_COMMANDS,
"edit-find-symbolic",
_("Find files"),
"win.find",
- "<Control>F");
+ NULL);
data = g_new0 (BrowserData, 1);
g_object_set_data_full (G_OBJECT (browser), BROWSER_DATA_KEY, data, (GDestroyNotify)
browser_data_free);
diff --git a/extensions/slideshow/callbacks.c b/extensions/slideshow/callbacks.c
index 035ad5a6..98d750c9 100644
--- a/extensions/slideshow/callbacks.c
+++ b/extensions/slideshow/callbacks.c
@@ -35,6 +35,11 @@ static const GActionEntry actions[] = {
};
+static const GthShortcut shortcuts[] = {
+ { "slideshow", N_("Presentation"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER,
GTH_SHORTCUT_CATEGORY_FILE_MANAGER, "F5" },
+};
+
+
void
ss__gth_browser_construct_cb (GthBrowser *browser)
{
@@ -45,12 +50,16 @@ ss__gth_browser_construct_cb (GthBrowser *browser)
G_N_ELEMENTS (actions),
browser);
+ gth_window_add_shortcuts (GTH_WINDOW (browser),
+ shortcuts,
+ G_N_ELEMENTS (shortcuts));
+
gth_browser_add_header_bar_button (browser,
GTH_BROWSER_HEADER_SECTION_BROWSER_VIEW,
"view-presentation-symbolic",
_("Presentation"),
"win.slideshow",
- "F5");
+ NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]