summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-10-29 00:17:11 +0000
committerVincent Sanders <vince@kyllikki.org>2014-10-29 00:18:12 +0000
commit7ace528729c37d665e269c8a76991739c9437088 (patch)
treec6e6d60655da38fecd8f9bd74980b01f402715e8 /windows
parent4b941297aaa8de2b092b6b799fcfc91d6e0e4782 (diff)
downloadnetsurf-7ace528729c37d665e269c8a76991739c9437088.tar.gz
netsurf-7ace528729c37d665e269c8a76991739c9437088.tar.bz2
Update url setting API to return nserror code instead of calling warn_user
Diffstat (limited to 'windows')
-rw-r--r--windows/gui.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/windows/gui.c b/windows/gui.c
index 3804b18b1..cc0c05699 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -760,6 +760,8 @@ nsws_window_command(HWND hwnd,
int identifier,
HWND ctrl_window)
{
+ nserror ret;
+
LOG(("notification_code %x identifier %x ctrl_window %p",
notification_code, identifier, ctrl_window));
@@ -781,11 +783,14 @@ nsws_window_command(HWND hwnd,
break;
case IDM_FILE_OPEN_WINDOW:
- browser_window_create(BW_CREATE_NONE,
+ ret = browser_window_create(BW_CREATE_NONE,
NULL,
NULL,
gw->bw,
NULL);
+ if (ret != NSERROR_OK) {
+ warn_user(messages_get_errorcode(ret), 0);
+ }
break;
case IDM_FILE_CLOSE_WINDOW:
@@ -1657,11 +1662,11 @@ struct nsws_pointers *nsws_get_pointers(void)
return &nsws_pointer;
}
-static void gui_window_set_url(struct gui_window *w, const char *url)
+static nserror gui_window_set_url(struct gui_window *w, const char *url)
{
- if (w == NULL)
- return;
SendMessage(w->urlbar, WM_SETTEXT, 0, (LPARAM) url);
+
+ return NSERROR_OK;
}