summaryrefslogtreecommitdiff
path: root/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.go')
-rw-r--r--plugin.go60
1 files changed, 0 insertions, 60 deletions
diff --git a/plugin.go b/plugin.go
index 19af06f..787ced3 100644
--- a/plugin.go
+++ b/plugin.go
@@ -79,66 +79,6 @@ func addText(n *tree.Node, s string) {
w.AddText(s)
}
-func newaction(n *tree.Node, atype widget.ActionType) {
- log.Log(INFO, "newaction() START", atype)
- if !me.ok {
- log.Log(INFO, "newaction() START NOT OKAY", atype)
- log.Log(INFO, "newaction() START NOT OKAY", atype)
- log.Log(INFO, "newaction() START NOT OKAY", atype)
- waitOK()
- }
- if n == nil {
- log.Warn("Tree Error: Add() sent n == nil")
- return
- }
- if n.TK == nil {
- log.Warn("Tree sent an action on a widget we didn't seem to have.")
- // do this init here again? Probably something
- // went wrong and we should reset the our while gocui.View tree
- n.TK = initWidget(n)
- }
- w := n.TK.(*guiWidget)
- switch atype {
- case widget.Show:
- if me.debug {
- w.dumpWidget("Show()")
- }
- w.node.State.Hidden = false
- w.Show()
- case widget.Hide:
- if me.debug {
- w.dumpWidget("Hide()")
- }
- if n.Hidden() {
- // already hidden
- } else {
- // log.Log(NOW, "attempt to hide() =", atype, n.WidgetId, n.WidgetType, n.ProgName())
- w.node.State.Hidden = true
- w.Hide()
- }
- case widget.Move:
- log.Log(NOW, "attempt to move() =", atype, n.WidgetType, n.ProgName())
- case widget.ToolkitClose:
- log.Log(NOW, "attempting to close the plugin and release stdout and stderr")
- standardClose()
- case widget.Enable:
- w.Enable()
- case widget.Disable:
- w.Disable()
- case widget.Delete:
- if w == nil {
- return
- } else {
- w.hideWidgets()
- w.deleteNode()
- }
- n.DeleteNode()
- default:
- log.Log(ERROR, "newaction() UNHANDLED Action Type =", atype, "WidgetType =", n.WidgetType, "Name =", n.ProgName())
- }
- log.Log(INFO, "newaction() END", atype, n.String())
-}
-
func (w *guiWidget) deleteGocuiViews() {
if w.v == nil {
// no gocui view to delete for this widget