mirror of
https://git.srhtnin.garden/sarah/SaraSort.git
synced 2026-10-15 02:53:17 +02:00
macOS support
This commit is contained in:
1 parent
5613f4f8fe
commit
1bd37db1ba
8 files changed
+113
-29
No files matched your search
+2
-2
@@ -7,7 +7,7 @@ from typing import Callable, Optional
|
||||
|
||||
import flet as ft
|
||||
|
||||
from Core import AppConfig, ChildEnvironment, ChipButton, IsWindows, Note, NotificationStyle, Palette
|
||||
from Core import AppConfig, ChildEnvironment, ChipButton, IsMac, IsWindows, Note, NotificationStyle, Palette
|
||||
from Service import RestartIfRunning
|
||||
from Sortd import Setup, SortdError
|
||||
|
||||
@@ -72,7 +72,7 @@ class App:
|
||||
if IsWindows:
|
||||
os.startfile(PathText) # Explorer
|
||||
else:
|
||||
subprocess.Popen(["xdg-open", PathText], env=ChildEnvironment(), start_new_session=True)
|
||||
subprocess.Popen(["open" if IsMac else "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