[Xfce4-commits] <midori:master> Introduce thumb:// pseudo-uri to serve thumbnails from disk cache
Christian Dywan
noreply at xfce.org
Wed Mar 9 02:28:01 CET 2011
Updating branch refs/heads/master
to 88f7b72526a0555c27073532d9745c3eea1c5b09 (commit)
from e643cc8c10c79b866f39bcd701da13f4fe29a69a (commit)
commit 88f7b72526a0555c27073532d9745c3eea1c5b09
Author: Paweł Forysiuk <tuxator at o2.pl>
Date: Wed Mar 9 02:10:41 2011 +0100
Introduce thumb:// pseudo-uri to serve thumbnails from disk cache
midori/midori-view.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 2b87ae6..035fe28 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1078,6 +1078,15 @@ midori_view_web_view_resource_request_cb (WebKitWebView* web_view,
webkit_network_request_set_uri (request, file_uri);
g_free (file_uri);
}
+ else if (g_str_has_prefix (uri, "thumb://"))
+ {
+ gchar* file_path = g_build_filename (g_get_user_cache_dir (), "midori", "thumbnails",
+ g_strdup (uri + 8), NULL);
+ gchar* file_uri = g_filename_to_uri (file_path, NULL, NULL);
+ webkit_network_request_set_uri (request, file_uri);
+ g_free (file_uri);
+ g_free (file_path);
+ }
else if (g_str_has_prefix (uri, "stock://"))
{
GdkPixbuf* pixbuf;
More information about the Xfce4-commits
mailing list