forked from joejulian/gio
app: [API] add Window.Perform, replacing Close, Raise, Centered
This new method performs user related actions on the Window, supporting custom window decorations. It supersedes the Close and Raise methods as well as the Centered window option. Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
@@ -1024,14 +1024,6 @@ func (w *window) setTitle(prev, cnf Config) {
|
||||
func (w *window) Perform(actions system.Action) {
|
||||
walkActions(actions, func(action system.Action) {
|
||||
switch action {
|
||||
case system.ActionMinimize:
|
||||
w.Configure([]Option{Minimized.Option()})
|
||||
case system.ActionMaximize:
|
||||
w.Configure([]Option{Maximized.Option()})
|
||||
case system.ActionUnmaximize:
|
||||
w.Configure([]Option{Windowed.Option()})
|
||||
case system.ActionClose:
|
||||
w.Close()
|
||||
case system.ActionMove:
|
||||
w.move()
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user