From c61254f256099f121b71452db964c2146ff30133 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 15 Mar 2011 11:51:48 +0100 Subject: [PATCH] Add new option irc.look.buffer_auto_switch_on_join --- ChangeLog | 3 ++- doc/de/autogen/user/irc_options.txt | 5 +++++ doc/en/autogen/user/irc_options.txt | 5 +++++ doc/fr/autogen/user/irc_options.txt | 5 +++++ doc/it/autogen/user/irc_options.txt | 5 +++++ po/cs.po | 5 ++++- po/de.po | 5 ++++- po/es.po | 5 ++++- po/fr.po | 7 +++++-- po/hu.po | 5 ++++- po/it.po | 5 ++++- po/pl.po | 5 ++++- po/pt_BR.po | 5 ++++- po/ru.po | 5 ++++- po/weechat.pot | 5 ++++- src/plugins/irc/irc-channel.c | 4 +++- src/plugins/irc/irc-config.c | 9 ++++++++- src/plugins/irc/irc-config.h | 1 + 18 files changed, 75 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index c85de8ca5..7b076d840 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.3.5-dev, 2011-03-11 +v0.3.5-dev, 2011-03-15 Version 0.3.5 (under dev!) @@ -36,6 +36,7 @@ Version 0.3.5 (under dev!) being added with command "/color") * core: allow background for nick colors (using ":") * api: add new function buffer_match_list +* irc: add new option irc.look.buffer_auto_switch_on_join * irc: add new option irc.look.smart_filter_nick * irc: ignore join if nick is not self nick and if channel buffer does not exist (bug #32667) diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt index 67a686cab..9bbcfafae 100644 --- a/doc/de/autogen/user/irc_options.txt +++ b/doc/de/autogen/user/irc_options.txt @@ -73,6 +73,11 @@ ** 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 werden vor einer Farbe gesetzt (ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `default`) +* *irc.look.buffer_auto_switch_on_join* +** Beschreibung: `auto switch to channel buffer on join` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + * *irc.look.color_nicks_in_names* ** Beschreibung: `nutzt in der Ausgabe von /names die Nickfarbe (oder bei der Auflistung der Nicks wenn man einen Channel betritt)` ** Typ: boolesch diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index 4dd46a011..7ee11252a 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -73,6 +73,11 @@ ** 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`) +* *irc.look.buffer_auto_switch_on_join* +** description: `auto switch to channel buffer on join` +** type: boolean +** values: on, off (default value: `on`) + * *irc.look.color_nicks_in_names* ** description: `use nick color in output of /names (or list of nicks displayed when joining a channel)` ** type: boolean diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index 21f74531e..a3bbdea91 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -73,6 +73,11 @@ ** 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`) +* *irc.look.buffer_auto_switch_on_join* +** description: `basculer automatiquement vers le tampon du canal sur un join` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + * *irc.look.color_nicks_in_names* ** description: `utiliser la couleur du pseudo dans la sortie de /names (ou la liste des pseudos affichée lorsqu'on rejoint un canal)` ** type: booléen diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt index 28979f7fc..af998952c 100644 --- a/doc/it/autogen/user/irc_options.txt +++ b/doc/it/autogen/user/irc_options.txt @@ -73,6 +73,11 @@ ** tipo: colore ** valori: 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 (valore predefinito: `default`) +* *irc.look.buffer_auto_switch_on_join* +** descrizione: `auto switch to channel buffer on join` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + * *irc.look.color_nicks_in_names* ** descrizione: `use nick color in output of /names (or list of nicks displayed when joining a channel)` ** tipo: bool diff --git a/po/cs.po b/po/cs.po index dcaa6eeb9..fab8f9b08 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-02-07 17:29+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -4918,6 +4918,9 @@ msgstr "%s%s: chyba při vytváření serveru \"%s\"" msgid "%s%s: error creating server option \"%s\"" msgstr "%s%s: chyba při vytváření volby serveru \"%s\"" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/de.po b/po/de.po index a2da65c0f..7897220f1 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-11 17:21+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-03-12 10:15+0100\n" "Last-Translator: Nils G.\n" "Language-Team: weechat-dev \n" @@ -5129,6 +5129,9 @@ msgstr "%s%s: Fehler bei der Erstellung des Servers \"%s\"" msgid "%s%s: error creating server option \"%s\"" msgstr "%s%s: Fehler bei der Erstellung der Server-Option \"%s\"" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/es.po b/po/es.po index bd859aa60..1b3307333 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-02-07 17:29+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -5030,6 +5030,9 @@ msgstr "%s%s: error al crear el servidor \"%s\"" msgid "%s%s: error creating server option \"%s\"" msgstr "%s%s: error al crear la opción \"%s\" del servidor" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/fr.po b/po/fr.po index cb31de492..85a72a8be 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" -"PO-Revision-Date: 2011-03-09 10:07+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" +"PO-Revision-Date: 2011-03-15 11:40+0100\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -5032,6 +5032,9 @@ msgstr "%s%s: erreur de création du serveur \"%s\"" msgid "%s%s: error creating server option \"%s\"" msgstr "%s%s: erreur de création de l'option serveur \"%s\"" +msgid "auto switch to channel buffer on join" +msgstr "basculer automatiquement vers le tampon du canal sur un join" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/hu.po b/po/hu.po index 3f967d8ab..bbdcc8a34 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-02-07 17:29+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4598,6 +4598,9 @@ msgstr "%s nincs elég memória az információs pult üzenethez\n" msgid "%s%s: error creating server option \"%s\"" msgstr "%s nincs elég memória az információs pult üzenethez\n" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/it.po b/po/it.po index 3b3c28968..77b5aa0a2 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-03-09 09:29+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -4945,6 +4945,9 @@ msgstr "%s%s: errore durante la creazione del server \"%s\"" msgid "%s%s: error creating server option \"%s\"" msgstr "%s%s: errore durante la creazione dell'opzione del server \"%s\"" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/pl.po b/po/pl.po index 89c03ba54..cf61ece55 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-02-07 17:29+0100\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: weechat-dev \n" @@ -5010,6 +5010,9 @@ msgstr "%s%s: błąd podczas tworzenia serwera \"%s\"" msgid "%s%s: error creating server option \"%s\"" msgstr "%s%s: błąd podczas tworzenia opcji dla serwera \"%s\"" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/pt_BR.po b/po/pt_BR.po index cec0f224b..e506c79a7 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-02-07 17:30+0100\n" "Last-Translator: Ivan Sichmann Freitas \n" "Language-Team: weechat-dev \n" @@ -4441,6 +4441,9 @@ msgstr "" msgid "%s%s: error creating server option \"%s\"" msgstr "" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/ru.po b/po/ru.po index b57f9f33e..7e51781b1 100644 --- a/po/ru.po +++ b/po/ru.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: 2011-02-07 17:30+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -4605,6 +4605,9 @@ msgstr "%s недостаточно памяти для сообщения в с msgid "%s%s: error creating server option \"%s\"" msgstr "%s недостаточно памяти для сообщения в строке информации\n" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/po/weechat.pot b/po/weechat.pot index 492cce17a..335891cd1 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-03-09 10:06+0100\n" +"POT-Creation-Date: 2011-03-15 11:39+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3907,6 +3907,9 @@ msgstr "" msgid "%s%s: error creating server option \"%s\"" msgstr "" +msgid "auto switch to channel buffer on join" +msgstr "" + msgid "" "use nick color in output of /names (or list of nicks displayed when joining " "a channel)" diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index eef33b5e6..aee6330a2 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -283,7 +283,9 @@ irc_channel_new (struct t_irc_server *server, int channel_type, server->channels = new_channel; server->last_channel = new_channel; - if (switch_to_channel) + if (switch_to_channel + && ((channel_type != IRC_CHANNEL_TYPE_CHANNEL) + || weechat_config_boolean (irc_config_look_buffer_auto_switch_on_join))) { weechat_buffer_set (new_buffer, "display", (auto_switch) ? "auto" : "1"); diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index a7e7f3a67..45ad4dca0 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -50,6 +50,7 @@ struct t_config_section *irc_config_section_server = NULL; /* IRC config, look section */ +struct t_config_option *irc_config_look_buffer_auto_switch_on_join; struct t_config_option *irc_config_look_color_nicks_in_names; struct t_config_option *irc_config_look_color_nicks_in_nicklist; struct t_config_option *irc_config_look_color_nicks_in_server_messages; @@ -1792,7 +1793,13 @@ irc_config_init () weechat_config_free (irc_config_file); return 0; } - + + irc_config_look_buffer_auto_switch_on_join = weechat_config_new_option ( + irc_config_file, ptr_section, + "buffer_auto_switch_on_join", "boolean", + N_("auto switch to channel buffer on join"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, + NULL, NULL, NULL, NULL); irc_config_look_color_nicks_in_names = weechat_config_new_option ( irc_config_file, ptr_section, "color_nicks_in_names", "boolean", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index d843cf94f..cc99b0933 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -75,6 +75,7 @@ extern struct t_config_section *irc_config_section_ctcp; extern struct t_config_section *irc_config_section_server_default; extern struct t_config_section *irc_config_section_server; +extern struct t_config_option *irc_config_look_buffer_auto_switch_on_join; extern struct t_config_option *irc_config_look_color_nicks_in_names; extern struct t_config_option *irc_config_look_color_nicks_in_nicklist; extern struct t_config_option *irc_config_look_color_nicks_in_server_messages;