summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'amiga')
-rw-r--r--amiga/download.c12
-rwxr-xr-xamiga/gui_options.c14
2 files changed, 23 insertions, 3 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);
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index a92503ce7..ee605f672 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2009, 2010 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -21,6 +21,7 @@
#include <proto/exec.h>
#include <proto/intuition.h>
#include <proto/utility.h>
+#include <proto/application.h>
#include <libraries/gadtools.h>
#include <exec/types.h>
#include <intuition/classusr.h>
@@ -362,6 +363,7 @@ void ami_gui_opts_open(void)
BOOL proxyhostdisabled = TRUE, proxyauthdisabled = TRUE;
BOOL disableanims, animspeeddisabled = FALSE;
BOOL scaleselected = option_scale_quality, scaledisabled = FALSE;
+ BOOL download_notify_disabled = FALSE;
char animspeed[10];
struct TextAttr fontsans, fontserif, fontmono, fontcursive, fontfantasy;
@@ -423,6 +425,12 @@ void ami_gui_opts_open(void)
scaleselected = FALSE;
}
+ if(ApplicationBase->lib_Version < 53)
+ {
+ download_notify_disabled = TRUE;
+ option_download_notify = FALSE;
+ }
+
fontsans.ta_Name = ASPrintf("%s.font",option_font_sans);
fontserif.ta_Name = ASPrintf("%s.font",option_font_serif);
fontmono.ta_Name = ASPrintf("%s.font",option_font_mono);
@@ -1018,9 +1026,9 @@ void ami_gui_opts_open(void)
LAYOUT_AddChild, gow->gadgets[GID_OPTS_NOTIFY] = CheckBoxObject,
GA_ID, GID_OPTS_NOTIFY,
GA_RelVerify, TRUE,
- GA_Disabled, TRUE,
+ GA_Disabled, download_notify_disabled,
GA_Text, gadlab[GID_OPTS_NOTIFY],
- GA_Selected, FALSE, //option_download_notify,
+ GA_Selected, option_download_notify,
CheckBoxEnd,
LayoutEnd,
LAYOUT_AddChild, gow->gadgets[GID_OPTS_DLDIR] = GetFileObject,