summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-config.c8
-rw-r--r--src/core/wee-config.h1
-rw-r--r--src/core/wee-list.c4
-rw-r--r--src/core/wee-list.h4
4 files changed, 15 insertions, 2 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index b5fd829e4..536a59424 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -144,6 +144,7 @@ struct t_config_option *config_color_nicklist_separator;
/* config, completion section */
+struct t_config_option *config_completion_default_template;
struct t_config_option *config_completion_nick_completor;
struct t_config_option *config_completion_nick_first_only;
struct t_config_option *config_completion_nick_ignore_chars;
@@ -1597,6 +1598,13 @@ config_weechat_init_options ()
return 0;
}
+ config_completion_default_template = config_file_new_option (
+ weechat_config_file, ptr_section,
+ "default_template", "string",
+ N_("default completion template (please see documentation for template "
+ "codes and values)"),
+ NULL, 0, 0, "%n|%(irc_channels)", NULL, 0,
+ NULL, NULL, NULL, NULL, NULL, NULL);
config_completion_nick_completor = config_file_new_option (
weechat_config_file, ptr_section,
"nick_completor", "string",
diff --git a/src/core/wee-config.h b/src/core/wee-config.h
index bcefc2143..8739b0fa7 100644
--- a/src/core/wee-config.h
+++ b/src/core/wee-config.h
@@ -146,6 +146,7 @@ extern struct t_config_option *config_color_nicklist_prefix5;
extern struct t_config_option *config_color_nicklist_more;
extern struct t_config_option *config_color_nicklist_separator;
+extern struct t_config_option *config_completion_default_template;
extern struct t_config_option *config_completion_nick_completor;
extern struct t_config_option *config_completion_nick_first_only;
extern struct t_config_option *config_completion_nick_ignore_chars;
diff --git a/src/core/wee-list.c b/src/core/wee-list.c
index 13429cc53..428a5cd20 100644
--- a/src/core/wee-list.c
+++ b/src/core/wee-list.c
@@ -139,7 +139,8 @@ weelist_insert (struct t_weelist *weelist, struct t_weelist_item *item,
*/
struct t_weelist_item *
-weelist_add (struct t_weelist *weelist, const char *data, const char *where)
+weelist_add (struct t_weelist *weelist, const char *data, const char *where,
+ void *user_data)
{
struct t_weelist_item *new_item;
@@ -150,6 +151,7 @@ weelist_add (struct t_weelist *weelist, const char *data, const char *where)
if (new_item)
{
new_item->data = strdup (data);
+ new_item->user_data = user_data;
weelist_insert (weelist, new_item, where);
weelist->size++;
}
diff --git a/src/core/wee-list.h b/src/core/wee-list.h
index 5aa0ff8d2..0cfd18a28 100644
--- a/src/core/wee-list.h
+++ b/src/core/wee-list.h
@@ -23,6 +23,7 @@
struct t_weelist_item
{
char *data; /* item data */
+ void *user_data; /* pointer to user data */
struct t_weelist_item *prev_item; /* link to previous item */
struct t_weelist_item *next_item; /* link to next item */
};
@@ -36,7 +37,8 @@ struct t_weelist
extern struct t_weelist *weelist_new ();
extern struct t_weelist_item *weelist_add (struct t_weelist *weelist,
- const char *data, const char *where);
+ const char *data, const char *where,
+ void *user_data);
extern struct t_weelist_item *weelist_search (struct t_weelist *weelist,
const char *data);
extern struct t_weelist_item *weelist_casesearch (struct t_weelist *weelist,