diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 1aa23d721..f304612ec 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -51,7 +51,7 @@ Andrew Gaul kenden Nickolay Yudin neitrinoweb -Andreas Reis +Andreas Reis Matt Krump Alexander Presnyakov abdo diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index 8fa8360c4..6dfcc858b 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -319,6 +319,9 @@ def parseArgs(argv): parser.add_argument("-p", "--profile", help="profile name to load", default="") parser.add_argument("-l", "--lang", help="interface language (en, de, etc)") parser.add_argument("-v", "--version", help="print the Anki version and exit") + parser.add_argument( + "-s", "--safemode", help="disable addons and automatic syncing" + ) return parser.parse_known_args(argv[1:]) diff --git a/qt/aqt/main.py b/qt/aqt/main.py index a20ea514e..8cea38bcc 100644 --- a/qt/aqt/main.py +++ b/qt/aqt/main.py @@ -112,7 +112,9 @@ class AnkiQt(QMainWindow): self.app = app self.pm = profileManager # init rest of app - self.safeMode = self.app.queryKeyboardModifiers() & Qt.ShiftModifier + self.safeMode = ( + self.app.queryKeyboardModifiers() & Qt.ShiftModifier + ) or self.opts.safemode try: self.setupUI() self.setupAddons(args)