summaryrefslogtreecommitdiff
path: root/amiga/download.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-01-25 12:41:05 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-01-25 12:41:05 +0000
commit40c768cec659adb8c94016536b31d175ff998c83 (patch)
tree7d67bf85b338e9f3584cf01784e5a9dee2948496 /amiga/download.c
parent2c8452b961c5160eec15806d4af6decbecb8680f (diff)
downloadnetsurf-40c768cec659adb8c94016536b31d175ff998c83.tar.gz
netsurf-40c768cec659adb8c94016536b31d175ff998c83.tar.bz2
Notify on download completion using system-wide Ringhio notifications.
- Uses ARexx currently due to includes for application.library v53 not having been released. - Shows a download complete message even if failed (but the user would already have seen a warning requester about that) svn path=/trunk/netsurf/; revision=9913
Diffstat (limited to 'amiga/download.c')
-rw-r--r--amiga/download.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/amiga/download.c b/amiga/download.c
index 07cdc2bf9..90f73b4f0 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -32,6 +32,7 @@
#include "amiga/options.h"
#include "amiga/bitmap.h"
#include "amiga/iff_dr2d.h"
+#include "amiga/arexx.h" /* temporarily required for notifications */
#include "content/fetch.h"
@@ -198,9 +199,20 @@ void gui_download_window_done(struct gui_download_window *dw)
struct dlnode *dln,*dln2;
struct browser_window *bw = dw->bw;
bool queuedl = false;
+ STRPTR sendcmd = NULL;
if(!dw) return;
+ if(option_download_notify)
+ {
+ if(sendcmd = ASPrintf("RINGHIO APP=NetSurf SCREEN=FRONT TITLE=NetSurf \"%s downloaded\"",dw->url))
+ {
+ IDoMethod(arexx_obj, AM_EXECUTE, sendcmd, "RINGHIO",
+ NULL, NULL, NULL, NULL);
+ FreeVec(sendcmd);
+ }
+ }
+
bw->download = false;
if(dw->url) free(dw->url);