summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/main.go b/main.go
index 44c72fd..f334507 100644
--- a/main.go
+++ b/main.go
@@ -16,6 +16,8 @@ type GUI struct {
showbiomes *gtk.CheckButton
fixSnowIce *gtk.CheckButton
+ menuitemSave *gtk.MenuItem
+
statusContext uint
lastStatus string
@@ -38,7 +40,9 @@ func (g *GUI) openWorld(path string) {
dlg.Destroy()
}
- go g.mapw.SetRegion(region)
+ g.menuitemSave.SetSensitive(true)
+
+ g.mapw.SetRegion(region)
}
func (g *GUI) aboutDlg() {
@@ -85,9 +89,10 @@ func (g *GUI) mkMenuBar() *gtk.MenuBar {
fileMenu.Append(quickopenItem)
}
- save := gtk.NewMenuItemWithLabel("Save")
- save.Connect("activate", g.save)
- fileMenu.Append(save)
+ g.menuitemSave = gtk.NewMenuItemWithLabel("Save")
+ g.menuitemSave.Connect("activate", g.save)
+ g.menuitemSave.SetSensitive(false)
+ fileMenu.Append(g.menuitemSave)
quit := gtk.NewMenuItemWithLabel("Quit")
quit.Connect("activate", g.exitApp)