After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592667 - add custom error pages to Epiphany
add custom error pages to Epiphany
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Backend
git master
Other Linux
: Normal normal
: ---
Assigned To: Xan Lopez
Epiphany Maintainers
: 408999 436870 464837 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-08-22 09:20 UTC by Diego Escalante Urrelo (not reading bugmail)
Modified: 2010-12-10 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed Error Page for Epiphany (1.54 KB, text/html)
2009-09-01 02:33 UTC, Vinicius Depizzol
  Details
Page Error preview (11.14 KB, image/png)
2009-09-01 02:36 UTC, Vinicius Depizzol
  Details
[PATCH] ephy-session: use a nicer crash recovery page (4.86 KB, patch)
2009-09-01 05:14 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-session: use a nicer crash recovery page (6.76 KB, patch)
2010-01-18 17:39 UTC, Diego Escalante Urrelo (not reading bugmail)
needs-work Details | Review
Use nice recovery and error pages (12.27 KB, patch)
2010-01-29 20:38 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
Use html for error pages only as a template (5.89 KB, patch)
2010-01-29 20:38 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
Updated patch (16.23 KB, patch)
2010-12-09 21:09 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
Last version, only waiting for Vinicius confirmation on GPLv2. (15.48 KB, patch)
2010-12-10 09:51 UTC, Diego Escalante Urrelo (not reading bugmail)
none Details | Review
ephy-web-view: use custom error pages (16.74 KB, patch)
2010-12-10 15:53 UTC, Diego Escalante Urrelo (not reading bugmail)
committed Details | Review

Description Diego Escalante Urrelo (not reading bugmail) 2009-08-22 09:20:06 UTC
webkit allows us to have beautiful errors, let's do.

I'm CC'ing Vinicius who prepared some nice stuff during GCDS. Vinicius please upload your work here.
Comment 1 Diego Escalante Urrelo (not reading bugmail) 2009-08-27 21:50:17 UTC
*** Bug 408999 has been marked as a duplicate of this bug. ***
Comment 2 Vinicius Depizzol 2009-09-01 02:33:44 UTC
Created attachment 142186 [details]
Proposed Error Page for Epiphany
Comment 3 Vinicius Depizzol 2009-09-01 02:36:33 UTC
Created attachment 142188 [details]
Page Error preview
Comment 4 Diego Escalante Urrelo (not reading bugmail) 2009-09-01 05:14:15 UTC
Created attachment 142196 [details] [review]
[PATCH] ephy-session: use a nicer crash recovery page


Bug 592667 - add custom error pages to Epiphany
This is a test drive to Vinicius work on a nicer template for error pages.
We need templates for all the other errors and also plug them in the correct
place (ephy-web-view? ephy-window?).

Comments welcome.
---
 configure.ac             |    1 +
 data/Makefile.am         |    2 +-
 data/pages/Makefile.am   |    5 ++++
 data/pages/recovery.html |   52 ++++++++++++++++++++++++++++++++++++++++
 src/ephy-session.c       |   59 ++++------------------------------------------
 5 files changed, 64 insertions(+), 55 deletions(-)
Comment 5 Vinicius Depizzol 2009-09-01 13:19:18 UTC
This error page uses the default system background, text color and fonts. For the emblem-unreadable icon, we need to make sure it will come from the default theme (by now the template is using the absolute path "file:///usr/share/icons/gnome/32x32/emblems/emblem-unreadable.png").

