diff options
author | Vincent Sanders <vince@kyllikki.org> | 2016-04-26 15:16:33 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2016-04-26 15:16:33 +0100 |
commit | 8fd04922cc25bfd2205881fc5d4220c84b2c6fe0 (patch) | |
tree | 807795da126c6d1a7617007016c8cd05ba90e4a3 /riscos/gui | |
parent | 6a36d4ec2b6fd8ac52da2c3883b4776aec14ba2d (diff) | |
download | netsurf-8fd04922cc25bfd2205881fc5d4220c84b2c6fe0.tar.gz netsurf-8fd04922cc25bfd2205881fc5d4220c84b2c6fe0.tar.bz2 |
update RISC OS frontend to not use the depricated warn_user API
Diffstat (limited to 'riscos/gui')
-rw-r--r-- | riscos/gui/button_bar.c | 12 | ||||
-rw-r--r-- | riscos/gui/throbber.c | 7 | ||||
-rw-r--r-- | riscos/gui/url_bar.c | 30 |
3 files changed, 25 insertions, 24 deletions
diff --git a/riscos/gui/button_bar.c b/riscos/gui/button_bar.c index e04bfc270..6f8920cfc 100644 --- a/riscos/gui/button_bar.c +++ b/riscos/gui/button_bar.c @@ -540,7 +540,7 @@ bool ro_gui_button_bar_icon_update(struct button_bar *button_bar) error = xwimp_create_icon(&icon, &button->icon); if (error) { LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); button->icon = -1; return false; } @@ -550,7 +550,7 @@ bool ro_gui_button_bar_icon_update(struct button_bar *button_bar) button->icon); if (error != NULL) { LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -600,7 +600,7 @@ bool ro_gui_button_bar_icon_resize(struct button_bar *button_bar) button->y_size); if (error != NULL) { LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); button->icon = -1; return false; } @@ -872,7 +872,7 @@ void ro_gui_button_bar_drag_end(wimp_dragged *drag, void *data) error = xwimp_get_pointer_info(&pointer); if (error) { LOG("xwimp_get_pointer_info: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return; } @@ -882,7 +882,7 @@ void ro_gui_button_bar_drag_end(wimp_dragged *drag, void *data) error = xwimp_get_window_state(&state); if (error) { LOG("xwimp_get_window_state: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return; } @@ -1070,7 +1070,7 @@ char *ro_gui_button_bar_get_config(struct button_bar *button_bar) config = malloc(size); if (config == NULL) { LOG("No memory for malloc()"); - warn_user("NoMemory", 0); + ro_warn_user("NoMemory", 0); return NULL; } diff --git a/riscos/gui/throbber.c b/riscos/gui/throbber.c index 2eabb3e7e..437c4faba 100644 --- a/riscos/gui/throbber.c +++ b/riscos/gui/throbber.c @@ -35,6 +35,7 @@ #include "riscos/wimp.h" #include "utils/log.h" #include "utils/utils.h" +#include "riscos/gui.h" #define THROBBER_SPRITE_NAME_LENGTH 12 #define THROBBER_ANIMATE_INTERVAL 10 @@ -247,7 +248,7 @@ bool ro_gui_throbber_icon_update(struct throbber *throbber) error = xwimp_create_icon(&icon, &throbber->icon); if (error != NULL) { LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); throbber->icon = -1; return false; } @@ -258,7 +259,7 @@ bool ro_gui_throbber_icon_update(struct throbber *throbber) error = xwimp_delete_icon(throbber->window, throbber->icon); if (error != NULL) { LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -294,7 +295,7 @@ bool ro_gui_throbber_icon_resize(struct throbber *throbber) throbber->extent.x1, throbber->extent.y1); if (error != NULL) { LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); throbber->icon = -1; return false; } diff --git a/riscos/gui/url_bar.c b/riscos/gui/url_bar.c index adaa8c03c..053014784 100644 --- a/riscos/gui/url_bar.c +++ b/riscos/gui/url_bar.c @@ -235,7 +235,7 @@ static bool ro_gui_url_bar_icon_resize(struct url_bar *url_bar, bool full) x0, y0, x1, y1); if (error != NULL) { LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); url_bar->container_icon = -1; return false; } @@ -255,7 +255,7 @@ static bool ro_gui_url_bar_icon_resize(struct url_bar *url_bar, bool full) x0, y0, x1, y1); if (error != NULL) { LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); url_bar->suggest_icon = -1; return false; } @@ -276,7 +276,7 @@ static bool ro_gui_url_bar_icon_resize(struct url_bar *url_bar, bool full) x0, y0, x1, y1); if (error != NULL) { LOG("xwimp_resize_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); url_bar->text_icon = -1; return false; } @@ -357,7 +357,7 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) error = xwimp_create_icon(&icon, &url_bar->container_icon); if (error != NULL) { LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); url_bar->container_icon = -1; return false; } @@ -368,7 +368,7 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) url_bar->container_icon); if (error != NULL) { LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -394,7 +394,7 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) error = xwimp_create_icon(&icon, &url_bar->text_icon); if (error) { LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); url_bar->text_icon = -1; return false; } @@ -405,7 +405,7 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) url_bar->text_icon); if (error != NULL) { LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -425,7 +425,7 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) error = xwimp_create_icon(&icon, &url_bar->suggest_icon); if (error) { LOG("xwimp_create_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -445,7 +445,7 @@ static bool ro_gui_url_bar_icon_update(struct url_bar *url_bar) url_bar->suggest_icon); if (error != NULL) { LOG("xwimp_delete_icon: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -856,7 +856,7 @@ bool ro_gui_url_bar_menu_select(struct url_bar *url_bar, wimp_i i, error = nsurl_create(urltxt, &url); if (error != NSERROR_OK) { - warn_user(messages_get_errorcode(error), 0); + ro_warn_user(messages_get_errorcode(error), 0); } else { ro_gui_window_set_url(g, url); @@ -935,7 +935,7 @@ bool ro_gui_url_bar_take_caret(struct url_bar *url_bar) -1, -1, -1, 0); if (error) { LOG("xwimp_set_caret_position: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } @@ -986,7 +986,7 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url, if (strlen(local_url) >= url_bar->text_size) { url_bar->text_buffer[0] = '\0'; - warn_user("LongURL", NULL); + ro_warn_user("LongURL", NULL); LOG("Long URL (%zu chars): %s", strlen(url), url); } else { strncpy(url_bar->text_buffer, local_url, @@ -1016,7 +1016,7 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url, error = xwimp_get_caret_position(&caret); if (error) { LOG("xwimp_get_caret_position: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return; } @@ -1029,7 +1029,7 @@ void ro_gui_url_bar_set_url(struct url_bar *url_bar, const char *url, url_bar->text_icon, 0, 0, -1, strlen(set_url)); if (error) { LOG("xwimp_set_caret_position: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); } } } @@ -1118,7 +1118,7 @@ bool ro_gui_url_bar_get_url_extent(struct url_bar *url_bar, os_box *extent) error = xwimp_get_icon_state(&state); if (error) { LOG("xwimp_get_icon_state: 0x%x: %s", error->errnum, error->errmess); - warn_user("WimpError", error->errmess); + ro_warn_user("WimpError", error->errmess); return false; } |