diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | po/cs.po | 7 | ||||
-rw-r--r-- | po/de.po | 7 | ||||
-rw-r--r-- | po/es.po | 7 | ||||
-rw-r--r-- | po/fr.po | 12 | ||||
-rw-r--r-- | po/hu.po | 7 | ||||
-rw-r--r-- | po/it.po | 7 | ||||
-rw-r--r-- | po/pl.po | 7 | ||||
-rw-r--r-- | po/pt_BR.po | 7 | ||||
-rw-r--r-- | po/ru.po | 7 | ||||
-rw-r--r-- | po/weechat.pot | 7 | ||||
-rw-r--r-- | src/core/wee-config.c | 8 | ||||
-rw-r--r-- | src/core/wee-config.h | 1 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-color.c | 69 | ||||
-rw-r--r-- | src/gui/curses/gui-curses.h | 2 |
19 files changed, 147 insertions, 32 deletions
@@ -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) diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index e5068edda..58dbfe33a 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 8a2ca6ca0..b1dab6735 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index c115acad1..03937b185 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 21b716177..9c76d6dfc 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -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 @@ -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 " @@ -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 " @@ -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 " @@ -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" @@ -2359,6 +2359,14 @@ msgstr "" "${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)" msgstr "" @@ -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" @@ -1927,6 +1927,11 @@ msgid "" 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)" msgstr "" @@ -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 " @@ -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 " diff --git a/po/pt_BR.po b/po/pt_BR.po index 684af52b8..24c5967e4 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -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" @@ -2259,6 +2259,11 @@ msgstr "" "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)" msgstr "" @@ -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" @@ -1936,6 +1936,11 @@ msgid "" 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)" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index b260f2cc1..ec683cefd 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -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" @@ -1691,6 +1691,11 @@ msgid "" 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)" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 588aeaea2..db32bdbe4 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -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", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 07c0443e9..85245c638 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -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; diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index 027910fc7..7ec534591 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -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)); diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h index 5301234bd..ddc48cede 100644 --- a/src/gui/curses/gui-curses.h +++ b/src/gui/curses/gui-curses.h @@ -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; |