Use Alt+Page_Up / Alt+Page_Down for previous/next in the commit dialog

This commit is contained in:
Jean-François Fortin Tam 2023-12-07 17:27:24 -05:00 committed by Alberto Fanjul
parent 9e921a2ded
commit 992722b53f
2 changed files with 7 additions and 4 deletions

View file

@ -764,11 +764,14 @@ class Dialog : Gtk.Dialog
d_button_ok.activate();
return true;
}
else if ((event.keyval == Gdk.Key.Left || event.keyval == Gdk.Key.KP_Left))
}
else if ((mmask & event.state) == Gdk.ModifierType.MOD1_MASK)
{
if (event.keyval == Gdk.Key.Page_Up)
{
on_prev_commit_message_button_clicked ();
}
else if ((event.keyval == Gdk.Key.Right || event.keyval == Gdk.Key.KP_Right))
else if (event.keyval == Gdk.Key.Page_Down)
{
on_next_commit_message_button_clicked ();
}

View file

@ -174,14 +174,14 @@
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">true</property>
<property name="accelerator">&lt;primary&gt;Left</property>
<property name="accelerator">&lt;Alt&gt;Page_Up</property>
<property name="title" translatable="yes" context="shortcut window">Previous commit message</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">true</property>
<property name="accelerator">&lt;primary&gt;Right</property>
<property name="accelerator">&lt;Alt&gt;Page_Down</property>
<property name="title" translatable="yes" context="shortcut window">Next commit message</property>
</object>
</child>