Remove temporary comments from main.go

This commit is contained in:
Luke I. Wilson 2021-04-08 11:11:09 -05:00
parent 14ba338de9
commit 2e128e5b36

View File

@ -28,7 +28,6 @@ var (
screen *tcell.Screen screen *tcell.Screen
menuBar *ui.MenuBar menuBar *ui.MenuBar
// tabContainer *ui.TabContainer
panelContainer *ui.PanelContainer panelContainer *ui.PanelContainer
dialog ui.Component // nil if not present (has exclusive focus) dialog ui.Component // nil if not present (has exclusive focus)
@ -143,9 +142,6 @@ func main() {
var closing bool var closing bool
sizex, sizey := s.Size() sizex, sizey := s.Size()
// tabContainer = ui.NewTabContainer(&theme)
// tabContainer.SetPos(0, 1)
// tabContainer.SetSize(sizex, sizey-2)
panelContainer = ui.NewPanelContainer(&theme) panelContainer = ui.NewPanelContainer(&theme)
panelContainer.SetPos(0, 1) panelContainer.SetPos(0, 1)
panelContainer.SetSize(sizex, sizey-2) panelContainer.SetSize(sizex, sizey-2)
@ -283,7 +279,7 @@ func main() {
tabContainer := getActiveTabContainer() tabContainer := getActiveTabContainer()
if tabContainer != nil && tabContainer.GetTabCount() > 0 { if tabContainer != nil && tabContainer.GetTabCount() > 0 {
tabContainer.RemoveTab(tabContainer.GetSelectedTabIdx()) tabContainer.RemoveTab(tabContainer.GetSelectedTabIdx())
} else { // No tabs open; close the editor } else {
// if the selected is root: close editor. otherwise close panel // if the selected is root: close editor. otherwise close panel
if panelContainer.IsRootSelected() { if panelContainer.IsRootSelected() {
closing = true closing = true
@ -427,9 +423,6 @@ func main() {
//ui.DrawRect(screen, 0, 0, sizex, sizey, '▚', tcell.Style{}.Foreground(tcell.ColorGrey).Background(tcell.ColorBlack)) //ui.DrawRect(screen, 0, 0, sizex, sizey, '▚', tcell.Style{}.Foreground(tcell.ColorGrey).Background(tcell.ColorBlack))
ui.DrawRect(s, 0, 1, sizex, sizey-1, ' ', tcell.Style{}.Background(tcell.ColorBlack)) ui.DrawRect(s, 0, 1, sizex, sizey-1, ' ', tcell.Style{}.Background(tcell.ColorBlack))
// if tabContainer.GetTabCount() > 0 { // Draw the tab container only if a tab is open
// tabContainer.Draw(s)
// }
panelContainer.Draw(s) panelContainer.Draw(s)
menuBar.Draw(s) menuBar.Draw(s)