-
Notifications
You must be signed in to change notification settings - Fork 360
Expand file tree
/
Copy pathgui_on.go
More file actions
34 lines (28 loc) · 895 Bytes
/
Copy pathgui_on.go
File metadata and controls
34 lines (28 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//go:build !nogui
package main
import (
"github.com/yetone/magpie/internal/gui"
"github.com/yetone/magpie/internal/proc"
)
const hasGUI = true
// the desktop app may have been opened from the Finder, with none of the
// PATH a terminal has
func runGUI(showMain bool, link string) error {
proc.UserPath()
gui.Started = ownSignals // once Wails handles them: it quits through OnShutdown
return gui.Run(version, showMain, link)
}
// runWindow starts the app with its window open on view ("" for the first
// tab).
func runWindow(view string) error {
gui.OpenView = view
return runGUI(true, "")
}
// runPanel starts the app with its quick panel open, or toggles the panel
// of the one already running.
func runPanel() error {
proc.UserPath()
gui.OpenPanel = true
gui.Started = ownSignals // once Wails handles them: it quits through OnShutdown
return gui.Run(version, false, "")
}