aspell: rename option aspell.look.color to aspell.color.misspelled, add option aspell.color.suggestions

v2.8-utf8proc
Sebastien Helleu 2013-07-20 19:27:51 +02:00
parent 87e342dd9e
commit f7f019887d
23 changed files with 187 additions and 63 deletions

View File

@ -41,6 +41,8 @@ Version 0.4.2 (under dev!)
"layout_window"
* core: fix line alignment when option weechat.look.buffer_time_format is set
to empty string
* aspell: rename option aspell.look.color to aspell.color.misspelled, add option
aspell.color.suggestions
* aspell: add support of enchant library (patch #6858)
* irc: fix self nick color in server messages after nick is changed with /nick
(bug #39415)

9
NEWS
View File

@ -1,7 +1,7 @@
WeeChat Release Notes
=====================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-dev, 2013-05-20
v0.4.2-dev, 2013-07-20
This document lists important changes for each version, that require manual
@ -13,6 +13,13 @@ http://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
(file 'ChangeLog' in sources).
Version 0.4.2 (under dev!)
--------------------------
=== Aspell colors ===
Option 'aspell.look.color' has been renamed to 'aspell.color.misspelled'.
Version 0.4.1 (2013-05-20)
--------------------------

View File

@ -33,8 +33,13 @@
** Typ: integer
** Werte: 0 .. 2147483647 (Standardwert: `2`)
* [[option_aspell.look.color]] *aspell.look.color*
** Beschreibung: `Farbe in der ein Wort mit einem Rechtschreibfehler hervorgehoben werden soll`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled*
** Beschreibung: `text color for misspelled words (input bar)`
** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `lightred`)
* [[option_aspell.color.suggestions]] *aspell.color.suggestions*
** Beschreibung: `text color for suggestions on a misspelled word (status bar)`
** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `default`)

View File

@ -33,8 +33,13 @@
** type: integer
** values: 0 .. 2147483647 (default value: `2`)
* [[option_aspell.look.color]] *aspell.look.color*
** description: `color used for misspelled words`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled*
** description: `text color for misspelled words (input bar)`
** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `lightred`)
* [[option_aspell.color.suggestions]] *aspell.color.suggestions*
** description: `text color for suggestions on a misspelled word (status bar)`
** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `default`)

View File

@ -33,8 +33,13 @@
** type: entier
** valeurs: 0 .. 2147483647 (valeur par défaut: `2`)
* [[option_aspell.look.color]] *aspell.look.color*
** description: `couleur utilisée pour les mots mal orthographiés`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled*
** description: `couleur du texte pour les mots mal orthographiés (barre de saisie)`
** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `lightred`)
* [[option_aspell.color.suggestions]] *aspell.color.suggestions*
** description: `couleur du texte pour les suggestions sur un mot mal orthographié (barre de statut)`
** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `default`)

View File

@ -33,8 +33,13 @@
** tipo: intero
** valori: 0 .. 2147483647 (valore predefinito: `2`)
* [[option_aspell.look.color]] *aspell.look.color*
** descrizione: `colore usato per le parole non corrette`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled*
** descrizione: `text color for misspelled words (input bar)`
** tipo: colore
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `lightred`)
* [[option_aspell.color.suggestions]] *aspell.color.suggestions*
** descrizione: `text color for suggestions on a misspelled word (status bar)`
** tipo: colore
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `default`)

View File

