netsurf: branch master updated. release/3.0-835-g8b6874e
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/8b6874effd85a476af488...
...commit http://git.netsurf-browser.org/netsurf.git/commit/8b6874effd85a476af488a5...
...tree http://git.netsurf-browser.org/netsurf.git/tree/8b6874effd85a476af488a5c7...
The branch, master has been updated
via 8b6874effd85a476af488a5c747a7ab861f576d8 (commit)
from 2aacb411fc07441679f6a73f13956792919dee65 (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/commit/?id=8b6874effd85a476af4...
commit 8b6874effd85a476af488a5c747a7ab861f576d8
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Revert "Think this needs converting back to local charset here otherwise non-ASCII file uploads don't work."
This reverts commit 2aacb411fc07441679f6a73f13956792919dee65.
diff --git a/amiga/misc.c b/amiga/misc.c
index 0ede003..003a5fb 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -181,7 +181,7 @@ char *path_to_url(const char *path)
char *filename_from_path(char *path)
{
- return ami_utf8_easy(FilePart(path));
+ return strdup(FilePart(path));
}
/**
-----------------------------------------------------------------------
Summary of changes:
amiga/misc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/amiga/misc.c b/amiga/misc.c
index 0ede003..003a5fb 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -181,7 +181,7 @@ char *path_to_url(const char *path)
char *filename_from_path(char *path)
{
- return ami_utf8_easy(FilePart(path));
+ return strdup(FilePart(path));
}
/**
--
NetSurf Browser
9 years, 8 months
netsurf: branch master updated. release/3.0-834-g2aacb41
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/2aacb411fc07441679f6a...
...commit http://git.netsurf-browser.org/netsurf.git/commit/2aacb411fc07441679f6a73...
...tree http://git.netsurf-browser.org/netsurf.git/tree/2aacb411fc07441679f6a73f1...
The branch, master has been updated
via 2aacb411fc07441679f6a73f13956792919dee65 (commit)
from e65c91807e554737445916cfb25235b5d0a10c83 (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/commit/?id=2aacb411fc07441679f...
commit 2aacb411fc07441679f6a73f13956792919dee65
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Think this needs converting back to local charset here otherwise non-ASCII file uploads don't work.
diff --git a/amiga/misc.c b/amiga/misc.c
index 003a5fb..0ede003 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -181,7 +181,7 @@ char *path_to_url(const char *path)
char *filename_from_path(char *path)
{
- return strdup(FilePart(path));
+ return ami_utf8_easy(FilePart(path));
}
/**
-----------------------------------------------------------------------
Summary of changes:
amiga/misc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/amiga/misc.c b/amiga/misc.c
index 003a5fb..0ede003 100755
--- a/amiga/misc.c
+++ b/amiga/misc.c
@@ -181,7 +181,7 @@ char *path_to_url(const char *path)
char *filename_from_path(char *path)
{
- return strdup(FilePart(path));
+ return ami_utf8_easy(FilePart(path));
}
/**
--
NetSurf Browser
9 years, 8 months
netsurf: branch stevef/hotlist updated. release/3.0-845-gea28b07
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/ea28b07cae4d0d40850be...
...commit http://git.netsurf-browser.org/netsurf.git/commit/ea28b07cae4d0d40850be14...
...tree http://git.netsurf-browser.org/netsurf.git/tree/ea28b07cae4d0d40850be1417...
The branch, stevef/hotlist has been updated
via ea28b07cae4d0d40850be1417bd00e555e6168fb (commit)
from 604108916923146c888e6659bd5df24fab460e41 (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/commit/?id=ea28b07cae4d0d40850...
commit ea28b07cae4d0d40850be1417bd00e555e6168fb
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Add confirm_hotlist_remove option to allow users to turn URL removal query off.
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index b29ba7e..f47d05e 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -629,12 +629,21 @@ void ro_gui_hotlist_remove_page(nsurl *url)
hotlist_delete_url = NULL;
}
- hotlist_query = query_user("RemoveHotlist", NULL, &remove_funcs, NULL,
- messages_get("Remove"), messages_get("DontRemove"));
+ /* Check with the user before removing the URL, unless they don't
+ * want us to be careful in which case just do it.
+ */
- hotlist_delete_url = nsurl_ref(url);
+ if (nsoption_bool(confirm_hotlist_remove)) {
+ hotlist_query = query_user("RemoveHotlist", NULL,
+ &remove_funcs, NULL,
+ messages_get("Remove"),
+ messages_get("DontRemove"));
- // hotlist_remove_url(url);
+ hotlist_delete_url = nsurl_ref(url);
+ } else {
+ hotlist_remove_url(url);
+ ro_toolbar_update_all_hotlists();
+ }
}
diff --git a/riscos/options.h b/riscos/options.h
index 9ee3592..cb2b78b 100644
--- a/riscos/options.h
+++ b/riscos/options.h
@@ -53,6 +53,7 @@ NSOPTION_BOOL(no_plugins, false)
NSOPTION_BOOL(block_popups, false)
NSOPTION_BOOL(strip_extensions, false)
NSOPTION_BOOL(confirm_overwrite, true)
+NSOPTION_BOOL(confirm_hotlist_remove, true)
NSOPTION_STRING(url_path, "NetSurf:URL")
NSOPTION_STRING(url_save, CHOICES_PREFIX "URL")
NSOPTION_STRING(hotlist_path, "NetSurf:Hotlist")
-----------------------------------------------------------------------
Summary of changes:
riscos/hotlist.c | 17 +++++++++++++----
riscos/options.h | 1 +
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index b29ba7e..f47d05e 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -629,12 +629,21 @@ void ro_gui_hotlist_remove_page(nsurl *url)
hotlist_delete_url = NULL;
}
- hotlist_query = query_user("RemoveHotlist", NULL, &remove_funcs, NULL,
- messages_get("Remove"), messages_get("DontRemove"));
+ /* Check with the user before removing the URL, unless they don't
+ * want us to be careful in which case just do it.
+ */
- hotlist_delete_url = nsurl_ref(url);
+ if (nsoption_bool(confirm_hotlist_remove)) {
+ hotlist_query = query_user("RemoveHotlist", NULL,
+ &remove_funcs, NULL,
+ messages_get("Remove"),
+ messages_get("DontRemove"));
- // hotlist_remove_url(url);
+ hotlist_delete_url = nsurl_ref(url);
+ } else {
+ hotlist_remove_url(url);
+ ro_toolbar_update_all_hotlists();
+ }
}
diff --git a/riscos/options.h b/riscos/options.h
index 9ee3592..cb2b78b 100644
--- a/riscos/options.h
+++ b/riscos/options.h
@@ -53,6 +53,7 @@ NSOPTION_BOOL(no_plugins, false)
NSOPTION_BOOL(block_popups, false)
NSOPTION_BOOL(strip_extensions, false)
NSOPTION_BOOL(confirm_overwrite, true)
+NSOPTION_BOOL(confirm_hotlist_remove, true)
NSOPTION_STRING(url_path, "NetSurf:URL")
NSOPTION_STRING(url_save, CHOICES_PREFIX "URL")
NSOPTION_STRING(hotlist_path, "NetSurf:Hotlist")
--
NetSurf Browser
9 years, 8 months
netsurf: branch stevef/hotlist updated. release/3.0-844-g6041089
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/604108916923146c888e6...
...commit http://git.netsurf-browser.org/netsurf.git/commit/604108916923146c888e665...
...tree http://git.netsurf-browser.org/netsurf.git/tree/604108916923146c888e6659b...
The branch, stevef/hotlist has been updated
via 604108916923146c888e6659bd5df24fab460e41 (commit)
via 56b0465e88f9941bd05fe7492a4d6b4e9bb7f9f0 (commit)
from 2506471b34200940eda71ff4b9f390f0697425db (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/commit/?id=604108916923146c888...
commit 604108916923146c888e6659bd5df24fab460e41
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Implement user confirmation before removing hotlist entries from the URL bar.
diff --git a/resources/FatMessages b/resources/FatMessages
index 777bbc6..2d74f3d 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -3051,6 +3051,11 @@ de.all.OverwriteFile:Eine Datei mit diesem Namen existiert bereits und würde ü
fr.all.OverwriteFile:Un fichier portant ce nom existe déjà et serait perdu.
it.all.OverwriteFile:Un file con questo nome è già esistente, continuare comporterà la sovrascrittura del file originale.
nl.all.OverwriteFile:Een bestand met deze naam bestaat al en zal verloren gaan.
+en.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+de.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+fr.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+it.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+nl.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
# Page fetching
# =============
@@ -3590,6 +3595,16 @@ de.all.DontReplace:Abbrechen
fr.all.DontReplace:Ne pas remplacer le fichier
it.all.DontReplace:Non sostituire
nl.all.DontReplace:Bestand niet vervangen
+en.all.Remove:Remove address
+de.all.Remove:Remove address
+rf.all.Remove:Remove address
+it.all.Remove:Remove address
+nl.all.Remove:Remove address
+en.all.DontRemove:Don't remove
+de.all.DontRemove:Don't remove
+rf.all.DontRemove:Don't remove
+it.all.DontRemove:Don't remove
+nl.all.DontRemove:Don't remove
en.all.obj:object
de.all.obj:Objekt
fr.all.obj:objet
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 9fcd81e..b29ba7e 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -62,6 +62,15 @@ static bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
static void ro_gui_hotlist_toolbar_click(button_bar_action action);
static void ro_gui_hotlist_addurl_bounce(wimp_message *message);
static void ro_gui_hotlist_scheduled_callback(void *p);
+static void ro_gui_hotlist_remove_confirmed(query_id id,
+ enum query_response res, void *p);
+static void ro_gui_hotlist_remove_cancelled(query_id id,
+ enum query_response res, void *p);
+
+static const query_callback remove_funcs = {
+ ro_gui_hotlist_remove_confirmed,
+ ro_gui_hotlist_remove_cancelled
+};
struct ro_treeview_callbacks ro_hotlist_treeview_callbacks = {
ro_gui_hotlist_toolbar_click,
@@ -85,6 +94,11 @@ struct ro_hotlist_message_hotlist_changed {
static char *hotlist_url = NULL; /**< URL area claimed from RMA. */
static char *hotlist_title = NULL; /**< Title area claimed from RMA. */
+/** Hotlist Query Handler. */
+
+static query_id hotlist_query = QUERY_INVALID;
+static nsurl *hotlist_delete_url = NULL;
+
/* The RISC OS hotlist window, toolbar and treeview data. */
static struct ro_hotlist {
@@ -599,10 +613,65 @@ void ro_gui_hotlist_add_cleanup(void)
void ro_gui_hotlist_remove_page(nsurl *url)
{
- if (url == NULL || nsoption_bool(external_hotlists))
+ if (url == NULL || nsoption_bool(external_hotlists) ||
+ !hotlist_has_url(url))
return;
- hotlist_remove_url(url);
+ /* Clean up any existing delete attempts before continuing. */
+
+ if (hotlist_query != QUERY_INVALID) {
+ query_close(hotlist_query);
+ hotlist_query = QUERY_INVALID;
+ }
+
+ if (hotlist_delete_url != NULL) {
+ nsurl_unref(hotlist_delete_url);
+ hotlist_delete_url = NULL;
+ }
+
+ hotlist_query = query_user("RemoveHotlist", NULL, &remove_funcs, NULL,
+ messages_get("Remove"), messages_get("DontRemove"));
+
+ hotlist_delete_url = nsurl_ref(url);
+
+ // hotlist_remove_url(url);
+}
+
+
+/**
+ * Callback confirming a URL delete query.
+ *
+ * \param id The ID of the query calling us.
+ * \param res The user's response to the query.
+ * \param *p Callback data (always NULL).
+ */
+
+static void ro_gui_hotlist_remove_confirmed(query_id id,
+ enum query_response res, void *p)
+{
+ hotlist_remove_url(hotlist_delete_url);
+ ro_toolbar_update_all_hotlists();
+
+ nsurl_unref(hotlist_delete_url);
+ hotlist_delete_url = NULL;
+ hotlist_query = QUERY_INVALID;
+}
+
+
+/**
+ * Callback cancelling a URL delete query.
+ *
+ * \param id The ID of the query calling us.
+ * \param res The user's response to the query.
+ * \param *p Callback data (always NULL).
+ */
+
+static void ro_gui_hotlist_remove_cancelled(query_id id,
+ enum query_response res, void *p)
+{
+ nsurl_unref(hotlist_delete_url);
+ hotlist_delete_url = NULL;
+ hotlist_query = QUERY_INVALID;
}
diff --git a/riscos/window.c b/riscos/window.c
index d169a70..f6b274a 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -4300,7 +4300,6 @@ static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
url = hlcache_handle_get_url(g->bw->current_content);
ro_gui_hotlist_remove_page(url);
- ro_toolbar_update_hotlist(g->toolbar);
}
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=56b0465e88f9941bd05...
commit 56b0465e88f9941bd05fe7492a4d6b4e9bb7f9f0
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Add default clause to squash compiler warning.
diff --git a/riscos/window.c b/riscos/window.c
index 0f81b8f..d169a70 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -3637,6 +3637,9 @@ void ro_gui_window_toolbar_click(void *data,
case TOOLBAR_URL_ADJUST_HOTLIST:
ro_gui_window_action_remove_bookmark(g);
break;
+
+ default:
+ break;
}
return;
-----------------------------------------------------------------------
Summary of changes:
resources/FatMessages | 15 ++++++++++
riscos/hotlist.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++-
riscos/window.c | 4 ++-
3 files changed, 89 insertions(+), 3 deletions(-)
diff --git a/resources/FatMessages b/resources/FatMessages
index 777bbc6..2d74f3d 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -3051,6 +3051,11 @@ de.all.OverwriteFile:Eine Datei mit diesem Namen existiert bereits und würde ü
fr.all.OverwriteFile:Un fichier portant ce nom existe déjà et serait perdu.
it.all.OverwriteFile:Un file con questo nome è già esistente, continuare comporterà la sovrascrittura del file originale.
nl.all.OverwriteFile:Een bestand met deze naam bestaat al en zal verloren gaan.
+en.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+de.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+fr.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+it.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
+nl.all.RemoveHotlist:Are you sure you wish to remove this address from the hotlist?
# Page fetching
# =============
@@ -3590,6 +3595,16 @@ de.all.DontReplace:Abbrechen
fr.all.DontReplace:Ne pas remplacer le fichier
it.all.DontReplace:Non sostituire
nl.all.DontReplace:Bestand niet vervangen
+en.all.Remove:Remove address
+de.all.Remove:Remove address
+rf.all.Remove:Remove address
+it.all.Remove:Remove address
+nl.all.Remove:Remove address
+en.all.DontRemove:Don't remove
+de.all.DontRemove:Don't remove
+rf.all.DontRemove:Don't remove
+it.all.DontRemove:Don't remove
+nl.all.DontRemove:Don't remove
en.all.obj:object
de.all.obj:Objekt
fr.all.obj:objet
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 9fcd81e..b29ba7e 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -62,6 +62,15 @@ static bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
static void ro_gui_hotlist_toolbar_click(button_bar_action action);
static void ro_gui_hotlist_addurl_bounce(wimp_message *message);
static void ro_gui_hotlist_scheduled_callback(void *p);
+static void ro_gui_hotlist_remove_confirmed(query_id id,
+ enum query_response res, void *p);
+static void ro_gui_hotlist_remove_cancelled(query_id id,
+ enum query_response res, void *p);
+
+static const query_callback remove_funcs = {
+ ro_gui_hotlist_remove_confirmed,
+ ro_gui_hotlist_remove_cancelled
+};
struct ro_treeview_callbacks ro_hotlist_treeview_callbacks = {
ro_gui_hotlist_toolbar_click,
@@ -85,6 +94,11 @@ struct ro_hotlist_message_hotlist_changed {
static char *hotlist_url = NULL; /**< URL area claimed from RMA. */
static char *hotlist_title = NULL; /**< Title area claimed from RMA. */
+/** Hotlist Query Handler. */
+
+static query_id hotlist_query = QUERY_INVALID;
+static nsurl *hotlist_delete_url = NULL;
+
/* The RISC OS hotlist window, toolbar and treeview data. */
static struct ro_hotlist {
@@ -599,10 +613,65 @@ void ro_gui_hotlist_add_cleanup(void)
void ro_gui_hotlist_remove_page(nsurl *url)
{
- if (url == NULL || nsoption_bool(external_hotlists))
+ if (url == NULL || nsoption_bool(external_hotlists) ||
+ !hotlist_has_url(url))
return;
- hotlist_remove_url(url);
+ /* Clean up any existing delete attempts before continuing. */
+
+ if (hotlist_query != QUERY_INVALID) {
+ query_close(hotlist_query);
+ hotlist_query = QUERY_INVALID;
+ }
+
+ if (hotlist_delete_url != NULL) {
+ nsurl_unref(hotlist_delete_url);
+ hotlist_delete_url = NULL;
+ }
+
+ hotlist_query = query_user("RemoveHotlist", NULL, &remove_funcs, NULL,
+ messages_get("Remove"), messages_get("DontRemove"));
+
+ hotlist_delete_url = nsurl_ref(url);
+
+ // hotlist_remove_url(url);
+}
+
+
+/**
+ * Callback confirming a URL delete query.
+ *
+ * \param id The ID of the query calling us.
+ * \param res The user's response to the query.
+ * \param *p Callback data (always NULL).
+ */
+
+static void ro_gui_hotlist_remove_confirmed(query_id id,
+ enum query_response res, void *p)
+{
+ hotlist_remove_url(hotlist_delete_url);
+ ro_toolbar_update_all_hotlists();
+
+ nsurl_unref(hotlist_delete_url);
+ hotlist_delete_url = NULL;
+ hotlist_query = QUERY_INVALID;
+}
+
+
+/**
+ * Callback cancelling a URL delete query.
+ *
+ * \param id The ID of the query calling us.
+ * \param res The user's response to the query.
+ * \param *p Callback data (always NULL).
+ */
+
+static void ro_gui_hotlist_remove_cancelled(query_id id,
+ enum query_response res, void *p)
+{
+ nsurl_unref(hotlist_delete_url);
+ hotlist_delete_url = NULL;
+ hotlist_query = QUERY_INVALID;
}
diff --git a/riscos/window.c b/riscos/window.c
index 0f81b8f..f6b274a 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -3637,6 +3637,9 @@ void ro_gui_window_toolbar_click(void *data,
case TOOLBAR_URL_ADJUST_HOTLIST:
ro_gui_window_action_remove_bookmark(g);
break;
+
+ default:
+ break;
}
return;
@@ -4297,7 +4300,6 @@ static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
url = hlcache_handle_get_url(g->bw->current_content);
ro_gui_hotlist_remove_page(url);
- ro_toolbar_update_hotlist(g->toolbar);
}
--
NetSurf Browser
9 years, 8 months
netsurf: branch mmu_man/french_pages created. release/3.0-834-g09cbf6a
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/09cbf6a61d87b3c7ce154...
...commit http://git.netsurf-browser.org/netsurf.git/commit/09cbf6a61d87b3c7ce15433...
...tree http://git.netsurf-browser.org/netsurf.git/tree/09cbf6a61d87b3c7ce1543351...
The branch, mmu_man/french_pages has been created
at 09cbf6a61d87b3c7ce1543351830b194c7050fe5 (commit)
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=09cbf6a61d87b3c7ce1...
commit 09cbf6a61d87b3c7ce1543351830b194c7050fe5
Author: François Revol <revol(a)free.fr>
Commit: François Revol <revol(a)free.fr>
Add french translation for the welcome and credits page.
diff --git a/!NetSurf/Resources/fr/credits.html,faf b/!NetSurf/Resources/fr/credits.html,faf
new file mode 100644
index 0000000..6dccbd2
--- /dev/null
+++ b/!NetSurf/Resources/fr/credits.html,faf
@@ -0,0 +1,99 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>NetSurf | Remerciements</title>
+<link rel="stylesheet" type="text/css" href="resource:internal.css">
+<style>
+div#DevList li {
+ float: left;
+ width: 18em; }
+div#DevList ul {
+ overflow: hidden; }
+</style>
+</head>
+
+<body>
+<p class="banner"><a href="http://www.netsurf-browser.org/"><img src="resource:netsurf.png" alt="NetSurf"></a></p>
+
+<h1>Remerciements pour NetSurf</h1>
+
+<p>NetSurf a �t� d�velopp� par les personnes suivantes :</p>
+
+<div id="DevList">
+
+<h2>Code</h2>
+<ul>
+<li>Kevin Bagust</li>
+<li>John-Mark Bell</li>
+<li>Mark Benjamin</li>
+<li>Adam Blokus</li>
+<li>Paweł Blokus</li>
+<li>James Bursa</li>
+<li>Stefaan Claes</li>
+<li>Calin Dobos</li>
+<li>Michael Drake</li>
+<li>Sean Fox</li>
+<li>Stephen Fryatt</li>
+<li>Rik Griffin</li>
+<li>Matthew Hambley</li>
+<li>Rob Jackson</li>
+<li>Rob Kendrick</li>
+<li>Jeffrey Lee</li>
+<li>Adrian Lees</li>
+<li>Michael Lester</li>
+<li>Ole Loots</li>
+<li>Phil Mellor</li>
+<li>Philip Pemberton</li>
+<li>Fran�ois Revol</li>
+<li>Darren Salt</li>
+<li>Vincent Sanders</li>
+<li>James Shaw</li>
+<li>Andrew Sidwell</li>
+<li>Daniel Silverstone</li>
+<li>Andrew Timmins</li>
+<li>John Tytgat</li>
+<li>Sven Weidauer</li>
+<li>Chris Williams</li>
+<li>Richard Wilson</li>
+<li>Bo Yang</li>
+<li>Chris Young</li>
+</ul>
+
+<h2>Documentation</h2>
+<ul>
+<li>John-Mark Bell</li>
+<li>James Bursa</li>
+<li>Michael Drake</li>
+<li>Rob Kendrick</li>
+<li>James Shaw</li>
+<li>Richard Wilson</li>
+</ul>
+
+<h2>Graphiques</h2>
+<ul>
+<li>Michael Drake</li>
+<li>Andrew Duffell</li>
+<li>John Duffell</li>
+<li>Richard Hallas</li>
+<li>Phil Mellor</li>
+</ul>
+
+<h2>Traductions</h2>
+<ul>
+<li>Sebastian Barthel</li>
+<li>Bruno D'Arcangeli</li>
+<li>Samir Hawamdeh</li>
+<li>Gerard van Katwijk</li>
+<li>J�r�me Mathevet</li>
+<li>Simon Voortman</li>
+</ul>
+
+</div>
+
+<div class="footer">
+<p>Copyright 2003–2013 The NetSurf Developers</p>
+</div>
+
+</body>
+</html>
diff --git a/!NetSurf/Resources/fr/welcome.html,faf b/!NetSurf/Resources/fr/welcome.html,faf
new file mode 100644
index 0000000..720d7dc
--- /dev/null
+++ b/!NetSurf/Resources/fr/welcome.html,faf
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<title>Bienvenue dans NetSurf</title>
+<style type="text/css">html,body{margin:0;padding:0;}body{color:#000;background:#fff;font-family:sans-serif;margin:0 auto;}a:link{text-decoration:underline;color:#00f;}a:visited{text-decoration:underline;color:#60a;}a:hover{text-decoration:none;}a:active{text-decoration:underline;color:#f00;}.banner{margin:0;padding:0;background:#94adff;text-align:left;}.banner img{border:none;color:#000;height:86px;width:308px;display:block;}.onlycontent{margin:0 1em;}.nslinks{display:table;width:100%;margin:0;border-spacing:0;padding:0;background:#ccd8ff;font-size:94%;}.nslinks li{display:table-cell;text-align:center;padding:0.2em 0.3em 0.3em;vertical-align:middle;}.nslinks li+li{border-left:2px solid #b1c3ff;}.version{padding:0;margin:1.2em auto 0;width:90%;color:#444;font-size:160%;}.intro{width: 90%;margin:1em auto;color:#666;}.websearch{margin:1.5em auto;padding:1.2em 0.3em;background:#d8e2ff;border:2px solid #c5d3ff;width:80%;text-align:center;}input[type=text]{border:2px solid #b6c7ff;background:#f9faff;color:#000;margin:2px;}input[type=submit]{border:2px outset #cedaff;color:#000;background:#cedaff;margin:2px;}.links{display:table;width:80%;margin:0 auto 3em;font-size:94%;}.links ul{display:table-cell;padding-left:2.5em;}.links ul+ul{padding-left:1em;}.footer{font-style:italic;color:#666;text-align:right;}.footer p{margin-top:1.5em;padding-top:0.4em;border-top:2px solid #94adff;}</style>
+</head>
+
+<body>
+<h1 class="banner"><a href="http://www.netsurf-browser.org/"><img src="about:logo" alt="NetSurf"></a></h1>
+
+<ul class="nslinks">
+<li><a href="http://www.netsurf-browser.org/">Site Web de NetSurf</a></li>
+<li><a href="http://www.netsurf-browser.org/documentation/">Documentation</a></li>
+<li><a href="http://www.netsurf-browser.org/downloads/">T�l�charger le dernier NetSurf</a></li>
+<li><a href="http://www.netsurf-browser.org/contact/">Contacter les d�veloppeurs</a></li>
+</ul>
+
+<div class="onlycontent">
+<h2 class="version">Bienvenue dans NetSurf</h2>
+
+<p class="intro">NetSurf est un navigateur Web open-source l�ger et rapide. Nous sommes toujours d�sireux d'am�liorer notre navigateur, donc n'h�sitez-pas � nous contacter si vous d�tectez un probl�me. Merci d'avoir choisi NetSurf !</p>
+
+<form method="get" action="http://www.google.fr/search">
+<div class="websearch">
+<input type="text" name="q" size="42" maxlength="255">
+<input type="submit" value="Recherche Google" name="btnG">
+</div>
+</form>
+
+<div class="links">
+<ul>
+<li><a href="http://news.bbc.co.uk/">BBC News</a></li>
+<li><a href="http://www.reuters.com/news">Reuters</a></li>
+<li><a href="http://www.cnn.com/">CNN</a></li>
+</ul>
+
+<ul>
+<li><a href="http://slashdot.org/">Slashdot</a></li>
+<li><a href="http://arstechnica.com/">Ars Technica</a></li>
+<li><a href="http://www.theregister.co.uk/">The Register</a></li>
+<li><a href="http://www.w3.org/">W3C</a></li>
+</ul>
+
+<ul>
+<li><a href="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a></li>
+<li><a href="http://google.co.uk/">Google</a></li>
+<li><a href="http://yahoo.co.uk/">Yahoo!</a></li>
+<li><a href="http://www.imdb.com/">IMDB</a></li>
+</ul>
+
+<ul>
+<li><a href="http://www.iconbar.com/">The Icon Bar</a></li>
+<li><a href="http://www.riscosopen.org/">ROOL</a></li>
+<li><a href="http://www.riscos.info/">riscos.info</a></li>
+</ul>
+</div>
+
+<div class="footer">
+<p>NetSurf est disponible sous la Licence Publique G�n�rale de GNU version 2.</p>
+</div>
+</div>
+
+</body>
+</html>
-----------------------------------------------------------------------
--
NetSurf Browser
9 years, 8 months
netsurf: branch stevef/hotlist created. release/3.0-842-g2506471
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/2506471b34200940eda71...
...commit http://git.netsurf-browser.org/netsurf.git/commit/2506471b34200940eda71ff...
...tree http://git.netsurf-browser.org/netsurf.git/tree/2506471b34200940eda71ff4b...
The branch, stevef/hotlist has been created
at 2506471b34200940eda71ff4b9f390f0697425db (commit)
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=2506471b34200940eda...
commit 2506471b34200940eda71ff4b9f390f0697425db
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Fix broken dragging mouse pointer introduced in mouse tracking changes.
diff --git a/riscos/mouse.c b/riscos/mouse.c
index c655340..a20965e 100644
--- a/riscos/mouse.c
+++ b/riscos/mouse.c
@@ -50,6 +50,8 @@ static void (*ro_mouse_drag_track_callback)(wimp_pointer *pointer, void *data)
static void (*ro_mouse_drag_cancel_callback)(void *data) = NULL;
static void *ro_mouse_drag_data = NULL;
+static bool ro_mouse_ignore_leaving_event = false;
+
/* Data for the wimp poll handler. */
static void (*ro_mouse_poll_end_callback)(wimp_leaving *leaving, void *data)
@@ -123,6 +125,12 @@ void ro_mouse_drag_start(void (*drag_end)(wimp_dragged *dragged, void *data),
ro_mouse_drag_track_callback = drag_track;
ro_mouse_drag_cancel_callback = drag_cancel;
ro_mouse_drag_data = data;
+
+ /* The Wimp sends a PointerLeaving event when Wimp_DragBox is called,
+ * so we mask out the next event that will come our way.
+ */
+
+ ro_mouse_ignore_leaving_event = true;
}
@@ -184,14 +192,20 @@ void ro_mouse_track_start(void (*poll_end)(wimp_leaving *leaving, void *data),
* Process Wimp_PointerLeaving events by terminating an active mouse track and
* passing the details on to any registered event handler.
*
+ * If the ignore mask is set, we don't pass the event on to the client as it
+ * is assumed that it's a result of starting a Wimp_DragBox operation.
+ *
* \param *leaving The Wimp_PointerLeaving data block.
*/
void ro_mouse_pointer_leaving_window(wimp_leaving *leaving)
{
- if (ro_mouse_poll_end_callback != NULL)
+ if (ro_mouse_poll_end_callback != NULL &&
+ ro_mouse_ignore_leaving_event == false)
ro_mouse_poll_end_callback(leaving, ro_mouse_poll_data);
+ ro_mouse_ignore_leaving_event = false;
+
/* Poll tracking is a one-shot event, so clear the data ready for
* another claimant.
*/
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=20b3d960e585a3b13a4...
commit 20b3d960e585a3b13a40bc2eddd40d526597eeac
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Remove excessive logging from hotlist code.
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 7147440..9fcd81e 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -498,8 +498,6 @@ void ro_gui_hotlist_add_page(nsurl *url)
ro_gui_hotlist_add_cleanup();
- LOG(("Sending Hotlist AddURL to potential hotlist clients."));
-
data = urldb_get_url_data(url);
if (data == NULL)
return;
@@ -542,8 +540,6 @@ void ro_gui_hotlist_add_page(nsurl *url)
static void ro_gui_hotlist_addurl_bounce(wimp_message *message)
{
- LOG(("Hotlist AddURL Bounced"));
-
if (hotlist_url != NULL) {
nsurl *nsurl;
@@ -572,8 +568,6 @@ static void ro_gui_hotlist_addurl_bounce(wimp_message *message)
static void ro_gui_hotlist_scheduled_callback(void *p)
{
- LOG(("Hotlist AddURL was claimed by something."));
-
ro_gui_hotlist_add_cleanup();
}
@@ -584,8 +578,6 @@ static void ro_gui_hotlist_scheduled_callback(void *p)
void ro_gui_hotlist_add_cleanup(void)
{
- LOG(("Clean up RMA"));
-
if (hotlist_url != NULL) {
osmodule_free(hotlist_url);
hotlist_url = NULL;
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=5c25b2e47d78da935db...
commit 5c25b2e47d78da935dbf8b957dc709f3e371cbf4
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Provide some interactive help for the URL Bar's favicon and hotlist indicator.
diff --git a/resources/FatMessages b/resources/FatMessages
index 44598c5..777bbc6 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -3696,6 +3696,16 @@ de.ro.HelpToolbar16:Das ist die Ladeaktivitätsanzeige.|MSie wird animiert, wenn
fr.ro.HelpToolbar16:\Tle pulseur.|MIl s'anime lorsque cette \w est active.
it.ro.HelpToolbar16:\Tthrobber animato durante le attività di rete
nl.ro.HelpToolbar16:\Tthrobber.|MIt animates while this \w is active.
+en.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+de.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+fr.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+it.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+nl.ro.HelpToolbarFav:\TFavicon: a small logo supplied by the current site, if available.
+en.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+de.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+fr.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+it.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
+nl.ro.HelpToolbarHot:\Thotlist indicator: if lit, the current address is in the hotlist.|M\Sto add the current address to the hotlist.|M\Ato remove the current address from the hotlist.
en.ro.HelpStatus0:\Tstatus bar resizer.|MDrag to alter the size of the status bar.
de.ro.HelpStatus0:Das ist die Begrenzung der Statusanzeige.|MKlicken und Ziehen verändert die Länge der Statusanzeige.
diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c
index 4badb6b..845f8b3 100644
--- a/riscos/gui/url_bar.c
+++ b/riscos/gui/url_bar.c
@@ -894,6 +894,16 @@ bool ro_gui_url_bar_help_suffix(struct url_bar *url_bar, wimp_i i,
*suffix = "14";
else if (i == url_bar->suggest_icon)
*suffix = "15";
+ else if (pos.x >= url_bar->hotlist.extent.x0 &&
+ pos.x <= url_bar->hotlist.extent.x1 &&
+ pos.y >= url_bar->hotlist.extent.y0 &&
+ pos.y <= url_bar->hotlist.extent.y1)
+ *suffix = "Hot";
+ else if (pos.x >= url_bar->favicon_extent.x0 &&
+ pos.x <= url_bar->favicon_extent.x1 &&
+ pos.y >= url_bar->favicon_extent.y0 &&
+ pos.y <= url_bar->favicon_extent.y1)
+ *suffix = "Fav";
else
*suffix = "";
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=f64c8ed9ef976618d36...
commit f64c8ed9ef976618d36f7e07285e4755c0c9c11c
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Update the URL hotlist icon when entries are deleted from the hotlist.
This does not currently spot entries which are edited.
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 3350ffb..7147440 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -241,6 +241,7 @@ void ro_gui_hotlist_toolbar_click(button_bar_action action)
switch (action) {
case TOOLBAR_BUTTON_DELETE:
hotlist_keypress(KEY_DELETE_LEFT);
+ ro_toolbar_update_all_hotlists();
break;
case TOOLBAR_BUTTON_EXPAND:
@@ -410,6 +411,7 @@ bool ro_gui_hotlist_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
return true;
case TREE_SELECTION_DELETE:
hotlist_keypress(KEY_DELETE_LEFT);
+ ro_toolbar_update_all_hotlists();
return true;
case TREE_SELECT_ALL:
hotlist_keypress(KEY_SELECT_ALL);
diff --git a/riscos/toolbar.c b/riscos/toolbar.c
index d0c68c2..93c4438 100644
--- a/riscos/toolbar.c
+++ b/riscos/toolbar.c
@@ -1620,6 +1620,21 @@ const char *ro_toolbar_get_url(struct toolbar *toolbar)
/* This is an exported interface documented in toolbar.h */
+void ro_toolbar_update_all_hotlists(void)
+{
+ struct toolbar *bar;
+
+ bar = ro_toolbar_bars;
+ while (bar != NULL) {
+ ro_toolbar_update_hotlist(bar);
+
+ bar = bar->next;
+ }
+}
+
+
+/* This is an exported interface documented in toolbar.h */
+
void ro_toolbar_update_hotlist(struct toolbar *toolbar)
{
if (toolbar == NULL || toolbar->url == NULL)
diff --git a/riscos/toolbar.h b/riscos/toolbar.h
index e568b8c..336f95d 100644
--- a/riscos/toolbar.h
+++ b/riscos/toolbar.h
@@ -386,6 +386,13 @@ const char *ro_toolbar_get_url(struct toolbar *toolbar);
/**
+ * Update the state of the URL Bar hotlist icons in all open toolbars.
+ */
+
+void ro_toolbar_update_all_hotlists(void);
+
+
+/**
* Update the state of a toolbar's URL Bar hotlist icon to reflect any changes
* to the URL or the hotlist contents.
*
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=6300c7ed90b472dc9a5...
commit 6300c7ed90b472dc9a5f21d8054fd2e2689c8c9a
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Tidy up hotlist icon interfaces and make consistant with rest of toolbar.
diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c
index 0d82b60..4badb6b 100644
--- a/riscos/gui/url_bar.c
+++ b/riscos/gui/url_bar.c
@@ -30,7 +30,7 @@
#include "oslib/os.h"
#include "oslib/osspriteop.h"
#include "oslib/wimp.h"
-#include "desktop/hotlist.h"
+#include "riscos/hotlist.h"
#include "riscos/gui/url_bar.h"
#include "riscos/theme.h"
#include "riscos/url_suggest.h"
@@ -83,7 +83,7 @@ struct url_bar {
bool shaded;
struct {
- bool add;
+ bool set;
os_box extent;
os_coord offset;
} hotlist;
@@ -111,6 +111,7 @@ static struct url_bar_resource url_bar_res[URLBAR_RES_LAST] = {
}; /**< Treeview content resources */
+static void ro_gui_url_bar_set_hotlist(struct url_bar *url_bar, bool set);
/* This is an exported interface documented in url_bar.h */
@@ -159,7 +160,7 @@ struct url_bar *ro_gui_url_bar_create(struct theme_descriptor *theme)
strncpy(url_bar->favicon_sprite, "Ssmall_xxx",
URLBAR_FAVICON_NAME_LENGTH);
- url_bar->hotlist.add = true;
+ url_bar->hotlist.set = false;
url_bar->hotlist.extent.x0 = 0;
url_bar->hotlist.extent.y0 = 0;
url_bar->hotlist.extent.x1 = 0;
@@ -697,9 +698,9 @@ void ro_gui_url_bar_redraw(struct url_bar *url_bar, wimp_draw *redraw)
.background_images = true,
.plot = &ro_plotters
};
- struct url_bar_resource *hotlist_icon = url_bar->hotlist.add ?
- &(url_bar_res[URLBAR_RES_HOTLIST_ADD]) :
- &(url_bar_res[URLBAR_RES_HOTLIST_REMOVE]);
+ struct url_bar_resource *hotlist_icon = url_bar->hotlist.set ?
+ &(url_bar_res[URLBAR_RES_HOTLIST_REMOVE]) :
+ &(url_bar_res[URLBAR_RES_HOTLIST_ADD]);
xwimp_set_colour(wimp_COLOUR_WHITE);
xos_plot(os_MOVE_TO,
@@ -937,16 +938,8 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url,
return;
if (nsurl_create(url, &n) == NSERROR_OK) {
- bool prev = url_bar->hotlist.add;
- url_bar->hotlist.add = !hotlist_has_url(n);
+ ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
nsurl_unref(n);
-
- if (prev != url_bar->hotlist.add && !url_bar->hidden)
- xwimp_force_redraw(url_bar->window,
- url_bar->hotlist.extent.x0,
- url_bar->hotlist.extent.y0,
- url_bar->hotlist.extent.x1,
- url_bar->hotlist.extent.y1);
}
if (url_bar->text_icon == -1) {
@@ -983,23 +976,42 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url,
/* This is an exported interface documented in url_bar.h */
-void ro_gui_url_bar_hotlist_modifed(struct url_bar *url_bar, nsurl *url)
+void ro_gui_url_bar_update_hotlist(struct url_bar *url_bar)
{
+ const char *url;
nsurl *n;
- if (nsurl_create((const char *)url_bar->text_buffer,
- &n) == NSERROR_OK) {
- bool prev = url_bar->hotlist.add;
- url_bar->hotlist.add = !hotlist_has_url(n);
+ if (url_bar == NULL)
+ return;
+
+ url = (const char *) url_bar->text_buffer;
+ if (url != NULL && nsurl_create(url, &n) == NSERROR_OK) {
+ ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
nsurl_unref(n);
+ }
+}
- if (prev != url_bar->hotlist.add && !url_bar->hidden) {
+
+/**
+ * Set the state of a URL Bar's hotlist icon.
+ *
+ * \param *url_bar The URL Bar to update.
+ * \param set TRUE to set the hotlist icon; FALSE to clear it.
+ */
+
+static void ro_gui_url_bar_set_hotlist(struct url_bar *url_bar, bool set)
+{
+ if (url_bar == NULL || set == url_bar->hotlist.set)
+ return;
+
+ url_bar->hotlist.set = set;
+
+ if (!url_bar->hidden) {
xwimp_force_redraw(url_bar->window,
url_bar->hotlist.extent.x0,
url_bar->hotlist.extent.y0,
url_bar->hotlist.extent.x1,
url_bar->hotlist.extent.y1);
- }
}
}
@@ -1067,7 +1079,6 @@ bool ro_gui_url_bar_test_for_text_field_keypress(struct url_bar *url_bar,
{
const char *url;
nsurl *n;
- bool changed = false;
if (url_bar == NULL || url_bar->hidden || key == NULL)
return false;
@@ -1075,30 +1086,14 @@ bool ro_gui_url_bar_test_for_text_field_keypress(struct url_bar *url_bar,
if (key->w != url_bar->window || key->i != url_bar->text_icon)
return false;
- if (url_bar->hidden)
- return true;
-
/* Update hotlist indicator */
+
url = (const char *) url_bar->text_buffer;
if (url != NULL && nsurl_create(url, &n) == NSERROR_OK) {
- bool prev = url_bar->hotlist.add;
- url_bar->hotlist.add = !hotlist_has_url(n);
+ ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
nsurl_unref(n);
-
- if (prev != url_bar->hotlist.add) {
- changed = true;
- }
- } else if (!url_bar->hotlist.add) {
- url_bar->hotlist.add = true;
- changed = true;
- }
-
- if (changed) {
- xwimp_force_redraw(url_bar->window,
- url_bar->hotlist.extent.x0,
- url_bar->hotlist.extent.y0,
- url_bar->hotlist.extent.x1,
- url_bar->hotlist.extent.y1);
+ } else if (url_bar->hotlist.set) {
+ ro_gui_url_bar_set_hotlist(url_bar, false);
}
return true;
diff --git a/riscos/gui/url_bar.h b/riscos/gui/url_bar.h
index c20dbf9..034f74d 100644
--- a/riscos/gui/url_bar.h
+++ b/riscos/gui/url_bar.h
@@ -234,13 +234,13 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url,
/**
- * Update urlbar's hotlist icon, if necessary.
+ * Update the state of a URL Bar's hotlist icon to reflect any changes to the
+ * URL or the contents of the hotlist.
*
* \param *url_bar The URL Bar to update.
- * \param *url URL with updated hotlist presence, or NULL if unknown.
*/
-void ro_gui_url_bar_hotlist_modifed(struct url_bar *url_bar, nsurl *url);
+void ro_gui_url_bar_update_hotlist(struct url_bar *url_bar);
/**
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index cb014b5..3350ffb 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -612,6 +612,24 @@ void ro_gui_hotlist_remove_page(nsurl *url)
}
+/**
+ * Report whether the hotlist contains a given URL. This will be passed on to
+ * the core hotlist, unless we're configured to use an external hotlist in which
+ * case we always report false.
+ *
+ * \param *url The URL to be tested.
+ * \return true if the hotlist contains the URL; else false.
+ */
+
+bool ro_gui_hotlist_has_page(nsurl *url)
+{
+ if (url == NULL || nsoption_bool(external_hotlists))
+ return false;
+
+ return hotlist_has_url(url);
+}
+
+
#if 0
/**
* Handle URL dropped on hotlist
diff --git a/riscos/hotlist.h b/riscos/hotlist.h
index 4993092..4cb5a1f 100644
--- a/riscos/hotlist.h
+++ b/riscos/hotlist.h
@@ -48,6 +48,7 @@ bool ro_gui_hotlist_check_menu(wimp_menu *menu);
void ro_gui_hotlist_add_page(nsurl *url);
void ro_gui_hotlist_add_cleanup(void);
void ro_gui_hotlist_remove_page(nsurl *url);
+bool ro_gui_hotlist_has_page(nsurl *url);
#endif
diff --git a/riscos/toolbar.c b/riscos/toolbar.c
index 26a9bd4..d0c68c2 100644
--- a/riscos/toolbar.c
+++ b/riscos/toolbar.c
@@ -1620,10 +1620,12 @@ const char *ro_toolbar_get_url(struct toolbar *toolbar)
/* This is an exported interface documented in toolbar.h */
-void ro_toolbar_hotlist_modifed(struct toolbar *toolbar, nsurl *url)
+void ro_toolbar_update_hotlist(struct toolbar *toolbar)
{
- if (toolbar != NULL && toolbar->url != NULL)
- ro_gui_url_bar_hotlist_modifed(toolbar->url, url);
+ if (toolbar == NULL || toolbar->url == NULL)
+ return;
+
+ ro_gui_url_bar_update_hotlist(toolbar->url);
}
diff --git a/riscos/toolbar.h b/riscos/toolbar.h
index 284eee2..e568b8c 100644
--- a/riscos/toolbar.h
+++ b/riscos/toolbar.h
@@ -386,13 +386,13 @@ const char *ro_toolbar_get_url(struct toolbar *toolbar);
/**
- * Update toolbar's urlbar hotlist icon, if necessary.
+ * Update the state of a toolbar's URL Bar hotlist icon to reflect any changes
+ * to the URL or the hotlist contents.
*
* \param *toolbar The toolbar to update.
- * \param *url URL with updated hotlist presence, or NULL if unknown.
*/
-void ro_toolbar_hotlist_modifed(struct toolbar *toolbar, nsurl *url);
+void ro_toolbar_update_hotlist(struct toolbar *toolbar);
/**
diff --git a/riscos/window.c b/riscos/window.c
index 39ae5f6..0f81b8f 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -4275,7 +4275,7 @@ static void ro_gui_window_action_add_bookmark(struct gui_window *g)
url = hlcache_handle_get_url(g->bw->current_content);
ro_gui_hotlist_add_page(url);
- ro_toolbar_hotlist_modifed(g->toolbar, url);
+ ro_toolbar_update_hotlist(g->toolbar);
}
@@ -4297,7 +4297,7 @@ static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
url = hlcache_handle_get_url(g->bw->current_content);
ro_gui_hotlist_remove_page(url);
- ro_toolbar_hotlist_modifed(g->toolbar, url);
+ ro_toolbar_update_hotlist(g->toolbar);
}
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=1019692b882860bcae9...
commit 1019692b882860bcae923fedb23269cbd2f0121b
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Fix indentation.
diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c
index e517957..0d82b60 100644
--- a/riscos/gui/url_bar.c
+++ b/riscos/gui/url_bar.c
@@ -1150,12 +1150,12 @@ bool ro_gui_url_bar_set_site_favicon(struct url_bar *url_bar,
"Ssmall_xxx");
}
- if (!url_bar->hidden)
- xwimp_force_redraw(url_bar->window,
- url_bar->favicon_extent.x0,
- url_bar->favicon_extent.y0,
- url_bar->favicon_extent.x1,
- url_bar->favicon_extent.y1);
+ if (!url_bar->hidden)
+ xwimp_force_redraw(url_bar->window,
+ url_bar->favicon_extent.x0,
+ url_bar->favicon_extent.y0,
+ url_bar->favicon_extent.x1,
+ url_bar->favicon_extent.y1);
return true;
}
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=01b85ff7c54f8250083...
commit 01b85ff7c54f8250083700aa6ec7dceb52c233a1
Merge: b8dd4f2 e65c918
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=b8dd4f282b521f881f3...
commit b8dd4f282b521f881f33841a9e3bb101f933c349
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Bring hotlist icon event handling in line with other toolbar actions.
- Make hotlist icon return click events to clients.
- Move URL add and remove code into browser window toolbar event handler.
- Pass hotlist icon URL add/remove via RISC OS hotlist interface.
diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c
index 1bc4261..e517957 100644
--- a/riscos/gui/url_bar.c
+++ b/riscos/gui/url_bar.c
@@ -760,40 +760,22 @@ bool ro_gui_url_bar_click(struct url_bar *url_bar,
pos.y > url_bar->extent.y1)
return false;
- /* If we have a click over the hotlist icon, hotlist add/remove. */
+ /* If we have a Select or Adjust click, check if it originated on the
+ * hotlist icon; if it did, return an event.
+ */
- if (pointer->buttons == wimp_SINGLE_SELECT &&
- url_bar->text_buffer != NULL) {
+ if (pointer->buttons == wimp_SINGLE_SELECT ||
+ pointer->buttons == wimp_SINGLE_ADJUST) {
if (pos.x >= url_bar->hotlist.extent.x0 &&
pos.x <= url_bar->hotlist.extent.x1 &&
pos.y >= url_bar->hotlist.extent.y0 &&
pos.y <= url_bar->hotlist.extent.y1) {
- nsurl *n;
- bool redraw = false;
- if (nsurl_create((const char *)url_bar->text_buffer,
- &n) == NSERROR_OK) {
- if (url_bar->hotlist.add) {
- if (hotlist_add_url(n) == NSERROR_OK) {
- redraw = true;
- url_bar->hotlist.add = false;
- }
- } else {
- /* TODO: Open "Remove page from
- * Hotlist?" query dialogue box,
- * rather than silent removal. */
- hotlist_remove_url(n);
- redraw = true;
- url_bar->hotlist.add = true;
- }
- nsurl_unref(n);
-
- if (redraw && !url_bar->hidden)
- xwimp_force_redraw(url_bar->window,
- url_bar->hotlist.extent.x0,
- url_bar->hotlist.extent.y0,
- url_bar->hotlist.extent.x1,
- url_bar->hotlist.extent.y1);
- }
+ if (pointer->buttons == wimp_SINGLE_SELECT &&
+ action != NULL)
+ *action = TOOLBAR_URL_SELECT_HOTLIST;
+ else if (pointer->buttons == wimp_SINGLE_ADJUST &&
+ action != NULL)
+ *action = TOOLBAR_URL_ADJUST_HOTLIST;
return true;
}
}
diff --git a/riscos/gui/url_bar.h b/riscos/gui/url_bar.h
index 04a8468..c20dbf9 100644
--- a/riscos/gui/url_bar.h
+++ b/riscos/gui/url_bar.h
@@ -34,6 +34,8 @@ typedef enum {
TOOLBAR_URL_NONE = 0, /* Special case: no action */
TOOLBAR_URL_DRAG_URL,
TOOLBAR_URL_DRAG_FAVICON,
+ TOOLBAR_URL_SELECT_HOTLIST,
+ TOOLBAR_URL_ADJUST_HOTLIST
} url_bar_action;
struct url_bar;
diff --git a/riscos/hotlist.c b/riscos/hotlist.c
index 7b5762f..cb014b5 100644
--- a/riscos/hotlist.c
+++ b/riscos/hotlist.c
@@ -596,6 +596,22 @@ void ro_gui_hotlist_add_cleanup(void)
}
+/**
+ * Remove a URL from the hotlist. This will be passed on to the core hotlist,
+ * unless we're configured to use external hotlists in which case we ignore it.
+ *
+ * \param *url The URL to be removed.
+ */
+
+void ro_gui_hotlist_remove_page(nsurl *url)
+{
+ if (url == NULL || nsoption_bool(external_hotlists))
+ return;
+
+ hotlist_remove_url(url);
+}
+
+
#if 0
/**
* Handle URL dropped on hotlist
diff --git a/riscos/hotlist.h b/riscos/hotlist.h
index 25e4794..4993092 100644
--- a/riscos/hotlist.h
+++ b/riscos/hotlist.h
@@ -47,6 +47,7 @@ bool ro_gui_hotlist_check_window(wimp_w window);
bool ro_gui_hotlist_check_menu(wimp_menu *menu);
void ro_gui_hotlist_add_page(nsurl *url);
void ro_gui_hotlist_add_cleanup(void);
+void ro_gui_hotlist_remove_page(nsurl *url);
#endif
diff --git a/riscos/window.c b/riscos/window.c
index a7c42ac..39ae5f6 100644
--- a/riscos/window.c
+++ b/riscos/window.c
@@ -138,6 +138,7 @@ static void ro_gui_window_action_save(struct gui_window *g,
static void ro_gui_window_action_search(struct gui_window *g);
static void ro_gui_window_action_zoom(struct gui_window *g);
static void ro_gui_window_action_add_bookmark(struct gui_window *g);
+static void ro_gui_window_action_remove_bookmark(struct gui_window *g);
static void ro_gui_window_action_print(struct gui_window *g);
static void ro_gui_window_action_page_info(struct gui_window *g);
@@ -3611,9 +3612,12 @@ void ro_gui_window_toolbar_click(void *data,
return;
- if (action_type == TOOLBAR_ACTION_URL &&
- action.url == TOOLBAR_URL_DRAG_URL) {
- if (g->bw->current_content) {
+ if (action_type == TOOLBAR_ACTION_URL) {
+ switch (action.url) {
+ case TOOLBAR_URL_DRAG_URL:
+ if (g->bw->current_content == NULL)
+ break;
+
hlcache_handle *h = g->bw->current_content;
if (ro_gui_shift_pressed())
@@ -3624,6 +3628,15 @@ void ro_gui_window_toolbar_click(void *data,
ro_gui_drag_save_link(save_type,
nsurl_access(hlcache_handle_get_url(h)),
content_get_title(h), g);
+ break;
+
+ case TOOLBAR_URL_SELECT_HOTLIST:
+ ro_gui_window_action_add_bookmark(g);
+ break;
+
+ case TOOLBAR_URL_ADJUST_HOTLIST:
+ ro_gui_window_action_remove_bookmark(g);
+ break;
}
return;
@@ -4250,7 +4263,7 @@ void ro_gui_window_action_zoom(struct gui_window *g)
* \param *g The browser window to act on.
*/
-void ro_gui_window_action_add_bookmark(struct gui_window *g)
+static void ro_gui_window_action_add_bookmark(struct gui_window *g)
{
nsurl *url;
@@ -4267,6 +4280,28 @@ void ro_gui_window_action_add_bookmark(struct gui_window *g)
/**
+ * Remove a hotlist entry for a browser window.
+ *
+ * \param *g The browser window to act on.
+ */
+
+static void ro_gui_window_action_remove_bookmark(struct gui_window *g)
+{
+ nsurl *url;
+
+ if (g == NULL || g->bw == NULL || g->toolbar == NULL ||
+ g->bw->current_content == NULL ||
+ hlcache_handle_get_url(g->bw->current_content) == NULL)
+ return;
+
+ url = hlcache_handle_get_url(g->bw->current_content);
+
+ ro_gui_hotlist_remove_page(url);
+ ro_toolbar_hotlist_modifed(g->toolbar, url);
+}
+
+
+/**
* Open a print dialogue for a browser window.
*
* \param *g The browser window to act on.
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=f825521072ed7e459e7...
commit f825521072ed7e459e7fa465cf66efd24f5feb76
Author: Steve Fryatt <stevef(a)netsurf-browser.org>
Commit: Steve Fryatt <stevef(a)netsurf-browser.org>
Fix hotlist icon in browser URL bar.
- Change URL container to Double/Click/Drag so that mouse actions get passed on.
- Correctly parse return code from hotlist_add_url() to identify successful adds.
diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c
index eede2ac..1bc4261 100644
--- a/riscos/gui/url_bar.c
+++ b/riscos/gui/url_bar.c
@@ -337,7 +337,10 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar)
if (!url_bar->hidden && url_bar->container_icon == -1) {
icon.icon.flags = wimp_ICON_BORDER |
- (wimp_COLOUR_BLACK << wimp_ICON_FG_COLOUR_SHIFT);
+ (wimp_COLOUR_BLACK <<
+ wimp_ICON_FG_COLOUR_SHIFT) |
+ (wimp_BUTTON_DOUBLE_CLICK_DRAG <<
+ wimp_ICON_BUTTON_TYPE_SHIFT);
error = xwimp_create_icon(&icon, &url_bar->container_icon);
if (error != NULL) {
LOG(("xwimp_create_icon: 0x%x: %s",
@@ -758,9 +761,8 @@ bool ro_gui_url_bar_click(struct url_bar *url_bar,
return false;
/* If we have a click over the hotlist icon, hotlist add/remove. */
- /* TODO: this doesn't work
- * neither does the TOOLBAR_URL_DRAG_FAVICON below */
- if (pointer->buttons & (wimp_CLICK_SELECT | wimp_SINGLE_SELECT) &&
+
+ if (pointer->buttons == wimp_SINGLE_SELECT &&
url_bar->text_buffer != NULL) {
if (pos.x >= url_bar->hotlist.extent.x0 &&
pos.x <= url_bar->hotlist.extent.x1 &&
@@ -771,7 +773,7 @@ bool ro_gui_url_bar_click(struct url_bar *url_bar,
if (nsurl_create((const char *)url_bar->text_buffer,
&n) == NSERROR_OK) {
if (url_bar->hotlist.add) {
- if (hotlist_add_url(n)) {
+ if (hotlist_add_url(n) == NSERROR_OK) {
redraw = true;
url_bar->hotlist.add = false;
}
diff --git a/riscos/toolbar.c b/riscos/toolbar.c
index 4da4db4..26a9bd4 100644
--- a/riscos/toolbar.c
+++ b/riscos/toolbar.c
@@ -162,7 +162,7 @@ static wimp_window ro_toolbar_window = {
wimp_WINDOW_NEVER3D | 0x16u /* RISC OS 5.03+ */,
{0, 0, TOOLBAR_DEFAULT_WIDTH, 16384},
0,
- wimp_BUTTON_CLICK_DRAG << wimp_ICON_BUTTON_TYPE_SHIFT,
+ wimp_BUTTON_DOUBLE_CLICK_DRAG << wimp_ICON_BUTTON_TYPE_SHIFT,
wimpspriteop_AREA,
1,
1,
-----------------------------------------------------------------------
--
NetSurf Browser
9 years, 8 months
netsurf: branch master updated. release/3.0-833-ge65c918
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/e65c91807e55473744591...
...commit http://git.netsurf-browser.org/netsurf.git/commit/e65c91807e554737445916c...
...tree http://git.netsurf-browser.org/netsurf.git/tree/e65c91807e554737445916cfb...
The branch, master has been updated
via e65c91807e554737445916cfb25235b5d0a10c83 (commit)
via 4bf410a5834fce29145276f101c7c1a11dde6c3c (commit)
from f31b7fa5c4c9d1c6003b42e9d848fa7df0b36abe (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/commit/?id=e65c91807e554737445...
commit e65c91807e554737445916cfb25235b5d0a10c83
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Send SC_CHANGED after writing to scrap file
diff --git a/atari/clipboard.c b/atari/clipboard.c
index bcd4ee6..254579b 100644
--- a/atari/clipboard.c
+++ b/atari/clipboard.c
@@ -28,6 +28,7 @@
#include <mint/osbind.h>
#include <cflib.h>
#include "atari/clipboard.h"
+#include "atari/gemtk/gemtk.h"
static int filesize(char * path)
@@ -49,6 +50,13 @@ static int filesize(char * path)
int scrap_txt_write(char *str)
{
scrap_wtxt(str);
+
+
+ // Send SC_CHANGED message:
+ gemtk_send_msg(SC_CHANGED, 0, 2, 0, 0, 0, 0);
+
+ return(0);
+
}
char *scrap_txt_read(void)
diff --git a/atari/gui.c b/atari/gui.c
index cf1d1b3..e52a658 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -767,8 +767,6 @@ void gui_set_clipboard(const char *buffer, size_t length,
// convert utf8 input to atari encoding:
- // TODO: send SC_CHANGED message
-
utf8_convert_ret ret;
char *clip = NULL;
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=4bf410a5834fce29145...
commit 4bf410a5834fce29145276f101c7c1a11dde6c3c
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Extended documentation
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index 3125012..fb687b8 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -114,7 +114,10 @@ static struct s_context_info * get_context_info( struct gui_window * gw, short m
}
/***
- *
+ * Generates an unique filename for temp. files
+ * The generated filename includes the path.
+ * If TMPDIR environmenrt vairable is set, this will be used as path,
+ * otherwise U:\tmp\
* \param prefix
* \param sufffix
* \return pointer to static buffer owned by get_tmpfilename()
-----------------------------------------------------------------------
Summary of changes:
atari/clipboard.c | 8 ++++++++
atari/ctxmenu.c | 5 ++++-
atari/gui.c | 2 --
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/atari/clipboard.c b/atari/clipboard.c
index bcd4ee6..254579b 100644
--- a/atari/clipboard.c
+++ b/atari/clipboard.c
@@ -28,6 +28,7 @@
#include <mint/osbind.h>
#include <cflib.h>
#include "atari/clipboard.h"
+#include "atari/gemtk/gemtk.h"
static int filesize(char * path)
@@ -49,6 +50,13 @@ static int filesize(char * path)
int scrap_txt_write(char *str)
{
scrap_wtxt(str);
+
+
+ // Send SC_CHANGED message:
+ gemtk_send_msg(SC_CHANGED, 0, 2, 0, 0, 0, 0);
+
+ return(0);
+
}
char *scrap_txt_read(void)
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index 3125012..fb687b8 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -114,7 +114,10 @@ static struct s_context_info * get_context_info( struct gui_window * gw, short m
}
/***
- *
+ * Generates an unique filename for temp. files
+ * The generated filename includes the path.
+ * If TMPDIR environmenrt vairable is set, this will be used as path,
+ * otherwise U:\tmp\
* \param prefix
* \param sufffix
* \return pointer to static buffer owned by get_tmpfilename()
diff --git a/atari/gui.c b/atari/gui.c
index cf1d1b3..e52a658 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -767,8 +767,6 @@ void gui_set_clipboard(const char *buffer, size_t length,
// convert utf8 input to atari encoding:
- // TODO: send SC_CHANGED message
-
utf8_convert_ret ret;
char *clip = NULL;
--
NetSurf Browser
9 years, 8 months
netsurf: branch master updated. release/3.0-831-gf31b7fa
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/f31b7fa5c4c9d1c6003b4...
...commit http://git.netsurf-browser.org/netsurf.git/commit/f31b7fa5c4c9d1c6003b42e...
...tree http://git.netsurf-browser.org/netsurf.git/tree/f31b7fa5c4c9d1c6003b42e9d...
The branch, master has been updated
via f31b7fa5c4c9d1c6003b42e9d848fa7df0b36abe (commit)
from ccde3fc1eb3a0258eb26e79a879c286a023711bc (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/commit/?id=f31b7fa5c4c9d1c6003...
commit f31b7fa5c4c9d1c6003b42e9d848fa7df0b36abe
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Minor documentation change
diff --git a/atari/findfile.c b/atari/findfile.c
index 61dc3a2..7badc71 100755
--- a/atari/findfile.c
+++ b/atari/findfile.c
@@ -124,14 +124,14 @@ char *url_to_path(const char *url)
/**
* Locate a shared resource file by searching known places in order.
+ * Search order is: ./, NETSURF_GEM_RESPATH, ./$HOME/.netsurf/, $NETSURFRES/
+ * (where NETSURFRES is an environment variable)
*
* \param buf buffer to write to. must be at least PATH_MAX chars
* \param filename file to look for
* \param def default to return if file not found
* \return buf
*
- * Search order is: ./, NETSURF_GEM_RESPATH, ./$HOME/.netsurf/, $NETSURFRES/ (where NETSURFRES is an
- * environment variable),
*/
#ifndef NETSURF_GEM_RESPATH
#define NETSURF_GEM_RESPATH "./res/"
-----------------------------------------------------------------------
Summary of changes:
atari/findfile.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/atari/findfile.c b/atari/findfile.c
index 61dc3a2..7badc71 100755
--- a/atari/findfile.c
+++ b/atari/findfile.c
@@ -124,14 +124,14 @@ char *url_to_path(const char *url)
/**
* Locate a shared resource file by searching known places in order.
+ * Search order is: ./, NETSURF_GEM_RESPATH, ./$HOME/.netsurf/, $NETSURFRES/
+ * (where NETSURFRES is an environment variable)
*
* \param buf buffer to write to. must be at least PATH_MAX chars
* \param filename file to look for
* \param def default to return if file not found
* \return buf
*
- * Search order is: ./, NETSURF_GEM_RESPATH, ./$HOME/.netsurf/, $NETSURFRES/ (where NETSURFRES is an
- * environment variable),
*/
#ifndef NETSURF_GEM_RESPATH
#define NETSURF_GEM_RESPATH "./res/"
--
NetSurf Browser
9 years, 8 months
netsurf: branch master updated. release/3.0-830-gccde3fc
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/ccde3fc1eb3a0258eb26e...
...commit http://git.netsurf-browser.org/netsurf.git/commit/ccde3fc1eb3a0258eb26e79...
...tree http://git.netsurf-browser.org/netsurf.git/tree/ccde3fc1eb3a0258eb26e79a8...
The branch, master has been updated
via ccde3fc1eb3a0258eb26e79a879c286a023711bc (commit)
from e154748542e42d0f3add5812791219ee174f117c (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/commit/?id=ccde3fc1eb3a0258eb2...
commit ccde3fc1eb3a0258eb26e79a879c286a023711bc
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Do not reload browser window on scal change
diff --git a/atari/gui.c b/atari/gui.c
index ace0f98..cf1d1b3 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -359,8 +359,7 @@ void gui_window_set_scale(struct gui_window *gw, float scale)
gw->scale = MAX(scale, 0.25);
- browser_window_reload(gw->browser->bw, false);
- gui_window_get_dimensions(gw, &width, &heigth, true);
+ gui_window_get_dimensions(gw, &width, &heigth, true);
browser_window_reformat(gw->browser->bw, false, width, heigth);
}
@@ -768,6 +767,8 @@ void gui_set_clipboard(const char *buffer, size_t length,
// convert utf8 input to atari encoding:
+ // TODO: send SC_CHANGED message
+
utf8_convert_ret ret;
char *clip = NULL;
-----------------------------------------------------------------------
Summary of changes:
atari/gui.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/atari/gui.c b/atari/gui.c
index ace0f98..cf1d1b3 100644
--- a/atari/gui.c
+++ b/atari/gui.c
@@ -359,8 +359,7 @@ void gui_window_set_scale(struct gui_window *gw, float scale)
gw->scale = MAX(scale, 0.25);
- browser_window_reload(gw->browser->bw, false);
- gui_window_get_dimensions(gw, &width, &heigth, true);
+ gui_window_get_dimensions(gw, &width, &heigth, true);
browser_window_reformat(gw->browser->bw, false, width, heigth);
}
@@ -768,6 +767,8 @@ void gui_set_clipboard(const char *buffer, size_t length,
// convert utf8 input to atari encoding:
+ // TODO: send SC_CHANGED message
+
utf8_convert_ret ret;
char *clip = NULL;
--
NetSurf Browser
9 years, 8 months
netsurf: branch master updated. release/3.0-829-ge154748
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/e154748542e42d0f3add5...
...commit http://git.netsurf-browser.org/netsurf.git/commit/e154748542e42d0f3add581...
...tree http://git.netsurf-browser.org/netsurf.git/tree/e154748542e42d0f3add58127...
The branch, master has been updated
via e154748542e42d0f3add5812791219ee174f117c (commit)
from d451b543c6a0ea7face2d5344de870d88ee0807a (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/commit/?id=e154748542e42d0f3ad...
commit e154748542e42d0f3add5812791219ee174f117c
Author: Ole Loots <ole(a)monochrom.net>
Commit: Ole Loots <ole(a)monochrom.net>
Do not use tmpnam() but a custom function.
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index 2170dec..3125012 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -23,7 +23,10 @@
#include <string.h>
#include <stdbool.h>
#include <assert.h>
-#include <mint/osbind.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <mint/osbind.h>
+#include <cflib.h>
#include "desktop/gui.h"
#include "desktop/netsurf.h"
@@ -36,7 +39,8 @@
#include "content/urldb.h"
#include "css/css.h"
#include "utils/log.h"
-#include "utils/messages.h"
+#include "utils/messages.h"
+#include "utils/utils.h"
#include "atari/gui.h"
#include "atari/rootwin.h"
@@ -107,6 +111,39 @@ static struct s_context_info * get_context_info( struct gui_window * gw, short m
return(&ctxinfo);
+}
+
+/***
+ *
+ * \param prefix
+ * \param sufffix
+ * \return pointer to static buffer owned by get_tmpfilename()
+ */
+static char * get_tmpfilename(const char * prefix, const char * suffix)
+{
+ int i=0;
+ static char tmpfilename[PATH_MAX];
+ char * tmpdir;
+ const char * tmp_path_suffix = "";
+
+ // TODO: make function public?
+ tmpdir = getenv("TMPDIR");
+ if(tmpdir == NULL){
+ tmpdir = (char*)"u:\\tmp\\";
+ }
+
+ if(tmpdir[strlen(tmpdir)-1] != '\\'){
+ tmp_path_suffix = "\\";
+ }
+
+ do{
+ /* generate a new filename: */
+ snprintf(tmpfilename, PATH_MAX, "%s%s%s%d%s", tmpdir,
+ tmp_path_suffix, prefix, i++, suffix);
+ /* check with cflib: */
+ } while(file_exists(tmpfilename));
+
+ return(tmpfilename);
}
//TODO: do not open popup for gui_window, but for a rootwin?
@@ -273,9 +310,11 @@ void context_popup(struct gui_window * gw, short x, short y)
editor = nsoption_charp(atari_editor);
if (editor != NULL && strlen(editor)>0) {
data = content_get_source_data(gw->browser->bw->current_content,
- &size);
+ &size);
if (size > 0 && data != NULL){
- snprintf(tempfile, 127, "%s%s.htm", "u:", tmpnam(NULL));
+ snprintf(tempfile, 127, "%s", get_tmpfilename("ns-", ".html"));
+ /* the GEMDOS cmdline contains the length of the commandline
+ in the first byte: */
cmdline[0] = (unsigned char)strlen(tempfile);
LOG(("Creating temporay source file: %s\n", tempfile));
fp_tmpfile = fopen(tempfile, "w");
@@ -283,6 +322,10 @@ void context_popup(struct gui_window * gw, short x, short y)
fwrite(data, size, 1, fp_tmpfile);
fclose(fp_tmpfile);
+ // Send SH_WDRAW to notify files changed:
+ gemtk_send_msg(SH_WDRAW, 0, -1, 0, 0, 0, 0);
+
+ // start application:
if(strlen(tempfile)<=125){
shel_write(1, 1, 1, editor, cmdline);
}
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index 44baba4..f16b4a7 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -60,6 +60,10 @@ void gemtk_clip_grect(VdiHdl vh, GRECT *rect);
void gemtk_wind_get_str(short aes_handle, short mode, char *str, int len);
+/* send application message */
+void gemtk_send_msg(short msg_type, short data2, short data3, short data4,
+ short data5, short data6, short data7);
+
#ifndef POINT_WITHIN
# define POINT_WITHIN(_x,_y, r) ((_x >= r.g_x) && (_x <= r.g_x + r.g_w ) \
diff --git a/atari/gemtk/utils.c b/atari/gemtk/utils.c
index 20fe5d4..aac293d 100644
--- a/atari/gemtk/utils.c
+++ b/atari/gemtk/utils.c
@@ -95,10 +95,38 @@ void gemtk_clip_grect(VdiHdl vh, GRECT *rect)
vs_clip_pxy(vh, pxy);
}
+/** Send an Message to a GUIWIN using AES message pipe
+* \param win the GUIWIN which shall receive the message
+* \param msg_type the WM_ message definition
+* \param a the 4th parameter to appl_write
+* \param b the 5th parameter to appl_write
+* \param c the 6th parameter to appl_write
+* \param d the 7th parameter to appl_write
+*/
+void gemtk_send_msg(short msg_type, short data2, short data3, short data4,
+ short data5, short data6, short data7)
+{
+ short msg[8];
+
+ msg[0] = msg_type;
+ msg[1] = gl_apid;
+ msg[2] = data2;
+ msg[3] = data3;
+ msg[4] = data4;
+ msg[5] = data5;
+ msg[6] = data6;
+ msg[7] = data7;
+
+ appl_write(gl_apid, 16, &msg);
+}
+
+
void gemtk_wind_get_str(short aes_handle, short mode, char *str, int len)
{
char tmp_str[255];
+ // TODO: remove or implement function
+
if(len>255) {
len = 255;
}
-----------------------------------------------------------------------
Summary of changes:
atari/ctxmenu.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++----
atari/gemtk/gemtk.h | 4 ++++
atari/gemtk/utils.c | 28 ++++++++++++++++++++++++++++
3 files changed, 79 insertions(+), 4 deletions(-)
diff --git a/atari/ctxmenu.c b/atari/ctxmenu.c
index 2170dec..3125012 100644
--- a/atari/ctxmenu.c
+++ b/atari/ctxmenu.c
@@ -23,7 +23,10 @@
#include <string.h>
#include <stdbool.h>
#include <assert.h>
-#include <mint/osbind.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <mint/osbind.h>
+#include <cflib.h>
#include "desktop/gui.h"
#include "desktop/netsurf.h"
@@ -36,7 +39,8 @@
#include "content/urldb.h"
#include "css/css.h"
#include "utils/log.h"
-#include "utils/messages.h"
+#include "utils/messages.h"
+#include "utils/utils.h"
#include "atari/gui.h"
#include "atari/rootwin.h"
@@ -107,6 +111,39 @@ static struct s_context_info * get_context_info( struct gui_window * gw, short m
return(&ctxinfo);
+}
+
+/***
+ *
+ * \param prefix
+ * \param sufffix
+ * \return pointer to static buffer owned by get_tmpfilename()
+ */
+static char * get_tmpfilename(const char * prefix, const char * suffix)
+{
+ int i=0;
+ static char tmpfilename[PATH_MAX];
+ char * tmpdir;
+ const char * tmp_path_suffix = "";
+
+ // TODO: make function public?
+ tmpdir = getenv("TMPDIR");
+ if(tmpdir == NULL){
+ tmpdir = (char*)"u:\\tmp\\";
+ }
+
+ if(tmpdir[strlen(tmpdir)-1] != '\\'){
+ tmp_path_suffix = "\\";
+ }
+
+ do{
+ /* generate a new filename: */
+ snprintf(tmpfilename, PATH_MAX, "%s%s%s%d%s", tmpdir,
+ tmp_path_suffix, prefix, i++, suffix);
+ /* check with cflib: */
+ } while(file_exists(tmpfilename));
+
+ return(tmpfilename);
}
//TODO: do not open popup for gui_window, but for a rootwin?
@@ -273,9 +310,11 @@ void context_popup(struct gui_window * gw, short x, short y)
editor = nsoption_charp(atari_editor);
if (editor != NULL && strlen(editor)>0) {
data = content_get_source_data(gw->browser->bw->current_content,
- &size);
+ &size);
if (size > 0 && data != NULL){
- snprintf(tempfile, 127, "%s%s.htm", "u:", tmpnam(NULL));
+ snprintf(tempfile, 127, "%s", get_tmpfilename("ns-", ".html"));
+ /* the GEMDOS cmdline contains the length of the commandline
+ in the first byte: */
cmdline[0] = (unsigned char)strlen(tempfile);
LOG(("Creating temporay source file: %s\n", tempfile));
fp_tmpfile = fopen(tempfile, "w");
@@ -283,6 +322,10 @@ void context_popup(struct gui_window * gw, short x, short y)
fwrite(data, size, 1, fp_tmpfile);
fclose(fp_tmpfile);
+ // Send SH_WDRAW to notify files changed:
+ gemtk_send_msg(SH_WDRAW, 0, -1, 0, 0, 0, 0);
+
+ // start application:
if(strlen(tempfile)<=125){
shel_write(1, 1, 1, editor, cmdline);
}
diff --git a/atari/gemtk/gemtk.h b/atari/gemtk/gemtk.h
index 44baba4..f16b4a7 100644
--- a/atari/gemtk/gemtk.h
+++ b/atari/gemtk/gemtk.h
@@ -60,6 +60,10 @@ void gemtk_clip_grect(VdiHdl vh, GRECT *rect);
void gemtk_wind_get_str(short aes_handle, short mode, char *str, int len);
+/* send application message */
+void gemtk_send_msg(short msg_type, short data2, short data3, short data4,
+ short data5, short data6, short data7);
+
#ifndef POINT_WITHIN
# define POINT_WITHIN(_x,_y, r) ((_x >= r.g_x) && (_x <= r.g_x + r.g_w ) \
diff --git a/atari/gemtk/utils.c b/atari/gemtk/utils.c
index 20fe5d4..aac293d 100644
--- a/atari/gemtk/utils.c
+++ b/atari/gemtk/utils.c
@@ -95,10 +95,38 @@ void gemtk_clip_grect(VdiHdl vh, GRECT *rect)
vs_clip_pxy(vh, pxy);
}
+/** Send an Message to a GUIWIN using AES message pipe
+* \param win the GUIWIN which shall receive the message
+* \param msg_type the WM_ message definition
+* \param a the 4th parameter to appl_write
+* \param b the 5th parameter to appl_write
+* \param c the 6th parameter to appl_write
+* \param d the 7th parameter to appl_write
+*/
+void gemtk_send_msg(short msg_type, short data2, short data3, short data4,
+ short data5, short data6, short data7)
+{
+ short msg[8];
+
+ msg[0] = msg_type;
+ msg[1] = gl_apid;
+ msg[2] = data2;
+ msg[3] = data3;
+ msg[4] = data4;
+ msg[5] = data5;
+ msg[6] = data6;
+ msg[7] = data7;
+
+ appl_write(gl_apid, 16, &msg);
+}
+
+
void gemtk_wind_get_str(short aes_handle, short mode, char *str, int len)
{
char tmp_str[255];
+ // TODO: remove or implement function
+
if(len>255) {
len = 255;
}
--
NetSurf Browser
9 years, 8 months