From 613c8855cd8fcace4b7ba4f6662bd0486e9ad5f1 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sat, 2 Nov 2013 17:54:32 +0100 Subject: New menu items --- main.go | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/main.go b/main.go index ba60c97..75409e1 100644 --- a/main.go +++ b/main.go @@ -103,23 +103,23 @@ func (g *GUI) mkMenuBar() *gtk.MenuBar { quit.Connect("activate", g.exitApp) fileMenu.Append(quit) - foo := gtk.NewMenuItemWithLabel("Foo") - foo.Connect("activate", func() { - f, _ := os.Open("test.biomes") - defer f.Close() - biomes, err := ReadBiomeInfos(f) - if err != nil { - panic(err) - } - g.biomes = biomes - g.updateBiomeInfo() - }) - fileMenu.Append(foo) - fileMenuItem := gtk.NewMenuItemWithLabel("File") fileMenuItem.SetSubmenu(fileMenu) menubar.Append(fileMenuItem) + prefMenu := gtk.NewMenu() + + confbiomes := gtk.NewMenuItemWithLabel("Configure Biomes") + confbiomes.Connect("activate", func() { + // TODO: Display awesome biome editor dialog thing. + fmt.Println("(...)") + }) + prefMenu.Append(confbiomes) + + prefMenuItem := gtk.NewMenuItemWithLabel("Preferences") + prefMenuItem.SetSubmenu(prefMenu) + menubar.Append(prefMenuItem) + helpMenu := gtk.NewMenu() controls := gtk.NewMenuItemWithLabel("Controls") -- cgit v1.2.3-70-g09d2