summaryrefslogtreecommitdiff
path: root/new.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-11 15:56:50 -0600
committerJeff Carr <[email protected]>2024-01-11 15:56:50 -0600
commit1248e21394afa41f5a5a42e843c3bd4cae71c5d6 (patch)
treea97acc520dd1e31870e9cc89ecfd1bd861d311ad /new.go
parent5d21e2f6f8ba1b62a848c6b614e98cea530bc085 (diff)
update for new gui API
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'new.go')
-rw-r--r--new.go20
1 files changed, 2 insertions, 18 deletions
diff --git a/new.go b/new.go
index c18480e..3142011 100644
--- a/new.go
+++ b/new.go
@@ -1,8 +1,6 @@
package repostatus
import (
- "go.wit.com/log"
-
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
)
@@ -15,21 +13,7 @@ func New(p *gui.Node, path string) *RepoStatus {
repopath: path,
}
rs.tags = make(map[string]string)
- return rs
-}
-
-func (rs *RepoStatus) InitWindow() {
- if ! rs.Initialized() {
- log.Log(WARN, "not initalized yet (no parent for the window?)")
- return
- }
- if rs.window != nil {
- log.Log(WARN, "You already have a window")
- rs.ready = true
- return
- }
-
- log.Log(WARN, "Creating the Window")
- rs.window = gadgets.NewBasicWindow(rs.parent, "GO Repo Details")
+ rs.window = gadgets.NewBasicWindow(p, "GO Repo Details")
rs.ready = true
+ return rs
}