Gitweb links:

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

The branch, master has been updated
       via  2fa06ed503fa18239b8d7a32c88ac24b8b8c0121 (commit)
       via  56a9a25192c31fde2bb3bbb7906f0220285227ab (commit)
       via  a970572fc9696b6615ee85165de71aa020a6358b (commit)
      from  8ca778197c80725429d98548f429835f2656f2dd (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=2fa06ed503fa18239b8d7a32c88ac24b8b8c0121
commit 2fa06ed503fa18239b8d7a32c88ac24b8b8c0121
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    windows: Use nserror reporting rather than always NoMemory
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 572e412..f4c1ac3 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1265,6 +1265,7 @@ nsws_window_command(HWND hwnd,
        case IDC_MAIN_LAUNCH_URL:
        {
                nsurl *url;
+               nserror err;
 
                if (GetFocus() != gw->urlbar)
                        break;
@@ -1274,8 +1275,10 @@ nsws_window_command(HWND hwnd,
                SendMessage(gw->urlbar, WM_GETTEXT, (WPARAM)(len + 1), 
(LPARAM)addr);
                NSLOG(netsurf, INFO, "launching %s\n", addr);
 
-               if (nsurl_create(addr, &url) != NSERROR_OK) {
-                       win32_warning("NoMemory", 0);
+               err = nsurl_create(addr, &url);
+
+               if (err != NSERROR_OK) {
+                       win32_report_nserror(err, 0);
                } else {
                        browser_window_navigate(gw->bw,
                                                url,


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=56a9a25192c31fde2bb3bbb7906f0220285227ab
commit 56a9a25192c31fde2bb3bbb7906f0220285227ab
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    Windows: Add nserror reporting function
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index fdfafcf..9a2c13b 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -182,3 +182,17 @@ nserror win32_warning(const char *warning, const char 
*detail)
 }
 
 
+/* exported function documented in windows/gui.h */
+nserror
+win32_report_nserror(nserror error, const char *detail)
+{
+       size_t len = 1 +
+               strlen(messages_get_errorcode(error)) +
+               ((detail != 0) ? strlen(detail) : 0);
+       char message[len];
+       snprintf(message, len, messages_get_errorcode(error), detail);
+       MessageBox(NULL, message, "Warning", MB_ICONWARNING);
+
+       return NSERROR_OK;
+}
+
diff --git a/frontends/windows/gui.h b/frontends/windows/gui.h
index 0633c93..957280a 100644
--- a/frontends/windows/gui.h
+++ b/frontends/windows/gui.h
@@ -68,6 +68,16 @@ void win32_set_quit(bool q);
 nserror win32_warning(const char *warning, const char *detail);
 
 /**
+ * Warn the user of an unexpected nserror.
+ *
+ * \param[in] error The nserror to report
+ * \param[in] detail Additional text to be displayed or NULL.
+ * \return NSERROR_OK on success or error code if there was a
+ *           faliure displaying the message to the user.
+ */
+nserror win32_report_nserror(nserror error, const char *detail);
+
+/**
  * add a modeless dialog to the special handling list
  */
 nserror nsw32_add_dialog(HWND hwndDlg);


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=a970572fc9696b6615ee85165de71aa020a6358b
commit a970572fc9696b6615ee85165de71aa020a6358b
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    Add BadURL message
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/resources/FatMessages b/resources/FatMessages
index 5197ffb..5b8a996 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -468,6 +468,7 @@ it.all.DirectoryError:La directory '%s' è già esistente
 nl.all.DirectoryError:map '%s' bestaat reeds
 en.all.Timeout:This site took too long to respond
 it.all.Timeout:Questo sito sta impiegando troppo a rispondere
+en.all.BadURL:The given URL was not able to be parsed
 
 # error messages for RISC OS
 #


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

Summary of changes:
 frontends/windows/gui.c    |   14 ++++++++++++++
 frontends/windows/gui.h    |   10 ++++++++++
 frontends/windows/window.c |    7 +++++--
 resources/FatMessages      |    1 +
 4 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/frontends/windows/gui.c b/frontends/windows/gui.c
index fdfafcf..9a2c13b 100644
--- a/frontends/windows/gui.c
+++ b/frontends/windows/gui.c
@@ -182,3 +182,17 @@ nserror win32_warning(const char *warning, const char 
*detail)
 }
 
 
+/* exported function documented in windows/gui.h */
+nserror
+win32_report_nserror(nserror error, const char *detail)
+{
+       size_t len = 1 +
+               strlen(messages_get_errorcode(error)) +
+               ((detail != 0) ? strlen(detail) : 0);
+       char message[len];
+       snprintf(message, len, messages_get_errorcode(error), detail);
+       MessageBox(NULL, message, "Warning", MB_ICONWARNING);
+
+       return NSERROR_OK;
+}
+
diff --git a/frontends/windows/gui.h b/frontends/windows/gui.h
index 0633c93..957280a 100644
--- a/frontends/windows/gui.h
+++ b/frontends/windows/gui.h
@@ -68,6 +68,16 @@ void win32_set_quit(bool q);
 nserror win32_warning(const char *warning, const char *detail);
 
 /**
+ * Warn the user of an unexpected nserror.
+ *
+ * \param[in] error The nserror to report
+ * \param[in] detail Additional text to be displayed or NULL.
+ * \return NSERROR_OK on success or error code if there was a
+ *           faliure displaying the message to the user.
+ */
+nserror win32_report_nserror(nserror error, const char *detail);
+
+/**
  * add a modeless dialog to the special handling list
  */
 nserror nsw32_add_dialog(HWND hwndDlg);
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index 572e412..f4c1ac3 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -1265,6 +1265,7 @@ nsws_window_command(HWND hwnd,
        case IDC_MAIN_LAUNCH_URL:
        {
                nsurl *url;
+               nserror err;
 
                if (GetFocus() != gw->urlbar)
                        break;
@@ -1274,8 +1275,10 @@ nsws_window_command(HWND hwnd,
                SendMessage(gw->urlbar, WM_GETTEXT, (WPARAM)(len + 1), 
(LPARAM)addr);
                NSLOG(netsurf, INFO, "launching %s\n", addr);
 
-               if (nsurl_create(addr, &url) != NSERROR_OK) {
-                       win32_warning("NoMemory", 0);
+               err = nsurl_create(addr, &url);
+
+               if (err != NSERROR_OK) {
+                       win32_report_nserror(err, 0);
                } else {
                        browser_window_navigate(gw->bw,
                                                url,
diff --git a/resources/FatMessages b/resources/FatMessages
index 5197ffb..5b8a996 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -468,6 +468,7 @@ it.all.DirectoryError:La directory '%s' è già esistente
 nl.all.DirectoryError:map '%s' bestaat reeds
 en.all.Timeout:This site took too long to respond
 it.all.Timeout:Questo sito sta impiegando troppo a rispondere
+en.all.BadURL:The given URL was not able to be parsed
 
 # error messages for RISC OS
 #


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to