Skip to content

Commit 03f99c0

Browse files
author
Junio C Hamano
committed
Merge master.kernel.org:/pub/scm/gitk/gitk
* master.kernel.org:/pub/scm/gitk/gitk: gitk: Fix enabling/disabling of menu items on Mac OS X
2 parents aed4509 + 3cd204e commit 03f99c0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

gitk

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ proc makewindow {} {
554554
pack .ctop.top.lbar.vlabel -side left -fill y
555555
global viewhlmenu selectedhlview
556556
set viewhlmenu [tk_optionMenu .ctop.top.lbar.vhl selectedhlview None]
557-
$viewhlmenu entryconf 0 -command delvhighlight
557+
$viewhlmenu entryconf None -command delvhighlight
558558
$viewhlmenu conf -font $uifont
559559
.ctop.top.lbar.vhl conf -font $uifont
560560
pack .ctop.top.lbar.vhl -side left -fill y
@@ -1474,7 +1474,7 @@ proc doviewmenu {m first cmd op argv} {
14741474
proc allviewmenus {n op args} {
14751475
global viewhlmenu
14761476

1477-
doviewmenu .bar.view 7 [list showview $n] $op $args
1477+
doviewmenu .bar.view 5 [list showview $n] $op $args
14781478
doviewmenu $viewhlmenu 1 [list addvhighlight $n] $op $args
14791479
}
14801480

@@ -1516,7 +1516,7 @@ proc newviewok {top n} {
15161516
set viewperm($n) $newviewperm($n)
15171517
if {$newviewname($n) ne $viewname($n)} {
15181518
set viewname($n) $newviewname($n)
1519-
doviewmenu .bar.view 7 [list showview $n] \
1519+
doviewmenu .bar.view 5 [list showview $n] \
15201520
entryconf [list -label $viewname($n)]
15211521
doviewmenu $viewhlmenu 1 [list addvhighlight $n] \
15221522
entryconf [list -label $viewname($n) -value $viewname($n)]
@@ -1632,8 +1632,8 @@ proc showview {n} {
16321632

16331633
set curview $n
16341634
set selectedview $n
1635-
.bar.view entryconf 2 -state [expr {$n == 0? "disabled": "normal"}]
1636-
.bar.view entryconf 3 -state [expr {$n == 0? "disabled": "normal"}]
1635+
.bar.view entryconf Edit* -state [expr {$n == 0? "disabled": "normal"}]
1636+
.bar.view entryconf Delete* -state [expr {$n == 0? "disabled": "normal"}]
16371637

16381638
if {![info exists viewdata($n)]} {
16391639
set pending_select $selid
@@ -4899,9 +4899,9 @@ proc rowmenu {x y id} {
48994899
} else {
49004900
set state normal
49014901
}
4902-
$rowctxmenu entryconfigure 0 -state $state
4903-
$rowctxmenu entryconfigure 1 -state $state
4904-
$rowctxmenu entryconfigure 2 -state $state
4902+
$rowctxmenu entryconfigure "Diff this*" -state $state
4903+
$rowctxmenu entryconfigure "Diff selected*" -state $state
4904+
$rowctxmenu entryconfigure "Make patch" -state $state
49054905
set rowmenuid $id
49064906
tk_popup $rowctxmenu $x $y
49074907
}
@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs ne {}} {
63056305
set viewargs(1) $revtreeargs
63066306
set viewperm(1) 0
63076307
addviewmenu 1
6308-
.bar.view entryconf 2 -state normal
6309-
.bar.view entryconf 3 -state normal
6308+
.bar.view entryconf Edit* -state normal
6309+
.bar.view entryconf Delete* -state normal
63106310
}
63116311

63126312
if {[info exists permviews]} {

0 commit comments

Comments
 (0)