[Xfce4-commits] <tumbler:jeromeg/webkit-thumbnailer> Stop loading when the timeout is elapsed.

Jérôme Guelfucci noreply at xfce.org
Sat Jun 4 14:28:01 CEST 2011


Updating branch refs/heads/jeromeg/webkit-thumbnailer
         to 3c65a449a6905782dc5230499b5f6f74ce9bf250 (commit)
       from 5da5de92e1d68f3a2ba64cd8fea3286f52c037c6 (commit)

commit 3c65a449a6905782dc5230499b5f6f74ce9bf250
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sat Jun 4 13:41:48 2011 +0200

    Stop loading when the timeout is elapsed.

 plugins/webkit-thumbnailer/webkit-thumbnailer.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/plugins/webkit-thumbnailer/webkit-thumbnailer.c b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
index 4314091..b0b6a02 100644
--- a/plugins/webkit-thumbnailer/webkit-thumbnailer.c
+++ b/plugins/webkit-thumbnailer/webkit-thumbnailer.c
@@ -238,6 +238,8 @@ generate_pixbuf (GdkPixbuf *source,
 static gboolean
 cb_load_timeout (gpointer data)
 {
+  webkit_web_view_stop_loading (WEBKIT_WEB_VIEW (WEBKIT_THUMBNAILER (data)->view));
+
   gtk_main_quit ();
 
   return FALSE;
@@ -283,7 +285,8 @@ webkit_thumbnailer_create (TumblerAbstractThumbnailer *thumbnailer,
 
   /* schedule a timeout to avoid waiting forever if the page fails to
    * load */
-  timeout_id = g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, NULL);
+  timeout_id =
+    g_timeout_add_seconds (LOAD_TIMEOUT, cb_load_timeout, webkit_thumbnailer);
 
   /* load the page in the web view */
   webkit_web_view_load_uri (WEBKIT_WEB_VIEW (webkit_thumbnailer->view), uri);



More information about the Xfce4-commits mailing list