Skip to contentSkip to conversation

gitk: adjust the menu line numbers to compensate for the new entry

PATCH RESEND Applied Beat Bolli 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore

Beat Bolli

author
#0 lore raw

PATCH RESEND 1/1 gitk: adjust the menu line numbers to compensate for the new entry

Commit d835dbb9 ("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.

Cc Paul Mackerras <[email protected]>
---
 gitk-git/gitk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
gitk-git/gitk +3 -3
index d05169a..bc0e586 100755
@@ -8877,13 +8877,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
     }
Signature · 1 line
2.5.0.492.g918e48c
#1 lore raw
Quoted 7 lines · Beat Bolli

Commit d835dbb9 ("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.

Cc Paul Mackerras <[email protected]>

Thanks, applied.

Paul.