[geary: 2/3] Enable activating Gtk.ListBox items using XF86Forward and Alt+Right
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 2/3] Enable activating Gtk.ListBox items using XF86Forward and Alt+Right
- Date: Wed, 24 Feb 2021 12:28:33 +0000 (UTC)
commit 6caf26b15ab3d042af3ea9b77c6b7e5ff406da7f
Author: Michał Kopeć <mkopec12 gmail com>
Date: Fri Feb 19 23:41:33 2021 +0100
Enable activating Gtk.ListBox items using XF86Forward and Alt+Right
src/client/application/application-client.vala | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index 19992eddf..5d9ed3fb9 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -409,6 +409,17 @@ public class Application.Client : Gtk.Application {
add_edit_accelerators(Action.Edit.REDO, { "<Ctrl><Shift>Z" });
add_edit_accelerators(Action.Edit.UNDO, { "<Ctrl>Z" });
+ // Set up custom keybindings
+ unowned Gtk.BindingSet bindings = Gtk.BindingSet.by_class(
+ (ObjectClass) typeof(Gtk.ListBoxRow).class_ref()
+ );
+ Gtk.BindingEntry.add_signal(
+ bindings, Gdk.Key.Right, MOD1_MASK, "activate", 0
+ );
+ Gtk.BindingEntry.add_signal(
+ bindings, Gdk.Key.Forward, 0, "activate", 0
+ );
+
// Load Geary GTK CSS
var provider = new Gtk.CssProvider();
Gtk.StyleContext.add_provider_for_screen(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]