From e3832245e672e85c82707af1f9f42f04a6ba87e6 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 27 Mar 2026 10:52:30 -0500 Subject: [PATCH] Add Reject URLs: Accept story URLs drag/drop & paste like Add Stories by URL --- calibre-plugin/config.py | 1 + calibre-plugin/dialogs.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/calibre-plugin/config.py b/calibre-plugin/config.py index 9a5f09b7..1e123ea0 100644 --- a/calibre-plugin/config.py +++ b/calibre-plugin/config.py @@ -760,6 +760,7 @@ class BasicTab(QWidget): tooltip=_("One URL per line:\nhttp://...,note\nhttp://...,title by author - note"), rejectreasons=rejecturllist.get_reject_reasons(), reasonslabel=_('Add this reason to all URLs added:'), + accept_storyurls=True, save_size_name='fff:Add Reject List') d.exec_() if d.result() == d.Accepted: diff --git a/calibre-plugin/dialogs.py b/calibre-plugin/dialogs.py index 8e3978e7..93bf3f0b 100644 --- a/calibre-plugin/dialogs.py +++ b/calibre-plugin/dialogs.py @@ -1328,6 +1328,7 @@ class EditTextDialog(SizePersistedDialog): icon=None, title=None, label=None, tooltip=None, read_only=False, rejectreasons=[],reasonslabel=None, + accept_storyurls=False, save_size_name='fff:edit text dialog', ): SizePersistedDialog.__init__(self, parent, save_size_name) @@ -1341,7 +1342,10 @@ class EditTextDialog(SizePersistedDialog): self.setWindowIcon(icon) self.l.addWidget(self.label) - self.textedit = QTextEdit(self) + if accept_storyurls: + self.textedit = DroppableQTextEdit(self) + else: + self.textedit = QTextEdit(self) self.textedit.setLineWrapMode(QTextEditNoWrap) self.textedit.setReadOnly(read_only) self.textedit.setText(text)