summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-11-02 17:54:32 +0100
committerKevin Chabowski <kevin@kch42.de>2013-11-02 17:54:32 +0100
commit613c8855cd8fcace4b7ba4f6662bd0486e9ad5f1 (patch)
treeac3ab78d18d1d718c6a1bd65248c416bfd2fdcb9
parent2ac5529a8973c262ddc5674f5846a6b293ca0ce1 (diff)
downloadbiomed-613c8855cd8fcace4b7ba4f6662bd0486e9ad5f1.tar.gz
biomed-613c8855cd8fcace4b7ba4f6662bd0486e9ad5f1.tar.bz2
biomed-613c8855cd8fcace4b7ba4f6662bd0486e9ad5f1.zip
New menu items
-rw-r--r--main.go26
1 files 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")