From e0535b0e61cc56ec62d32518c03a42836f5256e6 Mon Sep 17 00:00:00 2001 From: rootavish Date: Sat, 19 Jul 2014 22:18:40 +0530 Subject: Moving all webkit tasks to main loop jobs --- backend/epub/epub-document.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'backend') diff --git a/backend/epub/epub-document.c b/backend/epub/epub-document.c index bea41d98..51a13d9a 100644 --- a/backend/epub/epub-document.c +++ b/backend/epub/epub-document.c @@ -112,39 +112,11 @@ epub_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document, return thumbnailpix; } -static void -load_finished_cb(WebKitWebView *webview, - GParamSpec *spec, - gboolean *completed) -{ - WebKitLoadStatus status = webkit_web_view_get_load_status (webview); - - if (status == WEBKIT_LOAD_FINISHED) { - (*completed) = TRUE; - } -} - -GtkWidget* -epub_document_thumbnails_render_in_webview(gchar* webpage) -{ - GtkWidget *webview = webkit_web_view_new(); - webkit_web_view_load_uri(WEBKIT_WEB_VIEW(webview),webpage); - gboolean completed = FALSE; - g_signal_connect(webview,"notify::load-status",G_CALLBACK(load_finished_cb),&completed); - - while (completed == FALSE) { - /* Wait for the load to complete*/ - } - - return webview; -} - static void epub_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *iface) { iface->get_thumbnail = epub_document_thumbnails_get_thumbnail; iface->get_dimensions = epub_document_thumbnails_get_dimensions; - iface->render_in_webview = epub_document_thumbnails_render_in_webview; } static gboolean -- cgit v1.2.1