summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 43c2507)
raw | patch | inline | side by side (parent: 43c2507)
author | Paul Mackerras <paulus@samba.org> | |
Sun, 17 Jun 2007 07:08:35 +0000 (17:08 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sat, 23 Jun 2007 10:55:47 +0000 (20:55 +1000) |
Neither the "check out this branch" nor the "remove this branch"
menu item can be used on the currently-checked out branch, so disable
them.
Signed-off-by: Paul Mackerras <paulus@samba.org>
menu item can be used on the currently-checked out branch, so disable
them.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 0c2767df0b6ab54fa16e8cdbd8ea9dd2000148e2..6a45fcae4ce195a2b912f10bc72f5857acf275c4 100755 (executable)
--- a/gitk
+++ b/gitk
# context menu for a head
proc headmenu {x y id head} {
- global headmenuid headmenuhead headctxmenu
+ global headmenuid headmenuhead headctxmenu mainhead
set headmenuid $id
set headmenuhead $head
+ set state normal
+ if {$head eq $mainhead} {
+ set state disabled
+ }
+ $headctxmenu entryconfigure 0 -state $state
+ $headctxmenu entryconfigure 1 -state $state
tk_popup $headctxmenu $x $y
}
set head $headmenuhead
set id $headmenuid
+ # this check shouldn't be needed any more...
if {$head eq $mainhead} {
error_popup "Cannot delete the currently checked-out branch"
return