Don't emit add-download before all preparations
Notably verifying that there's space available and a file shouldn't be overriden has to come first. This already was the case for the transferbar which isn't using the signal.
This commit is contained in:
parent
bbc6bdea30
commit
663e7e9285
1 changed files with 1 additions and 1 deletions
|
@ -983,6 +983,7 @@ midori_browser_prepare_download (MidoriBrowser* browser,
|
||||||
}
|
}
|
||||||
|
|
||||||
webkit_download_set_destination_uri (download, uri);
|
webkit_download_set_destination_uri (download, uri);
|
||||||
|
g_signal_emit (browser, signals[ADD_DOWNLOAD], 0, download);
|
||||||
midori_transferbar_add_download_item (MIDORI_TRANSFERBAR (browser->transferbar), download);
|
midori_transferbar_add_download_item (MIDORI_TRANSFERBAR (browser->transferbar), download);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -1416,7 +1417,6 @@ midori_view_download_requested_cb (GtkWidget* view,
|
||||||
WebKitDownload* download,
|
WebKitDownload* download,
|
||||||
MidoriBrowser* browser)
|
MidoriBrowser* browser)
|
||||||
{
|
{
|
||||||
g_signal_emit (browser, signals[ADD_DOWNLOAD], 0, download);
|
|
||||||
if (!webkit_download_get_destination_uri (download))
|
if (!webkit_download_get_destination_uri (download))
|
||||||
{
|
{
|
||||||
gchar* folder;
|
gchar* folder;
|
||||||
|
|
Loading…
Reference in a new issue