]> spindle.queued.net Git - midori/commitdiff
use MidoriDownloadType to check if the download should be started
authorAndré Stösel <andre@stoesel.de>
Tue, 21 Aug 2012 17:20:11 +0000 (19:20 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 22 Aug 2012 00:06:04 +0000 (02:06 +0200)
extensions/external-download-manager.vala

index 89a1d19a9f46daa65ca8949f916585dff16bb19d..18e726936fac031e0c6a6fbe713d38a92a06c9aa 100644 (file)
@@ -35,7 +35,9 @@ namespace EDM {
         private GLib.PtrArray download_managers =  new GLib.PtrArray ();
 
         public bool download_requested (Midori.View view, WebKit.Download download) {
-            if (download.get_data<void*> ("midori-download-type") == null) {
+            Midori.DownloadType download_type = download.get_data<Midori.DownloadType> ("midori-download-type");
+
+            if (download_type == Midori.DownloadType.SAVE) {
                 var dlReq = new DownloadRequest ();
                 dlReq.uri = download.get_uri ();