diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-04-27 22:41:59 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-04-27 22:41:59 +0100 |
commit | e44bd09ac3a28823d9947c54949d115619003fe4 (patch) | |
tree | 66e3efcd35046d44c161fddabf5f7cb880b16424 /windows/gui.c | |
parent | 68938664411ac2ee82e39e11fe855a6cd1b32c7c (diff) | |
download | netsurf-e44bd09ac3a28823d9947c54949d115619003fe4.tar.gz netsurf-e44bd09ac3a28823d9947c54949d115619003fe4.tar.bz2 |
update windows frontend to not use depricated warn_user API
Diffstat (limited to 'windows/gui.c')
-rw-r--r-- | windows/gui.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/windows/gui.c b/windows/gui.c index f9aca5a9c..9923ecfaa 100644 --- a/windows/gui.c +++ b/windows/gui.c @@ -30,6 +30,7 @@ #include "utils/corestrings.h" #include "utils/url.h" #include "utils/file.h" +#include "utils/messages.h" #include "desktop/browser.h" #include "desktop/gui_clipboard.h" @@ -90,8 +91,17 @@ void win32_run(void) } +/* exported function documented in windows/gui.h */ +nserror win32_warning(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; +} /** |