Skip to content

Commit

Permalink
Revert moved "New Map" button
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaiR committed Jun 14, 2022
1 parent c1a733d commit a9639af
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v2.6.1.alpha

* Revert: renamed "New Map" button to "Create Map" and moved to the "Edit" menu;
* When selecting multiple maps to open in the available maps pane, open button will show in the tooltip only a part of those maps.

# v2.6.0.alpha
Expand Down
4 changes: 2 additions & 2 deletions src/app/action_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func (a *app) DoCloseEnvironment() {
})
}

// DoCreateMap opens dialog window to create a new map file.
func (a *app) DoCreateMap() {
// DoNewMap opens dialog window to create a new map file.
func (a *app) DoNewMap() {
log.Println("[app] opening create map...")
a.layout.WsArea.OpenCreateMap()
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/cpwsarea/wsempty/wsempty.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func New(app App) *WsEmpty {
}

func (ws *WsEmpty) Name() string {
return "Workspace"
return icon.File + " Workspace"
}

func (ws *WsEmpty) Title() string {
Expand Down
9 changes: 4 additions & 5 deletions src/app/ui/menu/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
type app interface {
// File
DoNewWorkspace()
DoNewMap()
DoOpen()
DoLoadResource(path string)
DoClearRecentMaps()
Expand All @@ -39,7 +40,6 @@ type app interface {
DoDelete()
DoSearch()
DoDeselect()
DoCreateMap()

// View
DoAreaBorders()
Expand Down Expand Up @@ -113,6 +113,9 @@ func (m *Menu) Process() {
w.MenuItem("New Workspace", m.app.DoNewWorkspace).
Icon(icon.File).
Shortcut(platform.KeyModName(), "N"),
w.MenuItem("New Map", m.app.DoNewMap).
IconEmpty().
Enabled(m.app.HasLoadedEnvironment()),
w.Separator(),
w.MenuItem("Open...", m.app.DoOpen).
Icon(icon.FolderOpen).
Expand Down Expand Up @@ -190,10 +193,6 @@ func (m *Menu) Process() {
Icon(icon.Search).
Enabled(m.app.HasActiveMap()).
Shortcut(platform.KeyModName(), "F"),
w.Separator(),
w.MenuItem("Create Map", m.app.DoCreateMap).
IconEmpty().
Enabled(m.app.HasLoadedEnvironment()),
}),

w.Menu("View", w.Layout{
Expand Down

0 comments on commit a9639af

Please sign in to comment.