Skip to content

Commit

Permalink
gitk: Adjust the menu line numbers to compensate for the new entry
Browse files Browse the repository at this point in the history
Commit d835dbb ("gitk: Add a "Copy commit summary" command",
2015-08-13) in the upstream gitk repo added a new context menu entry.
Therefore, the line numbers of the entries below the new one need to be
adjusted when their text or state is changed.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Beat Bolli authored and Paul Mackerras committed Sep 13, 2015
1 parent d835dbb commit b6f92a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -8896,13 +8896,13 @@ proc rowmenu {x y id} {
if {$id ne $nullid && $id ne $nullid2} {
set menu $rowctxmenu
if {$mainhead ne {}} {
$menu entryconfigure 7 -label [mc "Reset %s branch to here" $mainhead] -state normal
$menu entryconfigure 8 -label [mc "Reset %s branch to here" $mainhead] -state normal
} else {
$menu entryconfigure 7 -label [mc "Detached head: can't reset" $mainhead] -state disabled
$menu entryconfigure 8 -label [mc "Detached head: can't reset" $mainhead] -state disabled
}
$menu entryconfigure 9 -state $mstate
$menu entryconfigure 10 -state $mstate
$menu entryconfigure 11 -state $mstate
$menu entryconfigure 12 -state $mstate
} else {
set menu $fakerowmenu
}
Expand Down

0 comments on commit b6f92a8

Please sign in to comment.