git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Beat Bolli <dev+git@drbeat.li>
Date
Aug 11, 2015, 21:00 UTC
Message-ID
<1439326837-6126-1-git-send-email-dev+git@drbeat.li>
In-Reply-To
<1437218139-7031-1-git-send-email-dev+git@drbeat.li>

The previous commit[1] added a new context menu entry. Therefore, the line numbers of the folloeing entries need to be incremented when their text or state is changed.

[1] <1437218139-7031-1-git-send-email-dev+git@drbeat.li>,
    http://article.gmane.org/gmane.comp.version-control.git/274161
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Paul Mackerras <paulus@samba.org>
---
Paul, feel free to squash this commit into my previous one.
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
 gitk-git/gitk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index d05169a..bc0e586 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -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
     }
-- 
2.5.0.492.g918e48c
Previous: Beat BolliNext: Paul Mackerras
Message 5 of 7 in “gitk: Add a "Copy commit summary" command”
  1. gitk: Add a "Copy commit summary" commandBeat Bolli, Jul 18, 2015
  2. Beat BolliJul 21, 2015
  3. Paul MackerrasJul 21, 2015
  4. Beat BolliJul 21, 2015
  5. gitk: adjust the menu line numbers to compensate for the new entryBeat Bolli, Aug 11, 2015
  6. Paul MackerrasAug 13, 2015
  7. Beat BolliAug 13, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.