mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Sync to trunk.
This commit is contained in:
commit
0d6ad0c46c
@ -277,7 +277,16 @@ class StreamReadWrapper(object):
|
||||
|
||||
def detect_ncpus():
|
||||
"""Detects the number of effective CPUs in the system"""
|
||||
return multiprocessing.cpu_count()
|
||||
ans = -1
|
||||
try:
|
||||
ans = multiprocessing.cpu_count()
|
||||
except:
|
||||
from PyQt4.Qt import QThread
|
||||
ans = QThread.idealThreadCount()
|
||||
if ans < 1:
|
||||
ans = 1
|
||||
return ans
|
||||
|
||||
|
||||
def launch(path_or_url):
|
||||
if os.path.exists(path_or_url):
|
||||
|
@ -865,7 +865,7 @@ class PRS500(DeviceConfig, DevicePlugin):
|
||||
size = sum(sizes)
|
||||
space = self.free_space(end_session=False)
|
||||
mspace = space[0]
|
||||
cspace = space[1] if space[1] >= space[2] else space[2]
|
||||
cspace = space[2] if len(space) > 2 and space[2] >= space[1] else space[1]
|
||||
if on_card and size > cspace - 1024*1024:
|
||||
raise FreeSpaceError("There is insufficient free space "+\
|
||||
"on the storage card")
|
||||
|
@ -23,7 +23,7 @@ class DRMError(ValueError):
|
||||
pass
|
||||
|
||||
BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'htm', 'xhtm',
|
||||
'html', 'xhtml', 'pdf', 'prc', 'mobi', 'azw', 'doc',
|
||||
'html', 'xhtml', 'pdf', 'pdb', 'prc', 'mobi', 'azw', 'doc',
|
||||
'epub', 'fb2', 'djvu', 'lrx', 'cbr', 'cbz', 'oebzip',
|
||||
'rb', 'imp', 'odt']
|
||||
|
||||
|
@ -49,4 +49,5 @@ class PluginWidget(Widget, Ui_Form):
|
||||
if idx < 0:
|
||||
idx = 0
|
||||
g.setCurrentIndex(0)
|
||||
return True
|
||||
return False
|
||||
|
@ -216,6 +216,12 @@ class LocationModel(QAbstractListModel):
|
||||
return NONE
|
||||
|
||||
def update_devices(self, cp=(None, None), fs=[-1, -1, -1]):
|
||||
if cp is None:
|
||||
cp = (None, None)
|
||||
if isinstance(cp, (str, unicode)):
|
||||
cp = (cp, None)
|
||||
if len(fs) < 3:
|
||||
fs = list(fs) + [0]
|
||||
self.free[0] = fs[0]
|
||||
self.free[1] = fs[1]
|
||||
self.free[2] = fs[2]
|
||||
|
@ -23,7 +23,7 @@
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Choose a location for your books. When you add books to calibre, they will be stored here:</string>
|
||||
<string>Choose a location for your books. When you add books to calibre, they will be copied here:</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
@ -4,9 +4,9 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: calibre 0.6.0b2\n"
|
||||
"POT-Creation-Date: 2009-06-07 13:48+PDT\n"
|
||||
"PO-Revision-Date: 2009-06-07 13:48+PDT\n"
|
||||
"Project-Id-Version: calibre 0.6.0b3\n"
|
||||
"POT-Creation-Date: 2009-06-10 13:26+PDT\n"
|
||||
"PO-Revision-Date: 2009-06-10 13:26+PDT\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: LANGUAGE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -477,21 +477,21 @@ msgstr ""
|
||||
msgid "Communicate with the Sony PRS-700 eBook reader."
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:230
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:280
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:250
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:300
|
||||
msgid "Unable to detect the %s disk drive. Try rebooting."
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:348
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:451
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:368
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:471
|
||||
msgid "Unable to detect the %s disk drive."
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:438
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:458
|
||||
msgid "You must install the pmount package."
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:457
|
||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:477
|
||||
msgid "Unable to mount main memory (Error code: %d)"
|
||||
msgstr ""
|
||||
|
||||
@ -4327,7 +4327,7 @@ msgstr ""
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:302
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:308
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:313
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:368
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/widgets.py:374
|
||||
msgid "None"
|
||||
msgstr ""
|
||||
|
||||
@ -5495,7 +5495,7 @@ msgid "&Kindle email:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/library_ui.py:43
|
||||
msgid "Choose a location for your books. When you add books to calibre, they will be stored here:"
|
||||
msgid "Choose a location for your books. When you add books to calibre, they will be copied here:"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/library_ui.py:44
|
||||
@ -6133,8 +6133,8 @@ msgstr ""
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_glasgow_herald.py:10
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_globe_and_mail.py:16
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_guardian.py:16
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_harpers.py:13
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_harpers_full.py:27
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_harpers.py:14
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_harpers_full.py:26
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_hindu.py:10
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_honoluluadvertiser.py:18
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_iht.py:15
|
||||
@ -6220,6 +6220,8 @@ msgstr ""
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_elargentino.py:23
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_elcronista.py:16
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_elmundo.py:60
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_elperiodico_spanish.py:25
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_expansion_spanish.py:25
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_granma.py:24
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_infobae.py:21
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_juventudrebelde.py:23
|
||||
@ -6231,6 +6233,8 @@ msgstr ""
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_lanacion_chile.py:54
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_laprensa.py:60
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_laprensa_ni.py:25
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_lavanguardia.py:25
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_marca.py:25
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_pagina12.py:25
|
||||
msgid "Spanish"
|
||||
msgstr ""
|
||||
@ -6279,6 +6283,11 @@ msgstr ""
|
||||
msgid "Bosnian"
|
||||
msgstr ""
|
||||
|
||||
#:
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_elperiodico_catalan.py:25
|
||||
msgid "Catalan"
|
||||
msgstr ""
|
||||
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_estadao.py:62
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_jb_online.py:47
|
||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_o_globo.py:69
|
||||
|
Loading…
x
Reference in New Issue
Block a user