]> spindle.queued.net Git - midori/commitdiff
Guard WebKitDownload to WebKitGTK+ 1.1.2
authorChristian Dywan <christian@twotoasts.de>
Sat, 24 Apr 2010 21:56:23 +0000 (23:56 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 24 Apr 2010 21:59:07 +0000 (23:59 +0200)
extensions/adblock.c

index 8fd25a9d04363c01b0a9450bd21b453e5c8905a5..b15becf9317a7b94037dcc5a801fa3ce488ca4a5 100644 (file)
@@ -94,6 +94,7 @@ adblock_init_db ()
     katze_assign (blockcssprivate, g_strdup (""));
 }
 
+#if WEBKIT_CHECK_VERSION (1, 1, 2)
 static void
 adblock_download_notify_status_cb (WebKitDownload* download,
                                    GParamSpec*     pspec,
@@ -107,6 +108,7 @@ adblock_download_notify_status_cb (WebKitDownload* download,
     g_free (path);
     /* g_object_unref (download); */
 }
+#endif
 
 static gchar*
 adblock_get_filename_for_uri (const gchar* uri)
@@ -163,6 +165,7 @@ adblock_reload_rules (MidoriExtension* extension,
 
             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);
@@ -175,6 +178,7 @@ adblock_reload_rules (MidoriExtension* extension,
                 g_signal_connect (download, "notify::status",
                     G_CALLBACK (adblock_download_notify_status_cb), path);
                 webkit_download_start (download);
+                #endif
             }
             else
                 g_free (path);