mirror of
https://git.srhtnin.garden/sarah/SaraSort.git
synced 2026-10-14 18:48:11 +02:00
Windows support
This commit is contained in:
1 parent
f1935a119b
commit
6cb2bd74cc
13 files changed
+207
-25
No files matched your search
+5
-2
@@ -7,7 +7,7 @@ from typing import Callable, Optional
|
||||
|
||||
import flet as ft
|
||||
|
||||
from Core import AppConfig, ChildEnvironment, ChipButton, Note, NotificationStyle, Palette
|
||||
from Core import AppConfig, ChildEnvironment, ChipButton, IsWindows, Note, NotificationStyle, Palette
|
||||
from Service import RestartIfRunning
|
||||
from Sortd import Setup, SortdError
|
||||
|
||||
@@ -69,7 +69,10 @@ class App:
|
||||
|
||||
def OpenFolder(self, PathText: str) -> None:
|
||||
try:
|
||||
subprocess.Popen(["xdg-open", PathText], env=ChildEnvironment(), start_new_session=True)
|
||||
if IsWindows:
|
||||
os.startfile(PathText) # Explorer
|
||||
else:
|
||||
subprocess.Popen(["xdg-open", PathText], env=ChildEnvironment(), start_new_session=True)
|
||||
except OSError as Error:
|
||||
self.Notify(f"Couldn't open {PathText}: {Error}", "error")
|
||||
|
||||
|
||||
Reference in new issue
Block a user