summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-01-31 17:21:51 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-01-31 17:21:51 +0000
commitcc0abb66b092f2198e1931ee6921fe79da4ed94d (patch)
treeec90d09e288919cb1a2233b6feb8592106f4b4c4
parente98c220813cb12a413711990d9b25aa8a9cb847a (diff)
downloadnetsurf-cc0abb66b092f2198e1931ee6921fe79da4ed94d.tar.gz
netsurf-cc0abb66b092f2198e1931ee6921fe79da4ed94d.tar.bz2
Implement warn_multi for OS3 (needed for the multiple tab close warning)
-rwxr-xr-xamiga/misc.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/amiga/misc.c b/amiga/misc.c
index 407aec18b..aa9d1196b 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -137,7 +137,7 @@ void warn_user(const char *warning, const char *detail)
int32 ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct Window *win)
{
int res = 0;
-#ifdef __amigaos4__
+
char *utf8text = ami_utf8_easy(body);
char *utf8gadget1 = ami_utf8_easy(messages_get(opt1));
char *utf8gadget2 = ami_utf8_easy(messages_get(opt2));
@@ -145,18 +145,28 @@ int32 ami_warn_user_multi(const char *body, const char *opt1, const char *opt2,
free(utf8gadget1);
free(utf8gadget2);
+#ifdef __amigaos4__
res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_WARNING,
TDR_TitleString, messages_get("NetSurf"),
TDR_FormatString, utf8text,
TDR_GadgetString, utf8gadgets,
TDR_Window, win,
TAG_DONE);
+#else
+ struct EasyStruct easyreq = {
+ sizeof(struct EasyStruct),
+ 0,
+ messages_get("NetSurf"),
+ utf8text,
+ utf8gadgets,
+ };
+
+ res = EasyRequest(win, &easyreq, NULL);
+#endif
if(utf8text) free(utf8text);
if(utf8gadgets) FreeVec(utf8gadgets);
-#else
-#warning write this for os3
-#endif
+
return res;
}