From 6a36d4ec2b6fd8ac52da2c3883b4776aec14ba2d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 26 Apr 2016 12:50:16 +0100 Subject: remove all core usage of warn_user API --- render/search.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'render/search.c') diff --git a/render/search.c b/render/search.c index b586ff55f..f5e231ab0 100644 --- a/render/search.c +++ b/render/search.c @@ -34,6 +34,7 @@ #include "content/hlcache.h" #include "desktop/selection.h" #include "desktop/gui_search.h" +#include "desktop/gui_misc.h" #include "desktop/gui_internal.h" #include "render/box.h" @@ -85,13 +86,13 @@ struct search_context * search_create_context(struct content *c, context = malloc(sizeof(struct search_context)); if (context == NULL) { - warn_user("NoMemory", 0); + guit->misc->warning("NoMemory", 0); return NULL; } search_head = malloc(sizeof(struct list_entry)); if (search_head == NULL) { - warn_user("NoMemory", 0); + guit->misc->warning("NoMemory", 0); free(context); return NULL; } @@ -282,7 +283,7 @@ static struct list_entry *add_entry(unsigned start_idx, unsigned end_idx, /* found string in box => add to list */ entry = calloc(1, sizeof(*entry)); if (!entry) { - warn_user("NoMemory", 0); + guit->misc->warning("NoMemory", 0); return NULL; } @@ -548,7 +549,7 @@ void search_step(struct search_context *context, search_flags_t flags, int i = 0; if (context == NULL) { - warn_user("SearchError", 0); + guit->misc->warning("SearchError", 0); return; } -- cgit v1.2.3