diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index 75615ab88..12533b3df 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -90,6 +90,9 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] * alias: change default command for alias /beep to "/print -beep" * exec: add exec plugin: new command /exec and file exec.conf * guile: fix module used after unload of a script +* irc: rename option irc.look.item_channel_modes_hide_key to + irc.look.item_channel_modes_hide_args, value is now a string + (task #12070, task #12163, closes #48) * irc: add option irc.color.item_nick_modes (closes #47) * irc: allow "$ident" in option irc.network.ban_mask_default (closes #18) * irc: add support of "away-notify" capability (closes #12) diff --git a/ReleaseNotes.asciidoc b/ReleaseNotes.asciidoc index d535a207c..8172ef233 100644 --- a/ReleaseNotes.asciidoc +++ b/ReleaseNotes.asciidoc @@ -17,6 +17,19 @@ http://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog] == Version 0.4.4 (under dev) +=== Hide IRC channel modes arguments + +The option 'irc.look.item_channel_modes_hide_key' has been renamed to +'irc.look.item_channel_modes_hide_args' and it now a string. + +It can now hide arguments for multiple channel modes. + +By default, a channel key (mode "k") will hide channel arguments. For old +behavior (never hide arguments, even with a channel key), you can do: + +---- +/set irc.look.item_channel_modes_hide_args "" +---- + === Jump to first/last buffer The command `/input jump_last_buffer` has been replaced by `/buffer +`. diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt index fabd7882d..050dcd1dc 100644 --- a/doc/de/autogen/user/irc_options.txt +++ b/doc/de/autogen/user/irc_options.txt @@ -183,10 +183,10 @@ ** Typ: boolesch ** Werte: on, off (Standardwert: `on`) -* [[option_irc.look.item_channel_modes_hide_key]] *irc.look.item_channel_modes_hide_key* -** Beschreibung: `der Channel-Schlüssel wird nicht im Channel Modus angezeigt (diese Option unterdrückt alle Channel-Modi falls der Modus für den Channel auf +k gesetzt wurde)` -** Typ: boolesch -** Werte: on, off (Standardwert: `off`) +* [[option_irc.look.item_channel_modes_hide_args]] *irc.look.item_channel_modes_hide_args* +** Beschreibung: `hide channel modes arguments if at least one of these modes is in channel modes ("*" to always hide all arguments, empty value to never hide arguments); example: "kf" to hide arguments if "k" or "f" are in channel modes` +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette (Standardwert: `"k"`) * [[option_irc.look.item_display_server]] *irc.look.item_display_server* ** Beschreibung: `Name der Bar-Item in dem der IRC Server angezeigt wird (für Status-Bar)` diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index d553868ba..b3f538c10 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -183,10 +183,10 @@ ** type: boolean ** values: on, off (default value: `on`) -* [[option_irc.look.item_channel_modes_hide_key]] *irc.look.item_channel_modes_hide_key* -** description: `hide channel key in channel modes (this will hide all channel modes arguments if mode +k is set on channel)` -** type: boolean -** values: on, off (default value: `off`) +* [[option_irc.look.item_channel_modes_hide_args]] *irc.look.item_channel_modes_hide_args* +** description: `hide channel modes arguments if at least one of these modes is in channel modes ("*" to always hide all arguments, empty value to never hide arguments); example: "kf" to hide arguments if "k" or "f" are in channel modes` +** type: string +** values: any string (default value: `"k"`) * [[option_irc.look.item_display_server]] *irc.look.item_display_server* ** description: `name of bar item where IRC server is displayed (for status bar)` diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index c0c09a025..94de0ef71 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -183,10 +183,10 @@ ** type: booléen ** valeurs: on, off (valeur par défaut: `on`) -* [[option_irc.look.item_channel_modes_hide_key]] *irc.look.item_channel_modes_hide_key* -** description: `cacher la clé du canal (cela cachera tous les paramètres des modes du canal si le mode +k est défini sur le canal)` -** type: booléen -** valeurs: on, off (valeur par défaut: `off`) +* [[option_irc.look.item_channel_modes_hide_args]] *irc.look.item_channel_modes_hide_args* +** description: `cacher les paramètres des modes du canal si au moins un de ces modes est dans les modes du canal ("*" pour toujours cacher les paramètres, valeur vide pour ne jamais cacher les paramètres); exemple: "kf" pour cacher les paramètres si "k" ou "f" sont dans les modes du canal` +** type: chaîne +** valeurs: toute chaîne (valeur par défaut: `"k"`) * [[option_irc.look.item_display_server]] *irc.look.item_display_server* ** description: `nom de l'objet de barre où est affiché le serveur IRC (pour la barre de statut)` diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt index 4b4a6c19c..dbd23d1ef 100644 --- a/doc/it/autogen/user/irc_options.txt +++ b/doc/it/autogen/user/irc_options.txt @@ -183,10 +183,10 @@ ** tipo: bool ** valori: on, off (valore predefinito: `on`) -* [[option_irc.look.item_channel_modes_hide_key]] *irc.look.item_channel_modes_hide_key* -** descrizione: `nasconde la chiave del canale (l'opzione nasconde gli argomenti di tutte le modalità canale se +k è impostato sul canale)` -** tipo: bool -** valori: on, off (valore predefinito: `off`) +* [[option_irc.look.item_channel_modes_hide_args]] *irc.look.item_channel_modes_hide_args* +** descrizione: `hide channel modes arguments if at least one of these modes is in channel modes ("*" to always hide all arguments, empty value to never hide arguments); example: "kf" to hide arguments if "k" or "f" are in channel modes` +** tipo: stringa +** valori: qualsiasi stringa (valore predefinito: `"k"`) * [[option_irc.look.item_display_server]] *irc.look.item_display_server* ** descrizione: `nome dell'elemento barra dove è mostrato il server IRC (per la barra di stato)` diff --git a/doc/ja/autogen/user/irc_options.txt b/doc/ja/autogen/user/irc_options.txt index 149a091a1..8fcf9e919 100644 --- a/doc/ja/autogen/user/irc_options.txt +++ b/doc/ja/autogen/user/irc_options.txt @@ -183,10 +183,10 @@ ** タイプ: ブール ** 値: on, off (デフォルト値: `on`) -* [[option_irc.look.item_channel_modes_hide_key]] *irc.look.item_channel_modes_hide_key* -** 説明: `チャンネルモードに含まれるチャンネルキーを隠す (チャンネルにモード +k が設定されていた場合、全てのチャンネルモード引数を隠す)` -** タイプ: ブール -** 値: on, off (デフォルト値: `off`) +* [[option_irc.look.item_channel_modes_hide_args]] *irc.look.item_channel_modes_hide_args* +** 説明: `hide channel modes arguments if at least one of these modes is in channel modes ("*" to always hide all arguments, empty value to never hide arguments); example: "kf" to hide arguments if "k" or "f" are in channel modes` +** タイプ: 文字列 +** 値: 未制約文字列 (デフォルト値: `"k"`) * [[option_irc.look.item_display_server]] *irc.look.item_display_server* ** 説明: `IRC サーバが表示されるバーアイテムの名前 (ステータスバー用)` diff --git a/doc/pl/autogen/user/irc_options.txt b/doc/pl/autogen/user/irc_options.txt index af291a60f..f73f2f4b3 100644 --- a/doc/pl/autogen/user/irc_options.txt +++ b/doc/pl/autogen/user/irc_options.txt @@ -183,10 +183,10 @@ ** typ: bool ** wartości: on, off (domyślna wartość: `on`) -* [[option_irc.look.item_channel_modes_hide_key]] *irc.look.item_channel_modes_hide_key* -** opis: `ukrywa klucz kanału w trybach kanału (ukryje to wszystkie atrybuty kanału jeśli na kanale ustawione jest +k)` -** typ: bool -** wartości: on, off (domyślna wartość: `off`) +* [[option_irc.look.item_channel_modes_hide_args]] *irc.look.item_channel_modes_hide_args* +** opis: `hide channel modes arguments if at least one of these modes is in channel modes ("*" to always hide all arguments, empty value to never hide arguments); example: "kf" to hide arguments if "k" or "f" are in channel modes` +** typ: ciąg +** wartości: dowolny ciąg (domyślna wartość: `"k"`) * [[option_irc.look.item_display_server]] *irc.look.item_display_server* ** opis: `nazwa paska, w którym wyświetlany jest serwer IRC (dla paska stanu)` diff --git a/po/cs.po b/po/cs.po index af66fbda4..fb67c4f5c 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -6791,14 +6791,12 @@ msgstr "" msgid "display server away message in away bar item" msgstr "zobrazit zprávu nepřítomnosti na serveru v položce nepřítomnosti pole" -#, fuzzy msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"schovat klíč kanálu pokud jsou zobrazeny módy v \"buffer_name\" položce " -"panelu (toto schová všechny argumenty módů kanálu pokud je +k nastaveno na " -"kanálu)" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "jméno položky pole, kde je IRC server zobrazen (pro stavový řádek)" @@ -10621,6 +10619,15 @@ msgstr "%s%s: nemohu nastavit \"neblokovaci\" volbu na soket" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: vypršel časový limit \"%s\" pro %s" +#, fuzzy +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "schovat klíč kanálu pokud jsou zobrazeny módy v \"buffer_name\" položce " +#~ "panelu (toto schová všechny argumenty módů kanálu pokud je +k nastaveno " +#~ "na kanálu)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "zobrazovat módy přezdívky v položce pole \"input_prompt\"" diff --git a/po/de.po b/po/de.po index d51ff8574..2b4a4d300 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-04-02 20:17+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -7778,12 +7778,11 @@ msgid "display server away message in away bar item" msgstr "Abwesenheitsnachricht in der Away-Bar-Item anzeigen" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"der Channel-Schlüssel wird nicht im Channel Modus angezeigt (diese Option " -"unterdrückt alle Channel-Modi falls der Modus für den Channel auf +k gesetzt " -"wurde)" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "" @@ -12003,5 +12002,13 @@ msgstr "" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s" +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "der Channel-Schlüssel wird nicht im Channel Modus angezeigt (diese Option " +#~ "unterdrückt alle Channel-Modi falls der Modus für den Channel auf +k " +#~ "gesetzt wurde)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "zeigt Nick-Modi in \"input_prompt\" Bar-Item" diff --git a/po/es.po b/po/es.po index 84b7a5680..e43818770 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -7059,11 +7059,11 @@ msgid "display server away message in away bar item" msgstr "mostrar mensaje de ausencia en el elemento de barra \"away\"" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"ocultar la clave del canal en los modos de canal (esto ocultará todos los " -"argumentos de los modos si +k es usado en el canal)" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "" @@ -10897,6 +10897,13 @@ msgstr "%s%s: no es posible configurar la opción \"nonblock\" para el socket" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s" +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "ocultar la clave del canal en los modos de canal (esto ocultará todos los " +#~ "argumentos de los modos si +k es usado en el canal)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "" #~ "mostrar los modos del apodo en el elemento de barra \"input_prompt\"" diff --git a/po/fr.po b/po/fr.po index a36f510ff..eed5c1150 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" -"PO-Revision-Date: 2014-04-04 10:27+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" +"PO-Revision-Date: 2014-04-04 12:24+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -7592,11 +7592,15 @@ msgstr "" "afficher le message d'absence du serveur dans l'objet de barre d'absence" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"cacher la clé du canal (cela cachera tous les paramètres des modes du canal " -"si le mode +k est défini sur le canal)" +"cacher les paramètres des modes du canal si au moins un de ces modes est " +"dans les modes du canal (\"*\" pour toujours cacher les paramètres, valeur " +"vide pour ne jamais cacher les paramètres); exemple: \"kf\" pour cacher les " +"paramètres si \"k\" ou \"f\" sont dans les modes du canal" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "" @@ -11731,6 +11735,13 @@ msgstr "" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: délai d'attente dépassé pour \"%s\" avec %s" +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "cacher la clé du canal (cela cachera tous les paramètres des modes du " +#~ "canal si le mode +k est défini sur le canal)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "affiche les modes du pseudo dans l'objet de barre \"input_prompt\"" diff --git a/po/hu.po b/po/hu.po index 499c5b0f0..0d9aa4243 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -6297,8 +6297,10 @@ msgid "display server away message in away bar item" msgstr "privát beszélgetésben a másik fél távollétét csak egyszer jelezze" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" msgid "name of bar item where IRC server is displayed (for status bar)" diff --git a/po/it.po b/po/it.po index c1ad60785..65a8cac88 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -7208,11 +7208,11 @@ msgid "display server away message in away bar item" msgstr "mostra il messaggio di assenza del server nell'elemento barra di away" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"nasconde la chiave del canale (l'opzione nasconde gli argomenti di tutte le " -"modalità canale se +k è impostato sul canale)" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "" @@ -11062,6 +11062,13 @@ msgstr "" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: timeout per \"%s\" con %s" +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "nasconde la chiave del canale (l'opzione nasconde gli argomenti di tutte " +#~ "le modalità canale se +k è impostato sul canale)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "visualizza le modalità nick nell'elemento barra \"input_prompt\"" diff --git a/po/ja.po b/po/ja.po index 839ff43a9..cd731e06c 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-29 20:07+0900\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -7300,11 +7300,11 @@ msgid "display server away message in away bar item" msgstr "サーバの離席メッセージを離席バーアイテムに表示" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"チャンネルモードに含まれるチャンネルキーを隠す (チャンネルにモード +k が設定" -"されていた場合、全てのチャンネルモード引数を隠す)" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "IRC サーバが表示されるバーアイテムの名前 (ステータスバー用)" @@ -11297,6 +11297,13 @@ msgstr "%s%s: ソケットにオプション \"nonblock\" を設定できませ msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: \"%s\" のタイムアウト %s" +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "チャンネルモードに含まれるチャンネルキーを隠す (チャンネルにモード +k が設" +#~ "定されていた場合、全てのチャンネルモード引数を隠す)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "\"input_prompt\" バーアイテムではニックネームモードを表示" diff --git a/po/pl.po b/po/pl.po index e619fce8f..96b6af1d2 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -7366,11 +7366,11 @@ msgid "display server away message in away bar item" msgstr "wyświetla wiadomość o nieobecności dla serwera w elemencie paska" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" -"ukrywa klucz kanału w trybach kanału (ukryje to wszystkie atrybuty kanału " -"jeśli na kanale ustawione jest +k)" msgid "name of bar item where IRC server is displayed (for status bar)" msgstr "nazwa paska, w którym wyświetlany jest serwer IRC (dla paska stanu)" @@ -11329,6 +11329,13 @@ msgstr "%s%s: nie można ustawić opcji \"nonblock\" dla gniazda: błąd %d %s" msgid "%s%s: timeout for \"%s\" with %s" msgstr "%s%s: przekroczono czas na \"%s\" z %s" +#~ msgid "" +#~ "hide channel key in channel modes (this will hide all channel modes " +#~ "arguments if mode +k is set on channel)" +#~ msgstr "" +#~ "ukrywa klucz kanału w trybach kanału (ukryje to wszystkie atrybuty kanału " +#~ "jeśli na kanale ustawione jest +k)" + #~ msgid "display nick modes in \"input_prompt\" bar item" #~ msgstr "wyświetl atrybuty nicka w elemencie paska \"input_prompt\"" diff --git a/po/pt_BR.po b/po/pt_BR.po index 693cc2d4a..f4a7d97f7 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -6527,8 +6527,10 @@ msgid "display server away message in away bar item" msgstr "" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" msgid "name of bar item where IRC server is displayed (for status bar)" diff --git a/po/ru.po b/po/ru.po index 649a4bcaa..1d20b0a29 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -6319,8 +6319,10 @@ msgid "display server away message in away bar item" msgstr "отображать уведомление об отсутствии единожды в привате" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" msgid "name of bar item where IRC server is displayed (for status bar)" diff --git a/po/tr.po b/po/tr.po index 6e0ede3e8..9d9b5e9d6 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2014-03-24 14:23+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -5612,8 +5612,10 @@ msgid "display server away message in away bar item" msgstr "" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" msgid "name of bar item where IRC server is displayed (for status bar)" diff --git a/po/weechat.pot b/po/weechat.pot index 65a2e8f3e..33cb2be70 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2014-04-04 10:26+0200\n" +"POT-Creation-Date: 2014-04-04 12:24+0200\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: weechat-dev \n" @@ -5558,8 +5558,10 @@ msgid "display server away message in away bar item" msgstr "" msgid "" -"hide channel key in channel modes (this will hide all channel modes " -"arguments if mode +k is set on channel)" +"hide channel modes arguments if at least one of these modes is in channel " +"modes (\"*\" to always hide all arguments, empty value to never hide " +"arguments); example: \"kf\" to hide arguments if \"k\" or \"f\" are in " +"channel modes" msgstr "" msgid "name of bar item where IRC server is displayed (for status bar)" diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 3306efbf0..e98292d39 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -260,7 +260,7 @@ irc_bar_item_buffer_modes (void *data, struct t_gui_bar_item *item, struct t_hashtable *extra_info) { char modes[128], *modes_without_args; - const char *pos_space, *pos_key; + const char *pos_space; int part_from_channel; struct t_irc_server *server; struct t_irc_channel *channel; @@ -287,17 +287,13 @@ irc_bar_item_buffer_modes (void *data, struct t_gui_bar_item *item, && (strcmp (channel->modes, "+") != 0)) { modes_without_args = NULL; - if (weechat_config_boolean (irc_config_look_item_channel_modes_hide_key)) + if (!irc_config_display_channel_modes_arguments (channel->modes)) { pos_space = strchr(channel->modes, ' '); if (pos_space) { - pos_key = strchr(channel->modes, 'k'); - if (pos_key && (pos_key < pos_space)) - { - modes_without_args = weechat_strndup (channel->modes, - pos_space - channel->modes); - } + modes_without_args = weechat_strndup (channel->modes, + pos_space - channel->modes); } } snprintf (modes, sizeof (modes), diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index f5a48cc4f..c7dce6c10 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -71,7 +71,7 @@ struct t_config_option *irc_config_look_highlight_channel; struct t_config_option *irc_config_look_highlight_pv; struct t_config_option *irc_config_look_highlight_tags_restrict; struct t_config_option *irc_config_look_item_away_message; -struct t_config_option *irc_config_look_item_channel_modes_hide_key; +struct t_config_option *irc_config_look_item_channel_modes_hide_args; struct t_config_option *irc_config_look_item_display_server; struct t_config_option *irc_config_look_item_nick_modes; struct t_config_option *irc_config_look_item_nick_prefix; @@ -246,6 +246,45 @@ irc_config_set_nick_colors () &irc_config_num_nick_colors); } +/* + * Checks if channel modes arguments must be displayed or hidden + * (according to option irc.look.item_channel_modes_hide_args). + * + * Returns: + * 1: channel modes arguments must be displayed + * 0: channel modes arguments must be hidden + */ + +int +irc_config_display_channel_modes_arguments (const char *modes) +{ + char *pos_space, *pos; + const char *ptr_mode; + + pos_space = strchr (modes, ' '); + if (!pos_space) + return 1; + + ptr_mode = weechat_config_string (irc_config_look_item_channel_modes_hide_args); + if (!ptr_mode) + return 1; + + /* "*" means hide all arguments */ + if (strcmp (ptr_mode, "*") == 0) + return 0; + + while (ptr_mode[0]) + { + pos = strchr (modes, ptr_mode[0]); + if (pos && (pos < pos_space)) + return 0; + ptr_mode++; + } + + /* arguments are displayed by default */ + return 1; +} + /* * Callback for changes on option "weechat.color.chat_nick_colors". */ @@ -445,12 +484,12 @@ irc_config_change_look_item_away_message (void *data, } /* - * Callback for changes on option "irc.look.item_channel_modes_hide_key". + * Callback for changes on option "irc.look.item_channel_modes_hide_args". */ void -irc_config_change_look_item_channel_modes_hide_key (void *data, - struct t_config_option *option) +irc_config_change_look_item_channel_modes_hide_args (void *data, + struct t_config_option *option) { /* make C compiler happy */ (void) data; @@ -2357,13 +2396,15 @@ irc_config_init () N_("display server away message in away bar item"), NULL, 0, 0, "on", NULL, 0, NULL, NULL, &irc_config_change_look_item_away_message, NULL, NULL, NULL); - irc_config_look_item_channel_modes_hide_key = weechat_config_new_option ( + irc_config_look_item_channel_modes_hide_args = weechat_config_new_option ( irc_config_file, ptr_section, - "item_channel_modes_hide_key", "boolean", - N_("hide channel key in channel modes (this will hide all channel modes " - "arguments if mode +k is set on channel)"), - NULL, 0, 0, "off", NULL, 0, NULL, NULL, - &irc_config_change_look_item_channel_modes_hide_key, NULL, NULL, NULL); + "item_channel_modes_hide_args", "string", + N_("hide channel modes arguments if at least one of these modes is in " + "channel modes (\"*\" to always hide all arguments, empty value to " + "never hide arguments); example: \"kf\" to hide arguments if \"k\" " + "or \"f\" are in channel modes"), + NULL, 0, 0, "k", NULL, 0, NULL, NULL, + &irc_config_change_look_item_channel_modes_hide_args, NULL, NULL, NULL); irc_config_look_item_display_server = weechat_config_new_option ( irc_config_file, ptr_section, "item_display_server", "integer", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index e059ce8f0..5e2bebfc0 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -119,7 +119,7 @@ extern struct t_config_option *irc_config_look_highlight_channel; extern struct t_config_option *irc_config_look_highlight_pv; extern struct t_config_option *irc_config_look_highlight_tags_restrict; extern struct t_config_option *irc_config_look_item_away_message; -extern struct t_config_option *irc_config_look_item_channel_modes_hide_key; +extern struct t_config_option *irc_config_look_item_channel_modes_hide_args; extern struct t_config_option *irc_config_look_item_display_server; extern struct t_config_option *irc_config_look_item_nick_modes; extern struct t_config_option *irc_config_look_item_nick_prefix; @@ -196,6 +196,7 @@ extern char **irc_config_nicks_hide_password; extern int irc_config_num_nicks_hide_password; extern void irc_config_set_nick_colors (); +extern int irc_config_display_channel_modes_arguments (const char *modes); extern int irc_config_server_check_value_cb (void *data, struct t_config_option *option, const char *value);