mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
pep8
This commit is contained in:
parent
d329202ec6
commit
b7d88ff218
@ -187,8 +187,8 @@ class BackupStatus(QDialog): # {{{
|
|||||||
dirty_text = '%s' % db.dirty_queue_length()
|
dirty_text = '%s' % db.dirty_queue_length()
|
||||||
except:
|
except:
|
||||||
dirty_text = _('none')
|
dirty_text = _('none')
|
||||||
self.msg.setText('<p>' +
|
self.msg.setText('<p>' + _(
|
||||||
_('Book metadata files remaining to be written: %s') % dirty_text)
|
'Book metadata files remaining to be written: %s') % dirty_text)
|
||||||
QTimer.singleShot(1000, self.update)
|
QTimer.singleShot(1000, self.update)
|
||||||
|
|
||||||
def mark_all_dirty(self):
|
def mark_all_dirty(self):
|
||||||
@ -398,8 +398,9 @@ class ChooseLibraryAction(InterfaceAction):
|
|||||||
base = os.path.dirname(loc)
|
base = os.path.dirname(loc)
|
||||||
old_name = name.replace('&&', '&')
|
old_name = name.replace('&&', '&')
|
||||||
newname, ok = QInputDialog.getText(self.gui, _('Rename') + ' ' + old_name,
|
newname, ok = QInputDialog.getText(self.gui, _('Rename') + ' ' + old_name,
|
||||||
'<p>'+_('Choose a new name for the library <b>%s</b>. ')%name +
|
'<p>'+_(
|
||||||
'<p>'+_('Note that the actual library folder will be renamed.'),
|
'Choose a new name for the library <b>%s</b>. ')%name + '<p>'+_(
|
||||||
|
'Note that the actual library folder will be renamed.'),
|
||||||
text=old_name)
|
text=old_name)
|
||||||
newname = sanitize_file_name_unicode(unicode(newname))
|
newname = sanitize_file_name_unicode(unicode(newname))
|
||||||
if not ok or not newname or newname == old_name:
|
if not ok or not newname or newname == old_name:
|
||||||
@ -409,8 +410,7 @@ class ChooseLibraryAction(InterfaceAction):
|
|||||||
return error_dialog(self.gui, _('Already exists'),
|
return error_dialog(self.gui, _('Already exists'),
|
||||||
_('The folder %s already exists. Delete it first.') %
|
_('The folder %s already exists. Delete it first.') %
|
||||||
newloc, show=True)
|
newloc, show=True)
|
||||||
if (iswindows and len(newloc) >
|
if (iswindows and len(newloc) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||||
LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
|
||||||
return error_dialog(self.gui, _('Too long'),
|
return error_dialog(self.gui, _('Too long'),
|
||||||
_('Path to library too long. Must be less than'
|
_('Path to library too long. Must be less than'
|
||||||
' %d characters.')%LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT,
|
' %d characters.')%LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT,
|
||||||
@ -470,8 +470,7 @@ class ChooseLibraryAction(InterfaceAction):
|
|||||||
LibraryDatabase = db_class()
|
LibraryDatabase = db_class()
|
||||||
m = self.gui.library_view.model()
|
m = self.gui.library_view.model()
|
||||||
db = m.db
|
db = m.db
|
||||||
if (iswindows and len(db.library_path) >
|
if (iswindows and len(db.library_path) > LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
||||||
LibraryDatabase.WINDOWS_LIBRARY_PATH_LIMIT):
|
|
||||||
return error_dialog(self.gui, _('Too long'),
|
return error_dialog(self.gui, _('Too long'),
|
||||||
_('Path to library too long. Must be less than'
|
_('Path to library too long. Must be less than'
|
||||||
' %d characters. Move your library to a location with'
|
' %d characters. Move your library to a location with'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user