summaryrefslogtreecommitdiff
path: root/windows/main.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-27 22:41:59 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-27 22:41:59 +0100
commite44bd09ac3a28823d9947c54949d115619003fe4 (patch)
tree66e3efcd35046d44c161fddabf5f7cb880b16424 /windows/main.c
parent68938664411ac2ee82e39e11fe855a6cd1b32c7c (diff)
downloadnetsurf-e44bd09ac3a28823d9947c54949d115619003fe4.tar.gz
netsurf-e44bd09ac3a28823d9947c54949d115619003fe4.tar.bz2
update windows frontend to not use depricated warn_user API
Diffstat (limited to 'windows/main.c')
-rw-r--r--windows/main.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/windows/main.c b/windows/main.c
index 869907d11..df64e487d 100644
--- a/windows/main.c
+++ b/windows/main.c
@@ -65,25 +65,6 @@ static void die(const char *error)
}
-/**
- * Warn the user of an event.
- *
- * \param[in] message A warning looked up in the message translation table
- * \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.
- */
-static nserror win32_warn_user(const char *warning, const char *detail)
-{
- size_t len = 1 + ((warning != NULL) ? strlen(messages_get(warning)) :
- 0) + ((detail != 0) ? strlen(detail) : 0);
- char message[len];
- snprintf(message, len, messages_get(warning), detail);
- MessageBox(NULL, message, "Warning", MB_ICONWARNING);
-
- return NSERROR_OK;
-}
-
static nsurl *gui_get_resource_url(const char *path)
{
char buf[PATH_MAX];
@@ -155,7 +136,7 @@ static nserror set_defaults(struct nsoption_s *defaults)
static struct gui_misc_table win32_misc_table = {
.schedule = win32_schedule,
- .warning = win32_warn_user,
+ .warning = win32_warning,
};
@@ -277,7 +258,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
}
if (ret != NSERROR_OK) {
- win32_warn_user(messages_get_errorcode(ret), 0);
+ win32_warning(messages_get_errorcode(ret), 0);
} else {
win32_run();
}