use MidoriDownloadType to check if the download should be started

This commit is contained in:
André Stösel 2012-08-21 19:20:11 +02:00 committed by Christian Dywan
parent 06b3a3a1ad
commit 43d3a6b07e

View file

@ -35,7 +35,9 @@ namespace EDM {
private GLib.PtrArray download_managers = new GLib.PtrArray (); private GLib.PtrArray download_managers = new GLib.PtrArray ();
public bool download_requested (Midori.View view, WebKit.Download download) { 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 (); var dlReq = new DownloadRequest ();
dlReq.uri = download.get_uri (); dlReq.uri = download.get_uri ();