mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-21 07:04:02 +00:00
Use QDesktopServices to open cover images instead of webbrowser2
QDesktopServices takes care of honoring the user configuration so when opening an image, the user preferred external app is used instead of always using a web browser. Fixes PICARD-1501
This commit is contained in:
committed by
Philipp Wolfer
parent
86ea3c11f7
commit
29c2f45de1
@@ -38,8 +38,7 @@ from picard.util import (
|
||||
encode_filename,
|
||||
format_time,
|
||||
htmlescape,
|
||||
union_sorted_lists,
|
||||
webbrowser2,
|
||||
union_sorted_lists
|
||||
)
|
||||
|
||||
from picard.ui import PicardDialog
|
||||
@@ -243,7 +242,8 @@ class InfoDialog(PicardDialog):
|
||||
return
|
||||
filename = data.tempfile_filename
|
||||
if filename:
|
||||
webbrowser2.open("file://" + filename)
|
||||
url = QtCore.QUrl.fromLocalFile(filename)
|
||||
QtGui.QDesktopServices.openUrl(url)
|
||||
|
||||
|
||||
def format_file_info(file_):
|
||||
|
||||
Reference in New Issue
Block a user