[gthumb: 2/5] grid view: restore the select/unselect all keyword shortcuts
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb: 2/5] grid view: restore the select/unselect all keyword shortcuts
- Date: Sat, 8 Aug 2020 19:22:25 +0000 (UTC)
commit 75f1c80ba50373a45aaa4396ab7d4104b3c6bb8f
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Jul 19 16:20:43 2020 +0200
grid view: restore the select/unselect all keyword shortcuts
This allows to use the same shortcuts wherever the widget is used, for
example in the import dialog as well. However now the shortcuts for
these commands are no longer editable.
gthumb/gth-browser-actions-entries.h | 4 ++--
gthumb/gth-grid-view.c | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gthumb/gth-browser-actions-entries.h b/gthumb/gth-browser-actions-entries.h
index 3a5bde009..fd7245287 100644
--- a/gthumb/gth-browser-actions-entries.h
+++ b/gthumb/gth-browser-actions-entries.h
@@ -124,8 +124,8 @@ static const GthShortcut gth_browser_shortcuts[] = {
{ "toggle-edit-file", N_("Image tools"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER,
GTH_SHORTCUT_CATEGORY_UI, "e" },
{ "toggle-file-properties", N_("File properties"), GTH_SHORTCUT_CONTEXT_BROWSER_VIEWER,
GTH_SHORTCUT_CATEGORY_UI, "i" },
- { "file-list-select-all", N_("Select all"), GTH_SHORTCUT_CONTEXT_BROWSER,
GTH_SHORTCUT_CATEGORY_NAVIGATION, "<Primary>a" },
- { "file-list-unselect-all", N_("Select none"), GTH_SHORTCUT_CONTEXT_BROWSER,
GTH_SHORTCUT_CATEGORY_NAVIGATION, "<Primary><Shift>a" },
+ { "file-list-select-all", N_("Select all"), GTH_SHORTCUT_CONTEXT_BROWSER |
GTH_SHORTCUT_CONTEXT_INTERNAL, GTH_SHORTCUT_CATEGORY_NAVIGATION, "<Primary>a" },
+ { "file-list-unselect-all", N_("Select none"), GTH_SHORTCUT_CONTEXT_BROWSER |
GTH_SHORTCUT_CONTEXT_INTERNAL, GTH_SHORTCUT_CATEGORY_NAVIGATION, "<Primary><Shift>a" },
/* file list keybindings (read only) */
diff --git a/gthumb/gth-grid-view.c b/gthumb/gth-grid-view.c
index 92b083056..904d0ec61 100644
--- a/gthumb/gth-grid-view.c
+++ b/gthumb/gth-grid-view.c
@@ -3829,6 +3829,16 @@ gth_grid_view_class_init (GthGridViewClass *grid_view_class)
gtk_binding_entry_add_signal (binding_set, GDK_KEY_KP_Space, GDK_CONTROL_MASK,
"toggle-cursor-item", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_a, GDK_CONTROL_MASK,
+ "select-all", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_slash, GDK_CONTROL_MASK,
+ "select-all", 0);
+
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_A, GDK_SHIFT_MASK | GDK_CONTROL_MASK,
+ "unselect-all", 0);
+ gtk_binding_entry_add_signal (binding_set, GDK_KEY_backslash, GDK_CONTROL_MASK,
+ "unselect-all", 0);
+
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Return, 0,
"activate-cursor-item", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_ISO_Enter, 0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]