- menu .bar
- .bar add cascade -label [mc "File"] -menu .bar.file
- menu .bar.file
- .bar.file add command -label [mc "Update"] -command updatecommits
- .bar.file add command -label [mc "Reload"] -command reloadcommits
- .bar.file add command -label [mc "Reread references"] -command rereadrefs
- .bar.file add command -label [mc "List references"] -command showrefs
- .bar.file add command -label [mc "Quit"] -command doquit
- menu .bar.edit
- .bar add cascade -label [mc "Edit"] -menu .bar.edit
- .bar.edit add command -label [mc "Preferences"] -command doprefs
-
- menu .bar.view
- .bar add cascade -label [mc "View"] -menu .bar.view
- .bar.view add command -label [mc "New view..."] -command {newview 0}
- .bar.view add command -label [mc "Edit view..."] -command editview \
- -state disabled
- .bar.view add command -label [mc "Delete view"] -command delview -state disabled
- .bar.view add separator
- .bar.view add radiobutton -label [mc "All files"] -command {showview 0} \
- -variable selectedview -value 0
-
- menu .bar.help
- .bar add cascade -label [mc "Help"] -menu .bar.help
- .bar.help add command -label [mc "About gitk"] -command about
- .bar.help add command -label [mc "Key bindings"] -command keys
- .bar.help configure
+ makemenu .bar {
+ {"File" cascade {
+ {"Update" command updatecommits -accelerator F5}
+ {"Reload" command reloadcommits}
+ {"Reread references" command rereadrefs}
+ {"List references" command showrefs}
+ {"Quit" command doquit}
+ }}
+ {"Edit" cascade {
+ {"Preferences" command doprefs}
+ }}
+ {"View" cascade {
+ {"New view..." command {newview 0}}
+ {"Edit view..." command editview -state disabled}
+ {"Delete view" command delview -state disabled}
+ {"" separator}
+ {"All files" radiobutton {selectedview 0} -command {showview 0}}
+ }}
+ {"Help" cascade {
+ {"About gitk" command about}
+ {"Key bindings" command keys}
+ }}
+ }