Thank you :).
Comment 6 Diego Escalante Urrelo (not reading bugmail) 2009-10-20 03:54:25 UTC
*** Bug 436870 has been marked as a duplicate of this bug. ***
Comment 7 Reinout van Schouwen 2009-12-19 11:50:16 UTC
Confirmed regression.
Comment 8 Diego Escalante Urrelo (not reading bugmail) 2009-12-19 23:45:20 UTC
I sorted out the hardcoding of the icon path, but due to security in webkit we can't have it load local resources. Apparently setting the referrer would fix it... but I'm not sure if that's a safe thing to do without risking users. Ideas?
Comment 9 Vinicius Depizzol 2009-12-20 02:20:07 UTC
I was just wondering (well, consider first I'm not a programmer)... maybe we could attach a GTK+ widget (in this case the GtkImage) to the error page using the create-plugin-widget signal. This would make easier the access to the icon from the current theme.
Comment 10 Gustavo Noronha (kov) 2009-12-28 14:18:14 UTC
(In reply to comment #9)
> I was just wondering (well, consider first I'm not a programmer)... maybe we
> could attach a GTK+ widget (in this case the GtkImage) to the error page using
> the create-plugin-widget signal. This would make easier the access to the icon
> from the current theme.

Sounds like an awesome idea to me!
Comment 11 Diego Escalante Urrelo (not reading bugmail) 2010-01-18 17:39:02 UTC
Created attachment 151684 [details] [review]
ephy-session: use a nicer crash recovery page

This is a test drive to Vinicius work on a nicer template for error pages.
We need templates for all the other errors and also plug them in the correct
place (ephy-web-view? ephy-window?).

Bug #592667
--

This is an updated patch applying Vinicius idea of using create-plugin-widget.
There seems to be a bug in the signal that makes the returned plugin widget not
be shown until there's a resize in the WebKitWebView.
If you apply the patch and get to the recovery page, you'll see that there's no
icon next to "Oops!...", but if you resize the window the icon will appear.
Comment 12 Gustavo Noronha (kov) 2010-01-20 12:24:27 UTC
Review of attachment 151684 [details] [review]:

Is this working now, or it's still bugging with the scrollbars?

::: src/ephy-session.c
@@ +1276,3 @@
 
+static GtkWidget*
+cpw_cb (WebKitWebView *web_view,

I don't like the cryptic name. Can it be named create_plugin_widget_cb?

@@ +1282,3 @@
+	gpointer user_data)
+{
+	g_debug ("mime: %s", mime_type);

remove the g_debug, or make it a LOG

@@ +1283,3 @@
+{
+	g_debug ("mime: %s", mime_type);
+	if (g_strcmp0 ("application/x-iconito", mime_type) != 0)

how about you add epiphany somewhere in this mime type, just in case?

@@ +1290,3 @@
+					   GTK_ICON_SIZE_DIALOG);
+	gtk_widget_show (widget);
+	g_debug ("icono: %p", widget);

saca esto ;D
Comment 13 Diego Escalante Urrelo (not reading bugmail) 2010-01-29 20:38:13 UTC
Created attachment 152603 [details] [review]
Use nice recovery and error pages

Show a nice custom error page instead of WebKit's default. Also create one for
crash recovery which currently is just an ugly box.

Bug #592667
Comment 14 Diego Escalante Urrelo (not reading bugmail) 2010-01-29 20:38:18 UTC
Created attachment 152604 [details] [review]
Use html for error pages only as a template

Hold the actual strings for the messages in the .c files so it's easier to
translate.

Bug #592667
Comment 15 Diego Escalante Urrelo (not reading bugmail) 2010-01-29 20:41:24 UTC
The first patch implements nice pages for load error and crash recovery. It
should be clean enough code-wise, however it has no i18n.
With the second patch I'm trying to fix that, adding i18n by removing actual
text from the .html files, converting them to just placeholders. The actual
strings are in the .c files so it's simpler to get them translated. However I
don't know if it's evil to have those markup'd strings there... opinions?
Comment 16 Diego Escalante Urrelo (not reading bugmail) 2010-08-18 19:44:47 UTC
*** Bug 464837 has been marked as a duplicate of this bug. ***
Comment 17 Diego Escalante Urrelo (not reading bugmail) 2010-12-09 21:09:06 UTC
Created attachment 176153 [details] [review]
Updated patch

Uploading for a quick pre-review.

--
Use nice recovery and error pages

Show a nice custom error page instead of WebKit's default. Also create one for
crash recovery which currently is just an ugly box.

Bug #592667
Comment 18 Diego Escalante Urrelo (not reading bugmail) 2010-12-10 09:51:39 UTC
Created attachment 176167 [details] [review]
Last version, only waiting for Vinicius confirmation on GPLv2.

ephy-web-view: use custom error pages

Show nice error pages instead of WebKitGTK+'s defaults.
FIXME: needs license for html files.

Bug #592667
Comment 19 Vinicius Depizzol 2010-12-10 15:16:07 UTC
License of html files is GPLv2.

Thank you.
Comment 20 Diego Escalante Urrelo (not reading bugmail) 2010-12-10 15:53:48 UTC
Created attachment 176187 [details] [review]
ephy-web-view: use custom error pages

Show nice error pages instead of WebKitGTK+'s defaults.

Bug #592667
Comment 21 Diego Escalante Urrelo (not reading bugmail) 2010-12-10 16:55:40 UTC
Done. High five!

Attachment 176187 [details] pushed as e435a10 - ephy-web-view: use custom error pages