@ -33,8 +33,13 @@
** タイプ: 整数
** 値: 0 .. 2147483647 (デフォルト値: `2`)
* [[option_aspell.look.color]] *aspell.look.color*
** 説明: `スペルミスのある単語に付ける色`
* [[option_aspell.color.misspelled]] *aspell.color.misspelled*
** 説明: `text color for misspelled words (input bar)`
** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、ターミナル色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、下線は "_"。 (デフォルト値: `lightred`)
* [[option_aspell.color.suggestions]] *aspell.color.suggestions*
** 説明: `text color for suggestions on a misspelled word (status bar)`
** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、ターミナル色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、下線は "_"。 (デフォルト値: `default`)

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3954,9 +3954,14 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: chyba vytváření aspell volby \"%s\" => \"%s\""
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "barva použitá pro slova s chybou"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "barva textu pro čas (stavový řádek)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@ -4424,10 +4424,15 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: Fehler beim Erstellen der Aspell-Option \"%s\" => \"%s\""
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr ""
"Farbe in der ein Wort mit einem Rechtschreibfehler hervorgehoben werden soll"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "Textfarbe für die Uhrzeit (Statusbar)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4160,9 +4160,14 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: error al crear la opción de aspell \"%s\" => \"%s\""
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "color a usar para palabras mal escritas"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "color para el texto de la hora (en la barra de estado)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"PO-Revision-Date: 2013-07-20 11:57+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-20 17:56+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -4304,8 +4304,13 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: erreur en création de l'option aspell \"%s\" => \"%s\""
msgid "color used for misspelled words"
msgstr "couleur utilisée pour les mots mal orthographiés"
msgid "text color for misspelled words (input bar)"
msgstr "couleur du texte pour les mots mal orthographiés (barre de saisie)"
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr ""
"couleur du texte pour les suggestions sur un mot mal orthographié (barre de "
"statut)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3569,8 +3569,13 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s nincs elég memória az információs pult üzenethez\n"
msgid "color used for misspelled words"
msgstr ""
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "státuszsor színe"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "státuszsor színe"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4224,9 +4224,14 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: errore nella creazione dell'opzione aspell \"%s\" => \"%s\""
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "colore usato per le parole non corrette"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "colore del testo per l'ora (barra di stato)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@ -4143,9 +4143,14 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: aspell オプション \"%s\" => \"%s\" の作成中にエラー"
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "スペルミスのある単語に付ける色"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "時間のテキスト色 (ステータスバー)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4234,9 +4234,14 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: błąd podczas tworzenia opcji aspell \"%s\" => \"%s\""
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "kolor używany dla błędnie zapisanych słów"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "kolor czasu (pasek statusu)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:51+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4006,9 +4006,14 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s%s: erro ao criar opção para aspell \"%s\" => \"%s\""
msgid "color used for misspelled words"
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "cor usada em palavras erradas"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "cor de texto para o tempo (barra de status)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "
"checking is disabled for all other commands)"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:52+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3601,8 +3601,13 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr "%s недостаточно памяти для сообщения в строке информации\n"
msgid "color used for misspelled words"
msgstr ""
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "цвет строки состояния"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "цвет строки состояния"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-07-18 19:52+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3172,8 +3172,13 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr ""
msgid "color used for misspelled words"
msgstr ""
#, fuzzy
msgid "text color for misspelled words (input bar)"
msgstr "zaman için metin rengi (durum çubuğu)"
#, fuzzy
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr "zaman için metin rengi (durum çubuğu)"
msgid ""
"comma separated list of commands for which spell checking is enabled (spell "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-07-20 11:55+0200\n"
"POT-Creation-Date: 2013-07-20 17:56+0200\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3181,7 +3181,10 @@ msgstr ""
msgid "%s%s: error creating aspell option \"%s\" => \"%s\""
msgstr ""
msgid "color used for misspelled words"
msgid "text color for misspelled words (input bar)"
msgstr ""
msgid "text color for suggestions on a misspelled word (status bar)"
msgstr ""
msgid ""

View File

