diff --git a/src/vorta/models.py b/src/vorta/models.py index af4e992e..82e40813 100644 --- a/src/vorta/models.py +++ b/src/vorta/models.py @@ -197,7 +197,7 @@ def init_db(con): if sys.platform == 'darwin': settings += [ {'key': 'autostart', 'value': False, 'type': 'checkbox', - 'label': 'Add Vorta to Login Items in Preferences > Users and Groups > Login Items.'}, + 'label': 'Add Vorta to Login Items in Preferences > Users and Groups > Login Items. (not implemented)'}, {'key': 'enable_notifications', 'value': True, 'type': 'checkbox', 'label': 'Display notifications when background tasks fail.'}, {'key': 'check_for_updates', 'value': True, 'type': 'checkbox', diff --git a/src/vorta/utils.py b/src/vorta/utils.py index 33dfd4fe..02599675 100644 --- a/src/vorta/utils.py +++ b/src/vorta/utils.py @@ -223,19 +223,21 @@ def set_tray_icon(tray, active=False): def open_app_at_startup(enabled=True): if sys.platform == 'darwin': + print('Not implemented due to conflict with keyring package.') # From https://stackoverflow.com/questions/26213884/cocoa-add-app-to-startup-in-sandbox-using-pyobjc - from Foundation import NSDictionary - from Cocoa import NSBundle, NSURL - from CoreFoundation import kCFAllocatorDefault - from LaunchServices import (LSSharedFileListCreate, kLSSharedFileListSessionLoginItems, - LSSharedFileListInsertItemURL, kLSSharedFileListItemHidden, - kLSSharedFileListItemLast, LSSharedFileListItemRemove) - app_path = NSBundle.mainBundle().bundlePath() - url = NSURL.alloc().initFileURLWithPath_(app_path) - login_items = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListSessionLoginItems, None) - props = NSDictionary.dictionaryWithObject_forKey_(True, kLSSharedFileListItemHidden) - - new_item = LSSharedFileListInsertItemURL(login_items, kLSSharedFileListItemLast, - None, None, url, props, None) - if not enabled: - LSSharedFileListItemRemove(login_items, new_item) + # from Foundation import NSDictionary + # from Cocoa import NSBundle, NSURL + # from CoreFoundation import kCFAllocatorDefault + # from LaunchServices import (LSSharedFileListCreate, kLSSharedFileListSessionLoginItems, + # LSSharedFileListInsertItemURL, kLSSharedFileListItemHidden, + # kLSSharedFileListItemLast, LSSharedFileListItemRemove) + # + # app_path = NSBundle.mainBundle().bundlePath() + # url = NSURL.alloc().initFileURLWithPath_(app_path) + # login_items = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListSessionLoginItems, None) + # props = NSDictionary.dictionaryWithObject_forKey_(True, kLSSharedFileListItemHidden) + # + # new_item = LSSharedFileListInsertItemURL(login_items, kLSSharedFileListItemLast, + # None, None, url, props, None) + # if not enabled: + # LSSharedFileListItemRemove(login_items, new_item) diff --git a/vorta.spec b/vorta.spec index 0944625f..3251efca 100644 --- a/vorta.spec +++ b/vorta.spec @@ -11,7 +11,8 @@ a = Analysis(['src/vorta/__main__.py'], ('src/vorta/assets/UI/*', 'assets/UI'), ('src/vorta/assets/icons/*', 'assets/icons'), ], - hiddenimports=['vorta.views.collection_rc'], + hiddenimports=['vorta.views.collection_rc', + ], hookspath=[], runtime_hooks=[], excludes=[],