summaryrefslogtreecommitdiff
path: root/amiga/download.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2012-06-04 15:10:13 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2012-06-04 15:10:13 +0000
commitcb9cee3ab7d83b8533cbbde0c4982a92b2732242 (patch)
tree088c852a4609fccbcfc2343b342564c2b46d339e /amiga/download.c
parent35ee72dccf50eb92985134589e34aab79afb612b (diff)
downloadnetsurf-cb9cee3ab7d83b8533cbbde0c4982a92b2732242.tar.gz
netsurf-cb9cee3ab7d83b8533cbbde0c4982a92b2732242.tar.bz2
Don't show a "download complete" message if there was an error or the user
aborted. svn path=/trunk/netsurf/; revision=13944
Diffstat (limited to 'amiga/download.c')
-rw-r--r--amiga/download.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/amiga/download.c b/amiga/download.c
index ac261e52b..af8d7e91f 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -74,6 +74,13 @@ struct gui_download_window {
struct download_context *ctx;
char *url;
char fname[1024];
+ int result;
+};
+
+enum {
+ AMINS_DLOAD_OK = 0,
+ AMINS_DLOAD_ERROR,
+ AMINS_DLOAD_ABORT,
};
struct gui_download_window *gui_download_window_create(download_context *ctx,
@@ -215,12 +222,14 @@ void gui_download_window_error(struct gui_download_window *dw,
const char *error_msg)
{
warn_user("Unwritten","");
+ dw->result = AMINS_DLOAD_ERROR;
gui_download_window_done(dw);
}
void ami_download_window_abort(struct gui_download_window *dw)
{
download_context_abort(dw->ctx);
+ dw->result = AMINS_DLOAD_ABORT;
gui_download_window_done(dw);
}
@@ -233,7 +242,7 @@ void gui_download_window_done(struct gui_download_window *dw)
if(!dw) return;
- if(nsoption_bool(download_notify))
+ if((nsoption_bool(download_notify)) && (dw->result == AMINS_DLOAD_OK))
{
Notify(ami_appid, APPNOTIFY_Title, messages_get("amiDownloadComplete"),
APPNOTIFY_PubScreenName, "FRONT",