diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-05-02 19:05:42 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-05-02 19:05:42 +1000 |
commit | 5dacbb6293bcff48649fd9fcae6af8e1b76d23ad (patch) | |
tree | 58199784e1d135eedaf836ba4cbf8303d30fee38 /pkg/gui/context.go | |
parent | 8d68ab41b6670c37802279bef7079991bea6888a (diff) |
merge master into refactor-better-encapsulation
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r-- | pkg/gui/context.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go index 252815e18..d5a7f35a2 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -53,7 +53,7 @@ func (self *ContextMgr) Replace(c types.Context) error { defer self.Unlock() - return self.activateContext(c, types.OnFocusOpts{}) + return self.ActivateContext(c, types.OnFocusOpts{}) } func (self *ContextMgr) Push(c types.Context, opts ...types.OnFocusOpts) error { @@ -83,7 +83,7 @@ func (self *ContextMgr) Push(c types.Context, opts ...types.OnFocusOpts) error { return nil } - return self.activateContext(contextToActivate, singleOpts) + return self.ActivateContext(contextToActivate, singleOpts) } // Adjusts the context stack based on the context that's being pushed and @@ -162,7 +162,7 @@ func (self *ContextMgr) Pop() error { return err } - return self.activateContext(newContext, types.OnFocusOpts{}) + return self.ActivateContext(newContext, types.OnFocusOpts{}) } func (self *ContextMgr) RemoveContexts(contextsToRemove []types.Context) error { @@ -192,7 +192,7 @@ func (self *ContextMgr) RemoveContexts(contextsToRemove []types.Context) error { } // activate the item at the top of the stack - return self.activateContext(contextToActivate, types.OnFocusOpts{}) + return self.ActivateContext(contextToActivate, types.OnFocusOpts{}) } func (self *ContextMgr) deactivateContext(c types.Context, opts types.OnFocusLostOpts) error { @@ -218,7 +218,7 @@ func (self *ContextMgr) deactivateContext(c types.Context, opts types.OnFocusLos return nil } -func (self *ContextMgr) activateContext(c types.Context, opts types.OnFocusOpts) error { +func (self *ContextMgr) ActivateContext(c types.Context, opts types.OnFocusOpts) error { viewName := c.GetViewName() v, err := self.gui.c.GocuiGui().View(viewName) if err != nil { |