Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/dfa287767fee79f479b4c...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/dfa287767fee79f479b4cf0...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/dfa287767fee79f479b4cf0d8...
The branch, master has been updated
via dfa287767fee79f479b4cf0d8d69431febc5e934 (commit)
via ff333828b70a5d31b9efe1c7b2df3216478722a3 (commit)
via ffac64fcea44e2840cef67ec2d5bdc6ef0b4b268 (commit)
from 69647cc6a4f230fc0c1ce5481a30ac21c93db8d2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/dfa287767fee79f479b...
commit dfa287767fee79f479b4cf0d8d69431febc5e934
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Warn the user and give them an option to stop NetSurf shutting down, if the TCP/IP
stack has signalled that it is about to exit.
diff --git a/amiga/gui.c b/amiga/gui.c
index 66aca15..1d523e6 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -177,6 +177,7 @@ void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys);
ULONG ami_set_border_gadget_balance(struct gui_window_2 *gwin);
ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *size1, ULONG
*size2);
void ami_try_quit(void);
+void ami_quit_netsurf_delayed(void);
Object *ami_gui_splash_open(void);
void ami_gui_splash_close(Object *win_obj);
static uint32 ami_set_search_ico_render_hook(struct Hook *hook, APTR space,
@@ -2148,7 +2149,7 @@ printf("sig recvd %ld (%ld %ld %ld %ld %ld %ld)\n",
signal, winsignal , appsig ,
if(signal & ctrlcsig)
{
- ami_quit_netsurf();
+ ami_quit_netsurf_delayed();
}
}
@@ -2308,6 +2309,30 @@ void ami_quit_netsurf(void)
}
}
+void ami_quit_netsurf_delayed(void)
+{
+ char *utf8text = ami_utf8_easy(messages_get("TCPIPShutdown"));
+ char *utf8gadgets = ami_utf8_easy(messages_get("AbortShutdown"));
+
+ DisplayBeep(NULL);
+
+ int32 res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO,
+ TDR_TitleString, messages_get("NetSurf"),
+ TDR_FormatString, utf8text,
+ TDR_GadgetString, utf8gadgets,
+ TDR_Timeout, 5,
+ TDR_Inactive, TRUE,
+ TAG_DONE);
+
+ free(utf8text);
+ free(utf8gadgets);
+
+ if(res == -1) { /* Requester timed out */
+ nsoption_set_bool(tab_close_warn, false);
+ ami_quit_netsurf();
+ }
+}
+
void ami_gui_close_screen(struct Screen *scrn)
{
if(scrn == NULL) return;
diff --git a/resources/FatMessages b/resources/FatMessages
index d7bda1a..075a1e9 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -2680,6 +2680,17 @@ de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
it.ami.MultiTabClose:Are you sure you want to close multiple tabs?
nl.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+en.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+de.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+fr.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+it.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+nl.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+en.ami.AbortShutdown:Abort shutdown
+de.ami.AbortShutdown:Abort shutdown
+fr.ami.AbortShutdown:Abort shutdown
+it.ami.AbortShutdown:Abort shutdown
+nl.ami.AbortShutdown:Abort shutdown
+
# Queries
# =======
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/ff333828b70a5d31b9e...
commit ff333828b70a5d31b9efe1c7b2df3216478722a3
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Warn when closing multiple tabs
diff --git a/amiga/download.c b/amiga/download.c
index 434d12e..224ac29 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -390,7 +390,7 @@ gui_window_save_link(struct gui_window *g, const char *url, const char
*title)
BOOL ami_download_check_overwrite(const char *file, struct Window *win, ULONG size)
{
/* Return TRUE if file can be (over-)written */
- int res = 0;
+ int32 res = 0;
BPTR lock = 0;
BPTR fh = 0;
int64 oldsize = 0;
diff --git a/amiga/gui.c b/amiga/gui.c
index 47d75bc..66aca15 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3316,7 +3316,15 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
{
struct Node *tab;
struct Node *ntab;
-
+
+ if((gwin->tabs > 1) && (nsoption_bool(tab_close_warn) == true)) {
+ char *req_body = ami_utf8_easy(messages_get("MultiTabClose"));
+ int32 res = ami_warn_user_multi(req_body, "No", "Yes",
gwin->win);
+ free(req_body);
+
+ if(res == 1) return;
+ }
+
if(gwin->tabs)
{
tab = GetHead(&gwin->tab_list);
diff --git a/amiga/misc.c b/amiga/misc.c
index b5da178..4359c79 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -71,7 +71,7 @@ void warn_user(const char *warning, const char *detail)
if(utf8warning) free(utf8warning);
}
-int ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win)
+int32 ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win)
{
int res = 0;
char *utf8text = ami_utf8_easy(body);
@@ -90,6 +90,8 @@ int ami_warn_user_multi(const char *body, const char *opt1, const char
*opt2, st
if(utf8text) free(utf8text);
if(utf8gadgets) FreeVec(utf8gadgets);
+
+ return res;
}
void die(const char *error)
diff --git a/amiga/misc.h b/amiga/misc.h
index e76d6a3..34a85fa 100644
--- a/amiga/misc.h
+++ b/amiga/misc.h
@@ -19,5 +19,5 @@
#ifndef AMIGA_MISC_H
#define AMIGA_MISC_H
char *translate_escape_chars(const char *s);
-int ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win);
+int32 ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win);
#endif
diff --git a/amiga/options.h b/amiga/options.h
index 957f389..4b477b6 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -39,6 +39,7 @@
bool use_openurl_lib; \
bool new_tab_active; \
bool new_tab_last; \
+ bool tab_close_warn; \
bool kiosk_mode; \
char *search_engines_file; \
char *arexx_dir; \
@@ -102,6 +103,7 @@
.use_openurl_lib = false, \
.new_tab_active = false, \
.new_tab_last = false, \
+ .tab_close_warn = true, \
.kiosk_mode = false, \
.search_engines_file = NULL, \
.arexx_dir = NULL, \
@@ -164,6 +166,7 @@
{ "use_openurl_lib", OPTION_BOOL, &nsoptions.use_openurl_lib}, \
{ "new_tab_is_active", OPTION_BOOL, &nsoptions.new_tab_active}, \
{ "new_tab_last", OPTION_BOOL, &nsoptions.new_tab_last}, \
+{ "tab_close_warn", OPTION_BOOL, &nsoptions.tab_close_warn}, \
{ "kiosk_mode", OPTION_BOOL, &nsoptions.kiosk_mode}, \
{ "search_engines_file",OPTION_STRING, &nsoptions.search_engines_file }, \
{ "arexx_dir", OPTION_STRING, &nsoptions.arexx_dir }, \
diff --git a/resources/FatMessages b/resources/FatMessages
index e8f22aa..d7bda1a 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -2675,6 +2675,11 @@ de.ami.CompError:Nicht zu öffnen
fr.ami.CompError:Unable to open
it.ami.CompError:Impossibile aprire
nl.ami.CompError:Unable to open
+en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+it.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+nl.ami.MultiTabClose:Are you sure you want to close multiple tabs?
# Queries
# =======
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/ffac64fcea44e2840ce...
commit ffac64fcea44e2840cef67ec2d5bdc6ef0b4b268
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Move download overwrite warning requester to misc.c
diff --git a/amiga/download.c b/amiga/download.c
index d5071d3..434d12e 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -37,9 +37,10 @@
#include "desktop/options.h"
#include "amiga/bitmap.h"
#include "amiga/iff_dr2d.h"
+#include "amiga/file.h"
+#include "amiga/misc.h"
#include "amiga/theme.h"
#include "amiga/utf8.h"
-#include "amiga/file.h"
#include "desktop/download.h"
#include "desktop/selection.h"
@@ -415,24 +416,8 @@ BOOL ami_download_check_overwrite(const char *file, struct Window
*win, ULONG si
overwritetext = ASPrintf(messages_get("OverwriteFile"));
}
- char *utf8text = ami_utf8_easy(overwritetext);
+ res = ami_warn_user_multi(overwritetext, "DontReplace", "Replace",
win);
FreeVec(overwritetext);
-
- char *utf8gadget1 = ami_utf8_easy(messages_get("DontReplace"));
- char *utf8gadget2 = ami_utf8_easy(messages_get("Replace"));
- char *utf8gadgets = ASPrintf("%s|%s", utf8gadget1, utf8gadget2);
- free(utf8gadget1);
- free(utf8gadget2);
-
- res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_WARNING,
- TDR_TitleString, messages_get("NetSurf"),
- TDR_FormatString, utf8text,
- TDR_GadgetString, utf8gadgets,
- TDR_Window, win,
- TAG_DONE);
-
- if(utf8text) free(utf8text);
- if(utf8gadgets) FreeVec(utf8gadgets);
}
else return TRUE;
diff --git a/amiga/misc.c b/amiga/misc.c
index 8e8fa76..b5da178 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -71,6 +71,27 @@ void warn_user(const char *warning, const char *detail)
if(utf8warning) free(utf8warning);
}
+int ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win)
+{
+ int res = 0;
+ char *utf8text = ami_utf8_easy(body);
+ char *utf8gadget1 = ami_utf8_easy(messages_get(opt1));
+ char *utf8gadget2 = ami_utf8_easy(messages_get(opt2));
+ char *utf8gadgets = ASPrintf("%s|%s", utf8gadget1, utf8gadget2);
+ free(utf8gadget1);
+ free(utf8gadget2);
+
+ res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_WARNING,
+ TDR_TitleString, messages_get("NetSurf"),
+ TDR_FormatString, utf8text,
+ TDR_GadgetString, utf8gadgets,
+ TDR_Window, win,
+ TAG_DONE);
+
+ if(utf8text) free(utf8text);
+ if(utf8gadgets) FreeVec(utf8gadgets);
+}
+
void die(const char *error)
{
TimedDosRequesterTags(TDR_ImageType,TDRIMAGE_ERROR,
diff --git a/amiga/misc.h b/amiga/misc.h
index c863c79..e76d6a3 100644
--- a/amiga/misc.h
+++ b/amiga/misc.h
@@ -19,4 +19,5 @@
#ifndef AMIGA_MISC_H
#define AMIGA_MISC_H
char *translate_escape_chars(const char *s);
+int ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win);
#endif
-----------------------------------------------------------------------
Summary of changes:
amiga/download.c | 23 ++++-------------------
amiga/gui.c | 37 +++++++++++++++++++++++++++++++++++--
amiga/misc.c | 23 +++++++++++++++++++++++
amiga/misc.h | 1 +
amiga/options.h | 3 +++
resources/FatMessages | 16 ++++++++++++++++
6 files changed, 82 insertions(+), 21 deletions(-)
diff --git a/amiga/download.c b/amiga/download.c
index d5071d3..224ac29 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -37,9 +37,10 @@
#include "desktop/options.h"
#include "amiga/bitmap.h"
#include "amiga/iff_dr2d.h"
+#include "amiga/file.h"
+#include "amiga/misc.h"
#include "amiga/theme.h"
#include "amiga/utf8.h"
-#include "amiga/file.h"
#include "desktop/download.h"
#include "desktop/selection.h"
@@ -389,7 +390,7 @@ gui_window_save_link(struct gui_window *g, const char *url, const char
*title)
BOOL ami_download_check_overwrite(const char *file, struct Window *win, ULONG size)
{
/* Return TRUE if file can be (over-)written */
- int res = 0;
+ int32 res = 0;
BPTR lock = 0;
BPTR fh = 0;
int64 oldsize = 0;
@@ -415,24 +416,8 @@ BOOL ami_download_check_overwrite(const char *file, struct Window
*win, ULONG si
overwritetext = ASPrintf(messages_get("OverwriteFile"));
}
- char *utf8text = ami_utf8_easy(overwritetext);
+ res = ami_warn_user_multi(overwritetext, "DontReplace", "Replace",
win);
FreeVec(overwritetext);
-
- char *utf8gadget1 = ami_utf8_easy(messages_get("DontReplace"));
- char *utf8gadget2 = ami_utf8_easy(messages_get("Replace"));
- char *utf8gadgets = ASPrintf("%s|%s", utf8gadget1, utf8gadget2);
- free(utf8gadget1);
- free(utf8gadget2);
-
- res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_WARNING,
- TDR_TitleString, messages_get("NetSurf"),
- TDR_FormatString, utf8text,
- TDR_GadgetString, utf8gadgets,
- TDR_Window, win,
- TAG_DONE);
-
- if(utf8text) free(utf8text);
- if(utf8gadgets) FreeVec(utf8gadgets);
}
else return TRUE;
diff --git a/amiga/gui.c b/amiga/gui.c
index 47d75bc..1d523e6 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -177,6 +177,7 @@ void ami_get_vscroll_pos(struct gui_window_2 *gwin, ULONG *ys);
ULONG ami_set_border_gadget_balance(struct gui_window_2 *gwin);
ULONG ami_get_border_gadget_balance(struct gui_window_2 *gwin, ULONG *size1, ULONG
*size2);
void ami_try_quit(void);
+void ami_quit_netsurf_delayed(void);
Object *ami_gui_splash_open(void);
void ami_gui_splash_close(Object *win_obj);
static uint32 ami_set_search_ico_render_hook(struct Hook *hook, APTR space,
@@ -2148,7 +2149,7 @@ printf("sig recvd %ld (%ld %ld %ld %ld %ld %ld)\n",
signal, winsignal , appsig ,
if(signal & ctrlcsig)
{
- ami_quit_netsurf();
+ ami_quit_netsurf_delayed();
}
}
@@ -2308,6 +2309,30 @@ void ami_quit_netsurf(void)
}
}
+void ami_quit_netsurf_delayed(void)
+{
+ char *utf8text = ami_utf8_easy(messages_get("TCPIPShutdown"));
+ char *utf8gadgets = ami_utf8_easy(messages_get("AbortShutdown"));
+
+ DisplayBeep(NULL);
+
+ int32 res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO,
+ TDR_TitleString, messages_get("NetSurf"),
+ TDR_FormatString, utf8text,
+ TDR_GadgetString, utf8gadgets,
+ TDR_Timeout, 5,
+ TDR_Inactive, TRUE,
+ TAG_DONE);
+
+ free(utf8text);
+ free(utf8gadgets);
+
+ if(res == -1) { /* Requester timed out */
+ nsoption_set_bool(tab_close_warn, false);
+ ami_quit_netsurf();
+ }
+}
+
void ami_gui_close_screen(struct Screen *scrn)
{
if(scrn == NULL) return;
@@ -3316,7 +3341,15 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
{
struct Node *tab;
struct Node *ntab;
-
+
+ if((gwin->tabs > 1) && (nsoption_bool(tab_close_warn) == true)) {
+ char *req_body = ami_utf8_easy(messages_get("MultiTabClose"));
+ int32 res = ami_warn_user_multi(req_body, "No", "Yes",
gwin->win);
+ free(req_body);
+
+ if(res == 1) return;
+ }
+
if(gwin->tabs)
{
tab = GetHead(&gwin->tab_list);
diff --git a/amiga/misc.c b/amiga/misc.c
index 8e8fa76..4359c79 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -71,6 +71,29 @@ void warn_user(const char *warning, const char *detail)
if(utf8warning) free(utf8warning);
}
+int32 ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win)
+{
+ int res = 0;
+ char *utf8text = ami_utf8_easy(body);
+ char *utf8gadget1 = ami_utf8_easy(messages_get(opt1));
+ char *utf8gadget2 = ami_utf8_easy(messages_get(opt2));
+ char *utf8gadgets = ASPrintf("%s|%s", utf8gadget1, utf8gadget2);
+ free(utf8gadget1);
+ free(utf8gadget2);
+
+ res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_WARNING,
+ TDR_TitleString, messages_get("NetSurf"),
+ TDR_FormatString, utf8text,
+ TDR_GadgetString, utf8gadgets,
+ TDR_Window, win,
+ TAG_DONE);
+
+ if(utf8text) free(utf8text);
+ if(utf8gadgets) FreeVec(utf8gadgets);
+
+ return res;
+}
+
void die(const char *error)
{
TimedDosRequesterTags(TDR_ImageType,TDRIMAGE_ERROR,
diff --git a/amiga/misc.h b/amiga/misc.h
index c863c79..34a85fa 100644
--- a/amiga/misc.h
+++ b/amiga/misc.h
@@ -19,4 +19,5 @@
#ifndef AMIGA_MISC_H
#define AMIGA_MISC_H
char *translate_escape_chars(const char *s);
+int32 ami_warn_user_multi(const char *body, const char *opt1, const char *opt2, struct
Window *win);
#endif
diff --git a/amiga/options.h b/amiga/options.h
index 957f389..4b477b6 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -39,6 +39,7 @@
bool use_openurl_lib; \
bool new_tab_active; \
bool new_tab_last; \
+ bool tab_close_warn; \
bool kiosk_mode; \
char *search_engines_file; \
char *arexx_dir; \
@@ -102,6 +103,7 @@
.use_openurl_lib = false, \
.new_tab_active = false, \
.new_tab_last = false, \
+ .tab_close_warn = true, \
.kiosk_mode = false, \
.search_engines_file = NULL, \
.arexx_dir = NULL, \
@@ -164,6 +166,7 @@
{ "use_openurl_lib", OPTION_BOOL, &nsoptions.use_openurl_lib}, \
{ "new_tab_is_active", OPTION_BOOL, &nsoptions.new_tab_active}, \
{ "new_tab_last", OPTION_BOOL, &nsoptions.new_tab_last}, \
+{ "tab_close_warn", OPTION_BOOL, &nsoptions.tab_close_warn}, \
{ "kiosk_mode", OPTION_BOOL, &nsoptions.kiosk_mode}, \
{ "search_engines_file",OPTION_STRING, &nsoptions.search_engines_file }, \
{ "arexx_dir", OPTION_STRING, &nsoptions.arexx_dir }, \
diff --git a/resources/FatMessages b/resources/FatMessages
index e8f22aa..075a1e9 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -2675,6 +2675,22 @@ de.ami.CompError:Nicht zu öffnen
fr.ami.CompError:Unable to open
it.ami.CompError:Impossibile aprire
nl.ami.CompError:Unable to open
+en.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+de.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+fr.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+it.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+nl.ami.MultiTabClose:Are you sure you want to close multiple tabs?
+en.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+de.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+fr.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+it.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+nl.ami.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and
NetSurf must exit.\n\nNetSurf will quit in 5 seconds unless this shutdown is aborted.
+en.ami.AbortShutdown:Abort shutdown
+de.ami.AbortShutdown:Abort shutdown
+fr.ami.AbortShutdown:Abort shutdown
+it.ami.AbortShutdown:Abort shutdown
+nl.ami.AbortShutdown:Abort shutdown
+
# Queries
# =======
--
NetSurf Browser