From 73a293a1d14d824c7683a6cab75305188d0f4be0 Mon Sep 17 00:00:00 2001 From: GRiker Date: Fri, 8 Apr 2011 12:28:11 -0600 Subject: [PATCH 1/2] GwR fix for periodical navbars --- src/calibre/customize/profiles.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/customize/profiles.py b/src/calibre/customize/profiles.py index bebaebced6..224bfa07ea 100644 --- a/src/calibre/customize/profiles.py +++ b/src/calibre/customize/profiles.py @@ -344,6 +344,7 @@ class iPadOutput(OutputProfile): border-spacing:1px; margin-left: 5%; margin-right: 5%; + page-break-inside:avoid; width: 90%; -webkit-border-radius:4px; } From bce755020b389c4e4c358f7462c355c1d184d1a0 Mon Sep 17 00:00:00 2001 From: GRiker Date: Thu, 14 Apr 2011 05:20:33 -0600 Subject: [PATCH 2/2] GwR fix for progress bar overrun --- src/calibre/devices/apple/driver.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/calibre/devices/apple/driver.py b/src/calibre/devices/apple/driver.py index 213f74f816..2cc478603a 100644 --- a/src/calibre/devices/apple/driver.py +++ b/src/calibre/devices/apple/driver.py @@ -349,7 +349,7 @@ class ITUNES(DriverBase): break break if self.report_progress is not None: - self.report_progress(j+1/task_count, _('Updating device metadata listing...')) + self.report_progress((j+1)/task_count, _('Updating device metadata listing...')) if self.report_progress is not None: self.report_progress(1.0, _('Updating device metadata listing...')) @@ -428,7 +428,7 @@ class ITUNES(DriverBase): } if self.report_progress is not None: - self.report_progress(i+1/book_count, _('%d of %d') % (i+1, book_count)) + self.report_progress((i+1)/book_count, _('%d of %d') % (i+1, book_count)) self._purge_orphans(library_books, cached_books) elif iswindows: @@ -466,7 +466,7 @@ class ITUNES(DriverBase): } if self.report_progress is not None: - self.report_progress(i+1/book_count, + self.report_progress((i+1)/book_count, _('%d of %d') % (i+1, book_count)) self._purge_orphans(library_books, cached_books) @@ -916,6 +916,8 @@ class ITUNES(DriverBase): """ if DEBUG: self.log.info("ITUNES.reset()") + if report_progress: + self.set_progress_reporter(report_progress) def set_progress_reporter(self, report_progress): ''' @@ -924,6 +926,9 @@ class ITUNES(DriverBase): If it is called with -1 that means that the task does not have any progress information ''' + if DEBUG: + self.log.info("ITUNES.set_progress_reporter()") + self.report_progress = report_progress def set_plugboards(self, plugboards, pb_func): @@ -1041,7 +1046,7 @@ class ITUNES(DriverBase): # Report progress if self.report_progress is not None: - self.report_progress(i+1/file_count, _('%d of %d') % (i+1, file_count)) + self.report_progress((i+1)/file_count, _('%d of %d') % (i+1, file_count)) elif iswindows: try: @@ -1081,7 +1086,7 @@ class ITUNES(DriverBase): # Report progress if self.report_progress is not None: - self.report_progress(i+1/file_count, _('%d of %d') % (i+1, file_count)) + self.report_progress((i+1)/file_count, _('%d of %d') % (i+1, file_count)) finally: pythoncom.CoUninitialize() @@ -3065,7 +3070,7 @@ class ITUNES_ASYNC(ITUNES): } if self.report_progress is not None: - self.report_progress(i+1/book_count, _('%d of %d') % (i+1, book_count)) + self.report_progress((i+1)/book_count, _('%d of %d') % (i+1, book_count)) elif iswindows: try: @@ -3104,7 +3109,7 @@ class ITUNES_ASYNC(ITUNES): } if self.report_progress is not None: - self.report_progress(i+1/book_count, + self.report_progress((i+1)/book_count, _('%d of %d') % (i+1, book_count)) finally: