From d327cedc8233d67f939f176bbafe5e022b597791 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 Jan 2020 14:12:42 +0530 Subject: [PATCH] Fix #1858180 [Error when enabling auto scroll on server in paged mode](https://bugs.launchpad.net/calibre/+bug/1858180) --- src/pyj/read_book/paged_mode.pyj | 2 +- src/pyj/read_book/view.pyj | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pyj/read_book/paged_mode.pyj b/src/pyj/read_book/paged_mode.pyj index e23548fb07..a7135a5758 100644 --- a/src/pyj/read_book/paged_mode.pyj +++ b/src/pyj/read_book/paged_mode.pyj @@ -662,6 +662,6 @@ def auto_scroll_action(action): if action is 'toggle': get_boss().send_message('error', title=_('No auto scroll in paged mode'), msg=_( 'Switch to flow mode (Viewer preferences->Page layout) to enable auto' - ' scrolling') + ' scrolling'), is_non_critical=True ) return False diff --git a/src/pyj/read_book/view.pyj b/src/pyj/read_book/view.pyj index cd564fc6cb..bc2b86a180 100644 --- a/src/pyj/read_book/view.pyj +++ b/src/pyj/read_book/view.pyj @@ -578,7 +578,11 @@ class View: self.show_spine_item_stage2(data) def on_iframe_error(self, data): - ui_operations.show_error((data.title or _('There was an error processing the book')), data.msg, data.details) + title = data.title or _('There was an error processing the book') + if data.is_non_critical: + warning_dialog(title, data.msg, data.details, on_close=ui_operations.focus_iframe) + return + ui_operations.show_error(title, data.msg, data.details) def apply_color_scheme(self): ans = resolve_color_scheme()