mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
experiment with standalone windows
This commit is contained in:
parent
36881da474
commit
a422ddb57b
3 changed files with 10 additions and 1 deletions
|
@ -75,6 +75,7 @@ class Config(dict):
|
|||
'showStudyOptions': False,
|
||||
'showStudyStats': True,
|
||||
'showCardTimer': True,
|
||||
'standaloneWindows': True,
|
||||
'extraNewCards': 5,
|
||||
'randomizeOnCram': True,
|
||||
'created': time.time(),
|
||||
|
|
|
@ -22,7 +22,11 @@ class FocusButton(QPushButton):
|
|||
class AddCards(QDialog):
|
||||
|
||||
def __init__(self, parent):
|
||||
QDialog.__init__(self, parent, Qt.Window)
|
||||
if parent.config['standaloneWindows']:
|
||||
windParent = None
|
||||
else:
|
||||
windParent = parent
|
||||
QDialog.__init__(self, windParent, Qt.Window)
|
||||
self.parent = parent
|
||||
self.config = parent.config
|
||||
self.dialog = ankiqt.forms.addcards.Ui_AddCards()
|
||||
|
|
|
@ -278,6 +278,10 @@ class StatusDelegate(QItemDelegate):
|
|||
class EditDeck(QMainWindow):
|
||||
|
||||
def __init__(self, parent):
|
||||
if parent.config['standaloneWindows']:
|
||||
windParent = None
|
||||
else:
|
||||
windParent = parent
|
||||
QMainWindow.__init__(self, parent)
|
||||
self.parent = parent
|
||||
self.deck = self.parent.deck
|
||||
|
|
Loading…
Reference in a new issue