More stupid PyQt enums

This commit is contained in:
Kovid Goyal 2020-12-20 09:56:46 +05:30
parent 38cc111d46
commit 191d900145
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 3 deletions

View File

@ -1135,7 +1135,7 @@ class Cover(ImageView): # {{{
b.setMenu(m) b.setMenu(m)
m.addAction(QIcon(I('config.png')), _('Customize the styles and colors of the generated cover'), self.custom_cover) m.addAction(QIcon(I('config.png')), _('Customize the styles and colors of the generated cover'), self.custom_cover)
m.addAction(QIcon(I('edit-undo.png')), _('Undo last Generate cover'), self.undo_generate) m.addAction(QIcon(I('edit-undo.png')), _('Undo last Generate cover'), self.undo_generate)
b.setPopupMode(b.DelayedPopup) b.setPopupMode(QToolButton.ToolButtonPopupMode.DelayedPopup)
self.buttons = [self.select_cover_button, self.remove_cover_button, self.buttons = [self.select_cover_button, self.remove_cover_button,
self.trim_cover_button, self.download_cover_button, self.trim_cover_button, self.download_cover_button,
self.generate_cover_button] self.generate_cover_button]

View File

@ -255,7 +255,7 @@ class MetadataSingleDialogBase(QDialog):
'to choose a different prefix.') + '</p>') 'to choose a different prefix.') + '</p>')
b.setIcon(QIcon(I('edit-paste.png'))) b.setIcon(QIcon(I('edit-paste.png')))
b.clicked.connect(self.identifiers.paste_identifier) b.clicked.connect(self.identifiers.paste_identifier)
b.setPopupMode(b.DelayedPopup) b.setPopupMode(QToolButton.ToolButtonPopupMode.DelayedPopup)
b.setMenu(QMenu(b)) b.setMenu(QMenu(b))
self.update_paste_identifiers_menu() self.update_paste_identifiers_menu()
@ -275,7 +275,7 @@ class MetadataSingleDialogBase(QDialog):
b.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon) b.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonTextBesideIcon)
b.setMinimumHeight(b.sizeHint().height()) b.setMinimumHeight(b.sizeHint().height())
b.setIcon(QIcon()) b.setIcon(QIcon())
b.setText(_('&Download metadata')), b.setPopupMode(b.DelayedPopup) b.setText(_('&Download metadata')), b.setPopupMode(QToolButton.ToolButtonPopupMode.DelayedPopup)
b.setToolTip(_('Download metadata for this book [%s]') % self.download_shortcut.key().toString(QKeySequence.SequenceFormat.NativeText)) b.setToolTip(_('Download metadata for this book [%s]') % self.download_shortcut.key().toString(QKeySequence.SequenceFormat.NativeText))
b.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)) b.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed))
self.fetch_metadata_button.clicked.connect(self.fetch_metadata) self.fetch_metadata_button.clicked.connect(self.fetch_metadata)