netsurf: branch master updated. 02a4bfd375110c268837931a8714fab0dc154d50
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/02a4bfd375110c2688379...
...commit http://git.netsurf-browser.org/netsurf.git/commit/02a4bfd375110c268837931...
...tree http://git.netsurf-browser.org/netsurf.git/tree/02a4bfd375110c268837931a8...
The branch, master has been updated
via 02a4bfd375110c268837931a8714fab0dc154d50 (commit)
via af8c3ef0c359a4c86531755659af7688e8b3f08e (commit)
via 5b5336499479af1e902de62319a95405b45136ac (commit)
from 083b7c0233635959f1944c2150abbb923c5e0481 (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/02a4bfd375110c26883...
commit 02a4bfd375110c268837931a8714fab0dc154d50
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Toggle the tab bar to the correct state if the option to always show it is changed and only one tab is currently open
diff --git a/amiga/gui.c b/amiga/gui.c
index 60d9d31..bd0715e 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2703,6 +2703,33 @@ void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
}
}
+void ami_gui_tabs_toggle_all(void)
+{
+ struct nsObject *node;
+ struct nsObject *nnode;
+ struct gui_window_2 *gwin;
+
+ if(IsMinListEmpty(window_list)) return;
+
+ node = (struct nsObject *)GetHead((struct List *)window_list);
+
+ do {
+ nnode=(struct nsObject *)GetSucc((struct Node *)node);
+ gwin = node->objstruct;
+
+ if(node->Type == AMINS_WINDOW)
+ {
+ if(gwin->tabs == 1) {
+ if(nsoption_bool(tab_always_show) == true) {
+ ami_toggletabbar(gwin, true);
+ } else {
+ ami_toggletabbar(gwin, false);
+ }
+ }
+ }
+ } while(node = nnode);
+}
+
struct gui_window *gui_create_browser_window(struct browser_window *bw,
struct browser_window *clone, bool new_tab)
{
diff --git a/amiga/gui.h b/amiga/gui.h
index 6a5434f..1dff5d3 100755
--- a/amiga/gui.h
+++ b/amiga/gui.h
@@ -154,6 +154,7 @@ bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y);
BOOL ami_gadget_hit(Object *obj, int x, int y);
void ami_gui_history(struct gui_window_2 *gwin, bool back);
void ami_gui_hotlist_toolbar_update_all(void);
+void ami_gui_tabs_toggle_all(void);
struct TextFont *origrpfont;
struct MinList *window_list;
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index d4c1198..a84449e 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -1450,6 +1450,7 @@ void ami_gui_opts_use(bool save)
struct TextAttr *tattr;
char *dot;
bool rescan_fonts = false;
+ bool old_tab_always_show;
SetWindowPointer(gow->win,
WA_BusyPointer, TRUE,
@@ -1689,12 +1690,17 @@ void ami_gui_opts_use(bool save)
}
GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
+ old_tab_always_show = nsoption_bool(tab_always_show);
+
if (data) {
nsoption_set_bool(tab_always_show, true);
} else {
nsoption_set_bool(tab_always_show, false);
}
+ if(old_tab_always_show != nsoption_bool(tab_always_show))
+ ami_gui_tabs_toggle_all();
+
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&nsoption_int(search_provider));
search_web_provider_details(nsoption_int(search_provider));
search_web_retrieve_ico(false);
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/af8c3ef0c359a4c8653...
commit af8c3ef0c359a4c86531755659af7688e8b3f08e
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Add options for always showing tabbar and warning on closing multiple tabs
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 613ffff..d4c1198 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -117,6 +117,8 @@ enum
GID_OPTS_TAB_ACTIVE,
GID_OPTS_TAB_2,
GID_OPTS_TAB_LAST,
+ GID_OPTS_TAB_ALWAYS,
+ GID_OPTS_TAB_CLOSE,
GID_OPTS_SEARCH_PROV,
GID_OPTS_CLIPBOARD,
GID_OPTS_CONTEXTMENU,
@@ -286,6 +288,8 @@ void ami_gui_opts_setup(void)
gadlab[GID_OPTS_TAB_ACTIVE] = (char *)ami_utf8_easy((char *)messages_get("TabActive"));
gadlab[GID_OPTS_TAB_2] = (char *)ami_utf8_easy((char *)messages_get("TabMiddle"));
gadlab[GID_OPTS_TAB_LAST] = (char *)ami_utf8_easy((char *)messages_get("TabLast"));
+ gadlab[GID_OPTS_TAB_ALWAYS] = (char *)ami_utf8_easy((char *)messages_get("TabAlways"));
+ gadlab[GID_OPTS_TAB_CLOSE] = (char *)ami_utf8_easy((char *)messages_get("TabClose"));
gadlab[GID_OPTS_SEARCH_PROV] = (char *)ami_utf8_easy((char *)messages_get("SearchProvider"));
gadlab[GID_OPTS_CLIPBOARD] = (char *)ami_utf8_easy((char *)messages_get("ClipboardUTF8"));
gadlab[GID_OPTS_CONTEXTMENU] = (char *)ami_utf8_easy((char *)messages_get("ContextMenu"));
@@ -1117,6 +1121,18 @@ void ami_gui_opts_open(void)
GA_Text, gadlab[GID_OPTS_TAB_2],
GA_Selected, nsoption_bool(button_2_tab),
CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ALWAYS] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_ALWAYS,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_ALWAYS],
+ GA_Selected, nsoption_bool(tab_always_show),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_CLOSE] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_CLOSE,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_CLOSE],
+ GA_Selected, nsoption_bool(tab_close_warn),
+ CheckBoxEnd,
LayoutEnd, // tabbed browsing
LayoutEnd,
LayoutEnd, // page vgroup
@@ -1665,6 +1681,20 @@ void ami_gui_opts_use(bool save)
nsoption_set_bool(button_2_tab, false);
}
+ GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_CLOSE],(ULONG *)&data);
+ if (data) {
+ nsoption_set_bool(tab_close_warn, true);
+ } else {
+ nsoption_set_bool(tab_close_warn, false);
+ }
+
+ GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
+ if (data) {
+ nsoption_set_bool(tab_always_show, true);
+ } else {
+ nsoption_set_bool(tab_always_show, false);
+ }
+
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&nsoption_int(search_provider));
search_web_provider_details(nsoption_int(search_provider));
search_web_retrieve_ico(false);
diff --git a/resources/FatMessages b/resources/FatMessages
index 6f7bf0d..c391a41 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -5512,24 +5512,14 @@ fr.all.Duration:Duration
it.all.Duration:Durata
nl.all.Duration:Duration
-# Advanced
+# Tabs
#
-en.all.Downloads:Downloads
-de.all.Downloads:Downloads
-fr.all.Downloads:Downloads
-it.all.Downloads:Trasferimenti
-nl.all.Downloads:Downloads
-en.all.ConfirmOverwrite:Request confirmation when overwriting
-de.all.ConfirmOverwrite:vor Überschreiben nachfragen
-fr.all.ConfirmOverwrite:Request confirmation when overwriting
-it.all.ConfirmOverwrite:Richiedi conferma prima di sovrascrivere
-nl.all.ConfirmOverwrite:Request confirmation when overwriting
-en.all.DownloadDir:Initial download location
-de.all.DownloadDir:Downloadverzeichnis
-fr.all.DownloadDir:Initial download location
-it.all.DownloadDir:Percorso predefinito
-nl.all.DownloadDir:Initial download location
+en.ami.Tabs:Tabs
+de.ami.Tabs:Tabs
+fr.ami.Tabs:Tabs
+it.ami.Tabs:Tabs
+nl.ami.Tabs:Tabs
en.all.TabbedBrowsing:Tabbed browsing
de.all.TabbedBrowsing:Registernavigation (Tabs)
fr.all.TabbedBrowsing:Tabbed browsing
@@ -5550,6 +5540,35 @@ de.all.TabLast:Open new tabs after all existing tabs
fr.all.TabLast:Open new tabs after all existing tabs
it.all.TabLast:Apri le nuove schede dopo quella corrente
nl.all.TabLast:Open new tabs after all existing tabs
+en.ami.TabClose:Warn when closing multiple tabs
+de.ami.TabClose:Warn when closing multiple tabs
+fr.ami.TabClose:Warn when closing multiple tabs
+it.ami.TabClose:Warn when closing multiple tabs
+nl.ami.TabClose:Warn when closing multiple tabs
+en.ami.TabAlways:Always show tabs
+de.ami.TabAlways:Always show tabs
+fr.ami.TabAlways:Always show tabs
+it.ami.TabAlways:Always show tabs
+nl.ami.TabAlways:Always show tabs
+
+# Advanced
+#
+
+en.all.Downloads:Downloads
+de.all.Downloads:Downloads
+fr.all.Downloads:Downloads
+it.all.Downloads:Trasferimenti
+nl.all.Downloads:Downloads
+en.all.ConfirmOverwrite:Request confirmation when overwriting
+de.all.ConfirmOverwrite:vor Überschreiben nachfragen
+fr.all.ConfirmOverwrite:Request confirmation when overwriting
+it.all.ConfirmOverwrite:Richiedi conferma prima di sovrascrivere
+nl.all.ConfirmOverwrite:Request confirmation when overwriting
+en.all.DownloadDir:Initial download location
+de.all.DownloadDir:Downloadverzeichnis
+fr.all.DownloadDir:Initial download location
+it.all.DownloadDir:Percorso predefinito
+nl.all.DownloadDir:Initial download location
en.all.DownloadNotify:Notify on completion
de.all.DownloadNotify:Downloadende melden
fr.all.DownloadNotify:Notify on completion
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/5b5336499479af1e902...
commit 5b5336499479af1e902de62319a95405b45136ac
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Move tabbed browsing options to new tab
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 27b3c63..613ffff 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -186,7 +186,7 @@ enum
};
#define OPTS_LAST LAB_OPTS_LAST
-#define OPTS_MAX_TABS 9
+#define OPTS_MAX_TABS 10
#define OPTS_MAX_SCREEN 4
#define OPTS_MAX_PROXY 5
#define OPTS_MAX_NATIVEBM 3
@@ -218,12 +218,13 @@ void ami_gui_opts_setup(void)
tabs[3] = (char *)ami_utf8_easy((char *)messages_get("con_rendering"));
tabs[4] = (char *)ami_utf8_easy((char *)messages_get("con_fonts"));
tabs[5] = (char *)ami_utf8_easy((char *)messages_get("con_cache"));
- tabs[6] = (char *)ami_utf8_easy((char *)messages_get("con_advanced"));
+ tabs[6] = (char *)ami_utf8_easy((char *)messages_get("Tabs"));
+ tabs[7] = (char *)ami_utf8_easy((char *)messages_get("con_advanced"));
#ifdef WITH_PDF_EXPORT
- tabs[7] = (char *)ami_utf8_easy((char *)messages_get("Export"));
- tabs[8] = NULL;
+ tabs[8] = (char *)ami_utf8_easy((char *)messages_get("Export"));
+ tabs[9] = NULL;
#else
- tabs[7] = NULL;
+ tabs[8] = NULL;
#endif
screenopts[0] = (char *)ami_utf8_easy((char *)messages_get("ScreenOwn"));
@@ -1089,6 +1090,39 @@ void ami_gui_opts_open(void)
CHILD_WeightedHeight, 0,
PageEnd, // page object
/*
+ ** Tabs
+ */
+ PAGE_Add, LayoutObject,
+ LAYOUT_AddChild,VGroupObject,
+ LAYOUT_AddChild,HGroupObject,
+ LAYOUT_AddChild,VGroupObject,
+ LAYOUT_SpaceOuter, TRUE,
+ LAYOUT_BevelStyle, BVS_GROUP,
+ LAYOUT_Label, gadlab[GRP_OPTS_TABS],
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ACTIVE] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_ACTIVE,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
+ GA_Selected, !nsoption_bool(new_tab_active),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_LAST,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_LAST],
+ GA_Selected, nsoption_bool(new_tab_last),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_2] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_2,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_2],
+ GA_Selected, nsoption_bool(button_2_tab),
+ CheckBoxEnd,
+ LayoutEnd, // tabbed browsing
+ LayoutEnd,
+ LayoutEnd, // page vgroup
+ CHILD_WeightedHeight, 0,
+ PageEnd, // page object
+ /*
** Advanced
*/
PAGE_Add, LayoutObject,
@@ -1127,29 +1161,6 @@ void ami_gui_opts_open(void)
LayoutEnd, // downloads
CHILD_WeightedHeight, 0,
LAYOUT_AddChild,HGroupObject,
- LAYOUT_AddChild,VGroupObject,
- LAYOUT_SpaceOuter, TRUE,
- LAYOUT_BevelStyle, BVS_GROUP,
- LAYOUT_Label, gadlab[GRP_OPTS_TABS],
- LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ACTIVE] = CheckBoxObject,
- GA_ID, GID_OPTS_TAB_ACTIVE,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
- GA_Selected, !nsoption_bool(new_tab_active),
- CheckBoxEnd,
- LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObject,
- GA_ID, GID_OPTS_TAB_LAST,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_TAB_LAST],
- GA_Selected, nsoption_bool(new_tab_last),
- CheckBoxEnd,
- LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_2] = CheckBoxObject,
- GA_ID, GID_OPTS_TAB_2,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_TAB_2],
- GA_Selected, nsoption_bool(button_2_tab),
- CheckBoxEnd,
- LayoutEnd, // tabbed browsing
LAYOUT_AddChild, VGroupObject,
LAYOUT_SpaceOuter, TRUE,
-----------------------------------------------------------------------
Summary of changes:
amiga/gui.c | 27 +++++++++++++
amiga/gui.h | 1 +
amiga/gui_options.c | 103 +++++++++++++++++++++++++++++++++++-------------
resources/FatMessages | 51 +++++++++++++++++--------
4 files changed, 138 insertions(+), 44 deletions(-)
diff --git a/amiga/gui.c b/amiga/gui.c
index 60d9d31..bd0715e 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2703,6 +2703,33 @@ void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
}
}
+void ami_gui_tabs_toggle_all(void)
+{
+ struct nsObject *node;
+ struct nsObject *nnode;
+ struct gui_window_2 *gwin;
+
+ if(IsMinListEmpty(window_list)) return;
+
+ node = (struct nsObject *)GetHead((struct List *)window_list);
+
+ do {
+ nnode=(struct nsObject *)GetSucc((struct Node *)node);
+ gwin = node->objstruct;
+
+ if(node->Type == AMINS_WINDOW)
+ {
+ if(gwin->tabs == 1) {
+ if(nsoption_bool(tab_always_show) == true) {
+ ami_toggletabbar(gwin, true);
+ } else {
+ ami_toggletabbar(gwin, false);
+ }
+ }
+ }
+ } while(node = nnode);
+}
+
struct gui_window *gui_create_browser_window(struct browser_window *bw,
struct browser_window *clone, bool new_tab)
{
diff --git a/amiga/gui.h b/amiga/gui.h
index 6a5434f..1dff5d3 100755
--- a/amiga/gui.h
+++ b/amiga/gui.h
@@ -154,6 +154,7 @@ bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y);
BOOL ami_gadget_hit(Object *obj, int x, int y);
void ami_gui_history(struct gui_window_2 *gwin, bool back);
void ami_gui_hotlist_toolbar_update_all(void);
+void ami_gui_tabs_toggle_all(void);
struct TextFont *origrpfont;
struct MinList *window_list;
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 27b3c63..a84449e 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -117,6 +117,8 @@ enum
GID_OPTS_TAB_ACTIVE,
GID_OPTS_TAB_2,
GID_OPTS_TAB_LAST,
+ GID_OPTS_TAB_ALWAYS,
+ GID_OPTS_TAB_CLOSE,
GID_OPTS_SEARCH_PROV,
GID_OPTS_CLIPBOARD,
GID_OPTS_CONTEXTMENU,
@@ -186,7 +188,7 @@ enum
};
#define OPTS_LAST LAB_OPTS_LAST
-#define OPTS_MAX_TABS 9
+#define OPTS_MAX_TABS 10
#define OPTS_MAX_SCREEN 4
#define OPTS_MAX_PROXY 5
#define OPTS_MAX_NATIVEBM 3
@@ -218,12 +220,13 @@ void ami_gui_opts_setup(void)
tabs[3] = (char *)ami_utf8_easy((char *)messages_get("con_rendering"));
tabs[4] = (char *)ami_utf8_easy((char *)messages_get("con_fonts"));
tabs[5] = (char *)ami_utf8_easy((char *)messages_get("con_cache"));
- tabs[6] = (char *)ami_utf8_easy((char *)messages_get("con_advanced"));
+ tabs[6] = (char *)ami_utf8_easy((char *)messages_get("Tabs"));
+ tabs[7] = (char *)ami_utf8_easy((char *)messages_get("con_advanced"));
#ifdef WITH_PDF_EXPORT
- tabs[7] = (char *)ami_utf8_easy((char *)messages_get("Export"));
- tabs[8] = NULL;
+ tabs[8] = (char *)ami_utf8_easy((char *)messages_get("Export"));
+ tabs[9] = NULL;
#else
- tabs[7] = NULL;
+ tabs[8] = NULL;
#endif
screenopts[0] = (char *)ami_utf8_easy((char *)messages_get("ScreenOwn"));
@@ -285,6 +288,8 @@ void ami_gui_opts_setup(void)
gadlab[GID_OPTS_TAB_ACTIVE] = (char *)ami_utf8_easy((char *)messages_get("TabActive"));
gadlab[GID_OPTS_TAB_2] = (char *)ami_utf8_easy((char *)messages_get("TabMiddle"));
gadlab[GID_OPTS_TAB_LAST] = (char *)ami_utf8_easy((char *)messages_get("TabLast"));
+ gadlab[GID_OPTS_TAB_ALWAYS] = (char *)ami_utf8_easy((char *)messages_get("TabAlways"));
+ gadlab[GID_OPTS_TAB_CLOSE] = (char *)ami_utf8_easy((char *)messages_get("TabClose"));
gadlab[GID_OPTS_SEARCH_PROV] = (char *)ami_utf8_easy((char *)messages_get("SearchProvider"));
gadlab[GID_OPTS_CLIPBOARD] = (char *)ami_utf8_easy((char *)messages_get("ClipboardUTF8"));
gadlab[GID_OPTS_CONTEXTMENU] = (char *)ami_utf8_easy((char *)messages_get("ContextMenu"));
@@ -1089,6 +1094,51 @@ void ami_gui_opts_open(void)
CHILD_WeightedHeight, 0,
PageEnd, // page object
/*
+ ** Tabs
+ */
+ PAGE_Add, LayoutObject,
+ LAYOUT_AddChild,VGroupObject,
+ LAYOUT_AddChild,HGroupObject,
+ LAYOUT_AddChild,VGroupObject,
+ LAYOUT_SpaceOuter, TRUE,
+ LAYOUT_BevelStyle, BVS_GROUP,
+ LAYOUT_Label, gadlab[GRP_OPTS_TABS],
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ACTIVE] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_ACTIVE,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
+ GA_Selected, !nsoption_bool(new_tab_active),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_LAST,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_LAST],
+ GA_Selected, nsoption_bool(new_tab_last),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_2] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_2,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_2],
+ GA_Selected, nsoption_bool(button_2_tab),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ALWAYS] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_ALWAYS,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_ALWAYS],
+ GA_Selected, nsoption_bool(tab_always_show),
+ CheckBoxEnd,
+ LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_CLOSE] = CheckBoxObject,
+ GA_ID, GID_OPTS_TAB_CLOSE,
+ GA_RelVerify, TRUE,
+ GA_Text, gadlab[GID_OPTS_TAB_CLOSE],
+ GA_Selected, nsoption_bool(tab_close_warn),
+ CheckBoxEnd,
+ LayoutEnd, // tabbed browsing
+ LayoutEnd,
+ LayoutEnd, // page vgroup
+ CHILD_WeightedHeight, 0,
+ PageEnd, // page object
+ /*
** Advanced
*/
PAGE_Add, LayoutObject,
@@ -1127,29 +1177,6 @@ void ami_gui_opts_open(void)
LayoutEnd, // downloads
CHILD_WeightedHeight, 0,
LAYOUT_AddChild,HGroupObject,
- LAYOUT_AddChild,VGroupObject,
- LAYOUT_SpaceOuter, TRUE,
- LAYOUT_BevelStyle, BVS_GROUP,
- LAYOUT_Label, gadlab[GRP_OPTS_TABS],
- LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_ACTIVE] = CheckBoxObject,
- GA_ID, GID_OPTS_TAB_ACTIVE,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_TAB_ACTIVE],
- GA_Selected, !nsoption_bool(new_tab_active),
- CheckBoxEnd,
- LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_LAST] = CheckBoxObject,
- GA_ID, GID_OPTS_TAB_LAST,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_TAB_LAST],
- GA_Selected, nsoption_bool(new_tab_last),
- CheckBoxEnd,
- LAYOUT_AddChild, gow->objects[GID_OPTS_TAB_2] = CheckBoxObject,
- GA_ID, GID_OPTS_TAB_2,
- GA_RelVerify, TRUE,
- GA_Text, gadlab[GID_OPTS_TAB_2],
- GA_Selected, nsoption_bool(button_2_tab),
- CheckBoxEnd,
- LayoutEnd, // tabbed browsing
LAYOUT_AddChild, VGroupObject,
LAYOUT_SpaceOuter, TRUE,
@@ -1423,6 +1450,7 @@ void ami_gui_opts_use(bool save)
struct TextAttr *tattr;
char *dot;
bool rescan_fonts = false;
+ bool old_tab_always_show;
SetWindowPointer(gow->win,
WA_BusyPointer, TRUE,
@@ -1654,6 +1682,25 @@ void ami_gui_opts_use(bool save)
nsoption_set_bool(button_2_tab, false);
}
+ GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_CLOSE],(ULONG *)&data);
+ if (data) {
+ nsoption_set_bool(tab_close_warn, true);
+ } else {
+ nsoption_set_bool(tab_close_warn, false);
+ }
+
+ GetAttr(GA_Selected,gow->objects[GID_OPTS_TAB_ALWAYS],(ULONG *)&data);
+ old_tab_always_show = nsoption_bool(tab_always_show);
+
+ if (data) {
+ nsoption_set_bool(tab_always_show, true);
+ } else {
+ nsoption_set_bool(tab_always_show, false);
+ }
+
+ if(old_tab_always_show != nsoption_bool(tab_always_show))
+ ami_gui_tabs_toggle_all();
+
GetAttr(CHOOSER_Selected,gow->objects[GID_OPTS_SEARCH_PROV],(ULONG *)&nsoption_int(search_provider));
search_web_provider_details(nsoption_int(search_provider));
search_web_retrieve_ico(false);
diff --git a/resources/FatMessages b/resources/FatMessages
index 6f7bf0d..c391a41 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -5512,24 +5512,14 @@ fr.all.Duration:Duration
it.all.Duration:Durata
nl.all.Duration:Duration
-# Advanced
+# Tabs
#
-en.all.Downloads:Downloads
-de.all.Downloads:Downloads
-fr.all.Downloads:Downloads
-it.all.Downloads:Trasferimenti
-nl.all.Downloads:Downloads
-en.all.ConfirmOverwrite:Request confirmation when overwriting
-de.all.ConfirmOverwrite:vor Überschreiben nachfragen
-fr.all.ConfirmOverwrite:Request confirmation when overwriting
-it.all.ConfirmOverwrite:Richiedi conferma prima di sovrascrivere
-nl.all.ConfirmOverwrite:Request confirmation when overwriting
-en.all.DownloadDir:Initial download location
-de.all.DownloadDir:Downloadverzeichnis
-fr.all.DownloadDir:Initial download location
-it.all.DownloadDir:Percorso predefinito
-nl.all.DownloadDir:Initial download location
+en.ami.Tabs:Tabs
+de.ami.Tabs:Tabs
+fr.ami.Tabs:Tabs
+it.ami.Tabs:Tabs
+nl.ami.Tabs:Tabs
en.all.TabbedBrowsing:Tabbed browsing
de.all.TabbedBrowsing:Registernavigation (Tabs)
fr.all.TabbedBrowsing:Tabbed browsing
@@ -5550,6 +5540,35 @@ de.all.TabLast:Open new tabs after all existing tabs
fr.all.TabLast:Open new tabs after all existing tabs
it.all.TabLast:Apri le nuove schede dopo quella corrente
nl.all.TabLast:Open new tabs after all existing tabs
+en.ami.TabClose:Warn when closing multiple tabs
+de.ami.TabClose:Warn when closing multiple tabs
+fr.ami.TabClose:Warn when closing multiple tabs
+it.ami.TabClose:Warn when closing multiple tabs
+nl.ami.TabClose:Warn when closing multiple tabs
+en.ami.TabAlways:Always show tabs
+de.ami.TabAlways:Always show tabs
+fr.ami.TabAlways:Always show tabs
+it.ami.TabAlways:Always show tabs
+nl.ami.TabAlways:Always show tabs
+
+# Advanced
+#
+
+en.all.Downloads:Downloads
+de.all.Downloads:Downloads
+fr.all.Downloads:Downloads
+it.all.Downloads:Trasferimenti
+nl.all.Downloads:Downloads
+en.all.ConfirmOverwrite:Request confirmation when overwriting
+de.all.ConfirmOverwrite:vor Überschreiben nachfragen
+fr.all.ConfirmOverwrite:Request confirmation when overwriting
+it.all.ConfirmOverwrite:Richiedi conferma prima di sovrascrivere
+nl.all.ConfirmOverwrite:Request confirmation when overwriting
+en.all.DownloadDir:Initial download location
+de.all.DownloadDir:Downloadverzeichnis
+fr.all.DownloadDir:Initial download location
+it.all.DownloadDir:Percorso predefinito
+nl.all.DownloadDir:Initial download location
en.all.DownloadNotify:Notify on completion
de.all.DownloadNotify:Downloadende melden
fr.all.DownloadNotify:Notify on completion
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. 083b7c0233635959f1944c2150abbb923c5e0481
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/083b7c0233635959f1944...
...commit http://git.netsurf-browser.org/netsurf.git/commit/083b7c0233635959f1944c2...
...tree http://git.netsurf-browser.org/netsurf.git/tree/083b7c0233635959f1944c215...
The branch, master has been updated
via 083b7c0233635959f1944c2150abbb923c5e0481 (commit)
via 0c54f2a90260127f7a96b798afc08c691ddebadf (commit)
via 24e1aff974499e7e2cb0996a946a6a2d34fd851d (commit)
via 388ddc6dbd11e28740538a4d39d04f086e16c0c0 (commit)
from 3ef843fcb420c94665981519dacdd8d8c03b8ed0 (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/083b7c0233635959f19...
commit 083b7c0233635959f1944c2150abbb923c5e0481
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Enable persistent tab bar through tab_always_show option
diff --git a/amiga/gui.c b/amiga/gui.c
index 06d8356..60d9d31 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3428,7 +3428,7 @@ void gui_window_destroy(struct gui_window *g)
g->shared->tabs--;
ami_switch_tab(g->shared,true);
- if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show)))
+ if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show) == false))
ami_toggletabbar(g->shared, false);
ami_utf8_free(g->tabtitle);
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/0c54f2a90260127f7a9...
commit 0c54f2a90260127f7a96b798afc08c691ddebadf
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Prevent multiple tabbars
diff --git a/amiga/gui.c b/amiga/gui.c
index bace205..06d8356 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2751,7 +2751,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g->shared = clone->window->shared;
g->tab = g->shared->next_tab;
- if(g->shared->tabs == 1)
+ if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show) == false))
ami_toggletabbar(g->shared, true);
SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/24e1aff974499e7e2cb...
commit 24e1aff974499e7e2cb0996a946a6a2d34fd851d
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Reverse the logic as well as the req text
diff --git a/amiga/download.c b/amiga/download.c
index 4243e6d..c0c88bb 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -421,6 +421,6 @@ BOOL ami_download_check_overwrite(const char *file, struct Window *win, ULONG si
}
else return TRUE;
- if(res == 0) return TRUE;
+ if(res == 1) return TRUE;
else return FALSE;
}
diff --git a/amiga/gui.c b/amiga/gui.c
index e2728c2..bace205 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3352,7 +3352,7 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
int32 res = ami_warn_user_multi(req_body, "Yes", "No", gwin->win);
free(req_body);
- if(res == 1) return;
+ if(res == 0) return;
}
if(gwin->tabs)
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/388ddc6dbd11e287405...
commit 388ddc6dbd11e28740538a4d39d04f086e16c0c0
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
non-working "always show tabbar" option
diff --git a/amiga/gui.c b/amiga/gui.c
index c30489e..e2728c2 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2318,7 +2318,7 @@ void ami_quit_netsurf_delayed(void)
DisplayBeep(NULL);
- int32 res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO,
+ res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO,
TDR_TitleString, messages_get("NetSurf"),
TDR_FormatString, utf8text,
TDR_GadgetString, utf8gadgets,
@@ -2697,8 +2697,10 @@ void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
gwin->win, NULL, TRUE);
- gwin->redraw_required = true;
- gwin->bw->reformat_pending = true;
+ if(gwin->bw) {
+ gwin->redraw_required = true;
+ gwin->bw->reformat_pending = true;
+ }
}
struct gui_window *gui_create_browser_window(struct browser_window *bw,
@@ -3264,6 +3266,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g->shared->win, NULL);
ami_gui_hotlist_toolbar_add(g->shared); /* is this the right place for this? */
+ if(nsoption_bool(tab_always_show)) ami_toggletabbar(g->shared, true);
}
else
{
@@ -3425,7 +3428,7 @@ void gui_window_destroy(struct gui_window *g)
g->shared->tabs--;
ami_switch_tab(g->shared,true);
- if(g->shared->tabs == 1)
+ if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show)))
ami_toggletabbar(g->shared, false);
ami_utf8_free(g->tabtitle);
diff --git a/amiga/options.h b/amiga/options.h
index 4b477b6..dc0274d 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -40,6 +40,7 @@
bool new_tab_active; \
bool new_tab_last; \
bool tab_close_warn; \
+ bool tab_always_show; \
bool kiosk_mode; \
char *search_engines_file; \
char *arexx_dir; \
@@ -104,6 +105,7 @@
.new_tab_active = false, \
.new_tab_last = false, \
.tab_close_warn = true, \
+ .tab_always_show = false, \
.kiosk_mode = false, \
.search_engines_file = NULL, \
.arexx_dir = NULL, \
@@ -167,6 +169,7 @@
{ "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}, \
+{ "tab_always_show", OPTION_BOOL, &nsoptions.tab_always_show}, \
{ "kiosk_mode", OPTION_BOOL, &nsoptions.kiosk_mode}, \
{ "search_engines_file",OPTION_STRING, &nsoptions.search_engines_file }, \
{ "arexx_dir", OPTION_STRING, &nsoptions.arexx_dir }, \
-----------------------------------------------------------------------
Summary of changes:
amiga/download.c | 2 +-
amiga/gui.c | 15 +++++++++------
amiga/options.h | 3 +++
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/amiga/download.c b/amiga/download.c
index 4243e6d..c0c88bb 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -421,6 +421,6 @@ BOOL ami_download_check_overwrite(const char *file, struct Window *win, ULONG si
}
else return TRUE;
- if(res == 0) return TRUE;
+ if(res == 1) return TRUE;
else return FALSE;
}
diff --git a/amiga/gui.c b/amiga/gui.c
index c30489e..60d9d31 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2318,7 +2318,7 @@ void ami_quit_netsurf_delayed(void)
DisplayBeep(NULL);
- int32 res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO,
+ res = TimedDosRequesterTags(TDR_ImageType, TDRIMAGE_INFO,
TDR_TitleString, messages_get("NetSurf"),
TDR_FormatString, utf8text,
TDR_GadgetString, utf8gadgets,
@@ -2697,8 +2697,10 @@ void ami_toggletabbar(struct gui_window_2 *gwin, bool show)
RethinkLayout((struct Gadget *)gwin->objects[GID_MAIN],
gwin->win, NULL, TRUE);
- gwin->redraw_required = true;
- gwin->bw->reformat_pending = true;
+ if(gwin->bw) {
+ gwin->redraw_required = true;
+ gwin->bw->reformat_pending = true;
+ }
}
struct gui_window *gui_create_browser_window(struct browser_window *bw,
@@ -2749,7 +2751,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g->shared = clone->window->shared;
g->tab = g->shared->next_tab;
- if(g->shared->tabs == 1)
+ if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show) == false))
ami_toggletabbar(g->shared, true);
SetGadgetAttrs((struct Gadget *)g->shared->objects[GID_TABS],
@@ -3264,6 +3266,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
g->shared->win, NULL);
ami_gui_hotlist_toolbar_add(g->shared); /* is this the right place for this? */
+ if(nsoption_bool(tab_always_show)) ami_toggletabbar(g->shared, true);
}
else
{
@@ -3349,7 +3352,7 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
int32 res = ami_warn_user_multi(req_body, "Yes", "No", gwin->win);
free(req_body);
- if(res == 1) return;
+ if(res == 0) return;
}
if(gwin->tabs)
@@ -3425,7 +3428,7 @@ void gui_window_destroy(struct gui_window *g)
g->shared->tabs--;
ami_switch_tab(g->shared,true);
- if(g->shared->tabs == 1)
+ if((g->shared->tabs == 1) && (nsoption_bool(tab_always_show) == false))
ami_toggletabbar(g->shared, false);
ami_utf8_free(g->tabtitle);
diff --git a/amiga/options.h b/amiga/options.h
index 4b477b6..dc0274d 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -40,6 +40,7 @@
bool new_tab_active; \
bool new_tab_last; \
bool tab_close_warn; \
+ bool tab_always_show; \
bool kiosk_mode; \
char *search_engines_file; \
char *arexx_dir; \
@@ -104,6 +105,7 @@
.new_tab_active = false, \
.new_tab_last = false, \
.tab_close_warn = true, \
+ .tab_always_show = false, \
.kiosk_mode = false, \
.search_engines_file = NULL, \
.arexx_dir = NULL, \
@@ -167,6 +169,7 @@
{ "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}, \
+{ "tab_always_show", OPTION_BOOL, &nsoptions.tab_always_show}, \
{ "kiosk_mode", OPTION_BOOL, &nsoptions.kiosk_mode}, \
{ "search_engines_file",OPTION_STRING, &nsoptions.search_engines_file }, \
{ "arexx_dir", OPTION_STRING, &nsoptions.arexx_dir }, \
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. 3ef843fcb420c94665981519dacdd8d8c03b8ed0
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/3ef843fcb420c94665981...
...commit http://git.netsurf-browser.org/netsurf.git/commit/3ef843fcb420c9466598151...
...tree http://git.netsurf-browser.org/netsurf.git/tree/3ef843fcb420c94665981519d...
The branch, master has been updated
via 3ef843fcb420c94665981519dacdd8d8c03b8ed0 (commit)
via 6b7e67847643dc54ade072c83c5669d7093fb1a3 (commit)
from 5ee1f09dd2f1535613d1ad88359150f4c6ac53b6 (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/3ef843fcb420c946659...
commit 3ef843fcb420c94665981519dacdd8d8c03b8ed0
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Switch Yes/No Replace/Don'tReplace so Esc operates the "don't do anything" operation as expected.
diff --git a/amiga/download.c b/amiga/download.c
index 224ac29..4243e6d 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -416,7 +416,7 @@ BOOL ami_download_check_overwrite(const char *file, struct Window *win, ULONG si
overwritetext = ASPrintf(messages_get("OverwriteFile"));
}
- res = ami_warn_user_multi(overwritetext, "DontReplace", "Replace", win);
+ res = ami_warn_user_multi(overwritetext, "Replace", "DontReplace", win);
FreeVec(overwritetext);
}
else return TRUE;
diff --git a/amiga/gui.c b/amiga/gui.c
index 22a50fa..c30489e 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3346,7 +3346,7 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
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);
+ int32 res = ami_warn_user_multi(req_body, "Yes", "No", gwin->win);
free(req_body);
if(res == 1) return;
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/6b7e67847643dc54ade...
commit 6b7e67847643dc54ade072c83c5669d7093fb1a3
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Only bother with the delayed requester on OS4
diff --git a/amiga/gui.c b/amiga/gui.c
index 522f66a..22a50fa 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2311,6 +2311,8 @@ void ami_quit_netsurf(void)
void ami_quit_netsurf_delayed(void)
{
+ int res = -1;
+#ifdef __amigaos4__
char *utf8text = ami_utf8_easy(messages_get("TCPIPShutdown"));
char *utf8gadgets = ami_utf8_easy(messages_get("AbortShutdown"));
@@ -2326,7 +2328,7 @@ void ami_quit_netsurf_delayed(void)
free(utf8text);
free(utf8gadgets);
-
+#endif
if(res == -1) { /* Requester timed out */
nsoption_set_bool(tab_close_warn, false);
ami_quit_netsurf();
-----------------------------------------------------------------------
Summary of changes:
amiga/download.c | 2 +-
amiga/gui.c | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/amiga/download.c b/amiga/download.c
index 224ac29..4243e6d 100644
--- a/amiga/download.c
+++ b/amiga/download.c
@@ -416,7 +416,7 @@ BOOL ami_download_check_overwrite(const char *file, struct Window *win, ULONG si
overwritetext = ASPrintf(messages_get("OverwriteFile"));
}
- res = ami_warn_user_multi(overwritetext, "DontReplace", "Replace", win);
+ res = ami_warn_user_multi(overwritetext, "Replace", "DontReplace", win);
FreeVec(overwritetext);
}
else return TRUE;
diff --git a/amiga/gui.c b/amiga/gui.c
index 522f66a..c30489e 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2311,6 +2311,8 @@ void ami_quit_netsurf(void)
void ami_quit_netsurf_delayed(void)
{
+ int res = -1;
+#ifdef __amigaos4__
char *utf8text = ami_utf8_easy(messages_get("TCPIPShutdown"));
char *utf8gadgets = ami_utf8_easy(messages_get("AbortShutdown"));
@@ -2326,7 +2328,7 @@ void ami_quit_netsurf_delayed(void)
free(utf8text);
free(utf8gadgets);
-
+#endif
if(res == -1) { /* Requester timed out */
nsoption_set_bool(tab_close_warn, false);
ami_quit_netsurf();
@@ -3344,7 +3346,7 @@ void ami_close_all_tabs(struct gui_window_2 *gwin)
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);
+ int32 res = ami_warn_user_multi(req_body, "Yes", "No", gwin->win);
free(req_body);
if(res == 1) return;
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. 5ee1f09dd2f1535613d1ad88359150f4c6ac53b6
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/5ee1f09dd2f1535613d1a...
...commit http://git.netsurf-browser.org/netsurf.git/commit/5ee1f09dd2f1535613d1ad8...
...tree http://git.netsurf-browser.org/netsurf.git/tree/5ee1f09dd2f1535613d1ad883...
The branch, master has been updated
via 5ee1f09dd2f1535613d1ad88359150f4c6ac53b6 (commit)
from 70825a5ee24ead041bc331b13e00ae5f86f458c0 (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/5ee1f09dd2f1535613d...
commit 5ee1f09dd2f1535613d1ad88359150f4c6ac53b6
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Missing double-quote
diff --git a/amiga/dist/Install b/amiga/dist/Install
index bb8f737..e320964 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -474,9 +474,9 @@
(rename (tackon @default-dest "Resources/SearchEngines") (tackon @default-dest "Resources/SearchEngines.backup"))
)
-(run "c:filenote Rexx/CloseTabs.nsrx \"Close other tabs\")
-(run "c:filenote Rexx/ViewSource.nsrx \"View source\")
-(run "c:filenote Rexx/GetVideo.nsrx \"Get video\")
+(run "c:filenote Rexx/CloseTabs.nsrx \"Close other tabs\"")
+(run "c:filenote Rexx/ViewSource.nsrx \"View source\"")
+(run "c:filenote Rexx/GetVideo.nsrx \"Get video\"")
(copyfiles
(prompt "Copying files")
-----------------------------------------------------------------------
Summary of changes:
amiga/dist/Install | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/amiga/dist/Install b/amiga/dist/Install
index bb8f737..e320964 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -474,9 +474,9 @@
(rename (tackon @default-dest "Resources/SearchEngines") (tackon @default-dest "Resources/SearchEngines.backup"))
)
-(run "c:filenote Rexx/CloseTabs.nsrx \"Close other tabs\")
-(run "c:filenote Rexx/ViewSource.nsrx \"View source\")
-(run "c:filenote Rexx/GetVideo.nsrx \"Get video\")
+(run "c:filenote Rexx/CloseTabs.nsrx \"Close other tabs\"")
+(run "c:filenote Rexx/ViewSource.nsrx \"View source\"")
+(run "c:filenote Rexx/GetVideo.nsrx \"Get video\"")
(copyfiles
(prompt "Copying files")
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. 70825a5ee24ead041bc331b13e00ae5f86f458c0
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/70825a5ee24ead041bc33...
...commit http://git.netsurf-browser.org/netsurf.git/commit/70825a5ee24ead041bc331b...
...tree http://git.netsurf-browser.org/netsurf.git/tree/70825a5ee24ead041bc331b13...
The branch, master has been updated
via 70825a5ee24ead041bc331b13e00ae5f86f458c0 (commit)
via 083cf492f59529192b1a683fa9064ee2c2300c48 (commit)
from c8b3fbbfdd64e23632d414ab0b2986a855960f26 (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/70825a5ee24ead041bc...
commit 70825a5ee24ead041bc331b13e00ae5f86f458c0
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Set the file comment for the included ARexx scripts as part of the install, as these tend to get lost and don't exist at all in Git.
diff --git a/amiga/dist/Install b/amiga/dist/Install
index 7b8c5fe..bb8f737 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -474,6 +474,10 @@
(rename (tackon @default-dest "Resources/SearchEngines") (tackon @default-dest "Resources/SearchEngines.backup"))
)
+(run "c:filenote Rexx/CloseTabs.nsrx \"Close other tabs\")
+(run "c:filenote Rexx/ViewSource.nsrx \"View source\")
+(run "c:filenote Rexx/GetVideo.nsrx \"Get video\")
+
(copyfiles
(prompt "Copying files")
(source "")
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/083cf492f59529192b1...
commit 083cf492f59529192b1a683fa9064ee2c2300c48
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Allow ctrl-click on hotlist toolbar to open in a new tab
diff --git a/amiga/gui.c b/amiga/gui.c
index 1d523e6..522f66a 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -4339,7 +4339,13 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct IntuiMessage *msg
case GID_HOTLIST:
if(node = (struct Node *)GetTagData(SPEEDBAR_SelectedNode, 0, msg->IAddress)) {
GetSpeedButtonNodeAttrs(node, SBNA_UserData, (ULONG *)&url, TAG_DONE);
- browser_window_go(gwin->bw, url, NULL, true);
+
+ ami_update_quals(gwin);
+ if(gwin->key_state & BROWSER_MOUSE_MOD_2) {
+ browser_window_create(url, gwin->bw, NULL, false, true);
+ } else {
+ browser_window_go(gwin->bw, url, NULL, true);
+ }
}
break;
}
-----------------------------------------------------------------------
Summary of changes:
amiga/dist/Install | 4 ++++
amiga/gui.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/amiga/dist/Install b/amiga/dist/Install
index 7b8c5fe..bb8f737 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -474,6 +474,10 @@
(rename (tackon @default-dest "Resources/SearchEngines") (tackon @default-dest "Resources/SearchEngines.backup"))
)
+(run "c:filenote Rexx/CloseTabs.nsrx \"Close other tabs\")
+(run "c:filenote Rexx/ViewSource.nsrx \"View source\")
+(run "c:filenote Rexx/GetVideo.nsrx \"Get video\")
+
(copyfiles
(prompt "Copying files")
(source "")
diff --git a/amiga/gui.c b/amiga/gui.c
index 1d523e6..522f66a 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -4339,7 +4339,13 @@ void ami_scroller_hook(struct Hook *hook,Object *object,struct IntuiMessage *msg
case GID_HOTLIST:
if(node = (struct Node *)GetTagData(SPEEDBAR_SelectedNode, 0, msg->IAddress)) {
GetSpeedButtonNodeAttrs(node, SBNA_UserData, (ULONG *)&url, TAG_DONE);
- browser_window_go(gwin->bw, url, NULL, true);
+
+ ami_update_quals(gwin);
+ if(gwin->key_state & BROWSER_MOUSE_MOD_2) {
+ browser_window_create(url, gwin->bw, NULL, false, true);
+ } else {
+ browser_window_go(gwin->bw, url, NULL, true);
+ }
}
break;
}
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. c8b3fbbfdd64e23632d414ab0b2986a855960f26
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/c8b3fbbfdd64e23632d41...
...commit http://git.netsurf-browser.org/netsurf.git/commit/c8b3fbbfdd64e23632d414a...
...tree http://git.netsurf-browser.org/netsurf.git/tree/c8b3fbbfdd64e23632d414ab0...
The branch, master has been updated
via c8b3fbbfdd64e23632d414ab0b2986a855960f26 (commit)
from dfa287767fee79f479b4cf0d8d69431febc5e934 (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/c8b3fbbfdd64e23632d...
commit c8b3fbbfdd64e23632d414ab0b2986a855960f26
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
TimedDosRequester doesn't support linefeeds through \n
diff --git a/resources/FatMessages b/resources/FatMessages
index 075a1e9..6f7bf0d 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -2680,11 +2680,11 @@ 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.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf 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. NetSurf 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. NetSurf 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. NetSurf 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. NetSurf 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
-----------------------------------------------------------------------
Summary of changes:
resources/FatMessages | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/resources/FatMessages b/resources/FatMessages
index 075a1e9..6f7bf0d 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -2680,11 +2680,11 @@ 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.TCPIPShutdown:The TCP/IP stack has signalled that it is about to shutdown and NetSurf must exit. NetSurf 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. NetSurf 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. NetSurf 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. NetSurf 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. NetSurf 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
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. dfa287767fee79f479b4cf0d8d69431febc5e934
by NetSurf Browser Project
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
10 years, 1 month
netsurf: branch master updated. 69647cc6a4f230fc0c1ce5481a30ac21c93db8d2
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/69647cc6a4f230fc0c1ce...
...commit http://git.netsurf-browser.org/netsurf.git/commit/69647cc6a4f230fc0c1ce54...
...tree http://git.netsurf-browser.org/netsurf.git/tree/69647cc6a4f230fc0c1ce5481...
The branch, master has been updated
via 69647cc6a4f230fc0c1ce5481a30ac21c93db8d2 (commit)
from 04825c62df92c8adef3f40f89c7b5d88b963f833 (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/69647cc6a4f230fc0c1...
commit 69647cc6a4f230fc0c1ce5481a30ac21c93db8d2
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Respond to Ctrl-C by immediately quitting. TCP/IP stack exit expects this.
diff --git a/amiga/gui.c b/amiga/gui.c
index a1a9468..47d75bc 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2108,11 +2108,12 @@ void ami_get_msg(void)
ULONG winsignal = 1L << sport->mp_SigBit;
ULONG appsig = 1L << appport->mp_SigBit;
ULONG schedulesig = 1L << msgport->mp_SigBit;
+ ULONG ctrlcsig = SIGBREAKF_CTRL_C;
ULONG signal;
struct TimerRequest *timermsg = NULL;
struct MsgPort *printmsgport = ami_print_get_msgport();
ULONG printsig = 1L << printmsgport->mp_SigBit;
- ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig | applibsig;
+ ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig | applibsig | ctrlcsig;
signal = Wait(signalmask);
/*
@@ -2144,6 +2145,11 @@ printf("sig recvd %ld (%ld %ld %ld %ld %ld %ld)\n", signal, winsignal , appsig ,
schedule_run(FALSE);
}
}
+
+ if(signal & ctrlcsig)
+ {
+ ami_quit_netsurf();
+ }
}
void gui_poll(bool active)
-----------------------------------------------------------------------
Summary of changes:
amiga/gui.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/amiga/gui.c b/amiga/gui.c
index a1a9468..47d75bc 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -2108,11 +2108,12 @@ void ami_get_msg(void)
ULONG winsignal = 1L << sport->mp_SigBit;
ULONG appsig = 1L << appport->mp_SigBit;
ULONG schedulesig = 1L << msgport->mp_SigBit;
+ ULONG ctrlcsig = SIGBREAKF_CTRL_C;
ULONG signal;
struct TimerRequest *timermsg = NULL;
struct MsgPort *printmsgport = ami_print_get_msgport();
ULONG printsig = 1L << printmsgport->mp_SigBit;
- ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig | applibsig;
+ ULONG signalmask = winsignal | appsig | schedulesig | rxsig | printsig | applibsig | ctrlcsig;
signal = Wait(signalmask);
/*
@@ -2144,6 +2145,11 @@ printf("sig recvd %ld (%ld %ld %ld %ld %ld %ld)\n", signal, winsignal , appsig ,
schedule_run(FALSE);
}
}
+
+ if(signal & ctrlcsig)
+ {
+ ami_quit_netsurf();
+ }
}
void gui_poll(bool active)
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. 04825c62df92c8adef3f40f89c7b5d88b963f833
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/04825c62df92c8adef3f4...
...commit http://git.netsurf-browser.org/netsurf.git/commit/04825c62df92c8adef3f40f...
...tree http://git.netsurf-browser.org/netsurf.git/tree/04825c62df92c8adef3f40f89...
The branch, master has been updated
via 04825c62df92c8adef3f40f89c7b5d88b963f833 (commit)
via 99f93da0f3a510df51c5a057e7597c570a636f9d (commit)
from 40076ea422458fde1799fd383b475586ee112c3f (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/04825c62df92c8adef3...
commit 04825c62df92c8adef3f40f89c7b5d88b963f833
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
implement document.URL and document.documentURI
diff --git a/javascript/jsapi/binding.h b/javascript/jsapi/binding.h
index f274935..7b0f614 100644
--- a/javascript/jsapi/binding.h
+++ b/javascript/jsapi/binding.h
@@ -45,8 +45,8 @@ JSObject *jsapi_InitClass_Location(JSContext *cx, JSObject *parent);
JSObject *jsapi_new_Location(JSContext *cx,
JSObject *window,
JSObject *parent,
- struct browser_window *bw,
- nsurl *url);
+ nsurl *url,
+ html_content *htmlc);
JSObject *jsapi_InitClass_Document(JSContext *cx, JSObject *parent);
diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd
index 72bc814..f17190d 100644
--- a/javascript/jsapi/htmldocument.bnd
+++ b/javascript/jsapi/htmldocument.bnd
@@ -56,6 +56,7 @@ api finalise %{
}
%}
+
getter location %{
if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx,vp))) {
/* already created - return it */
@@ -64,10 +65,27 @@ getter location %{
jsret = jsapi_new_Location(cx,
NULL,
NULL,
- private->htmlc->bw,
- llcache_handle_get_url(private->htmlc->base.llcache));
+ llcache_handle_get_url(private->htmlc->base.llcache),
+ private->htmlc);
+%}
+
+getter URL %{
+ jsval loc;
+ jsval jsstr = JSVAL_NULL;
+ if (JS_GetProperty(cx, obj, "location", &loc) == JS_TRUE) {
+ JS_GetProperty(cx, JSVAL_TO_OBJECT(loc), "href", &jsstr);
+ }
+ jsret = JSVAL_TO_STRING(jsstr);
%}
+getter documentURI %{
+ jsval loc;
+ jsval jsstr = JSVAL_NULL;
+ if (JS_GetProperty(cx, obj, "location", &loc) == JS_TRUE) {
+ JS_GetProperty(cx, JSVAL_TO_OBJECT(loc), "href", &jsstr);
+ }
+ jsret = JSVAL_TO_STRING(jsstr);
+%}
getter cookie %{
char *cookie_str;
diff --git a/javascript/jsapi/location.bnd b/javascript/jsapi/location.bnd
index 32e38da..32677d1 100644
--- a/javascript/jsapi/location.bnd
+++ b/javascript/jsapi/location.bnd
@@ -32,19 +32,27 @@ binding location {
interface Location; /* Web IDL interface to generate */
- private "struct browser_window *" bw;
private "nsurl *" url;
+ private "struct html_content *" htmlc;
+
+ property unshared href;
}
operation reload %{
- browser_window_reload(private->bw, false);
+ browser_window_reload(private->htmlc->bw, false);
%}
getter href %{
char *url_s = NULL;
size_t url_l;
+
+ if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx,vp))) {
+ /* already created - return it */
+ return JS_TRUE;
+ }
+
nsurl_get(private->url, NSURL_COMPLETE, &url_s, &url_l);
if (url_s != NULL) {
jsret = JS_NewStringCopyN(cx, url_s, url_l);
diff --git a/test/js/document-url.html b/test/js/document-url.html
new file mode 100644
index 0000000..2299b57
--- /dev/null
+++ b/test/js/document-url.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+<title>document location and URL interface</title>
+<link rel="stylesheet" type="text/css" href="tst.css">
+</head>
+<body>
+<h1>document location and URL interface</h1>
+
+<h2>Document location enumeration</h2>
+<script>
+function output(x,y) {
+ document.body.appendChild(document.createTextNode(x));
+ document.body.appendChild(document.createTextNode("("));
+ if (y != undefined) {
+ document.body.appendChild(document.createTextNode(y.length));
+ }
+ document.body.appendChild(document.createTextNode(") = "));
+ document.body.appendChild(document.createTextNode(y));
+ document.body.appendChild(document.createElement('br'));
+}
+
+for(var key in document.location) {
+ output(key, document.location[key]);
+}
+</script>
+<h2>Document URL</h2>
+<script>output("document.URL", document.URL);</script>
+<h2>DocumentURI</h2>
+<script>output("document.documentURI", document.documentURI);</script>
+</body>
+</html>
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/99f93da0f3a510df51c...
commit 99f93da0f3a510df51c5a057e7597c570a636f9d
Author: Vincent Sanders <vince(a)netsurf-browser.org>
Commit: Vincent Sanders <vince(a)netsurf-browser.org>
correctly handle location
diff --git a/javascript/jsapi.h b/javascript/jsapi.h
index 0493290..d757b7f 100644
--- a/javascript/jsapi.h
+++ b/javascript/jsapi.h
@@ -79,7 +79,7 @@
jsapi_property_##name##_set(cx, obj, jsval jsapi_id, vp)
/* native property return value */
-#define JSAPI_PROP_RVAL(cx, vp) (vp)
+#define JSAPI_PROP_RVAL(cx, vp) (*(vp))
/* native property getter return value */
#define JSAPI_PROP_SET_RVAL(cx, vp, v) (*(vp) = (v))
diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd
index 0ed7ac1..72bc814 100644
--- a/javascript/jsapi/htmldocument.bnd
+++ b/javascript/jsapi/htmldocument.bnd
@@ -43,6 +43,9 @@ binding document {
*/
private "dom_document *" node;
private "struct html_content *" htmlc;
+
+ /** location instantiated on first use */
+ property unshared location;
}
api finalise %{
@@ -53,6 +56,19 @@ api finalise %{
}
%}
+getter location %{
+ if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx,vp))) {
+ /* already created - return it */
+ return JS_TRUE;
+ }
+ jsret = jsapi_new_Location(cx,
+ NULL,
+ NULL,
+ private->htmlc->bw,
+ llcache_handle_get_url(private->htmlc->base.llcache));
+%}
+
+
getter cookie %{
char *cookie_str;
cookie_str = urldb_get_cookie(llcache_handle_get_url(private->htmlc->base.llcache), false);
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index d7f47ce..6153e90 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -42,7 +42,6 @@ binding window {
internal "JSObject *" document;
internal "JSObject *" navigator;
internal "JSObject *" console;
- internal "JSObject *" location;
property unshared type EventHandler;
}
@@ -58,9 +57,6 @@ api mark %{
if (private->console != NULL) {
JSAPI_GCMARK(private->console);
}
- if (private->location != NULL) {
- JSAPI_GCMARK(private->location);
- }
}
%}
@@ -180,13 +176,6 @@ api new %{
return NULL;
}
- private->location = jsapi_new_Location(cx, NULL, newobject, bw,
- llcache_handle_get_url(private->htmlc->base.llcache));
- if (private->location == NULL) {
- free(private);
- return NULL;
- }
-
private->console = jsapi_new_Console(cx, NULL, newobject);
if (private->console == NULL) {
free(private);
@@ -210,14 +199,6 @@ operation prompt %{
warn_user(message, NULL);
%}
-getter window %{
- jsret = obj;
-%}
-
-getter self %{
- jsret = obj;
-%}
-
/* boolean dispatchEvent(Event event); */
operation dispatchEvent %{
/* this implementation is unique to the window object as it is
@@ -254,6 +235,20 @@ operation dispatchEvent %{
}
%}
+getter location %{
+ jsval loc;
+ JS_GetProperty(cx, private->document, "location", &loc);
+ jsret = JSVAL_TO_OBJECT(loc);
+%}
+
+getter window %{
+ jsret = obj;
+%}
+
+getter self %{
+ jsret = obj;
+%}
+
getter EventHandler %{
/* this implementation is unique to the window object as it is
* not a dom node.
-----------------------------------------------------------------------
Summary of changes:
javascript/jsapi.h | 2 +-
javascript/jsapi/binding.h | 4 +-
javascript/jsapi/htmldocument.bnd | 34 ++++++++++++++++++++
javascript/jsapi/location.bnd | 12 ++++++-
javascript/jsapi/window.bnd | 33 ++++++++-----------
...m-document-enumerate.html => document-url.html} | 13 +++++--
6 files changed, 70 insertions(+), 28 deletions(-)
copy test/js/{dom-document-enumerate.html => document-url.html} (59%)
diff --git a/javascript/jsapi.h b/javascript/jsapi.h
index 0493290..d757b7f 100644
--- a/javascript/jsapi.h
+++ b/javascript/jsapi.h
@@ -79,7 +79,7 @@
jsapi_property_##name##_set(cx, obj, jsval jsapi_id, vp)
/* native property return value */
-#define JSAPI_PROP_RVAL(cx, vp) (vp)
+#define JSAPI_PROP_RVAL(cx, vp) (*(vp))
/* native property getter return value */
#define JSAPI_PROP_SET_RVAL(cx, vp, v) (*(vp) = (v))
diff --git a/javascript/jsapi/binding.h b/javascript/jsapi/binding.h
index f274935..7b0f614 100644
--- a/javascript/jsapi/binding.h
+++ b/javascript/jsapi/binding.h
@@ -45,8 +45,8 @@ JSObject *jsapi_InitClass_Location(JSContext *cx, JSObject *parent);
JSObject *jsapi_new_Location(JSContext *cx,
JSObject *window,
JSObject *parent,
- struct browser_window *bw,
- nsurl *url);
+ nsurl *url,
+ html_content *htmlc);
JSObject *jsapi_InitClass_Document(JSContext *cx, JSObject *parent);
diff --git a/javascript/jsapi/htmldocument.bnd b/javascript/jsapi/htmldocument.bnd
index 0ed7ac1..f17190d 100644
--- a/javascript/jsapi/htmldocument.bnd
+++ b/javascript/jsapi/htmldocument.bnd
@@ -43,6 +43,9 @@ binding document {
*/
private "dom_document *" node;
private "struct html_content *" htmlc;
+
+ /** location instantiated on first use */
+ property unshared location;
}
api finalise %{
@@ -53,6 +56,37 @@ api finalise %{
}
%}
+
+getter location %{
+ if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx,vp))) {
+ /* already created - return it */
+ return JS_TRUE;
+ }
+ jsret = jsapi_new_Location(cx,
+ NULL,
+ NULL,
+ llcache_handle_get_url(private->htmlc->base.llcache),
+ private->htmlc);
+%}
+
+getter URL %{
+ jsval loc;
+ jsval jsstr = JSVAL_NULL;
+ if (JS_GetProperty(cx, obj, "location", &loc) == JS_TRUE) {
+ JS_GetProperty(cx, JSVAL_TO_OBJECT(loc), "href", &jsstr);
+ }
+ jsret = JSVAL_TO_STRING(jsstr);
+%}
+
+getter documentURI %{
+ jsval loc;
+ jsval jsstr = JSVAL_NULL;
+ if (JS_GetProperty(cx, obj, "location", &loc) == JS_TRUE) {
+ JS_GetProperty(cx, JSVAL_TO_OBJECT(loc), "href", &jsstr);
+ }
+ jsret = JSVAL_TO_STRING(jsstr);
+%}
+
getter cookie %{
char *cookie_str;
cookie_str = urldb_get_cookie(llcache_handle_get_url(private->htmlc->base.llcache), false);
diff --git a/javascript/jsapi/location.bnd b/javascript/jsapi/location.bnd
index 32e38da..32677d1 100644
--- a/javascript/jsapi/location.bnd
+++ b/javascript/jsapi/location.bnd
@@ -32,19 +32,27 @@ binding location {
interface Location; /* Web IDL interface to generate */
- private "struct browser_window *" bw;
private "nsurl *" url;
+ private "struct html_content *" htmlc;
+
+ property unshared href;
}
operation reload %{
- browser_window_reload(private->bw, false);
+ browser_window_reload(private->htmlc->bw, false);
%}
getter href %{
char *url_s = NULL;
size_t url_l;
+
+ if (!JSVAL_IS_VOID(JSAPI_PROP_RVAL(cx,vp))) {
+ /* already created - return it */
+ return JS_TRUE;
+ }
+
nsurl_get(private->url, NSURL_COMPLETE, &url_s, &url_l);
if (url_s != NULL) {
jsret = JS_NewStringCopyN(cx, url_s, url_l);
diff --git a/javascript/jsapi/window.bnd b/javascript/jsapi/window.bnd
index d7f47ce..6153e90 100644
--- a/javascript/jsapi/window.bnd
+++ b/javascript/jsapi/window.bnd
@@ -42,7 +42,6 @@ binding window {
internal "JSObject *" document;
internal "JSObject *" navigator;
internal "JSObject *" console;
- internal "JSObject *" location;
property unshared type EventHandler;
}
@@ -58,9 +57,6 @@ api mark %{
if (private->console != NULL) {
JSAPI_GCMARK(private->console);
}
- if (private->location != NULL) {
- JSAPI_GCMARK(private->location);
- }
}
%}
@@ -180,13 +176,6 @@ api new %{
return NULL;
}
- private->location = jsapi_new_Location(cx, NULL, newobject, bw,
- llcache_handle_get_url(private->htmlc->base.llcache));
- if (private->location == NULL) {
- free(private);
- return NULL;
- }
-
private->console = jsapi_new_Console(cx, NULL, newobject);
if (private->console == NULL) {
free(private);
@@ -210,14 +199,6 @@ operation prompt %{
warn_user(message, NULL);
%}
-getter window %{
- jsret = obj;
-%}
-
-getter self %{
- jsret = obj;
-%}
-
/* boolean dispatchEvent(Event event); */
operation dispatchEvent %{
/* this implementation is unique to the window object as it is
@@ -254,6 +235,20 @@ operation dispatchEvent %{
}
%}
+getter location %{
+ jsval loc;
+ JS_GetProperty(cx, private->document, "location", &loc);
+ jsret = JSVAL_TO_OBJECT(loc);
+%}
+
+getter window %{
+ jsret = obj;
+%}
+
+getter self %{
+ jsret = obj;
+%}
+
getter EventHandler %{
/* this implementation is unique to the window object as it is
* not a dom node.
diff --git a/test/js/dom-document-enumerate.html b/test/js/document-url.html
similarity index 59%
copy from test/js/dom-document-enumerate.html
copy to test/js/document-url.html
index 18146ab..2299b57 100644
--- a/test/js/dom-document-enumerate.html
+++ b/test/js/document-url.html
@@ -1,11 +1,12 @@
<html>
<head>
-<title>document interface enumeration</title>
+<title>document location and URL interface</title>
<link rel="stylesheet" type="text/css" href="tst.css">
</head>
<body>
-<h1>Document interface enumeration</h1>
+<h1>document location and URL interface</h1>
+<h2>Document location enumeration</h2>
<script>
function output(x,y) {
document.body.appendChild(document.createTextNode(x));
@@ -18,9 +19,13 @@ function output(x,y) {
document.body.appendChild(document.createElement('br'));
}
-for(var key in document) {
- output(key, document[key]);
+for(var key in document.location) {
+ output(key, document.location[key]);
}
</script>
+<h2>Document URL</h2>
+<script>output("document.URL", document.URL);</script>
+<h2>DocumentURI</h2>
+<script>output("document.documentURI", document.documentURI);</script>
</body>
</html>
--
NetSurf Browser
10 years, 1 month
netsurf: branch master updated. 40076ea422458fde1799fd383b475586ee112c3f
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/40076ea422458fde1799f...
...commit http://git.netsurf-browser.org/netsurf.git/commit/40076ea422458fde1799fd3...
...tree http://git.netsurf-browser.org/netsurf.git/tree/40076ea422458fde1799fd383...
The branch, master has been updated
via 40076ea422458fde1799fd383b475586ee112c3f (commit)
from 912b9de92808c43a78680d41bba1ad982e120d86 (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/40076ea422458fde179...
commit 40076ea422458fde1799fd383b475586ee112c3f
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Allow the size of the web search gadget to be user-set
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index f1536a2..8759b2b 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -48,6 +48,7 @@ There are a couple of Amiga-specific options which can only be changed directly
@{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0 disables tiling (will use a bitmap at least the size of the screen NetSurf is running on)
@{b}font_antialiasing@{ub} Switch text anti-aliasing on or off. Defaults to on in true-colour modes, but text rendering performance can be improved by setting to 0.
@{b}window_simple_refresh@{ub} If set to 1, NetSurf will use SimpleRefresh rather than SmartRefresh windows. These have slower redraw but use less memory. Note that this setting has no noticeable effect if compositing is enabled. Defaults to 0 (SmartRefresh)
+@{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size of the web search gadget next to the URL bar.
@{b}dithering_quality@{ub} Specify the dithering quality from all values supported by picture.datatype. Currently these are 0=None, 1=Normal, 2=High quality. Other values are undefined. This is only used when NetSurf is running in palette-mapped mode.
@{b}mask_alpha@{ub} Threshold to use when determining which alpha values to convert to full transparency (0 - 255, where 255 will convert even opaque pixels to transparent). Defaults to 50 (0x32). This is only used in palette-mapped modes where alpha blending is not currently supported.
diff --git a/amiga/gui.c b/amiga/gui.c
index c71afde..a1a9468 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3064,7 +3064,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
GA_HintInfo, g->shared->helphints[GID_SEARCHSTRING],
StringEnd,
LayoutEnd,
- CHILD_WeightedWidth, 0,
+ CHILD_WeightedWidth, nsoption_int(web_search_width),
LAYOUT_AddChild, g->shared->objects[GID_THROBBER] = SpaceObject,
GA_ID,GID_THROBBER,
SPACE_MinWidth,throbber_width,
diff --git a/amiga/options.h b/amiga/options.h
index 5e47778..957f389 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -74,6 +74,7 @@
int cookies_window_ypos; \
int cookies_window_xsize; \
int cookies_window_ysize; \
+ int web_search_width; \
int cairo_renderer; \
bool direct_render; \
bool window_simple_refresh; \
@@ -136,6 +137,7 @@
.cookies_window_ypos = 0, \
.cookies_window_xsize = 0, \
.cookies_window_ysize = 0, \
+ .web_search_width = 0, \
.cairo_renderer = 0, \
.direct_render = false, \
.window_simple_refresh = false, \
@@ -197,6 +199,7 @@
{ "cookies_window_ypos", OPTION_INTEGER, &nsoptions.cookies_window_ypos}, \
{ "cookies_window_xsize", OPTION_INTEGER, &nsoptions.cookies_window_xsize}, \
{ "cookies_window_ysize", OPTION_INTEGER, &nsoptions.cookies_window_ysize}, \
+{ "web_search_width", OPTION_INTEGER, &nsoptions.web_search_width}, \
{ "cairo_renderer", OPTION_INTEGER, &nsoptions.cairo_renderer}, \
{ "direct_render", OPTION_BOOL, &nsoptions.direct_render}, \
{ "window_simple_refresh", OPTION_BOOL, &nsoptions.window_simple_refresh}, \
-----------------------------------------------------------------------
Summary of changes:
amiga/dist/NetSurf.guide | 1 +
amiga/gui.c | 2 +-
amiga/options.h | 3 +++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/amiga/dist/NetSurf.guide b/amiga/dist/NetSurf.guide
index f1536a2..8759b2b 100755
--- a/amiga/dist/NetSurf.guide
+++ b/amiga/dist/NetSurf.guide
@@ -48,6 +48,7 @@ There are a couple of Amiga-specific options which can only be changed directly
@{b}redraw_tile_size_x@{ub}/@{b}redraw_tile_size_y@{ub} Specify the size of the off-screen bitmap. Higher will speed up redraws at the expense of memory. 0 disables tiling (will use a bitmap at least the size of the screen NetSurf is running on)
@{b}font_antialiasing@{ub} Switch text anti-aliasing on or off. Defaults to on in true-colour modes, but text rendering performance can be improved by setting to 0.
@{b}window_simple_refresh@{ub} If set to 1, NetSurf will use SimpleRefresh rather than SmartRefresh windows. These have slower redraw but use less memory. Note that this setting has no noticeable effect if compositing is enabled. Defaults to 0 (SmartRefresh)
+@{b}web_search_width@{ub} Defaults to 0. Larger values will increase the size of the web search gadget next to the URL bar.
@{b}dithering_quality@{ub} Specify the dithering quality from all values supported by picture.datatype. Currently these are 0=None, 1=Normal, 2=High quality. Other values are undefined. This is only used when NetSurf is running in palette-mapped mode.
@{b}mask_alpha@{ub} Threshold to use when determining which alpha values to convert to full transparency (0 - 255, where 255 will convert even opaque pixels to transparent). Defaults to 50 (0x32). This is only used in palette-mapped modes where alpha blending is not currently supported.
diff --git a/amiga/gui.c b/amiga/gui.c
index c71afde..a1a9468 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -3064,7 +3064,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
GA_HintInfo, g->shared->helphints[GID_SEARCHSTRING],
StringEnd,
LayoutEnd,
- CHILD_WeightedWidth, 0,
+ CHILD_WeightedWidth, nsoption_int(web_search_width),
LAYOUT_AddChild, g->shared->objects[GID_THROBBER] = SpaceObject,
GA_ID,GID_THROBBER,
SPACE_MinWidth,throbber_width,
diff --git a/amiga/options.h b/amiga/options.h
index 5e47778..957f389 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -74,6 +74,7 @@
int cookies_window_ypos; \
int cookies_window_xsize; \
int cookies_window_ysize; \
+ int web_search_width; \
int cairo_renderer; \
bool direct_render; \
bool window_simple_refresh; \
@@ -136,6 +137,7 @@
.cookies_window_ypos = 0, \
.cookies_window_xsize = 0, \
.cookies_window_ysize = 0, \
+ .web_search_width = 0, \
.cairo_renderer = 0, \
.direct_render = false, \
.window_simple_refresh = false, \
@@ -197,6 +199,7 @@
{ "cookies_window_ypos", OPTION_INTEGER, &nsoptions.cookies_window_ypos}, \
{ "cookies_window_xsize", OPTION_INTEGER, &nsoptions.cookies_window_xsize}, \
{ "cookies_window_ysize", OPTION_INTEGER, &nsoptions.cookies_window_ysize}, \
+{ "web_search_width", OPTION_INTEGER, &nsoptions.web_search_width}, \
{ "cairo_renderer", OPTION_INTEGER, &nsoptions.cairo_renderer}, \
{ "direct_render", OPTION_BOOL, &nsoptions.direct_render}, \
{ "window_simple_refresh", OPTION_BOOL, &nsoptions.window_simple_refresh}, \
--
NetSurf Browser
10 years, 1 month