Skip to content

Commit

Permalink
Merge branch 'py/call-do-quit-before-exit' of github.com:gitster/git-…
Browse files Browse the repository at this point in the history
…gui into py/git-gui-do-quit

* 'py/call-do-quit-before-exit' of github.com:gitster/git-gui:
  git-gui: call do_quit before destroying the main window
  • Loading branch information
gitster committed Aug 7, 2019
2 parents 7c20df8 + 5440eb0 commit 0d88f3d
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions git-gui/git-gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3030,8 +3030,23 @@ unset doc_path doc_url
wm protocol . WM_DELETE_WINDOW do_quit
bind all <$M1B-Key-q> do_quit
bind all <$M1B-Key-Q> do_quit
bind all <$M1B-Key-w> {destroy [winfo toplevel %W]}
bind all <$M1B-Key-W> {destroy [winfo toplevel %W]}
set m1b_w_script {
set toplvl_win [winfo toplevel %W]
# If we are destroying the main window, we should call do_quit to take
# care of cleanup before exiting the program.
if {$toplvl_win eq "."} {
do_quit
} else {
destroy $toplvl_win
}
}
bind all <$M1B-Key-w> $m1b_w_script
bind all <$M1B-Key-W> $m1b_w_script
unset m1b_w_script
set subcommand_args {}
proc usage {} {
Expand Down

0 comments on commit 0d88f3d

Please sign in to comment.