(dir string, items []string, top bool)
| 267 | } |
| 268 | |
| 269 | func SetMenu(dir string, items []string, top bool) error { |
| 270 | toolboxDisplay := fmt.Sprintf("Open %s Here", AppName) |
| 271 | toolboxCmd := filepath.Join(dir, _ToolBoxCommand) |
| 272 | subCommands := strings.Join(items, ";") |
| 273 | |
| 274 | // add directory background shell |
| 275 | err := SetMenuItem(DirectoryBackgroundShell+AppName, toolboxDisplay, toolboxCmd, subCommands, top) |
| 276 | if err != nil { |
| 277 | return err |
| 278 | } |
| 279 | |
| 280 | // add directory shell |
| 281 | err = SetMenuItem(DirectoryShell+AppName, toolboxDisplay, toolboxCmd, subCommands, top) |
| 282 | if err != nil { |
| 283 | return err |
| 284 | } |
| 285 | return nil |
| 286 | } |
| 287 | |
| 288 | // SetMenuItem add menu to registry |
| 289 | func SetMenuItem(path, display, command, subCommands string, top bool) error { |
no test coverage detected