summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-14 15:54:17 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-14 15:54:17 +0200
commitc5f34850ad648fda2a2fec30b40685c3651ea395 (patch)
tree5570f9f393d886e6abc1e44d7c25c6b426e02b8e
parente1227f703fc9e754fdb7f1ca8dce8dfb36ada368 (diff)
downloadbiomed-c5f34850ad648fda2a2fec30b40685c3651ea395.tar.gz
biomed-c5f34850ad648fda2a2fec30b40685c3651ea395.tar.bz2
biomed-c5f34850ad648fda2a2fec30b40685c3651ea395.zip
Added undo to menu bar.
-rw-r--r--main.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/main.go b/main.go
index 13f9ccf..ebe99a5 100644
--- a/main.go
+++ b/main.go
@@ -87,6 +87,16 @@ func (g *GUI) mkMenuBar() *gtk.MenuBar {
fileMenuItem.SetSubmenu(fileMenu)
menubar.Append(fileMenuItem)
+ editMenu := gtk.NewMenu()
+
+ undo := gtk.NewMenuItemWithLabel("Undo")
+ undo.Connect("activate", g.undo)
+ editMenu.Append(undo)
+
+ editMenuItem := gtk.NewMenuItemWithLabel("Edit")
+ editMenuItem.SetSubmenu(editMenu)
+ menubar.Append(editMenuItem)
+
helpMenu := gtk.NewMenu()
about := gtk.NewMenuItemWithLabel("About")
@@ -217,6 +227,10 @@ func (g *GUI) showbiomesToggled() {
fmt.Printf("Show biomes: %v\n", g.showbiomes.GetActive())
}
+func (g *GUI) undo() {
+ fmt.Println("Undo")
+}
+
func (g *GUI) Show() {
g.window.ShowAll()
}