From 8d87086917c611280c8a2297d58191147e8e3ea9 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 23 Jun 2009 10:08:27 +0200 Subject: [PATCH] Add new option irc.color.item_channel_modes --- doc/en/autogen/user/irc_options.txt | 5 +++++ doc/en/autogen/user/weechat_options.txt | 2 +- doc/fr/autogen/user/irc_options.txt | 5 +++++ doc/fr/autogen/user/weechat_options.txt | 2 +- po/cs.po | 10 +++++----- po/de.po | 10 +++++----- po/es.po | 10 +++++----- po/fr.po | 7 +++++-- po/hu.po | 10 +++++----- po/pl.po | 5 ++++- po/ru.po | 10 +++++----- po/weechat.pot | 5 ++++- src/plugins/irc/irc-bar-item.c | 2 +- src/plugins/irc/irc-config.c | 23 +++++++++++++++++++++++ src/plugins/irc/irc-config.h | 1 + src/plugins/irc/irc.h | 1 + 16 files changed, 76 insertions(+), 32 deletions(-) diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index 1b919c5c8..e34b1b96e 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -8,6 +8,11 @@ ** type: color ** values: a color name (default value: yellow) +* *irc.color.item_channel_modes* +** description: color for channel modes, near channel name +** type: color +** values: a color name (default value: default) + * *irc.color.message_join* ** description: color for text in join messages ** type: color diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index e343ac759..6fd40c65e 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -516,7 +516,7 @@ * *weechat.look.save_layout_on_exit* ** description: save layout on exit (buffers, windows, or both) ** type: integer -** values: none, buffers, windows, all (default value: all) +** values: none, buffers, windows, all (default value: none) * *weechat.look.scroll_amount* ** description: how many lines to scroll by with scroll_up and scroll_down diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index 01623ec81..db9ae1800 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -8,6 +8,11 @@ ** type: couleur ** valeurs: un nom de couleur (valeur par défaut: yellow) +* *irc.color.item_channel_modes* +** description: couleur pour les modes du canal, à côté du nom du canal +** type: couleur +** valeurs: un nom de couleur (valeur par défaut: default) + * *irc.color.message_join* ** description: couleur pour le texte dans les messages join ** type: couleur diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index a423901c4..b41a299ba 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -516,7 +516,7 @@ * *weechat.look.save_layout_on_exit* ** description: sauve la disposition en quittant (tampons, fenêtres, ou les deux) ** type: entier -** valeurs: none, buffers, windows, all (valeur par défaut: all) +** valeurs: none, buffers, windows, all (valeur par défaut: none) * *weechat.look.scroll_amount* ** description: nombre de lignes pour le défilement avec scroll_up et scroll_down diff --git a/po/cs.po b/po/cs.po index 9554faee1..11d8a9def 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -3848,6 +3848,10 @@ msgstr "barva přezdívek" msgid "color for away item" msgstr "barva přezdívek, které jsou pryč" +#, fuzzy +msgid "color for channel modes, near channel name" +msgstr "barva kanálu v akcích" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -6217,10 +6221,6 @@ msgstr "%s chybí argument pro volbu \"%s\"\n" #~ msgid "text color for server name in input line" #~ msgstr "barva pro jeméno serveru" -#, fuzzy -#~ msgid "text color for channel name in input line" -#~ msgstr "barva kanálu v akcích" - #, fuzzy #~ msgid "text color for delimiters in input line" #~ msgstr "barva děličů v infobaru" diff --git a/po/de.po b/po/de.po index f272feb48..aea048f45 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -3826,6 +3826,10 @@ msgstr "Farbe von Nicknames" msgid "color for away item" msgstr "Farbe von abwesenden Nicknames" +#, fuzzy +msgid "color for channel modes, near channel name" +msgstr "Farbe der Channelnamen in ACTIONs" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -6108,10 +6112,6 @@ msgstr "%s fehlende Argumente für die \"--dir\"-Option\n" #~ msgid "text color for server name in input line" #~ msgstr "Farbe des Servernamens" -#, fuzzy -#~ msgid "text color for channel name in input line" -#~ msgstr "Farbe der Channelnamen in ACTIONs" - #, fuzzy #~ msgid "text color for delimiters in input line" #~ msgstr "Farbe der Infobar-Trennzeichen" diff --git a/po/es.po b/po/es.po index 3c7989276..34fcd66ec 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -3812,6 +3812,10 @@ msgstr "color para los nombres de usuario" msgid "color for away item" msgstr "color para los usuarios ausentes" +#, fuzzy +msgid "color for channel modes, near channel name" +msgstr "color para los nombres de canal en las acciones" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -6087,10 +6091,6 @@ msgstr "%s falta un argumento para la opción --dir\n" #~ msgid "text color for server name in input line" #~ msgstr "color para el nombre del servidor" -#, fuzzy -#~ msgid "text color for channel name in input line" -#~ msgstr "color para los nombres de canal en las acciones" - #, fuzzy #~ msgid "text color for delimiters in input line" #~ msgstr "color para los delimitadores de la barra de información" diff --git a/po/fr.po b/po/fr.po index d925ecab2..5b8640957 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" -"PO-Revision-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" +"PO-Revision-Date: 2009-06-23 09:43+0200\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -3994,6 +3994,9 @@ msgstr "couleur du pseudo dans la barre de saisie" msgid "color for away item" msgstr "couleur pour l'objet away" +msgid "color for channel modes, near channel name" +msgstr "couleur pour les modes du canal, à côté du nom du canal" + msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" diff --git a/po/hu.po b/po/hu.po index 101550650..fb69293d3 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -3861,6 +3861,10 @@ msgstr "nevek színe" msgid "color for away item" msgstr "távollevő felhasználók nevének színe" +#, fuzzy +msgid "color for channel modes, near channel name" +msgstr "szobanevek színe az eseményekben" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -6153,10 +6157,6 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n" #~ msgid "text color for server name in input line" #~ msgstr "szerver nevének színe" -#, fuzzy -#~ msgid "text color for channel name in input line" -#~ msgstr "szobanevek színe az eseményekben" - #, fuzzy #~ msgid "text color for delimiters in input line" #~ msgstr "információs pult határolóinak színe" diff --git a/po/pl.po b/po/pl.po index 82edff8b4..27c659bab 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: \n" "Language-Team: Polish\n" @@ -3316,6 +3316,9 @@ msgstr "" msgid "color for away item" msgstr "" +msgid "color for channel modes, near channel name" +msgstr "" + msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" diff --git a/po/ru.po b/po/ru.po index afd338a52..e66a88787 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.0-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: 2009-05-11 13:02+0200\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -3853,6 +3853,10 @@ msgstr "цвет ников" msgid "color for away item" msgstr "цвет отошедших ников" +#, fuzzy +msgid "color for channel modes, near channel name" +msgstr "цвет имён при действиях" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -6123,10 +6127,6 @@ msgstr "%s нет аргумента для параметра \"%s\"\n" #~ msgid "text color for server name in input line" #~ msgstr "цвет названия сервера" -#, fuzzy -#~ msgid "text color for channel name in input line" -#~ msgstr "цвет имён при действиях" - #, fuzzy #~ msgid "text color for delimiters in input line" #~ msgstr "цвет разделителей информационной панели" diff --git a/po/weechat.pot b/po/weechat.pot index 19b6db83b..b2c7b3361 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: 2009-06-17 11:10+0200\n" +"POT-Creation-Date: 2009-06-23 09:42+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3283,6 +3283,9 @@ msgstr "" msgid "color for away item" msgstr "" +msgid "color for channel modes, near channel name" +msgstr "" + msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index fe32b1e76..f9e5e527a 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -233,7 +233,7 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item, snprintf (modes, sizeof (modes), "%s(%s%s%s)", IRC_COLOR_BAR_DELIM, - IRC_COLOR_STATUS_NAME, + IRC_COLOR_ITEM_CHANNEL_MODES, channel->modes, IRC_COLOR_BAR_DELIM); } diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index c39ef127b..5a47e5757 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -69,6 +69,7 @@ struct t_config_option *irc_config_color_message_quit; struct t_config_option *irc_config_color_notice; struct t_config_option *irc_config_color_input_nick; struct t_config_option *irc_config_color_item_away; +struct t_config_option *irc_config_color_item_channel_modes; /* IRC config, network section */ @@ -336,6 +337,22 @@ irc_config_change_color_item_away (void *data, weechat_bar_item_update ("away"); } +/* + * irc_config_change_color_item_channel_modes: called when the color of channel + * modes is changed + */ + +void +irc_config_change_color_item_channel_modes (void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + weechat_bar_item_update ("buffer_name"); +} + /* * irc_config_change_network_away_check: called when away check is changed */ @@ -1241,6 +1258,12 @@ irc_config_init () N_("color for away item"), NULL, -1, 0, "yellow", NULL, 0, NULL, NULL, &irc_config_change_color_item_away, NULL, NULL, NULL); + irc_config_color_item_channel_modes = weechat_config_new_option ( + irc_config_file, ptr_section, + "item_channel_modes", "color", + N_("color for channel modes, near channel name"), + NULL, -1, 0, "default", NULL, 0, NULL, NULL, + &irc_config_change_color_item_channel_modes, NULL, NULL, NULL); /* network */ ptr_section = weechat_config_new_section (irc_config_file, "network", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index efd135a16..b6ef3aa3f 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -85,6 +85,7 @@ extern struct t_config_option *irc_config_color_message_quit; extern struct t_config_option *irc_config_color_notice; extern struct t_config_option *irc_config_color_input_nick; extern struct t_config_option *irc_config_color_item_away; +extern struct t_config_option *irc_config_color_item_channel_modes; extern struct t_config_option *irc_config_network_default_msg_part; extern struct t_config_option *irc_config_network_default_msg_quit; diff --git a/src/plugins/irc/irc.h b/src/plugins/irc/irc.h index bdac5a508..a2ffec278 100644 --- a/src/plugins/irc/irc.h +++ b/src/plugins/irc/irc.h @@ -65,6 +65,7 @@ #define IRC_COLOR_NOTICE weechat_color(weechat_config_string(irc_config_color_notice)) #define IRC_COLOR_INPUT_NICK weechat_color(weechat_config_string(irc_config_color_input_nick)) #define IRC_COLOR_ITEM_AWAY weechat_color(weechat_config_string(irc_config_color_item_away)) +#define IRC_COLOR_ITEM_CHANNEL_MODES weechat_color(weechat_config_string(irc_config_color_item_channel_modes)) #define IRC_COLOR_NICK_IN_SERVER_MESSAGE(nick) \ ((nick && weechat_config_boolean(irc_config_look_color_nicks_in_server_messages)) ? \ nick->color : IRC_COLOR_CHAT_NICK)