summaryrefslogtreecommitdiff
path: root/tempView.go
blob: ee357bd62a41dae44af9b60a6ed7bb77d10ea578 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package main

import (
	"go.wit.com/lib/gadgets"
	"go.wit.com/lib/gui/repolist"
	"go.wit.com/log"
)

func makeTempView() *repoWindow {
	r := new(repoWindow)
	r.win = gadgets.RawBasicWindow("unmerged repositories")
	r.win.Make()

	r.box = r.win.Box().NewBox("bw vbox", false)
	r.win.Custom = func() {
		log.Warn("GOT HERE: makeTempView() close")
		log.Warn("GOT HERE: makeTempView() close")
		log.Warn("Should I do something special here?")
	}

	// reposbox.SetExpand(false)
	group1 := r.box.NewGroup("Run on all repos:")

	hbox := group1.Box()
	// hbox.Horizontal()
	hbox.Vertical()

	box2 := hbox.Box().Vertical()
	box2.NewButton("merge user to devel", func() {
		mergeAllUserToDevel()
	})
	box2.NewButton("merge devel to master", func() {
		mergeAllDevelToMain()
	})
	box2.NewButton("rescan values", func() {
		log.Warn("figure this out")
		r.View.ListRows()
		/*
			for _, repo := range r.View.AllRepos() {
				log.Warn("repo:", repo.Name())
			}
		*/
	})

	r.View = repolist.TempWindowView(r.box)
	r.Show()
	return r
}