git-gui: Add hotkeys for "Unstage from commit" and "Revert changes"
Signed-off-by: Vitaly _Vi Shukela <public_vi@tut.by> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Vitaly _Vi Shukela committed
Dec 31, 2009 at 15:32 UTC
b677c66e299c8754a6093cbd19ce71b0ad2a8a17
1 file changed
+8
-2
git-gui.sh
+8
-2
@@ -2543,12 +2543,14 @@ if {[is_enabled multicommit] || [is_enabled singlecommit]} {
2543
[list .mbar.commit entryconf [.mbar.commit index last] -state]
2544
2545
.mbar.commit add command -label [mc "Unstage From Commit"] \
2546
- -command do_unstage_selection
2546
+ -command do_unstage_selection \
2547
+ -accelerator $M1T-U
2548
lappend disable_on_lock \
2549
[list .mbar.commit entryconf [.mbar.commit index last] -state]
2550
2551
.mbar.commit add command -label [mc "Revert Changes"] \
2551
- -command do_revert_selection
2552
+ -command do_revert_selection \
2553
+ -accelerator $M1T-J
2554
lappend disable_on_lock \
2555
[list .mbar.commit entryconf [.mbar.commit index last] -state]
2556
@@ -3296,6 +3298,10 @@ unset gws
3298
bind $ui_comm <$M1B-Key-Return> {do_commit;break}
3299
bind $ui_comm <$M1B-Key-t> {do_add_selection;break}
3300
bind $ui_comm <$M1B-Key-T> {do_add_selection;break}
3301
+bind $ui_comm <$M1B-Key-u> {do_unstage_selection;break}
3302
+bind $ui_comm <$M1B-Key-U> {do_unstage_selection;break}
3303
+bind $ui_comm <$M1B-Key-j> {do_revert_selection;break}
3304
+bind $ui_comm <$M1B-Key-J> {do_revert_selection;break}
3305
bind $ui_comm <$M1B-Key-i> {do_add_all;break}
3306
bind $ui_comm <$M1B-Key-I> {do_add_all;break}
3307
bind $ui_comm <$M1B-Key-x> {tk_textCut %W;break}