aboutsummaryrefslogtreecommitdiffstats
path: root/src/resources
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-03-29 00:06:47 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-04-05 21:47:37 +0800
commita2181b928e5a0f6d27487859fe86a276c1eed25c (patch)
tree9a4915e37cb5f7f75ff686c8936bc34b47ea481c /src/resources
parentefccc1eac4ac4e15fd4f5695d27a85c7d25c3cc6 (diff)
downloadgsoc2013-epiphany-a2181b928e5a0f6d27487859fe86a276c1eed25c.tar.gz
gsoc2013-epiphany-a2181b928e5a0f6d27487859fe86a276c1eed25c.tar.zst
gsoc2013-epiphany-a2181b928e5a0f6d27487859fe86a276c1eed25c.zip
Compile template pages as GResources
So that they are loaded from memory instead of disk every time they are needed. We also get rid of ephy_file searching for the files in the file system. https://bugzilla.gnome.org/show_bug.cgi?id=696792
Diffstat (limited to 'src/resources')
-rw-r--r--src/resources/error.html87
-rw-r--r--src/resources/process-crash.html74
-rw-r--r--src/resources/recovery.html87
3 files changed, 248 insertions, 0 deletions
diff --git a/src/resources/error.html b/src/resources/error.html
new file mode 100644
index 000000000..9aa39f605
--- /dev/null
+++ b/src/resources/error.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ Copyright © 2010, 2011 Vinicius Depizzol
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%s" lang="%s" dir="%s">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>%s</title>
+ <style type="text/css">
+ body {
+ margin: 0 auto;
+ font: message-box;
+ }
+
+ #container {
+ padding: 10% 12% 5%;
+ margin: 0 auto;
+ max-width: 650px;
+ }
+
+ #main_icon {
+ float: left;
+ padding-right: 20px;
+ }
+
+ html[dir="rtl"] #main_icon {
+ padding-left: 20px;
+ padding-right: 0;
+ float: right;
+ }
+
+ #content {
+ display: table-cell;
+ vertical-align: top;
+ }
+
+ #content h1 {
+ margin-top: 0;
+ }
+
+ #content .buttonbox {
+ text-align: right;
+ }
+
+ html[dir="rtl"] #content .buttonbox {
+ text-align: left;
+ }
+ </style>
+ <script type="text/javascript">
+ function load_anyway()
+ {
+ window.location = '%s';
+ }
+ </script>
+</head>
+<body>
+ <div id="container">
+ <div id="main_icon">
+ <img src="%s" />
+ </div>
+ <div id="content">
+ <h1>%s</h1>
+ <div class="explanation">
+ %s
+ </div>
+
+ <div class="buttonbox">
+ <button onclick="javascript:load_anyway()">%s</button>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/src/resources/process-crash.html b/src/resources/process-crash.html
new file mode 100644
index 000000000..7cf7ab93c
--- /dev/null
+++ b/src/resources/process-crash.html
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ Copyright © 2013 Igalia S.L.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%s" lang="%s" dir="%s">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>%s</title>
+ <style type="text/css">
+ body {
+ margin: 0 auto;
+ font: message-box;
+ background-color: #2e3436;
+ color: #d0d1cf;
+ }
+
+ #container {
+ padding: 10% 12% 5%;
+ margin: 0 auto;
+ max-width: 650px;
+ }
+
+ #main_icon {
+ float: left;
+ padding-right: 20px;
+ }
+
+ html[dir="rtl"] #main_icon {
+ padding-left: 20px;
+ padding-right: 0;
+ float: right;
+ }
+
+ #content {
+ display: table-cell;
+ vertical-align: top;
+ }
+
+ #content h1 {
+ margin-top: 0;
+ font-size: 200%;
+ }
+ </style>
+
+</head>
+<body>
+ <div id="container">
+ <div id="main_icon">
+ <!-- We do nothing with the URI for now: %s -->
+ <img width="150px" height="150px" src="%s" alt="Sad face icon"/>
+ </div>
+ <div id="content">
+ <h1>%s</h1>
+ <div class="explanation">
+ %s
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/src/resources/recovery.html b/src/resources/recovery.html
new file mode 100644
index 000000000..9aa39f605
--- /dev/null
+++ b/src/resources/recovery.html
@@ -0,0 +1,87 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!--
+ Copyright © 2010, 2011 Vinicius Depizzol
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%s" lang="%s" dir="%s">
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>%s</title>
+ <style type="text/css">
+ body {
+ margin: 0 auto;
+ font: message-box;
+ }
+
+ #container {
+ padding: 10% 12% 5%;
+ margin: 0 auto;
+ max-width: 650px;
+ }
+
+ #main_icon {
+ float: left;
+ padding-right: 20px;
+ }
+
+ html[dir="rtl"] #main_icon {
+ padding-left: 20px;
+ padding-right: 0;
+ float: right;
+ }
+
+ #content {
+ display: table-cell;
+ vertical-align: top;
+ }
+
+ #content h1 {
+ margin-top: 0;
+ }
+
+ #content .buttonbox {
+ text-align: right;
+ }
+
+ html[dir="rtl"] #content .buttonbox {
+ text-align: left;
+ }
+ </style>
+ <script type="text/javascript">
+ function load_anyway()
+ {
+ window.location = '%s';
+ }
+ </script>
+</head>
+<body>
+ <div id="container">
+ <div id="main_icon">
+ <img src="%s" />
+ </div>
+ <div id="content">
+ <h1>%s</h1>
+ <div class="explanation">
+ %s
+ </div>
+
+ <div class="buttonbox">
+ <button onclick="javascript:load_anyway()">%s</button>
+ </div>
+ </div>
+ </div>
+</body>
+</html>