Skip to content

Commit

Permalink
started updating to new app structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jan 26, 2024
1 parent 0346b05 commit 250d52f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clock/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

func main() {
b := gi.NewAppBody("Cogent Clock")
b := gi.NewBody("Cogent Clock")

ts := gi.NewTabs(b)
clock(ts)
Expand Down
2 changes: 1 addition & 1 deletion code/code/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func init() {
var Settings = &SettingsData{
SettingsBase: gi.SettingsBase{
Name: "Code",
File: filepath.Join("CogentCode", "settings.toml"),
File: filepath.Join(gi.TheApp.DataDir(), "CogentCode", "settings.toml"),

Check failure on line 36 in code/code/settings.go

View workflow job for this annotation

GitHub Actions / build

undefined: gi.TheApp
},
}

Expand Down
2 changes: 1 addition & 1 deletion code/codev/codeview.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ func NewCodeWindow(path, projnm, root string, doPath bool) *CodeView {
}
}

b := gi.NewAppBody("Cogent Code").SetTitle(wintitle)
b := gi.NewBody("Cogent Code").SetTitle(wintitle)
b.Scene.Nm = winm

ge := NewCodeView(b)
Expand Down
4 changes: 2 additions & 2 deletions files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import (
)

func main() {
b := gi.NewAppBody("Cogent Files")
b := gi.NewBody("Cogent Files")

fv := giv.NewFileView(b)
fv.OnDoubleClick(func(e events.Event) {
gi.OpenURL(fv.SelectedFile())
gi.TheApp.OpenURL(fv.SelectedFile())

Check failure on line 18 in files/files.go

View workflow job for this annotation

GitHub Actions / build

undefined: gi.TheApp
})

b.RunMainWindow()
Expand Down
2 changes: 1 addition & 1 deletion gear/cmd/gear/gear.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
}

func run(c *config) error {
b := gi.NewAppBody("Cogent Gear")
b := gi.NewBody("Cogent Gear")
cmd := gear.NewCmd(c.Command)
err := cmd.Parse()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion glide/cmd/glide/glide.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func main() {
b := gi.NewAppBody("glide").SetTitle("Glide")
b := gi.NewBody("glide").SetTitle("Glide")
pg := glide.NewPage(b, "page")
pg.OpenURL("https://google.com")
b.AddAppBar(pg.AppBar)
Expand Down
2 changes: 1 addition & 1 deletion settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func main() {
b := gi.NewAppBody("Cogent Settings")
b := gi.NewBody("Cogent Settings")
giv.SettingsView(b)
b.RunMainWindow()
}
2 changes: 1 addition & 1 deletion taskmanager/taskmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Task struct { //gti:add
}

func main() {
b := gi.NewAppBody("Cogent Task Manager")
b := gi.NewBody("Cogent Task Manager")

ts := getTasks(b)
tv := giv.NewTableView(b)
Expand Down

0 comments on commit 250d52f

Please sign in to comment.