[epiphany] overview: Compile the missing thumbnail icon as a gresource



commit 7ca58a900c9655270bd24b9ebe79ca49ab3b886c
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Fri Feb 21 10:21:04 2014 +0100

    overview: Compile the missing thumbnail icon as a gresource
    
    And use it directly form the css using ephy-resource URI.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724862

 data/Makefile.am                              |    4 ----
 embed/web-extension/ephy-web-extension.c      |   12 ------------
 src/Makefile.am                               |    1 +
 src/epiphany.gresource.xml                    |    1 +
 {data => src/resources}/missing-thumbnail.png |  Bin 1226 -> 1226 bytes
 src/resources/overview.html                   |    2 +-
 6 files changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 1f67d31..1ad3ffa 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -51,10 +51,6 @@ $(default_bookmarks_DATA): $(default_bookmarks_in_files) Makefile $(INTLTOOL_MER
        sed -e "s|\ pkgdatadir\@|$(pkgdatadir)|g" $  tmp > $@ || rm -f $  tmp
        rm -f $  tmp
 
-iconsdir = $(pkgdatadir)/icons
-dist_icons_DATA =         \
-    missing-thumbnail.png
-
 searchproviderdir = $(datadir)/gnome-shell/search-providers
 dist_searchprovider_DATA = epiphany-search-provider.ini
 
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 183184a..7681ec8 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -122,18 +122,6 @@ web_page_send_request (WebKitWebPage *web_page,
 
   request_uri = webkit_uri_request_get_uri (request);
 
-  if (g_str_has_prefix (request_uri, "ephy-about:/")) {
-    char *about_resource;
-
-    /* Ideally we should use resource:// uris directly in about pages, but in multiprocess mode the
-     * Network Process doesn't have access to the resources compiled in the Web Process */
-    about_resource = g_filename_to_uri (ephy_file (request_uri + strlen ("ephy-about:/")), NULL, NULL);
-    webkit_uri_request_set_uri (request, about_resource);
-    g_free (about_resource);
-
-    return FALSE;
-  }
-
   if (g_settings_get_boolean (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_DO_NOT_TRACK)) {
     SoupMessageHeaders *headers;
     char *new_uri;
diff --git a/src/Makefile.am b/src/Makefile.am
index 9439f9f..6110430 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -117,6 +117,7 @@ RESOURCE_FILES = \
        resources/incognito-tinted.png            \
        resources/error.html                      \
        resources/overview.html                   \
+       resources/missing-thumbnail.png           \
        $(NULL)
 
 epiphany-resources.c: epiphany.gresource.xml $(RESOURCE_FILES)
diff --git a/src/epiphany.gresource.xml b/src/epiphany.gresource.xml
index 6908b99..07bc6b5 100644
--- a/src/epiphany.gresource.xml
+++ b/src/epiphany.gresource.xml
@@ -16,5 +16,6 @@
     <file>epiphany.css</file>
     <file alias="page-templates/error.html" compressed="true">error.html</file>
     <file alias="page-templates/overview.html" compressed="true">overview.html</file>
+    <file>missing-thumbnail.png</file>
   </gresource>
 </gresources>
diff --git a/src/resources/overview.html b/src/resources/overview.html
index 4f3505d..e78e386 100755
--- a/src/resources/overview.html
+++ b/src/resources/overview.html
@@ -84,7 +84,7 @@
       display: block;
       transition: all 0.2s ease-in-out;
       border: 1px solid #ccc;
-      background: url(ephy-about:/missing-thumbnail.png) center no-repeat,
+      background: url(ephy-resource:///org/gnome/epiphany/missing-thumbnail.png) center no-repeat,
                   linear-gradient(to bottom, #e8e8e8, #fff);
       background-repeat: no-repeat;
       animation: fadeOut 0.5s;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]