mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 19:23:13 +02:00
api: add function completion_set
This commit is contained in:
@@ -1561,6 +1561,23 @@ gui_completion_get_string (struct t_gui_completion *completion,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets a completion property.
|
||||
*/
|
||||
|
||||
void
|
||||
gui_completion_set (struct t_gui_completion *completion,
|
||||
const char *property, const char *value)
|
||||
{
|
||||
if (!completion || !property || !value)
|
||||
return;
|
||||
|
||||
if (strcmp (property, "add_space") == 0)
|
||||
{
|
||||
completion->add_space = (strcmp (value, "1") == 0) ? 1 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns hdata for completion.
|
||||
*/
|
||||
|
||||
@@ -94,6 +94,8 @@ extern int gui_completion_search (struct t_gui_completion *completion,
|
||||
int direction);
|
||||
extern const char *gui_completion_get_string (struct t_gui_completion *completion,
|
||||
const char *property);
|
||||
extern void gui_completion_set (struct t_gui_completion *completion,
|
||||
const char *property, const char *value);
|
||||
extern struct t_hdata *gui_completion_hdata_completion_cb (const void *pointer,
|
||||
void *data,
|
||||
const char *hdata_name);
|
||||
|
||||
Reference in New Issue
Block a user