diff --git a/setup/installer/linux/freeze.py b/setup/installer/linux/freeze.py
index 8c56ed4fb7..382c7ffeee 100644
--- a/setup/installer/linux/freeze.py
+++ b/setup/installer/linux/freeze.py
@@ -40,6 +40,7 @@ class LinuxFreeze(Command):
'/usr/bin/pdftohtml',
'/usr/lib/libwmflite-0.2.so.7',
'/usr/lib/liblcms.so.1',
+ '/usr/lib/liblcms2.so.2',
'/usr/lib/libstlport.so.5.1',
'/tmp/calibre-mount-helper',
'/usr/lib/libunrar.so',
@@ -50,10 +51,9 @@ class LinuxFreeze(Command):
'/usr/lib/libpodofo.so.0.8.1',
'/lib/libz.so.1',
'/lib/libuuid.so.1',
- '/usr/lib/libtiff.so.3',
+ '/usr/lib/libtiff.so.5',
'/lib/libbz2.so.1',
- '/usr/lib/libpoppler.so.5',
- '/usr/lib/libpoppler-qt4.so.3',
+ '/usr/lib/libpoppler.so.6',
'/usr/lib/libxml2.so.2',
'/usr/lib/libopenjpeg.so.2',
'/usr/lib/libxslt.so.1',
@@ -62,10 +62,10 @@ class LinuxFreeze(Command):
'/usr/lib/libgthread-2.0.so.0',
stdcpp,
ffi,
- '/usr/lib/libpng12.so.0',
+ '/usr/lib/libpng14.so.14',
'/usr/lib/libexslt.so.0',
- '/usr/lib/libMagickWand.so.2',
- '/usr/lib/libMagickCore.so.2',
+ '/usr/lib/libMagickWand.so.3',
+ '/usr/lib/libMagickCore.so.3',
'/usr/lib/libgcrypt.so.11',
'/usr/lib/libgpg-error.so.0',
'/usr/lib/libphonon.so.4',
diff --git a/src/calibre/devices/android/driver.py b/src/calibre/devices/android/driver.py
index 5642235b31..9951dc57ad 100644
--- a/src/calibre/devices/android/driver.py
+++ b/src/calibre/devices/android/driver.py
@@ -70,6 +70,16 @@ class ANDROID(USBMS):
dirs = [x.strip() for x in dirs.split(',')]
self.EBOOK_DIR_MAIN = dirs
+ def get_main_ebook_dir(self, for_upload=False):
+ dirs = self.EBOOK_DIR_MAIN
+ if not for_upload:
+ def aldiko_tweak(x):
+ return 'eBooks' if x == 'eBooks/import' else x
+ if isinstance(dirs, basestring):
+ dirs = [dirs]
+ dirs = list(map(aldiko_tweak, dirs))
+ return dirs
+
class S60(USBMS):
name = 'S60 driver'
diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py
index 55790420f2..c07b7fd761 100644
--- a/src/calibre/devices/usbms/device.py
+++ b/src/calibre/devices/usbms/device.py
@@ -732,7 +732,7 @@ class Device(DeviceConfig, DevicePlugin):
traceback.print_exc()
self._main_prefix = self._card_a_prefix = self._card_b_prefix = None
- def get_main_ebook_dir(self):
+ def get_main_ebook_dir(self, for_upload=False):
return self.EBOOK_DIR_MAIN
def _sanity_check(self, on_card, files):
@@ -750,7 +750,7 @@ class Device(DeviceConfig, DevicePlugin):
path = os.path.join(self._card_b_prefix,
*(self.EBOOK_DIR_CARD_B.split('/')))
else:
- candidates = self.get_main_ebook_dir()
+ candidates = self.get_main_ebook_dir(for_upload=True)
if isinstance(candidates, basestring):
candidates = [candidates]
candidates = [
diff --git a/src/calibre/gui2/convert/structure_detection.ui b/src/calibre/gui2/convert/structure_detection.ui
index e4414473f5..2e97c0d3ca 100644
--- a/src/calibre/gui2/convert/structure_detection.ui
+++ b/src/calibre/gui2/convert/structure_detection.ui
@@ -28,7 +28,11 @@
-
-
+
+
+ 20
+
+
-
diff --git a/src/calibre/gui2/convert/xexp_edit.ui b/src/calibre/gui2/convert/xexp_edit.ui
index 1b0196a8a1..f98eb8b1b8 100644
--- a/src/calibre/gui2/convert/xexp_edit.ui
+++ b/src/calibre/gui2/convert/xexp_edit.ui
@@ -43,6 +43,15 @@
0
+
+
+ 500
+ 16777215
+
+
+
+ 30
+
diff --git a/src/calibre/gui2/custom_column_widgets.py b/src/calibre/gui2/custom_column_widgets.py
index fed1de93a1..14a1a4abdc 100644
--- a/src/calibre/gui2/custom_column_widgets.py
+++ b/src/calibre/gui2/custom_column_widgets.py
@@ -133,11 +133,9 @@ class DateEdit(QDateEdit):
def focusInEvent(self, x):
self.setSpecialValueText('')
- QDateEdit.focusInEvent(self, x)
def focusOutEvent(self, x):
self.setSpecialValueText(_('Undefined'))
- QDateEdit.focusOutEvent(self, x)
def set_to_today(self):
self.setDate(now())
@@ -167,7 +165,7 @@ class DateTime(Base):
def getter(self):
val = self.widgets[1].date()
- if val <= UNDEFINED_QDATE:
+ if val == UNDEFINED_QDATE:
val = None
else:
val = qt_to_dt(val)
diff --git a/src/calibre/gui2/library/delegates.py b/src/calibre/gui2/library/delegates.py
index 40f7a2e4e0..529055ecd2 100644
--- a/src/calibre/gui2/library/delegates.py
+++ b/src/calibre/gui2/library/delegates.py
@@ -96,7 +96,7 @@ class DateDelegate(QStyledItemDelegate): # {{{
def displayText(self, val, locale):
d = val.toDate()
- if d <= UNDEFINED_QDATE:
+ if d == UNDEFINED_QDATE:
return ''
return format_date(d.toPyDate(), 'dd MMM yyyy')
@@ -116,7 +116,7 @@ class PubDateDelegate(QStyledItemDelegate): # {{{
def displayText(self, val, locale):
d = val.toDate()
- if d <= UNDEFINED_QDATE:
+ if d == UNDEFINED_QDATE:
return ''
format = tweaks['gui_pubdate_display_format']
if format is None:
@@ -194,7 +194,7 @@ class CcDateDelegate(QStyledItemDelegate): # {{{
def displayText(self, val, locale):
d = val.toDate()
- if d <= UNDEFINED_QDATE:
+ if d == UNDEFINED_QDATE:
return ''
return format_date(d.toPyDate(), self.format)
@@ -217,7 +217,7 @@ class CcDateDelegate(QStyledItemDelegate): # {{{
def setModelData(self, editor, model, index):
val = editor.date()
- if val <= UNDEFINED_QDATE:
+ if val == UNDEFINED_QDATE:
val = None
model.setData(index, QVariant(val), Qt.EditRole)
diff --git a/src/calibre/gui2/library/models.py b/src/calibre/gui2/library/models.py
index 89008735fe..9f1a72b021 100644
--- a/src/calibre/gui2/library/models.py
+++ b/src/calibre/gui2/library/models.py
@@ -1216,9 +1216,7 @@ class DeviceBooksModel(BooksModel): # {{{
return done
def set_editable(self, editable):
- # Cannot edit if metadata is sent on connect. Reason: changes will
- # revert to what is in the library on next connect.
- self.editable = editable and prefs['manage_device_metadata']!='on_connect'
+ self.editable = editable
def set_search_restriction(self, s):
pass
diff --git a/src/calibre/library/caches.py b/src/calibre/library/caches.py
index af950a36fc..d46ae23d90 100644
--- a/src/calibre/library/caches.py
+++ b/src/calibre/library/caches.py
@@ -209,13 +209,13 @@ class ResultCache(SearchQueryParser):
if query == 'false':
for item in self._data:
if item is None: continue
- if item[loc] is None or item[loc] <= UNDEFINED_DATE:
+ if item[loc] is None or item[loc] == UNDEFINED_DATE:
matches.add(item[0])
return matches
if query == 'true':
for item in self._data:
if item is None: continue
- if item[loc] is not None and item[loc] > UNDEFINED_DATE:
+ if item[loc] is not None and item[loc] != UNDEFINED_DATE:
matches.add(item[0])
return matches