From a0cd5e85ed03b898179f58b38dae04dd3483bb64 Mon Sep 17 00:00:00 2001 From: Kai O'Reilly Date: Thu, 25 Jan 2024 22:10:27 -0800 Subject: [PATCH] moved cocode to cogentcode; improved window names --- code/cmd/{cocode => cogentcode}/code.go | 2 +- code/cmd/{cocode => cogentcode}/code_darwin.go | 0 code/cmd/{cocode => cogentcode}/code_linux.go | 0 code/cmd/{cocode => cogentcode}/code_windows.go | 0 code/codev/codeview.go | 6 +++--- 5 files changed, 4 insertions(+), 4 deletions(-) rename code/cmd/{cocode => cogentcode}/code.go (97%) rename code/cmd/{cocode => cogentcode}/code_darwin.go (100%) rename code/cmd/{cocode => cogentcode}/code_linux.go (100%) rename code/cmd/{cocode => cogentcode}/code_windows.go (100%) diff --git a/code/cmd/cocode/code.go b/code/cmd/cogentcode/code.go similarity index 97% rename from code/cmd/cocode/code.go rename to code/cmd/cogentcode/code.go index aa55ca70..4ce07bd1 100644 --- a/code/cmd/cocode/code.go +++ b/code/cmd/cogentcode/code.go @@ -20,7 +20,7 @@ import ( func main() { gi.TheApp.SetName("CogentCode") pdir := gi.TheApp.AppDataDir() - lfnm := filepath.Join(pdir, "cocode.log") + lfnm := filepath.Join(pdir, "cogentcode.log") code.TheConsole.Init(lfnm) diff --git a/code/cmd/cocode/code_darwin.go b/code/cmd/cogentcode/code_darwin.go similarity index 100% rename from code/cmd/cocode/code_darwin.go rename to code/cmd/cogentcode/code_darwin.go diff --git a/code/cmd/cocode/code_linux.go b/code/cmd/cogentcode/code_linux.go similarity index 100% rename from code/cmd/cocode/code_linux.go rename to code/cmd/cogentcode/code_linux.go diff --git a/code/cmd/cocode/code_windows.go b/code/cmd/cogentcode/code_windows.go similarity index 100% rename from code/cmd/cocode/code_windows.go rename to code/cmd/cogentcode/code_windows.go diff --git a/code/codev/codeview.go b/code/codev/codeview.go index 33faecdc..b00d09bd 100644 --- a/code/codev/codeview.go +++ b/code/codev/codeview.go @@ -226,7 +226,7 @@ func (ge *CodeView) SetWindowNameTitle() { return } pnm := ge.Name() - winm := "cocode-" + pnm + winm := "Cogent Code: " + pnm win.SetName(winm) win.SetTitle(winm + ": " + string(ge.Settings.ProjRoot)) tab := ge.Scene.GetTopAppBar() @@ -512,7 +512,7 @@ func (ge *CodeView) CloseWindowReq() bool { // functions! func QuitReq() bool { for _, win := range gi.MainRenderWins { - if !strings.HasPrefix(win.Name, "cocode-") { + if !strings.HasPrefix(win.Name, "Cogent Code:") { continue } msc := win.MainScene() @@ -556,7 +556,7 @@ func CodeInScene(sc *gi.Scene) *CodeView { // NewCodeWindow is common code for Open CodeWindow from Proj or Path func NewCodeWindow(path, projnm, root string, doPath bool) *CodeView { - winm := "cocode-" + projnm + winm := "Cogent Code: " + projnm wintitle := winm + ": " + path if win, found := gi.AllRenderWins.FindName(winm); found {