Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#4011 closed defect (fixed)

PDF tabs don't display error page when there is no internet connection

Reported by: humitos Owned by: humitos
Priority: Normal Milestone:
Component: Browse Version: Unspecified
Severity: Unspecified Keywords: r+, olpc-test-pending
Cc: manuq Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description (last modified by humitos)

If you try to load a PDF url without being connected to Internet, the error page is not shown.

Attachments (4)

0001-Show-error-page-when-downloading-a-PDF-fails-SL-4011.patch (5.4 KB) - added by humitos 8 years ago.
Candidate patch
web_not_found.png (48.6 KB) - added by humitos 8 years ago.
Error page showed when the web page is not found
downloading_pdf.png (34.2 KB) - added by humitos 8 years ago.
ProgressIcon while a PDF is being downloaded
pdf_error.png (44.0 KB) - added by humitos 8 years ago.
Error occured while a PDF is being downloaded (needs the patch applied)

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by humitos

  • Cc manuq added
  • Description modified (diff)

@manuq: how we should implement this?

Nowadays, when an error occurs when a page is loading we load a error page in HTML format inside the same WebView that is being used.

The PDF case is a bit different because we do not create a WebView, instead of that we create a DummyBrowser and start the download process using a WebKit.Download and when it finishes we use Evince to show the PDF.

At the moment we have the signal 'error' of the WebKit.Download connected to log the reason. I think we should do something there to show the error page

I see two possibilities here:

  1. Create a common Browser -or a WebKit.WebView- (not a DummyBrowser) to show the error page.
  2. Create a Gtk widget that looks similar to the error page (something like the PDFMessageBox that you created.

Any other idea? What do you think?

comment:2 Changed 8 years ago by manuq

Good point. let's go for option 2.

Changed 8 years ago by humitos

Candidate patch

Changed 8 years ago by humitos

Error page showed when the web page is not found

Changed 8 years ago by humitos

ProgressIcon while a PDF is being downloaded

Changed 8 years ago by humitos

Error occured while a PDF is being downloaded (needs the patch applied)

comment:3 Changed 8 years ago by humitos

  • Keywords r? added

@manuq: I'm attaching a candidate patch here. We need to decide how the error pages will look like because there are different styles among them. Also, we need to check the error message in the PDF error page (*)

(*) this error page is showed when:

  1. an error occurs when the PDF file is being dowloaded
  2. when we open a PDF file, close browse, disconnect from the network and resume browse again

comment:4 Changed 8 years ago by manuq

  • Keywords r+ olpc-test-pending added; r? removed
  • Resolution set to fixed
  • Status changed from new to closed

For the styling consistency, we'll address that in #3969, the html message should match the ones made with gtk widgets.

I have pushed it after this changes:

  • icon change: read the icon from the activity/ folder, instead of adding a duplicate in icons/ folder
  • String changes: "this PDF" raplaced by "this document". In the other texts we talk about document instead of PDF. Also replaced "this web page" for "this document". Also set "Internet" with capital letter instead of "internet".
  • renam the progress message class from PDFMessageBox to PDFProgressMessageBox to avoid confusion

Pushed as 5e48a036 .

comment:5 Changed 8 years ago by dnarvaez

  • Milestone 1.0 deleted

Milestone 1.0 deleted

Note: See TracTickets for help on using tickets.