From 3a80153e17507d1693fb59e9e07269ac7cc26f9a Mon Sep 17 00:00:00 2001 From: Scoopta Date: Fri, 31 Jan 2020 13:25:04 -0800 Subject: [PATCH] Added wofi_insert_widgets() This allows modes to ask for wofi to query them for new entries --- inc/wofi_api.h | 2 ++ src/wofi.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/inc/wofi_api.h b/inc/wofi_api.h index bc2f30c..f0ec82e 100644 --- a/inc/wofi_api.h +++ b/inc/wofi_api.h @@ -42,6 +42,8 @@ struct wl_list* wofi_read_cache(struct mode* mode); struct widget* wofi_create_widget(struct mode* mode, char** text, char* search_text, char** actions, size_t action_count); +void wofi_insert_widgets(struct mode* mode); + bool wofi_allow_images(void); bool wofi_allow_markup(void); diff --git a/src/wofi.c b/src/wofi.c index aa06c60..576f7a5 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -626,6 +626,10 @@ struct widget* wofi_create_widget(struct mode* mode, char** text, char* search_t return widget; } +void wofi_insert_widgets(struct mode* mode) { + gdk_threads_add_idle(_insert_widget, mode); +} + bool wofi_allow_images(void) { return allow_images; }