Merge pull request #865 from hgiesel/configaction
Open AddonsDialog via dialog manager
This commit is contained in:
commit
623c5b305a
@ -69,7 +69,7 @@ except ImportError as e:
|
|||||||
# - make preferences modal? cmd+q does wrong thing
|
# - make preferences modal? cmd+q does wrong thing
|
||||||
|
|
||||||
|
|
||||||
from aqt import addcards, browser, editcurrent # isort:skip
|
from aqt import addcards, addons, browser, editcurrent # isort:skip
|
||||||
from aqt import stats, about, preferences, mediasync # isort:skip
|
from aqt import stats, about, preferences, mediasync # isort:skip
|
||||||
|
|
||||||
|
|
||||||
@ -77,6 +77,7 @@ class DialogManager:
|
|||||||
|
|
||||||
_dialogs: Dict[str, list] = {
|
_dialogs: Dict[str, list] = {
|
||||||
"AddCards": [addcards.AddCards, None],
|
"AddCards": [addcards.AddCards, None],
|
||||||
|
"AddonsDialog": [addons.AddonsDialog, None],
|
||||||
"Browser": [browser.Browser, None],
|
"Browser": [browser.Browser, None],
|
||||||
"EditCurrent": [editcurrent.EditCurrent, None],
|
"EditCurrent": [editcurrent.EditCurrent, None],
|
||||||
"DeckStats": [stats.DeckStats, None],
|
"DeckStats": [stats.DeckStats, None],
|
||||||
|
@ -218,7 +218,7 @@ class AddonManager:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def onAddonsDialog(self) -> None:
|
def onAddonsDialog(self) -> None:
|
||||||
AddonsDialog(self)
|
aqt.dialogs.open("AddonsDialog", self)
|
||||||
|
|
||||||
# Metadata
|
# Metadata
|
||||||
######################################################################
|
######################################################################
|
||||||
@ -731,6 +731,8 @@ class AddonsDialog(QDialog):
|
|||||||
|
|
||||||
def reject(self) -> None:
|
def reject(self) -> None:
|
||||||
saveGeom(self, "addons")
|
saveGeom(self, "addons")
|
||||||
|
aqt.dialogs.markClosed("AddonsDialog")
|
||||||
|
|
||||||
return QDialog.reject(self)
|
return QDialog.reject(self)
|
||||||
|
|
||||||
def name_for_addon_list(self, addon: AddonMeta) -> str:
|
def name_for_addon_list(self, addon: AddonMeta) -> str:
|
||||||
|
Loading…
Reference in New Issue
Block a user