mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2204 ("Delete news when sent" does not work)
This commit is contained in:
parent
5254aec93e
commit
c4f554dc0e
@ -11,7 +11,6 @@ from urllib import unquote, quote
|
||||
from urlparse import urlparse
|
||||
|
||||
|
||||
from calibre.constants import __version__ as VERSION
|
||||
from calibre import relpath
|
||||
from calibre.utils.config import OptionParser
|
||||
|
||||
@ -197,7 +196,7 @@ class MetaInformation(object):
|
||||
if hasattr(mi, attr):
|
||||
setattr(ans, attr, getattr(mi, attr))
|
||||
|
||||
def __init__(self, title, authors=[_('Unknown')]):
|
||||
def __init__(self, title, authors=(_('Unknown'),)):
|
||||
'''
|
||||
@param title: title or "Unknown" or a MetaInformation object
|
||||
@param authors: List of strings or []
|
||||
@ -208,9 +207,9 @@ class MetaInformation(object):
|
||||
title = mi.title
|
||||
authors = mi.authors
|
||||
self.title = title
|
||||
self.author = authors # Needed for backward compatibility
|
||||
self.author = list(authors) # Needed for backward compatibility
|
||||
#: List of strings or []
|
||||
self.authors = authors
|
||||
self.authors = list(authors)
|
||||
self.tags = getattr(mi, 'tags', [])
|
||||
#: mi.cover_data = (ext, data)
|
||||
self.cover_data = getattr(mi, 'cover_data', (None, None))
|
||||
|
@ -397,6 +397,9 @@ class ConfigDialog(QDialog, Ui_Dialog):
|
||||
self.separate_cover_flow.setChecked(config['separate_cover_flow'])
|
||||
self.setup_email_page()
|
||||
self.category_view.setCurrentIndex(self.category_view.model().index(0))
|
||||
self.delete_news.setEnabled(bool(self.sync_news.isChecked()))
|
||||
self.connect(self.sync_news, SIGNAL('toggled(bool)'),
|
||||
self.delete_news.setEnabled)
|
||||
|
||||
def setup_email_page(self):
|
||||
opts = smtp_prefs().parse()
|
||||
|
@ -371,7 +371,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="delete_news">
|
||||
<property name="text">
|
||||
<string>&Delete news from library when it is sent to reader</string>
|
||||
<string>&Delete news from library when it is automatically sent to reader</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user