diff --git a/doc/de/autogen/irc_options.xml b/doc/de/autogen/irc_options.xml index 6aaee96fb..17df5b5a4 100644 --- a/doc/de/autogen/irc_options.xml +++ b/doc/de/autogen/irc_options.xml @@ -186,6 +186,16 @@ +irc.look.topic_strip_colors: strip colors in topic (used only when displaying buffer title) + + + type: boolean + + + values: on, off (default value: off) + + + irc.network.anti_flood: anti-flood: # Sekunden zwischen zwei Benutzernachrichten (0 = kein anti-flood) diff --git a/doc/de/autogen/weechat_commands.xml b/doc/de/autogen/weechat_commands.xml index 6e1260727..04da6bf84 100644 --- a/doc/de/autogen/weechat_commands.xml +++ b/doc/de/autogen/weechat_commands.xml @@ -6,7 +6,7 @@ docgen.pl builds XML doc files to include in many languages --> -/bar [add barname type[,cond1,cond2,...] position size separator item1,item2,...] | [default] | [del barname|-all] | [set barname option value] | [hide|show barname] | [scroll barname buffer scroll_value] | [list] | [listfull] | [listitems] +/bar [add barname type[,cond1,cond2,...] position size separator item1,item2,...] | [default] | [del barname|-all] | [set barname option value] | [hide|show|toggle barname] | [scroll barname buffer scroll_value] | [list] | [listfull] | [listitems] manage bars diff --git a/doc/en/autogen/irc_options.xml b/doc/en/autogen/irc_options.xml index e951402f6..61743bb95 100644 --- a/doc/en/autogen/irc_options.xml +++ b/doc/en/autogen/irc_options.xml @@ -186,6 +186,16 @@ +irc.look.topic_strip_colors: strip colors in topic (used only when displaying buffer title) + + + type: boolean + + + values: on, off (default value: off) + + + irc.network.anti_flood: anti-flood: # seconds between two user messages (0 = no anti-flood) diff --git a/doc/en/autogen/weechat_commands.xml b/doc/en/autogen/weechat_commands.xml index cab2f1142..01d4cf804 100644 --- a/doc/en/autogen/weechat_commands.xml +++ b/doc/en/autogen/weechat_commands.xml @@ -6,7 +6,7 @@ docgen.pl builds XML doc files to include in many languages --> -/bar [add barname type[,cond1,cond2,...] position size separator item1,item2,...] | [default] | [del barname|-all] | [set barname option value] | [hide|show barname] | [scroll barname buffer scroll_value] | [list] | [listfull] | [listitems] +/bar [add barname type[,cond1,cond2,...] position size separator item1,item2,...] | [default] | [del barname|-all] | [set barname option value] | [hide|show|toggle barname] | [scroll barname buffer scroll_value] | [list] | [listfull] | [listitems] manage bars diff --git a/doc/fr/autogen/irc_options.xml b/doc/fr/autogen/irc_options.xml index 825cc90db..fc67d25f2 100644 --- a/doc/fr/autogen/irc_options.xml +++ b/doc/fr/autogen/irc_options.xml @@ -186,6 +186,16 @@ +irc.look.topic_strip_colors: supprimer les couleurs dans le titre (utilisé seulement lors de l'affichage du titre du tampon) + + + type: booléen + + + valeurs: on, off (valeur par défaut: off) + + + irc.network.anti_flood: anti-flood: nombre de secondes entre deux messages utilisateur (0 = pas d'anti-flood) diff --git a/doc/fr/autogen/weechat_commands.xml b/doc/fr/autogen/weechat_commands.xml index ae498b510..136f12bb6 100644 --- a/doc/fr/autogen/weechat_commands.xml +++ b/doc/fr/autogen/weechat_commands.xml @@ -6,7 +6,7 @@ docgen.pl builds XML doc files to include in many languages --> -/bar [add nombarre type[,cond1,cond2,...] position taille separateur objet1,objet2,...] | [default] | [del nombarre|-all] | [set nombarre option valeur] | [hide|show nombarre] | [scroll nombarre tampon valeur_scroll] | [list] | [listfull] | [listitems] +/bar [add nombarre type[,cond1,cond2,...] position taille separateur objet1,objet2,...] | [default] | [del nombarre|-all] | [set nombarre option valeur] | [hide|show|toggle nombarre] | [scroll nombarre tampon valeur_scroll] | [list] | [listfull] | [listitems] gestion des barres diff --git a/po/cs.po b/po/cs.po index c833c6d7f..d652035a8 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-02-24 15:00+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -3514,6 +3514,9 @@ msgstr "" msgid "display notices as private messages" msgstr "zobrazit upozornění jako soukromé zprávy" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" + #, fuzzy msgid "color for text in join messages" msgstr "prefix pro zprávy připojení" diff --git a/po/de.po b/po/de.po index d33b7d21f..87f9c060b 100644 --- a/po/de.po +++ b/po/de.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-02-24 15:00+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Thomas Schuetz \n" "Language-Team: weechat-dev \n" @@ -3497,6 +3497,9 @@ msgstr "" msgid "display notices as private messages" msgstr "NOTICEs als Queries anzeigen" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" + #, fuzzy msgid "color for text in join messages" msgstr "Farbe eines Fensters mit neuen Messages" diff --git a/po/es.po b/po/es.po index ba80a2fe4..430d2fbb1 100644 --- a/po/es.po +++ b/po/es.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-02-24 15:00+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Roberto González Cardenete \n" "Language-Team: weechat-dev \n" @@ -3484,6 +3484,9 @@ msgstr "" msgid "display notices as private messages" msgstr "mostrar noticias como mensajes privados" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" + #, fuzzy msgid "color for text in join messages" msgstr "color para una ventana con mensajes nuevos" diff --git a/po/fr.po b/po/fr.po index b600dd12f..d8804413c 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-02-24 15:00+0100\n" -"PO-Revision-Date: 2009-02-24 15:02+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" +"PO-Revision-Date: 2009-02-25 19:15+0100\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -3628,6 +3628,11 @@ msgstr "délai pour filtrer les messages join/part/quit (en minutes)" msgid "display notices as private messages" msgstr "afficher les notices comme des messages privés" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" +"supprimer les couleurs dans le titre (utilisé seulement lors de l'affichage " +"du titre du tampon)" + msgid "color for text in join messages" msgstr "couleur pour le texte dans les messages join" diff --git a/po/hu.po b/po/hu.po index 8de562eec..64d657a3b 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-02-24 15:00+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -3531,6 +3531,9 @@ msgstr "" msgid "display notices as private messages" msgstr "figyelmeztetések privát üzenetként való mutatása" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" + #, fuzzy msgid "color for text in join messages" msgstr "új üzenetet tartalmazó ablak színe" diff --git a/po/ru.po b/po/ru.po index f22fd16f6..e5f9eb00f 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.2.7-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2009-02-24 15:00+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" "PO-Revision-Date: 2009-01-03 00:42+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -3524,6 +3524,9 @@ msgstr "" msgid "display notices as private messages" msgstr "отображать notice'ы в виде личных сообщений" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" + #, fuzzy msgid "color for text in join messages" msgstr "цвет текущего окна с сообщениями" diff --git a/po/weechat.pot b/po/weechat.pot index c3ada1f41..bdeb7eb2f 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-02-24 15:00+0100\n" +"POT-Creation-Date: 2009-02-25 19:14+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2998,6 +2998,9 @@ msgstr "" msgid "display notices as private messages" msgstr "" +msgid "strip colors in topic (used only when displaying buffer title)" +msgstr "" + msgid "color for text in join messages" msgstr "" diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 043b669d8..dcfeb0420 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -59,8 +59,10 @@ irc_bar_item_buffer_title (void *data, struct t_gui_bar_item *item, if (!title) return NULL; - title_color = irc_color_decode (title, 1); - + title_color = irc_color_decode (title, + (weechat_config_boolean (irc_config_look_topic_strip_colors)) ? + 0 : 1); + return (title_color) ? title_color : strdup (title); } diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 9be9faa5b..95040fd87 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -53,10 +53,11 @@ struct t_config_option *irc_config_look_display_channel_modes; struct t_config_option *irc_config_look_display_nick_modes; struct t_config_option *irc_config_look_hide_nickserv_pwd; struct t_config_option *irc_config_look_highlight_tags; +struct t_config_option *irc_config_look_notice_as_pv; struct t_config_option *irc_config_look_show_away_once; struct t_config_option *irc_config_look_smart_filter; struct t_config_option *irc_config_look_smart_filter_delay; -struct t_config_option *irc_config_look_notice_as_pv; +struct t_config_option *irc_config_look_topic_strip_colors; /* IRC config, color section */ @@ -236,6 +237,22 @@ irc_config_change_look_highlight_tags (void *data, } } +/* + * irc_config_change_look_topic_strip_colors: called when the "topic strip colors" + * option is changed + */ + +void +irc_config_change_look_topic_strip_colors (void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + weechat_bar_item_update ("buffer_title"); +} + /* * irc_config_change_color_input_nick: called when the color of input nick is * changed @@ -1096,6 +1113,12 @@ irc_config_init () "notice_as_pv", "boolean", N_("display notices as private messages"), NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + irc_config_look_topic_strip_colors = weechat_config_new_option ( + irc_config_file, ptr_section, + "topic_strip_colors", "boolean", + N_("strip colors in topic (used only when displaying buffer title)"), + NULL, 0, 0, "off", NULL, 0, NULL, NULL, + &irc_config_change_look_topic_strip_colors, NULL, NULL, NULL); /* color */ ptr_section = weechat_config_new_section (irc_config_file, "color", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index 23dbcc98c..836c7f7f8 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -42,10 +42,11 @@ extern struct t_config_option *irc_config_look_display_channel_modes; extern struct t_config_option *irc_config_look_display_nick_modes; extern struct t_config_option *irc_config_look_hide_nickserv_pwd; extern struct t_config_option *irc_config_look_highlight_tags; +extern struct t_config_option *irc_config_look_notice_as_pv; extern struct t_config_option *irc_config_look_show_away_once; extern struct t_config_option *irc_config_look_smart_filter; extern struct t_config_option *irc_config_look_smart_filter_delay; -extern struct t_config_option *irc_config_look_notice_as_pv; +extern struct t_config_option *irc_config_look_topic_strip_colors; extern struct t_config_option *irc_config_color_message_join; extern struct t_config_option *irc_config_color_message_quit; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 1fd892477..5d7982f97 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -348,9 +348,7 @@ irc_protocol_cmd_join (struct t_irc_server *server, const char *command, /* remove topic and display channel creation date if joining new channel */ if (!ptr_channel->nicks) { - if (ptr_channel->topic) - irc_channel_set_topic (ptr_channel, NULL); - + irc_channel_set_topic (ptr_channel, NULL); ptr_channel->display_creation_date = 1; }