@ -26,6 +26,7 @@
#include "../weechat-plugin.h"
#include "weechat-aspell.h"
#include "weechat-aspell-config.h"
/*
@ -67,8 +68,9 @@ weechat_aspell_bar_item_suggest (void *data, struct t_gui_bar_item *item,
struct t_gui_window *window)
{
struct t_gui_buffer *buffer;
const char *suggestions, *pos;
char str_delim[128], *suggestions2;
const char *ptr_suggestions, *pos;
char **suggestions, *suggestions2;
int i, num_suggestions, length;
/* make C compiler happy */
(void) data;
@ -83,22 +85,45 @@ weechat_aspell_bar_item_suggest (void *data, struct t_gui_bar_item *item,
buffer = weechat_window_get_pointer (window, "buffer");
if (buffer)
{
suggestions = weechat_buffer_get_string (buffer,
"localvar_aspell_suggest");
if (suggestions)
ptr_suggestions = weechat_buffer_get_string (buffer,
"localvar_aspell_suggest");
if (ptr_suggestions)
{
pos = strchr (suggestions, ':');
pos = strchr (ptr_suggestions, ':');
if (pos)
pos++;
else
pos = suggestions;
snprintf (str_delim, sizeof (str_delim),
"%s/%s",
weechat_color ("bar_delim"),
weechat_color ("bar_fg"));
suggestions2 = weechat_string_replace (pos, "/", str_delim);
if (suggestions2)
return suggestions2;
pos = ptr_suggestions;
suggestions = weechat_string_split (pos, "/", 0, 0, &num_suggestions);
if (suggestions)
{
length = 64 + 1;
for (i = 0; i < num_suggestions; i++)
{
length += strlen (suggestions[i]) + 64;
}
suggestions2 = malloc (length);
if (suggestions2)
{
suggestions2[0] = '\0';
strcat (suggestions2,
weechat_color (weechat_config_string (weechat_aspell_config_color_suggestions)));
for (i = 0; i < num_suggestions; i++)
{
if (i > 0)
{
strcat (suggestions2, weechat_color ("bar_delim"));
strcat (suggestions2, "/");
strcat (suggestions2,
weechat_color (weechat_config_string (weechat_aspell_config_color_suggestions)));
}
strcat (suggestions2, suggestions[i]);
}
weechat_string_free_split (suggestions);
return suggestions2;
}
weechat_string_free_split (suggestions);
}
return strdup (pos);
}
}

View File

@ -35,9 +35,10 @@ struct t_config_section *weechat_aspell_config_section_dict = NULL;
int weechat_aspell_config_loading = 0;
/* aspell config, look section */
/* aspell config, color section */
struct t_config_option *weechat_aspell_config_look_color;
struct t_config_option *weechat_aspell_config_color_misspelled;
struct t_config_option *weechat_aspell_config_color_suggestions;
/* aspell config, check section */
@ -419,8 +420,8 @@ weechat_aspell_config_init ()
if (!weechat_aspell_config_file)
return 0;
/* look */
ptr_section = weechat_config_new_section (weechat_aspell_config_file, "look",
/* color */
ptr_section = weechat_config_new_section (weechat_aspell_config_file, "color",
0, 0,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
@ -431,11 +432,16 @@ weechat_aspell_config_init ()
return 0;
}
weechat_aspell_config_look_color = weechat_config_new_option (
weechat_aspell_config_color_misspelled = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"color", "color",
N_("color used for misspelled words"),
"misspelled", "color",
N_("text color for misspelled words (input bar)"),
NULL, 0, 0, "lightred", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
weechat_aspell_config_color_suggestions = weechat_config_new_option (
weechat_aspell_config_file, ptr_section,
"suggestions", "color",
N_("text color for suggestions on a misspelled word (status bar)"),
NULL, 0, 0, "default", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
/* check */
ptr_section = weechat_config_new_section (weechat_aspell_config_file, "check",

View File

@ -24,7 +24,8 @@
#define ASPELL_CONFIG_NAME "aspell"
extern struct t_config_option *weechat_aspell_config_look_color;
extern struct t_config_option *weechat_aspell_config_color_misspelled;
extern struct t_config_option *weechat_aspell_config_color_suggestions;
extern struct t_config_option *weechat_aspell_config_check_commands;
extern struct t_config_option *weechat_aspell_config_check_default_dict;

View File

@ -621,7 +621,7 @@ weechat_aspell_modifier_cb (void *data, const char *modifier,
color_normal = weechat_color ("bar_fg");
length_color_normal = strlen (color_normal);
color_error = weechat_color (weechat_config_string (weechat_aspell_config_look_color));
color_error = weechat_color (weechat_config_string (weechat_aspell_config_color_misspelled));
length_color_error = strlen (color_error);
length = strlen (string);