core: add new option weechat.look.color_basic_force_bold, off by default: bold is used only if terminal has less than 16 colors (patch #7621)

This commit is contained in:
Sebastien Helleu 2011-09-24 11:28:33 +02:00
parent 7998e60498
commit fb5d40951c
19 changed files with 147 additions and 32 deletions

View File

@ -1,12 +1,14 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.6-dev, 2011-09-23
v0.3.6-dev, 2011-09-24
Version 0.3.6 (under dev!)
--------------------------
* core: add new option weechat.look.color_basic_force_bold, off by default: bold
is used only if terminal has less than 16 colors (patch #7621)
* core: add default key "meta2-[E" (F5) for linux console
* core: fix display of paste multi-line prompt with a root input bar
(bug #34305)

View File

@ -368,6 +368,11 @@
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"%H:%M:%S"`)
* *weechat.look.color_basic_force_bold*
** Beschreibung: `force "bold" attribute for light colors and "darkgray" in basic colors; off by default: "bold" is used only if terminal has less than 16 colors`
** Typ: boolesch
** Werte: on, off (Standardwert: `off`)
* *weechat.look.color_inactive_buffer*
** Beschreibung: `use a different color for lines in inactive buffer (when line is from a merged buffer not selected)`
** Typ: boolesch

View File

@ -368,6 +368,11 @@
** type: string
** values: any string (default value: `"%H:%M:%S"`)
* *weechat.look.color_basic_force_bold*
** description: `force "bold" attribute for light colors and "darkgray" in basic colors; off by default: "bold" is used only if terminal has less than 16 colors`
** type: boolean
** values: on, off (default value: `off`)
* *weechat.look.color_inactive_buffer*
** description: `use a different color for lines in inactive buffer (when line is from a merged buffer not selected)`
** type: boolean

View File

@ -368,6 +368,11 @@
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"%H:%M:%S"`)
* *weechat.look.color_basic_force_bold*
** description: `forcer l'attribut "bold" (gras) pour les couleurs claires et "darkgray" dans les couleurs de base; désactivé par défaut: le "bold" est utilisé seulement si le terminal a moins de 16 couleurs`
** type: booléen
** valeurs: on, off (valeur par défaut: `off`)
* *weechat.look.color_inactive_buffer*
** description: `utiliser une couleur différente pour les lignes dans un tampon inactif (si la ligne est d'un tampon mélangé et le tampon n'est pas sélectionné)`
** type: booléen

View File

@ -368,6 +368,11 @@
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"%H:%M:%S"`)
* *weechat.look.color_basic_force_bold*
** descrizione: `force "bold" attribute for light colors and "darkgray" in basic colors; off by default: "bold" is used only if terminal has less than 16 colors`
** tipo: bool
** valori: on, off (valore predefinito: `off`)
* *weechat.look.color_inactive_buffer*
** descrizione: `use a different color for lines in inactive buffer (when line is from a merged buffer not selected)`
** tipo: bool

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2235,6 +2235,11 @@ msgstr ""
"specifikaci data/času), barvy jsou povoleny ve formátu \"${barva}\", "
"například francouzský čas: \"${lightblue}%H${white}%M${lightred}%S\""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
#, fuzzy
msgid ""
"use a different color for lines in inactive window (when window is not "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-08-15 10:10+0100\n"
"Last-Translator: Nils Görs\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2413,6 +2413,11 @@ msgstr ""
"\"${Farbe}\" ist es möglich eine Farbauswahl zu treffen, zum Beispiel eine "
"französische Uhr: \"${lightblue}%H${white}%M${lightred}%S\""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
#, fuzzy
msgid ""
"use a different color for lines in inactive window (when window is not "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2262,6 +2262,11 @@ msgstr ""
"\"${color}\", ejemplo hora francesa: \"${lightblue}%H${white}%M${lightred}%S"
"\""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
#, fuzzy
msgid ""
"use a different color for lines in inactive window (when window is not "

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"PO-Revision-Date: 2011-09-22 18:22+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-09-24 11:19+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -2358,6 +2358,14 @@ msgstr ""
"format \"${couleur}\", par exemple l'heure française: \"${lightblue}%H"
"${white}%M${lightred}%S\""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
"forcer l'attribut \"bold\" (gras) pour les couleurs claires et \"darkgray\" "
"dans les couleurs de base; désactivé par défaut: le \"bold\" est utilisé "
"seulement si le terminal a moins de 16 couleurs"
msgid ""
"use a different color for lines in inactive window (when window is not "
"current window)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1926,6 +1926,11 @@ msgid ""
"french time: \"${lightblue}%H${white}%M${lightred}%S\""
msgstr "új nap kezdetével megjelenő időbélyeg"
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
msgid ""
"use a different color for lines in inactive window (when window is not "
"current window)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-09-02 14:16+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2347,6 +2347,11 @@ msgstr ""
"formato \"${colore}\", nell'orario italiano ad esempio: \"${lightblue}%H"
"${white}%M{lightred}%S\""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
#, fuzzy
msgid ""
"use a different color for lines in inactive window (when window is not "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-07-05 15:38+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2262,6 +2262,11 @@ msgstr ""
"specyfikatorów daty/czasu), kolory są dozwolone poprzez \"${color}\", na "
"przykład francuski czas: \"${lightblue}%H${white}%M${lightred}%S\""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
#, fuzzy
msgid ""
"use a different color for lines in inactive window (when window is not "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2258,6 +2258,11 @@ msgstr ""
"o formato de tempo para cada linha mostrada nos buffers (veja man strftime "
"paraespecificadores de data/horário"
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
msgid ""
"use a different color for lines in inactive window (when window is not "
"current window)"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1935,6 +1935,11 @@ msgid ""
"french time: \"${lightblue}%H${white}%M${lightred}%S\""
msgstr "отображение маркера даты при смене дня"
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
msgid ""
"use a different color for lines in inactive window (when window is not "
"current window)"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-09-22 22:56+0200\n"
"POT-Creation-Date: 2011-09-24 11:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1690,6 +1690,11 @@ msgid ""
"french time: \"${lightblue}%H${white}%M${lightred}%S\""
msgstr ""
msgid ""
"force \"bold\" attribute for light colors and \"darkgray\" in basic colors; "
"off by default: \"bold\" is used only if terminal has less than 16 colors"
msgstr ""
msgid ""
"use a different color for lines in inactive window (when window is not "
"current window)"

View File

@ -85,6 +85,7 @@ struct t_config_option *config_look_bar_more_up;
struct t_config_option *config_look_bar_more_down;
struct t_config_option *config_look_buffer_notify_default;
struct t_config_option *config_look_buffer_time_format;
struct t_config_option *config_look_color_basic_force_bold;
struct t_config_option *config_look_color_inactive_window;
struct t_config_option *config_look_color_inactive_buffer;
struct t_config_option *config_look_color_inactive_time;
@ -1653,6 +1654,13 @@ config_weechat_init_options ()
"\"${color}\", for example french time: "
"\"${lightblue}%H${white}%M${lightred}%S\""),
NULL, 0, 0, "%H:%M:%S", NULL, 0, NULL, NULL, &config_change_buffer_time_format, NULL, NULL, NULL);
config_look_color_basic_force_bold = config_file_new_option (
weechat_config_file, ptr_section,
"color_basic_force_bold", "boolean",
N_("force \"bold\" attribute for light colors and \"darkgray\" in "
"basic colors; off by default: \"bold\" is used only if terminal "
"has less than 16 colors"),
NULL, 0, 0, "off", NULL, 0, NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_look_color_inactive_window = config_file_new_option (
weechat_config_file, ptr_section,
"color_inactive_window", "boolean",

View File

@ -112,6 +112,7 @@ extern struct t_config_option *config_look_buffer_notify_default;
extern struct t_config_option *config_look_buffer_time_format;
extern struct t_config_option *config_look_command_chars;
extern struct t_config_option *config_look_confirm_quit;
extern struct t_config_option *config_look_color_basic_force_bold;
extern struct t_config_option *config_look_color_inactive_window;
extern struct t_config_option *config_look_color_inactive_buffer;
extern struct t_config_option *config_look_color_inactive_time;

View File

@ -47,26 +47,47 @@
#define GUI_COLOR_TIMER_TERM_COLORS 10
struct t_gui_color gui_weechat_colors[GUI_CURSES_NUM_WEECHAT_COLORS + 1] =
{ { -1, -1, 0, "default" },
{ COLOR_BLACK, COLOR_BLACK, 0, "black" },
{ COLOR_BLACK, COLOR_BLACK + 8, A_BOLD, "darkgray" },
{ COLOR_RED, COLOR_RED, 0, "red" },
{ COLOR_RED, COLOR_RED + 8, A_BOLD, "lightred" },
{ COLOR_GREEN, COLOR_GREEN, 0, "green" },
{ COLOR_GREEN, COLOR_GREEN + 8, A_BOLD, "lightgreen" },
{ COLOR_YELLOW, COLOR_YELLOW, 0, "brown" },
{ COLOR_YELLOW, COLOR_YELLOW + 8, A_BOLD, "yellow" },
{ COLOR_BLUE, COLOR_BLUE, 0, "blue" },
{ COLOR_BLUE, COLOR_BLUE + 8, A_BOLD, "lightblue" },
{ COLOR_MAGENTA, COLOR_MAGENTA, 0, "magenta" },
{ COLOR_MAGENTA, COLOR_MAGENTA + 8, A_BOLD, "lightmagenta" },
{ COLOR_CYAN, COLOR_CYAN, 0, "cyan" },
{ COLOR_CYAN, COLOR_CYAN + 8, A_BOLD, "lightcyan" },
{ COLOR_WHITE, COLOR_WHITE, 0, "gray" },
{ COLOR_WHITE, COLOR_WHITE + 8, A_BOLD, "white" },
{ 0, 0, 0, NULL }
struct t_gui_color gui_weechat_colors_bold[GUI_CURSES_NUM_WEECHAT_COLORS + 1] =
{ { -1, -1, 0, "default" },
{ COLOR_BLACK, COLOR_BLACK, 0, "black" },
{ COLOR_BLACK, COLOR_BLACK + 8, A_BOLD, "darkgray" },
{ COLOR_RED, COLOR_RED, 0, "red" },
{ COLOR_RED, COLOR_RED + 8, A_BOLD, "lightred" },
{ COLOR_GREEN, COLOR_GREEN, 0, "green" },
{ COLOR_GREEN, COLOR_GREEN + 8, A_BOLD, "lightgreen" },
{ COLOR_YELLOW, COLOR_YELLOW, 0, "brown" },
{ COLOR_YELLOW, COLOR_YELLOW + 8, A_BOLD, "yellow" },
{ COLOR_BLUE, COLOR_BLUE, 0, "blue" },
{ COLOR_BLUE, COLOR_BLUE + 8, A_BOLD, "lightblue" },
{ COLOR_MAGENTA, COLOR_MAGENTA, 0, "magenta" },
{ COLOR_MAGENTA, COLOR_MAGENTA + 8, A_BOLD, "lightmagenta" },
{ COLOR_CYAN, COLOR_CYAN, 0, "cyan" },
{ COLOR_CYAN, COLOR_CYAN + 8, A_BOLD, "lightcyan" },
{ COLOR_WHITE, COLOR_WHITE, 0, "gray" },
{ COLOR_WHITE, COLOR_WHITE + 8, A_BOLD, "white" },
{ 0, 0, 0, NULL }
};
struct t_gui_color gui_weechat_colors_no_bold[GUI_CURSES_NUM_WEECHAT_COLORS + 1] =
{ { -1, -1, 0, "default" },
{ COLOR_BLACK, COLOR_BLACK, 0, "black" },
{ COLOR_BLACK + 8, COLOR_BLACK + 8, 0, "darkgray" },
{ COLOR_RED, COLOR_RED, 0, "red" },
{ COLOR_RED + 8, COLOR_RED + 8, 0, "lightred" },
{ COLOR_GREEN, COLOR_GREEN, 0, "green" },
{ COLOR_GREEN + 8, COLOR_GREEN + 8, 0, "lightgreen" },
{ COLOR_YELLOW, COLOR_YELLOW, 0, "brown" },
{ COLOR_YELLOW + 8, COLOR_YELLOW + 8, 0, "yellow" },
{ COLOR_BLUE, COLOR_BLUE, 0, "blue" },
{ COLOR_BLUE + 8, COLOR_BLUE + 8, 0, "lightblue" },
{ COLOR_MAGENTA, COLOR_MAGENTA, 0, "magenta" },
{ COLOR_MAGENTA + 8, COLOR_MAGENTA + 8, 0, "lightmagenta" },
{ COLOR_CYAN, COLOR_CYAN, 0, "cyan" },
{ COLOR_CYAN + 8, COLOR_CYAN + 8, 0, "lightcyan" },
{ COLOR_WHITE, COLOR_WHITE, 0, "gray" },
{ COLOR_WHITE + 8, COLOR_WHITE + 8, 0, "white" },
{ 0, 0, 0, NULL }
};
struct t_gui_color *gui_weechat_colors = gui_weechat_colors_bold;
/* terminal colors */
int gui_color_term_has_colors = 0; /* terminal supports colors? */
@ -1356,6 +1377,16 @@ gui_color_palette_free (struct t_gui_color_palette *color_palette)
void
gui_color_init_weechat ()
{
if (CONFIG_BOOLEAN(config_look_color_basic_force_bold)
|| (gui_color_term_colors < 16))
{
gui_weechat_colors = gui_weechat_colors_bold;
}
else
{
gui_weechat_colors = gui_weechat_colors_no_bold;
}
gui_color_build (GUI_COLOR_SEPARATOR, CONFIG_COLOR(config_color_separator), CONFIG_COLOR(config_color_chat_bg));
gui_color_build (GUI_COLOR_CHAT, CONFIG_COLOR(config_color_chat), CONFIG_COLOR(config_color_chat_bg));

View File

@ -58,7 +58,7 @@ struct t_gui_bar_window_curses_objects
};
extern int gui_term_cols, gui_term_lines;
extern struct t_gui_color gui_weechat_colors[];
extern struct t_gui_color *gui_weechat_colors;
extern int gui_color_term_colors;
extern int gui_color_num_pairs;
extern int gui_color_pairs_auto_reset;