Enable activating Gtk.ListBox items using XF86Forward and Alt+Right

This commit is contained in:
Michał Kopeć 2021-02-19 23:41:33 +01:00
parent 42f5eb2ff2
commit 6caf26b15a

View file

@ -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(