blockcssprivate = g_string_new ("");
}
-#if WEBKIT_CHECK_VERSION (1, 1, 2)
static void
adblock_download_notify_status_cb (WebKitDownload* download,
GParamSpec* pspec,
g_free (path);
/* g_object_unref (download); */
}
-#endif
static gchar*
adblock_get_filename_for_uri (const gchar* uri)
if (!adblock_parse_file (path))
{
- #if WEBKIT_CHECK_VERSION (1, 1, 2)
WebKitNetworkRequest* request;
WebKitDownload* download;
gchar* destination = g_filename_to_uri (path, NULL, NULL);
g_signal_connect (download, "notify::status",
G_CALLBACK (adblock_download_notify_status_cb), path);
webkit_download_start (download);
- #endif
}
else
g_free (path);
web_cache_set_content_type (SoupMessage* msg,
SoupBuffer* buffer)
{
- #if WEBKIT_CHECK_VERSION (1, 1, 15)
gchar* sniffed_type;
SoupContentSniffer* sniffer = soup_content_sniffer_new ();
if ((sniffed_type = soup_content_sniffer_sniff (sniffer, msg, buffer, NULL)))
msg->response_headers, "Content-Type");
g_signal_emit_by_name (msg, "content-sniffed", content_type, NULL);
}
- #endif
}
static void
g_free (uri);
}
-#if WEBKIT_CHECK_VERSION (1, 1, 3)
static void
web_cache_add_download_cb (MidoriBrowser* browser,
WebKitDownload* download,
g_object_set_data (G_OBJECT (msg), "midori-web-cache-download",
(gpointer)0xdeadbeef);
}
-#endif
static void
web_cache_deactivate_cb (MidoriExtension* extension,
MidoriBrowser* browser,
MidoriExtension* extension)
{
- #if WEBKIT_CHECK_VERSION (1, 1, 3)
g_signal_connect (browser, "add-download",
G_CALLBACK (web_cache_add_download_cb), extension);
- #endif
g_signal_connect (extension, "deactivate",
G_CALLBACK (web_cache_deactivate_cb), browser);
}
extension, web_cache_deactivate_cb, browser);
g_signal_handlers_disconnect_by_func (
app, web_cache_app_add_browser_cb, extension);
- #if WEBKIT_CHECK_VERSION (1, 1, 3)
g_signal_handlers_disconnect_by_func (
browser, web_cache_add_download_cb, extension);
- #endif
}
static void