Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/cf798ba79ae2b518a8775707ac9ccf90709ce949
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/cf798ba79ae2b518a8775707ac9ccf90709ce949
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/cf798ba79ae2b518a8775707ac9ccf90709ce949

The branch, master has been updated
       via  cf798ba79ae2b518a8775707ac9ccf90709ce949 (commit)
      from  ac8458e3f208cb0da63c7b9a07f3998fb49b3add (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=cf798ba79ae2b518a8775707ac9ccf90709ce949
commit cf798ba79ae2b518a8775707ac9ccf90709ce949
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>

    RISC OS: Be less intrusive with URL bar max URL length handling.

diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index 6e76490..15aab3e 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -1190,28 +1190,24 @@ ro_gui_url_bar_set_url(struct url_bar *url_bar,
                local_url = url;
        }
 
-       /* Copy the text into the icon buffer. If the text is too long, blank
-        * the buffer and warn the user.
+       /* Copy the text into the icon buffer. If the text is too long, truncate
+        * for URL bar and log the full URL.
         */
        if (strlen(local_url) >= url_bar->text.size) {
-               url_bar->text.buffer[0] = '\0';
-               ro_warn_user("LongURL", NULL);
-               NSLOG(netsurf, INFO,
-                     "Long URL (%zu chars): %s",
+               NSLOG(netsurf, WARNING,
+                     "URL too long to show in URL bar (%zu chars): %s",
                      strlen(url), url);
-       } else {
-               strncpy(url_bar->text.buffer,
-                       local_url,
-                       url_bar->text.size - 1);
-               url_bar->text.buffer[url_bar->text.size - 1] = '\0';
        }
 
+       strncpy(url_bar->text.buffer, local_url, url_bar->text.size - 1);
+       url_bar->text.buffer[url_bar->text.size - 1] = '\0';
+
        if (local_text != NULL) {
                free(local_text);
        }
 
        /* Set the hotlist flag. */
-       if (nsurl_create(url_bar->text.buffer, &n) == NSERROR_OK) {
+       if (nsurl_create(url, &n) == NSERROR_OK) {
                ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
                nsurl_unref(n);
        }


-----------------------------------------------------------------------

Summary of changes:
 frontends/riscos/gui/url_bar.c |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/frontends/riscos/gui/url_bar.c b/frontends/riscos/gui/url_bar.c
index 6e76490..15aab3e 100644
--- a/frontends/riscos/gui/url_bar.c
+++ b/frontends/riscos/gui/url_bar.c
@@ -1190,28 +1190,24 @@ ro_gui_url_bar_set_url(struct url_bar *url_bar,
                local_url = url;
        }
 
-       /* Copy the text into the icon buffer. If the text is too long, blank
-        * the buffer and warn the user.
+       /* Copy the text into the icon buffer. If the text is too long, truncate
+        * for URL bar and log the full URL.
         */
        if (strlen(local_url) >= url_bar->text.size) {
-               url_bar->text.buffer[0] = '\0';
-               ro_warn_user("LongURL", NULL);
-               NSLOG(netsurf, INFO,
-                     "Long URL (%zu chars): %s",
+               NSLOG(netsurf, WARNING,
+                     "URL too long to show in URL bar (%zu chars): %s",
                      strlen(url), url);
-       } else {
-               strncpy(url_bar->text.buffer,
-                       local_url,
-                       url_bar->text.size - 1);
-               url_bar->text.buffer[url_bar->text.size - 1] = '\0';
        }
 
+       strncpy(url_bar->text.buffer, local_url, url_bar->text.size - 1);
+       url_bar->text.buffer[url_bar->text.size - 1] = '\0';
+
        if (local_text != NULL) {
                free(local_text);
        }
 
        /* Set the hotlist flag. */
-       if (nsurl_create(url_bar->text.buffer, &n) == NSERROR_OK) {
+       if (nsurl_create(url, &n) == NSERROR_OK) {
                ro_gui_url_bar_set_hotlist(url_bar, ro_gui_hotlist_has_page(n));
                nsurl_unref(n);
        }


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to