diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-08-14 15:54:17 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-08-14 15:54:17 +0200 |
commit | c5f34850ad648fda2a2fec30b40685c3651ea395 (patch) | |
tree | 5570f9f393d886e6abc1e44d7c25c6b426e02b8e | |
parent | e1227f703fc9e754fdb7f1ca8dce8dfb36ada368 (diff) | |
download | biomed-c5f34850ad648fda2a2fec30b40685c3651ea395.tar.gz biomed-c5f34850ad648fda2a2fec30b40685c3651ea395.tar.bz2 biomed-c5f34850ad648fda2a2fec30b40685c3651ea395.zip |
Added undo to menu bar.
-rw-r--r-- | main.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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() } |