Skip to content

Commit 3ad2af6

Browse files
committed
Fix types in Process args, remove hardcoded development False
1 parent 04d8269 commit 3ad2af6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

aw_watcher_window/macos.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ def getTitle(info: str) -> str:
1919

2020
def background_ensure_permissions() -> None:
2121
from multiprocessing import Process
22-
# TODO: remove print before merging
23-
print("Starting permission check thread")
24-
permission_process = Process(target=ensure_permissions, args=([]))
22+
permission_process = Process(target=ensure_permissions, args=(()))
2523
permission_process.start()
2624
permission_process.join()
2725
return
@@ -30,8 +28,7 @@ def background_ensure_permissions() -> None:
3028
def ensure_permissions() -> None:
3129
from ApplicationServices import AXIsProcessTrusted
3230
from AppKit import NSAlert, NSAlertFirstButtonReturn, NSWorkspace, NSURL
33-
#accessibility_permissions = AXIsProcessTrusted()
34-
accessibility_permissions = False
31+
accessibility_permissions = AXIsProcessTrusted()
3532
if not accessibility_permissions:
3633
title = "Missing accessibility permissions"
3734
info = "To let ActivityWatch capture window titles grant it accessibility permissions. \n If you've already given ActivityWatch accessibility permissions and are still seeing this dialog, try removing and re-adding them."
@@ -42,8 +39,7 @@ def ensure_permissions() -> None:
4239

4340
ok_button = alert.addButtonWithTitle_("Open accessibility settings")
4441

45-
# Is cancel a good name here since the user isn't really cancelling anything?
46-
alert.addButtonWithTitle_("Cancel")
42+
alert.addButtonWithTitle_("Close")
4743
choice = alert.runModal()
4844
print(choice)
4945
if choice == NSAlertFirstButtonReturn:

0 commit comments

Comments
 (0)