add extensions to default settings
This commit is contained in:
@@ -20,6 +20,7 @@ DEFAULT_SETTINGS = {
|
|||||||
"MainWindow/button/size": 33,
|
"MainWindow/button/size": 33,
|
||||||
"MainWindow/application/icon/size": 40,
|
"MainWindow/application/icon/size": 40,
|
||||||
"ImagePopup/enabled": False,
|
"ImagePopup/enabled": False,
|
||||||
|
"ImagePopup/extensions": [".jpg", ".jpeg", ".png", ".svg"],
|
||||||
"ImagePopup/w": 400,
|
"ImagePopup/w": 400,
|
||||||
"ImagePopup/h": 400,
|
"ImagePopup/h": 400,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class MessageWidget(QtWidgets.QWidget, Ui_Form):
|
|||||||
return
|
return
|
||||||
|
|
||||||
_, ext = os.path.splitext(link)
|
_, 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())
|
self.image_popup.emit(link, QtGui.QCursor.pos())
|
||||||
|
|
||||||
def link_callbacks(self):
|
def link_callbacks(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user