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():
|
def detect_ncpus():
|
||||||
"""Detects the number of effective CPUs in the system"""
|
"""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):
|
def launch(path_or_url):
|
||||||
if os.path.exists(path_or_url):
|
if os.path.exists(path_or_url):
|
||||||
|
@ -865,7 +865,7 @@ class PRS500(DeviceConfig, DevicePlugin):
|
|||||||
size = sum(sizes)
|
size = sum(sizes)
|
||||||
space = self.free_space(end_session=False)
|
space = self.free_space(end_session=False)
|
||||||
mspace = space[0]
|
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:
|
if on_card and size > cspace - 1024*1024:
|
||||||
raise FreeSpaceError("There is insufficient free space "+\
|
raise FreeSpaceError("There is insufficient free space "+\
|
||||||
"on the storage card")
|
"on the storage card")
|
||||||
|
@ -26,7 +26,7 @@ class PRS505(CLI, Device):
|
|||||||
PRODUCT_ID = [0x031e] #: Product Id for the PRS-505
|
PRODUCT_ID = [0x031e] #: Product Id for the PRS-505
|
||||||
BCD = [0x229, 0x1000] #: Needed to disambiguate 505 and 700 on linux
|
BCD = [0x229, 0x1000] #: Needed to disambiguate 505 and 700 on linux
|
||||||
|
|
||||||
VENDOR_NAME = 'SONY'
|
VENDOR_NAME = 'SONY'
|
||||||
WINDOWS_MAIN_MEM = 'PRS-505'
|
WINDOWS_MAIN_MEM = 'PRS-505'
|
||||||
WINDOWS_CARD_A_MEM = ['PRS-505/UC:MS', 'PRS-505/CE:MS']
|
WINDOWS_CARD_A_MEM = ['PRS-505/UC:MS', 'PRS-505/CE:MS']
|
||||||
WINDOWS_CARD_B_MEM = ['PRS-505/UC:SD', 'PRS-505/CE:SD']
|
WINDOWS_CARD_B_MEM = ['PRS-505/UC:SD', 'PRS-505/CE:SD']
|
||||||
|
@ -23,7 +23,7 @@ class DRMError(ValueError):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
BOOK_EXTENSIONS = ['lrf', 'rar', 'zip', 'rtf', 'lit', 'txt', 'htm', 'xhtm',
|
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',
|
'epub', 'fb2', 'djvu', 'lrx', 'cbr', 'cbz', 'oebzip',
|
||||||
'rb', 'imp', 'odt']
|
'rb', 'imp', 'odt']
|
||||||
|
|
||||||
|
@ -49,4 +49,5 @@ class PluginWidget(Widget, Ui_Form):
|
|||||||
if idx < 0:
|
if idx < 0:
|
||||||
idx = 0
|
idx = 0
|
||||||
g.setCurrentIndex(0)
|
g.setCurrentIndex(0)
|
||||||
|
return True
|
||||||
return False
|
return False
|
||||||
|
@ -216,6 +216,12 @@ class LocationModel(QAbstractListModel):
|
|||||||
return NONE
|
return NONE
|
||||||
|
|
||||||
def update_devices(self, cp=(None, None), fs=[-1, -1, -1]):
|
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[0] = fs[0]
|
||||||
self.free[1] = fs[1]
|
self.free[1] = fs[1]
|
||||||
self.free[2] = fs[2]
|
self.free[2] = fs[2]
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<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>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: calibre 0.6.0b2\n"
|
"Project-Id-Version: calibre 0.6.0b3\n"
|
||||||
"POT-Creation-Date: 2009-06-07 13:48+PDT\n"
|
"POT-Creation-Date: 2009-06-10 13:26+PDT\n"
|
||||||
"PO-Revision-Date: 2009-06-07 13:48+PDT\n"
|
"PO-Revision-Date: 2009-06-10 13:26+PDT\n"
|
||||||
"Last-Translator: Automatically generated\n"
|
"Last-Translator: Automatically generated\n"
|
||||||
"Language-Team: LANGUAGE\n"
|
"Language-Team: LANGUAGE\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
@ -477,21 +477,21 @@ msgstr ""
|
|||||||
msgid "Communicate with the Sony PRS-700 eBook reader."
|
msgid "Communicate with the Sony PRS-700 eBook reader."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:230
|
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:250
|
||||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:280
|
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:300
|
||||||
msgid "Unable to detect the %s disk drive. Try rebooting."
|
msgid "Unable to detect the %s disk drive. Try rebooting."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:348
|
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:368
|
||||||
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:451
|
#: /home/kovid/work/calibre/src/calibre/devices/usbms/device.py:471
|
||||||
msgid "Unable to detect the %s disk drive."
|
msgid "Unable to detect the %s disk drive."
|
||||||
msgstr ""
|
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."
|
msgid "You must install the pmount package."
|
||||||
msgstr ""
|
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)"
|
msgid "Unable to mount main memory (Error code: %d)"
|
||||||
msgstr ""
|
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:302
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/library.py:308
|
#: /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/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"
|
msgid "None"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -5495,7 +5495,7 @@ msgid "&Kindle email:"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/library_ui.py:43
|
#: /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 ""
|
msgstr ""
|
||||||
|
|
||||||
#: /home/kovid/work/calibre/src/calibre/gui2/wizard/library_ui.py:44
|
#: /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_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_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_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.py:14
|
||||||
#: /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_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_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_honoluluadvertiser.py:18
|
||||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_iht.py:15
|
#: /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_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_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_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_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_infobae.py:21
|
||||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_juventudrebelde.py:23
|
#: /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_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.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_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
|
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_pagina12.py:25
|
||||||
msgid "Spanish"
|
msgid "Spanish"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -6279,6 +6283,11 @@ msgstr ""
|
|||||||
msgid "Bosnian"
|
msgid "Bosnian"
|
||||||
msgstr ""
|
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_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_jb_online.py:47
|
||||||
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_o_globo.py:69
|
#: /home/kovid/work/calibre/src/calibre/web/feeds/recipes/recipe_o_globo.py:69
|
||||||
|
Loading…
x
Reference in New Issue
Block a user