add extensions to default settings

This commit is contained in:
dries.k
2022-09-01 21:38:22 +02:00
parent 6b2536916f
commit 7957c0c4d6
2 changed files with 2 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ DEFAULT_SETTINGS = {
"MainWindow/button/size": 33,
"MainWindow/application/icon/size": 40,
"ImagePopup/enabled": False,
"ImagePopup/extensions": [".jpg", ".jpeg", ".png", ".svg"],
"ImagePopup/w": 400,
"ImagePopup/h": 400,
}

View File

@@ -94,7 +94,7 @@ class MessageWidget(QtWidgets.QWidget, Ui_Form):
return
_, ext = os.path.splitext(link)
if ext in [".jpg", ".jpeg", ".png"]:
if ext in settings.value("ImagePopup/extensions", type=list):
self.image_popup.emit(link, QtGui.QCursor.pos())
def link_callbacks(self):