mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 23:06:38 +02:00
Add 256 colors support
Changes: - new section "palette" in weechat.conf - new API functions: list_search_pos and list_casesearch_pos
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
|
||||
#include "weechat.h"
|
||||
#include "wee-config.h"
|
||||
#include "wee-hashtable.h"
|
||||
#include "wee-hook.h"
|
||||
#include "wee-list.h"
|
||||
#include "wee-proxy.h"
|
||||
@@ -705,6 +706,24 @@ completion_list_add_plugins_commands_cb (void *data,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_list_add_color_alias_cb: add color alias in completion
|
||||
*/
|
||||
|
||||
void
|
||||
completion_list_add_color_alias_cb (void *data,
|
||||
struct t_hashtable *hashtable,
|
||||
const void *key, const void *value)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) hashtable;
|
||||
(void) value;
|
||||
|
||||
gui_completion_list_add ((struct t_gui_completion *)data,
|
||||
(char *)key,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
|
||||
/*
|
||||
* completion_list_add_config_option_values_cb: add option value to completion
|
||||
* list
|
||||
@@ -888,6 +907,12 @@ completion_list_add_config_option_values_cb (void *data,
|
||||
color_name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
if (gui_color_hash_palette_alias)
|
||||
{
|
||||
hashtable_map (gui_color_hash_palette_alias,
|
||||
&completion_list_add_color_alias_cb,
|
||||
completion);
|
||||
}
|
||||
gui_completion_list_add (completion, "++1",
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
gui_completion_list_add (completion, "--1",
|
||||
|
||||
Reference in New Issue
Block a user