mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
core: add completion "colors" (closes #481)
This commit is contained in:
@@ -19,6 +19,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
|
||||
=== New features
|
||||
|
||||
* core: add completion "colors" (issue #481)
|
||||
* core: start/stop search in buffer at current scroll position by default,
|
||||
add key key[ctrl-q] to stop search and reset scroll (issue #76, issue #393)
|
||||
* core: add option weechat.look.key_grab_delay to set the default delay when
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
| weechat | buffers_plugins_names | Liste der Buffer (inklusive der Erweiterungen)
|
||||
|
||||
| weechat | colors | color names
|
||||
|
||||
| weechat | commands | Befehle (WeeChat und Erweiterungen)
|
||||
|
||||
| weechat | config_files | Konfigurationsdateien
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
| weechat | buffers_plugins_names | names of buffers (including plugins names)
|
||||
|
||||
| weechat | colors | color names
|
||||
|
||||
| weechat | commands | commands (weechat and plugins)
|
||||
|
||||
| weechat | config_files | configuration files
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
| weechat | buffers_plugins_names | noms des tampons (incluant les noms d'extensions)
|
||||
|
||||
| weechat | colors | noms des couleurs
|
||||
|
||||
| weechat | commands | commandes (weechat et extensions)
|
||||
|
||||
| weechat | config_files | fichiers de configuration
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
| weechat | buffers_plugins_names | nomi dei buffer (inclusi i nomi dei plugin)
|
||||
|
||||
| weechat | colors | color names
|
||||
|
||||
| weechat | commands | comandi (weechat e plugin)
|
||||
|
||||
| weechat | config_files | file di configurazione
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
| weechat | buffers_plugins_names | バッファの名前 (プラグインの名前を含めた)
|
||||
|
||||
| weechat | colors | color names
|
||||
|
||||
| weechat | commands | コマンド (weechat とプラグイン)
|
||||
|
||||
| weechat | config_files | 設定ファイル
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
| weechat | buffers_plugins_names | nazwy buforów (włącznie z nazwami wtyczek)
|
||||
|
||||
| weechat | colors | color names
|
||||
|
||||
| weechat | commands | komendy (weechata i wtyczek)
|
||||
|
||||
| weechat | config_files | pliki konfiguracyjne
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-08-01 10:23+0200\n"
|
||||
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2642,6 +2642,10 @@ msgstr "vlastnosti, které mohou být čteny o bufferu"
|
||||
msgid "numbers of windows"
|
||||
msgstr "seznam oken"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "získat jméno barvy přezdívky"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "barvy palety"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-08-08 10:29+0200\n"
|
||||
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
|
||||
"Language-Team: German <>\n"
|
||||
@@ -3115,6 +3115,10 @@ msgstr "Eigenschaften die für den Buffer gelesen werden können"
|
||||
msgid "numbers of windows"
|
||||
msgstr "Nummern der Fenster"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "zeigt Farbnamen des Nick"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "Farbpalette"
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-07-26 09:41+0200\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2768,6 +2768,10 @@ msgstr "propiedades del buffer que pueden leerse"
|
||||
msgid "numbers of windows"
|
||||
msgstr "números de ventanas"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "obtiene el nombre del color del apodo"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "paleta de colores"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"PO-Revision-Date: 2015-08-08 10:29+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-08-11 22:24+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: fr\n"
|
||||
@@ -3040,6 +3040,9 @@ msgstr "propriétés qui peuvent être lues sur un tampon"
|
||||
msgid "numbers of windows"
|
||||
msgstr "numéros des fenêtres"
|
||||
|
||||
msgid "color names"
|
||||
msgstr "noms des couleurs"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "couleurs de la palette"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2290,6 +2290,10 @@ msgstr "puffer betöltése sikertelen"
|
||||
msgid "numbers of windows"
|
||||
msgstr "Mellőzések listája:\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "üzenetek színe"
|
||||
|
||||
#, fuzzy
|
||||
msgid "palette colors"
|
||||
msgstr "Alapértelmezett billentyűparancsok visszaállítva\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
|
||||
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2857,6 +2857,10 @@ msgstr "proprietà che possono essere lette su un buffer"
|
||||
msgid "numbers of windows"
|
||||
msgstr "numeri delle finestre"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "ottiene il nome del colore del nick"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "Tavolozza dei colori"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-08-10 09:00+0900\n"
|
||||
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
|
||||
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
|
||||
@@ -2958,6 +2958,10 @@ msgstr "バッファから読み取り可能なプロパティ"
|
||||
msgid "numbers of windows"
|
||||
msgstr "ウィンドウの数"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "ニックネームの色名を取得"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "パレットカラー"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3007,6 +3007,10 @@ msgstr "właściwości, jakie mogą być przeczytane w buforze"
|
||||
msgid "numbers of windows"
|
||||
msgstr "liczba okien"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "pobiera nazwę koloru nicka"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "paleta kolorów"
|
||||
|
||||
|
||||
+5
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
|
||||
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2823,6 +2823,10 @@ msgstr "propriedades que podem ser lidas em um buffer"
|
||||
msgid "numbers of windows"
|
||||
msgstr "número de janelas"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "obter nome da cor do apelido"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr "cores da palheta"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
|
||||
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2313,6 +2313,10 @@ msgstr "загрузка буфера не удалась"
|
||||
msgid "numbers of windows"
|
||||
msgstr "Список игнорирования:\n"
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "цвет чата"
|
||||
|
||||
#, fuzzy
|
||||
msgid "palette colors"
|
||||
msgstr "Комбинации клавиш по умолчанию восстановлены\n"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2015-03-10 21:33+0100\n"
|
||||
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2075,6 +2075,10 @@ msgstr ""
|
||||
msgid "numbers of windows"
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy
|
||||
msgid "color names"
|
||||
msgstr "rumuz renk ismi al"
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+4
-1
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2015-08-08 10:28+0200\n"
|
||||
"POT-Creation-Date: 2015-08-11 22:24+0200\n"
|
||||
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
|
||||
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2073,6 +2073,9 @@ msgstr ""
|
||||
msgid "numbers of windows"
|
||||
msgstr ""
|
||||
|
||||
msgid "color names"
|
||||
msgstr ""
|
||||
|
||||
msgid "palette colors"
|
||||
msgstr ""
|
||||
|
||||
|
||||
+63
-35
@@ -288,6 +288,62 @@ completion_list_add_windows_numbers_cb (void *data,
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds colors to completion list.
|
||||
*/
|
||||
|
||||
int
|
||||
completion_list_add_colors_cb (void *data,
|
||||
const char *completion_item,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
char str_number[64];
|
||||
const char *color_name;
|
||||
int i, num_colors;
|
||||
struct t_gui_color_palette *color_palette;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
(void) completion_item;
|
||||
(void) buffer;
|
||||
|
||||
num_colors = gui_color_get_weechat_colors_number ();
|
||||
for (i = 0; i < num_colors; i++)
|
||||
{
|
||||
color_name = gui_color_get_name (i);
|
||||
if (color_name)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
color_name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
num_colors = gui_color_get_term_colors ();
|
||||
for (i = 0; i <= num_colors; i++)
|
||||
{
|
||||
color_palette = gui_color_palette_get (i);
|
||||
if (color_palette)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
color_palette->alias,
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (str_number,
|
||||
sizeof (str_number),
|
||||
"%d",
|
||||
i);
|
||||
gui_completion_list_add (completion,
|
||||
str_number,
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
}
|
||||
}
|
||||
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a palette color to completion list.
|
||||
*/
|
||||
@@ -901,13 +957,12 @@ completion_list_add_config_option_values_cb (void *data,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
char *pos_space, *option_full_name, *pos_section, *pos_option;
|
||||
char *file, *section, *value_string, str_number[64];
|
||||
char *file, *section, *value_string;
|
||||
const char *color_name;
|
||||
int length, i, num_colors;
|
||||
int length, i;
|
||||
struct t_config_file *ptr_config;
|
||||
struct t_config_section *ptr_section, *section_found;
|
||||
struct t_config_option *option_found;
|
||||
struct t_gui_color_palette *color_palette;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -1066,38 +1121,8 @@ completion_list_add_config_option_values_cb (void *data,
|
||||
}
|
||||
break;
|
||||
case CONFIG_OPTION_TYPE_COLOR:
|
||||
num_colors = gui_color_get_weechat_colors_number ();
|
||||
for (i = 0; i < num_colors; i++)
|
||||
{
|
||||
color_name = gui_color_get_name (i);
|
||||
if (color_name)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
color_name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
}
|
||||
num_colors = gui_color_get_term_colors ();
|
||||
for (i = 0; i <= num_colors; i++)
|
||||
{
|
||||
color_palette = gui_color_palette_get (i);
|
||||
if (color_palette)
|
||||
{
|
||||
gui_completion_list_add (completion,
|
||||
color_palette->alias,
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf (str_number,
|
||||
sizeof (str_number),
|
||||
"%d",
|
||||
i);
|
||||
gui_completion_list_add (completion,
|
||||
str_number,
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
}
|
||||
}
|
||||
completion_list_add_colors_cb (
|
||||
data, completion_item, buffer, completion);
|
||||
gui_completion_list_add (completion, "++1",
|
||||
0, WEECHAT_LIST_POS_END);
|
||||
gui_completion_list_add (completion, "--1",
|
||||
@@ -1565,6 +1590,9 @@ completion_init ()
|
||||
hook_completion (NULL, "windows_numbers",
|
||||
N_("numbers of windows"),
|
||||
&completion_list_add_windows_numbers_cb, NULL);
|
||||
hook_completion (NULL, "colors",
|
||||
N_("color names"),
|
||||
&completion_list_add_colors_cb, NULL);
|
||||
hook_completion (NULL, "palette_colors",
|
||||
N_("palette colors"),
|
||||
&completion_list_add_palette_colors_cb, NULL);
|
||||
|
||||
Reference in New Issue
Block a user