mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Improve Windows stash behaviour (#2543)
* Rename manager.instance to Manager * Show dialog message on fatal error on Windows * Hide console windows explicitly on icon launch Gets rid of the windowsgui flag, which causes all sorts of issues. Instead, checks if stash was launched from the icon, and if so hides the console. * Remove fixconsole * Add changelog entries
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package desktop
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
@@ -29,6 +30,8 @@ type FaviconProvider interface {
|
||||
// MUST be run on the main goroutine or will have no effect on macOS
|
||||
func Start(shutdownHandler ShutdownHandler, faviconProvider FaviconProvider) {
|
||||
if IsDesktop() {
|
||||
hideConsole()
|
||||
|
||||
c := config.GetInstance()
|
||||
if !c.GetNoBrowser() {
|
||||
openURLInBrowser("")
|
||||
@@ -60,6 +63,11 @@ func SendNotification(title string, text string) {
|
||||
}
|
||||
|
||||
func IsDesktop() bool {
|
||||
if isDoubleClickLaunched() {
|
||||
fmt.Println("double click launched")
|
||||
return true
|
||||
}
|
||||
|
||||
// Check if running under root
|
||||
if os.Getuid() == 0 {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user