mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-24 00:26:08 +00:00
Merge branch 'master' into groupbox_title_workaround
This commit is contained in:
@@ -104,9 +104,6 @@ class CAATypesSelectorDialog(QtWidgets.QDialog):
|
||||
QtWidgets.QDialogButtonBox.RejectRole)
|
||||
self.buttonbox.addButton(
|
||||
StandardButton(StandardButton.HELP), QtWidgets.QDialogButtonBox.HelpRole)
|
||||
self.buttonbox.accepted.connect(self.accept)
|
||||
self.buttonbox.rejected.connect(self.reject)
|
||||
self.buttonbox.helpRequested.connect(self.help)
|
||||
|
||||
extrabuttons = [
|
||||
(N_("Chec&k all"), self.checkall),
|
||||
@@ -123,6 +120,7 @@ class CAATypesSelectorDialog(QtWidgets.QDialog):
|
||||
|
||||
self.buttonbox.accepted.connect(self.accept)
|
||||
self.buttonbox.rejected.connect(self.reject)
|
||||
self.buttonbox.helpRequested.connect(self.help)
|
||||
|
||||
def help(self):
|
||||
webbrowser2.goto('doc_cover_art_types')
|
||||
@@ -138,13 +136,8 @@ class CAATypesSelectorDialog(QtWidgets.QDialog):
|
||||
item.setChecked(value)
|
||||
|
||||
def get_selected_types(self):
|
||||
types = []
|
||||
for item, typ in self._items.items():
|
||||
if item.isChecked():
|
||||
types.append(typ['name'])
|
||||
if not types:
|
||||
return ['front']
|
||||
return types
|
||||
return [typ['name'] for item, typ in self._items.items() if
|
||||
item.isChecked()] or ['front']
|
||||
|
||||
@staticmethod
|
||||
def run(parent=None, types=None):
|
||||
|
||||
@@ -30,6 +30,7 @@ from picard.util import (format_time, encode_filename,
|
||||
union_sorted_lists, htmlescape)
|
||||
from picard.ui import PicardDialog
|
||||
from picard.ui.ui_infodialog import Ui_InfoDialog
|
||||
from picard.ui.util import StandardButton
|
||||
|
||||
|
||||
class ArtworkCoverWidget(QtWidgets.QWidget):
|
||||
@@ -113,8 +114,9 @@ class InfoDialog(PicardDialog):
|
||||
self.existing_images = []
|
||||
self.display_existing_artwork = False
|
||||
self.ui.setupUi(self)
|
||||
self.ui.buttonBox.addButton(
|
||||
StandardButton(StandardButton.CLOSE), QtWidgets.QDialogButtonBox.AcceptRole)
|
||||
self.ui.buttonBox.accepted.connect(self.accept)
|
||||
self.ui.buttonBox.rejected.connect(self.reject)
|
||||
|
||||
# Add the ArtworkTable to the ui
|
||||
self.ui.artwork_table = ArtworkTable(self.display_existing_artwork)
|
||||
@@ -258,7 +260,7 @@ def format_file_info(file_):
|
||||
else:
|
||||
ch = string_(ch)
|
||||
info.append((_('Channels:'), ch))
|
||||
return '<br/>'.join(map(lambda i: '<b>%s</b><br/>%s' %
|
||||
return '<br/>'.join(map(lambda i: '<b>%s</b> %s' %
|
||||
(htmlescape(i[0]),
|
||||
htmlescape(i[1])), info))
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class Ui_InfoDialog(object):
|
||||
self.info_scroll.setObjectName("info_scroll")
|
||||
self.scrollAreaWidgetContents = QtWidgets.QWidget()
|
||||
self.scrollAreaWidgetContents.setEnabled(True)
|
||||
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 493, 334))
|
||||
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 493, 358))
|
||||
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
|
||||
self.verticalLayoutLabel = QtWidgets.QVBoxLayout(self.scrollAreaWidgetContents)
|
||||
self.verticalLayoutLabel.setContentsMargins(0, 0, 0, 0)
|
||||
@@ -44,7 +44,7 @@ class Ui_InfoDialog(object):
|
||||
self.tabWidget.addTab(self.artwork_tab, "")
|
||||
self.verticalLayout.addWidget(self.tabWidget)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(InfoDialog)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.NoButton)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.verticalLayout.addWidget(self.buttonBox)
|
||||
|
||||
|
||||
@@ -28,11 +28,13 @@ class StandardButton(QtWidgets.QPushButton):
|
||||
OK = 0
|
||||
CANCEL = 1
|
||||
HELP = 2
|
||||
CLOSE = 4
|
||||
|
||||
__types = {
|
||||
OK: (N_('&Ok'), 'SP_DialogOkButton'),
|
||||
CANCEL: (N_('&Cancel'), 'SP_DialogCancelButton'),
|
||||
HELP: (N_('&Help'), 'SP_DialogHelpButton'),
|
||||
CLOSE: (N_('Clos&e'), 'SP_DialogCloseButton'),
|
||||
}
|
||||
|
||||
def __init__(self, btntype):
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>493</width>
|
||||
<height>334</height>
|
||||
<height>358</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayoutLabel">
|
||||
@@ -65,15 +65,14 @@
|
||||
<attribute name="title">
|
||||
<string>A&rtwork</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout">
|
||||
</layout>
|
||||
<layout class="QVBoxLayout"/>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
<set>QDialogButtonBox::NoButton</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user