Merge branch 'main' of ssh://git.bullercodeworks.com:2200/brian/expds
This commit is contained in:
@@ -50,12 +50,10 @@ type ScreenHome struct {
|
||||
layout *w.LinearLayout
|
||||
columns *w.LinearLayout
|
||||
|
||||
activePds *models.Pds
|
||||
//pdsListing *w.SimpleListWithHelp
|
||||
activePds *models.Pds
|
||||
pdsListing *wd.TreeBrowser
|
||||
jsonContent *wd.JsonContent
|
||||
status *wd.StatusBar
|
||||
stTmBlock *wd.StatusBlock
|
||||
stPathBlock *wd.StatusBlock
|
||||
|
||||
pdsListingTypes []models.EntryType
|
||||
@@ -105,9 +103,8 @@ func (s *ScreenHome) Init(a *App) {
|
||||
|
||||
//s.pdsListing = w.NewSimpleListWithHelp("pdslisting", s.style)
|
||||
s.pdsListing = wd.NewTreeBrowser("pdslisting", s.style)
|
||||
s.pdsListing.SetBorder(
|
||||
[]rune{'─', '┬', '│', '┴', '─', '└', '│', '┌', '├', '─', '┤', '┬', '│', '┴', '┼'},
|
||||
)
|
||||
s.pdsListing.SetBorder([]rune{'─', '┬', '│', '┴', '─', '└', '│', '┌', '├', '─', '┤', '┬', '│', '┴', '┼'})
|
||||
|
||||
s.pdsListing.SetTitle(strings.Repeat(" ", 30))
|
||||
s.pdsListing.SetOnSelect(s.selectPdsListingEntry)
|
||||
s.pdsListing.SetOnChange(s.changePdsList)
|
||||
@@ -149,8 +146,12 @@ func (s *ScreenHome) Init(a *App) {
|
||||
|
||||
s.columns.AddAll(s.pdsListing, s.jsonContent)
|
||||
|
||||
s.layout.AddAll(s.columns)
|
||||
s.layout.SetWeight(s.columns, 4)
|
||||
//s.layout.AddAll(s.columns)
|
||||
//s.layout.SetLogger(s.Log)
|
||||
//s.layout.SetWeight(s.columns, 4)
|
||||
s.layout.Add(s.pdsListing)
|
||||
s.layout.SetLogger(s.Log)
|
||||
s.layout.SetWeight(s.pdsListing, 4)
|
||||
s.menuLayout.SetWidget(s.layout)
|
||||
s.layout.SetLogger(s.Log)
|
||||
s.columns.SetLogger(s.Log)
|
||||
@@ -191,7 +192,6 @@ func (s *ScreenHome) HandleTime(ev *tcell.EventTime) {
|
||||
s.menuLayout.HandleTime(ev)
|
||||
s.loading.HandleTime(ev)
|
||||
s.status.HandleTime(ev)
|
||||
//s.stTmBlock.SetText(time.Now().Format(time.TimeOnly))
|
||||
}
|
||||
func (s *ScreenHome) Draw() {
|
||||
if s.doOpen {
|
||||
@@ -353,23 +353,11 @@ func (s *ScreenHome) updatePdsListing() {
|
||||
t.AddChild(c)
|
||||
}
|
||||
s.pdsListing.Add(t)
|
||||
|
||||
/*
|
||||
wrk = append(wrk, t)
|
||||
wrk = append(wrk, v)
|
||||
s.pdsListingTypes = append(s.pdsListingTypes, models.TypeNSID)
|
||||
if _, ok := s.expandedEntries[v]; ok {
|
||||
nsid := s.activePds.NSIDs[i]
|
||||
rIds := s.activePds.GetRecordIdsFor(nsid)
|
||||
for j := range rIds {
|
||||
wrk = append(wrk, fmt.Sprintf("• %s", rIds[j]))
|
||||
s.pdsListingTypes = append(s.pdsListingTypes, models.TypeRecord)
|
||||
s.recordIdsToNSIDs[rIds[j]] = nsid
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
//s.pdsListing.AddChild(wrk)
|
||||
s.layout.ActivateWidget(s.columns)
|
||||
s.columns.ActivateWidget(s.pdsListing)
|
||||
s.pdsListing.SetActive(true)
|
||||
s.pdsListing.SetFocusable(true)
|
||||
s.hideCli()
|
||||
}
|
||||
|
||||
@@ -393,11 +381,7 @@ func (s *ScreenHome) changePdsList(tn *wd.TreeNode) bool {
|
||||
return upd
|
||||
}
|
||||
func (s *ScreenHome) updateStatusPathBlock(tn *wd.TreeNode) bool {
|
||||
n, err := s.pdsListing.GetActiveNode()
|
||||
if err != nil || n == nil {
|
||||
return false
|
||||
}
|
||||
s.stPathBlock.SetParts(n.GetLabelPath())
|
||||
s.stPathBlock.SetParts(tn.GetLabelPath())
|
||||
return true
|
||||
}
|
||||
|
||||
@@ -406,6 +390,7 @@ func (s *ScreenHome) updateJsonView(tn *wd.TreeNode) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
/*
|
||||
func (s *ScreenHome) o_selectPdsListingEntry(idx int, nm string) bool {
|
||||
if !s.o_updateJsonView(idx, nm) {
|
||||
return false
|
||||
@@ -461,3 +446,4 @@ func (s *ScreenHome) o_updateJsonView(idx int, nm string) bool {
|
||||
|
||||
return false
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user