Gitweb links:

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

The branch, master has been updated
       via  67b2d3931d325bb65887daa92c030c1466d30d8f (commit)
      from  9c0fa9c9396a28adab4fd5130550e1ba5a7e472e (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=67b2d3931d325bb65887daa92c030c1466d30d8f
commit 67b2d3931d325bb65887daa92c030c1466d30d8f
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    make risc os url entry use the omi box and hence cope with bad urls 
gracefully

diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index d3bd529..5a9a721 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -64,6 +64,7 @@
 #include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/cookie_manager.h"
+#include "desktop/searchweb.h"
 
 #include "riscos/bitmap.h"
 #include "riscos/buffer.h"
@@ -990,17 +991,18 @@ ro_gui_window_toolbar_click(void *data,
  * \param g gui_window to update
  * \param url1 url to be launched
  */
-static void ro_gui_window_launch_url(struct gui_window *g, const char *url1)
+static void ro_gui_window_launch_url(struct gui_window *g, const char *url_s)
 {
        nserror error;
        nsurl *url;
 
-       if (url1 == NULL)
+       if (url_s == NULL) {
                return;
+       }
 
        ro_gui_url_complete_close();
 
-       error = nsurl_create(url1, &url);
+       error = search_web_omni(url_s, SEARCH_WEB_OMNI_NONE, &url);
        if (error != NSERROR_OK) {
                ro_warn_user(messages_get_errorcode(error), 0);
        } else {
@@ -1424,8 +1426,7 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
                if (is_toolbar) {
                        const char *toolbar_url;
                        toolbar_url = ro_toolbar_get_url(g->toolbar);
-                       if (toolbar_url != NULL)
-                               ro_gui_window_launch_url(g, toolbar_url);
+                       ro_gui_window_launch_url(g, toolbar_url);
                }
                return true;
 


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

Summary of changes:
 frontends/riscos/window.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index d3bd529..5a9a721 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -64,6 +64,7 @@
 #include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/cookie_manager.h"
+#include "desktop/searchweb.h"
 
 #include "riscos/bitmap.h"
 #include "riscos/buffer.h"
@@ -990,17 +991,18 @@ ro_gui_window_toolbar_click(void *data,
  * \param g gui_window to update
  * \param url1 url to be launched
  */
-static void ro_gui_window_launch_url(struct gui_window *g, const char *url1)
+static void ro_gui_window_launch_url(struct gui_window *g, const char *url_s)
 {
        nserror error;
        nsurl *url;
 
-       if (url1 == NULL)
+       if (url_s == NULL) {
                return;
+       }
 
        ro_gui_url_complete_close();
 
-       error = nsurl_create(url1, &url);
+       error = search_web_omni(url_s, SEARCH_WEB_OMNI_NONE, &url);
        if (error != NSERROR_OK) {
                ro_warn_user(messages_get_errorcode(error), 0);
        } else {
@@ -1424,8 +1426,7 @@ ro_gui_window_handle_local_keypress(struct gui_window *g,
                if (is_toolbar) {
                        const char *toolbar_url;
                        toolbar_url = ro_toolbar_get_url(g->toolbar);
-                       if (toolbar_url != NULL)
-                               ro_gui_window_launch_url(g, toolbar_url);
+                       ro_gui_window_launch_url(g, toolbar_url);
                }
                return true;
 


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

Reply via email to