summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--!NetSurf/Resources/de/Messages1
-rw-r--r--!NetSurf/Resources/en/Messages1
-rw-r--r--!NetSurf/Resources/fr/Messages1
-rwxr-xr-x!NetSurf/Resources/it/Messages1
-rw-r--r--!NetSurf/Resources/nl/Messages1
-rw-r--r--amiga/download.c31
-rwxr-xr-xamiga/download.h1
-rwxr-xr-xamiga/gui.c19
-rwxr-xr-xamiga/gui.h3
9 files changed, 40 insertions, 19 deletions
diff --git a/!NetSurf/Resources/de/Messages b/!NetSurf/Resources/de/Messages
index 5ec61de69..bcda79e03 100644
--- a/!NetSurf/Resources/de/Messages
+++ b/!NetSurf/Resources/de/Messages
@@ -393,6 +393,7 @@ Abort:Abgebrochen
#
amiDownload:%ld von %ld Bytes heruntergeladen
amiDownloadU:%ld Bytes heruntergeladen
+amiDownloadComplete:NetSurf: Download completed
# GTK download window tokens
#
diff --git a/!NetSurf/Resources/en/Messages b/!NetSurf/Resources/en/Messages
index 997aa6289..404691133 100644
--- a/!NetSurf/Resources/en/Messages
+++ b/!NetSurf/Resources/en/Messages
@@ -393,6 +393,7 @@ Abort:Abort
#
amiDownload:%ld of %ld bytes downloaded
amiDownloadU:%ld bytes downloaded
+amiDownloadComplete:NetSurf: Download completed
# GTK download window tokens
#
diff --git a/!NetSurf/Resources/fr/Messages b/!NetSurf/Resources/fr/Messages
index 75e559c39..23d30aaa6 100644
--- a/!NetSurf/Resources/fr/Messages
+++ b/!NetSurf/Resources/fr/Messages
@@ -393,6 +393,7 @@ Abort:Abort
#
amiDownload:%ld of %ld bytes downloaded
amiDownloadU:%ld bytes downloaded
+amiDownloadComplete:NetSurf: Download completed
# GTK download window tokens
#
diff --git a/!NetSurf/Resources/it/Messages b/!NetSurf/Resources/it/Messages
index 0ce5f0b6f..e116f1977 100755
--- a/!NetSurf/Resources/it/Messages
+++ b/!NetSurf/Resources/it/Messages
@@ -395,6 +395,7 @@ Abort:Annulla
#
amiDownload:%ld di %ld byte scaricati
amiDownloadU:%ld byte scaricati
+amiDownloadComplete:NetSurf: Download completed
# GTK download window tokens
#
diff --git a/!NetSurf/Resources/nl/Messages b/!NetSurf/Resources/nl/Messages
index 26c1d3866..180a578b7 100644
--- a/!NetSurf/Resources/nl/Messages
+++ b/!NetSurf/Resources/nl/Messages
@@ -393,6 +393,7 @@ Abort:Abort
#
amiDownload:%ld of %ld bytes downloaded
amiDownloadU:%ld bytes downloaded
+amiDownloadComplete:NetSurf: Download completed
# GTK download window tokens
#
diff --git a/amiga/download.c b/amiga/download.c
index 90f73b4f0..fde82679d 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008,2009 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2010 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -23,6 +23,7 @@
#include <proto/intuition.h>
#include <proto/utility.h>
#include <proto/icon.h>
+#include <proto/application.h>
#include <graphics/blitattr.h>
#include <workbench/icon.h>
@@ -32,7 +33,6 @@
#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"
@@ -58,7 +58,6 @@ struct gui_download_window *gui_download_window_create(const char *url,
const char *mime_type, struct fetch *fetch,
unsigned int total_size, struct gui_window *gui)
{
- char fname[1024];
struct gui_download_window *dw;
APTR va[3];
@@ -68,7 +67,7 @@ struct gui_download_window *gui_download_window_create(const char *url,
if((!IsListEmpty(&gui->dllist)) && (dw->dln = (struct dlnode *)FindName(&gui->dllist,url)))
{
- strcpy(fname,dw->dln->filename);
+ strcpy(dw->fname, dw->dln->filename);
free(dw->dln->node.ln_Name);
dw->dln->node.ln_Name = NULL;
}
@@ -80,8 +79,8 @@ struct gui_download_window *gui_download_window_create(const char *url,
ASLFR_InitialFile,FilePart(url),
TAG_DONE))
{
- strlcpy(&fname,savereq->fr_Drawer,1024);
- AddPart((STRPTR)&fname,savereq->fr_File,1024);
+ strlcpy(&dw->fname,savereq->fr_Drawer,1024);
+ AddPart((STRPTR)&dw->fname,savereq->fr_File,1024);
}
else return NULL;
}
@@ -95,14 +94,12 @@ struct gui_download_window *gui_download_window_create(const char *url,
va[1] = (APTR)dw->size;
va[2] = 0;
- if(!(dw->fh = FOpen((STRPTR)&fname,MODE_NEWFILE,0)))
+ if(!(dw->fh = FOpen((STRPTR)&dw->fname,MODE_NEWFILE,0)))
{
FreeVec(dw);
return NULL;
}
- SetComment(fname,url);
-
dw->objects[OID_MAIN] = WindowObject,
WA_ScreenTitle,nsscreentitle,
WA_Title, dw->url,
@@ -114,7 +111,7 @@ struct gui_download_window *gui_download_window_create(const char *url,
WA_CustomScreen,scrn,
WINDOW_SharedPort,sport,
WINDOW_UserData,dw,
- WINDOW_IconifyGadget, TRUE,
+ WINDOW_IconifyGadget, FALSE,
WINDOW_LockHeight,TRUE,
WINDOW_Position, WPOS_CENTERSCREEN,
WINDOW_ParentGroup, dw->gadgets[GID_MAIN] = VGroupObject,
@@ -203,14 +200,16 @@ void gui_download_window_done(struct gui_download_window *dw)
if(!dw) return;
+ SetComment(dw->fname, dw->url);
+
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);
- }
+ Notify(ami_appid, APPNOTIFY_Title, messages_get("amiDownloadComplete"),
+ APPNOTIFY_PubScreenName, "FRONT",
+ APPNOTIFY_BackMsg, dw->fname,
+ APPNOTIFY_CloseOnDC, TRUE,
+ APPNOTIFY_Text, dw->fname,
+ TAG_DONE);
}
bw->download = false;
diff --git a/amiga/download.h b/amiga/download.h
index 425207e39..6c37853c3 100755
--- a/amiga/download.h
+++ b/amiga/download.h
@@ -39,6 +39,7 @@ struct gui_download_window {
struct browser_window *bw;
struct fetch *fetch;
char *url;
+ char fname[1024];
};
int drag_save;
diff --git a/amiga/gui.c b/amiga/gui.c
index d787f6dcc..b1c23376b 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-9 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2010 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -81,6 +81,8 @@
#include <libraries/application.h>
#include <proto/application.h>
#include <desktop/searchweb.h>
+#include <proto/wb.h>
+#include <proto/utility.h>
#include "amiga/stringview/stringview.h"
#include "amiga/stringview/urlhistory.h"
@@ -130,7 +132,6 @@ ULONG throbber_width,throbber_height,throbber_frames,throbber_update_interval;
BOOL rmbtrapped;
BOOL locked_screen = FALSE;
BOOL screen_closed = FALSE;
-uint32 ami_appid;
struct MsgPort *applibport = NULL;
ULONG applibsig = 0;
@@ -732,6 +733,7 @@ void gui_init2(int argc, char** argv)
REGAPP_HasPrefsWindow, TRUE,
REGAPP_CanCreateNewDocs, TRUE,
REGAPP_UniqueApplication, TRUE,
+ REGAPP_Description, "Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.",
TAG_DONE);
}
else
@@ -744,6 +746,7 @@ void gui_init2(int argc, char** argv)
REGAPP_HasPrefsWindow, TRUE,
REGAPP_CanCreateNewDocs, TRUE,
REGAPP_UniqueApplication, TRUE,
+ REGAPP_Description, "Small as a mouse, fast as a cheetah and available for free. NetSurf is a multi-platform web browser.",
TAG_DONE);
}
@@ -1699,6 +1702,18 @@ void ami_handle_applib(void)
case APPLIBMT_ForceQuit:
ami_quit_netsurf();
break;
+
+ case APPLIBMT_CustomMsg:
+ {
+ struct ApplicationCustomMsg *applibcustmsg = applibmsg;
+ STRPTR tempmsg;
+ if(tempmsg = ASPrintf("\"%s\"",applibcustmsg->customMsg))
+ {
+ OpenWorkbenchObjectA(tempmsg, NULL);
+ FreeVec(tempmsg);
+ }
+ }
+ break;
}
ReplyMsg((struct Message *)applibmsg);
}
diff --git a/amiga/gui.h b/amiga/gui.h
index 6924bc344..b1f512e08 100755
--- a/amiga/gui.h
+++ b/amiga/gui.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-9 Chris Young <chris@unsatisfactorysoftware.co.uk>
+ * Copyright 2008-2010 Chris Young <chris@unsatisfactorysoftware.co.uk>
*
* This file is part of NetSurf, http://www.netsurf-browser.org/
*
@@ -142,4 +142,5 @@ struct MsgPort *sport;
bool win_destroyed;
struct browser_window *curbw;
struct gui_globals browserglob;
+uint32 ami_appid;
#endif