diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-07 07:22:31 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-03-12 20:37:40 +0100 |
commit | c71e6a50eb87bc1546b85e287fce4758f7957e30 (patch) | |
tree | 0134213f1bb1351dfb51fbb791edd9f4e7e3ffcd /src/gui | |
parent | 4ffd62b2065358ad4aad702d916b0d717453824b (diff) | |
download | weechat-c71e6a50eb87bc1546b85e287fce4758f7957e30.zip |
core: rename function gui_buffer_search_by_name to gui_buffer_search (issue #2081)
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-color.c | 3 | ||||
-rw-r--r-- | src/gui/gui-buffer.c | 8 | ||||
-rw-r--r-- | src/gui/gui-buffer.h | 3 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index 8bbcfe048..ee455ad9b 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -1297,8 +1297,7 @@ gui_color_buffer_assign () { if (!gui_color_buffer) { - gui_color_buffer = gui_buffer_search_by_name (NULL, - GUI_COLOR_BUFFER_NAME); + gui_color_buffer = gui_buffer_search (NULL, GUI_COLOR_BUFFER_NAME); if (gui_color_buffer) { gui_color_buffer->input_callback = &gui_color_buffer_input_cb; diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 8ad9949a0..bfade9dc9 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -806,7 +806,7 @@ gui_buffer_new_props_with_id (long long id, if (!name || !name[0]) return NULL; - if (gui_buffer_search_by_name (plugin_get_name (plugin), name)) + if (gui_buffer_search (plugin_get_name (plugin), name)) { gui_chat_printf (NULL, _("%sA buffer with same name (%s) already exists"), @@ -2901,11 +2901,13 @@ gui_buffer_search_by_full_name (const char *full_name) } /* - * Searches for a buffer by plugin and name. + * Searches for a buffer by plugin and name, full name or id. + * + * If plugin is "==", the name is used to search by full name. */ struct t_gui_buffer * -gui_buffer_search_by_name (const char *plugin, const char *name) +gui_buffer_search (const char *plugin, const char *name) { struct t_gui_buffer *ptr_buffer; int plugin_match, plugin_case_sensitive, name_case_sensitive; diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index b8a20e301..3f540d442 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -392,8 +392,7 @@ extern void gui_buffer_add_value_num_displayed (struct t_gui_buffer *buffer, extern int gui_buffer_is_main (const char *plugin_name, const char *name); extern struct t_gui_buffer *gui_buffer_search_main (); extern struct t_gui_buffer *gui_buffer_search_by_full_name (const char *full_name); -extern struct t_gui_buffer *gui_buffer_search_by_name (const char *plugin, - const char *name); +extern struct t_gui_buffer *gui_buffer_search (const char *plugin, const char *name); extern struct t_gui_buffer *gui_buffer_search_by_partial_name (const char *plugin, const char *name); extern struct t_gui_buffer *gui_buffer_search_by_number (int number); |