diff --git a/ChangeLog b/ChangeLog index 677e13b35..95529528a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= FlashCode -v0.3.2-dev, 2010-01-31 +v0.3.2-dev, 2010-02-02 Version 0.3.2 (under dev!) @@ -17,6 +17,8 @@ Version 0.3.2 (under dev!) * irc: fix bug with SSL connection (fails sometimes when ssl_verify is on) (bug #28741) * irc: add options irc.look.smart_filter_join and irc.look.smart_filter_quit +* irc: add option irc.look.display_channel_modes_hide_key to hide channel key + in channel modes (bug #23961) * irc: fix compilation with old GnuTLS versions (bug #28723) * logger: allow date format in logger options path and mask (task #9430) * xfer: fix crash when purging old xfer chats (bug #28764) diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index eefde4554..f40a919cc 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -48,6 +48,11 @@ ** type: boolean ** values: on, off (default value: on) +* *irc.look.display_channel_modes_hide_key* +** description: hide channel key if modes are displayed in "buffer_name" bar item (this will hide all channel modes arguments if mode +k is set on channel) +** type: boolean +** values: on, off (default value: off) + * *irc.look.display_ctcp_blocked* ** description: display CTCP message even if it is blocked ** type: boolean diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index 6c884229e..90109fdad 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -155,7 +155,7 @@ value: number of history entries to show ........................................ -• *`/input`* `return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | grab_key_command | scroll_unread | set_unread | set_unread_current_buffer | insert [args]`:: +• *`/input`* `return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | grab_key_command | scroll_unread | set_unread | set_unread_current_buffer | switch_active_buffer | insert [args]`:: ........................................ functions for command line diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index 8c4c23e17..1c6b8164e 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -48,6 +48,11 @@ ** type: booléen ** valeurs: on, off (valeur par défaut: on) +* *irc.look.display_channel_modes_hide_key* +** description: cacher la clé du canal si les modes sont affichés dans l'objet de barre "buffer_name" (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) + * *irc.look.display_ctcp_blocked* ** description: afficher le message CTCP même s'il est bloqué ** type: booléen diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 63456f9cb..178a337b5 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -155,7 +155,7 @@ valeur: nombre d'entrées dans l'historique à afficher ........................................ -• *`/input`* `return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | grab_key_command | scroll_unread | set_unread | set_unread_current_buffer | insert [args]`:: +• *`/input`* `return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | grab_key_command | scroll_unread | set_unread | set_unread_current_buffer | switch_active_buffer | insert [args]`:: ........................................ fonctions pour la ligne de commande diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt index ee1ece928..767b945ed 100644 --- a/doc/it/autogen/user/irc_options.txt +++ b/doc/it/autogen/user/irc_options.txt @@ -48,6 +48,11 @@ ** tipo: bool ** valori: on, off (valore predefinito: on) +* *irc.look.display_channel_modes_hide_key* +** descrizione: hide channel key if modes are displayed in "buffer_name" bar item (this will hide all channel modes arguments if mode +k is set on channel) +** tipo: bool +** valori: on, off (valore predefinito: off) + * *irc.look.display_ctcp_blocked* ** descrizione: visualizza messaggio CTCP anche se bloccato ** tipo: bool diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 4f97e0617..154421196 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -155,7 +155,7 @@ valore: numero delle voci nella cronologia da mostrare ........................................ -• *`/input`* `return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | grab_key_command | scroll_unread | set_unread | set_unread_current_buffer | insert [args]`:: +• *`/input`* `return | complete_next | complete_previous | search_next | delete_previous_char | delete_next_char | delete_previous_word | delete_next_word | delete_beginning_of_line | delete_end_of_line | delete_line | clipboard_paste | transpose_chars | move_beginning_of_line | move_end_of_line | move_previous_char | move_next_char | move_previous_word | move_next_word | history_previous | history_next | history_global_previous | history_global_next | jump_smart | jump_last_buffer | jump_previously_visited_buffer | jump_next_visited_buffer | hotlist_clear | grab_key | grab_key_command | scroll_unread | set_unread | set_unread_current_buffer | switch_active_buffer | insert [args]`:: ........................................ funzioni per la riga di comando diff --git a/po/cs.po b/po/cs.po index 413db28a7..0a3ebb860 100644 --- a/po/cs.po +++ b/po/cs.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-23 11:56+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -4079,6 +4079,11 @@ msgstr "zobrazit zprávu, když označen/odznačen jako nepřítomen" msgid "display channel modes in \"buffer_name\" bar item" msgstr "zobrazit módy kanálu v položce pole \"buffer_name\"" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "" diff --git a/po/de.po b/po/de.po index 9dd62b45d..9ea7c02c1 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-26 22:35+0100\n" "Last-Translator: Nils G \n" "Language-Team: weechat-dev \n" @@ -4255,6 +4255,11 @@ msgstr "Bei Abwesenheit und Rückkehr eine Nachricht anzeigen" msgid "display channel modes in \"buffer_name\" bar item" msgstr "Zeige die Channel-Modi mittels \"buffer_name\" in der Bar-Item an" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "CTCP Nachrichten werden angezeigt, obwohl sie unterdrückt werden" diff --git a/po/es.po b/po/es.po index f320ec4ed..aeadaff0e 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-23 11:56+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -4164,6 +4164,11 @@ msgstr "mostrar mensaje cuando se cambie el estado de ausente" msgid "display channel modes in \"buffer_name\" bar item" msgstr "mostrar los modos del canal en el elemento de barra \"buffer_name\"" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "mostrar mensaje CTCP incluso si está bloqueado" diff --git a/po/fr.po b/po/fr.po index 90b0f42c8..80c2a73b6 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" -"PO-Revision-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" +"PO-Revision-Date: 2010-02-02 13:22+0100\n" "Last-Translator: FlashCode \n" "Language-Team: weechat-dev \n" "MIME-Version: 1.0\n" @@ -4191,6 +4191,14 @@ msgstr "affiche un message pour l'absence/le retour" msgid "display channel modes in \"buffer_name\" bar item" msgstr "affiche les modes du canal dans l'objet de barre \"buffer_name\"" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" +"cacher la clé du canal si les modes sont affichés dans l'objet de barre " +"\"buffer_name\" (cela cachera tous les paramètres des modes du canal si le " +"mode +k est défini sur le canal)" + msgid "display CTCP message even if it is blocked" msgstr "afficher le message CTCP même s'il est bloqué" diff --git a/po/hu.po b/po/hu.po index d8232c644..78ee534f7 100644 --- a/po/hu.po +++ b/po/hu.po @@ -12,7 +12,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-23 11:57+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4025,6 +4025,11 @@ msgstr "üzenet mutatása távollétkor/visszatéréskor" msgid "display channel modes in \"buffer_name\" bar item" msgstr "" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "" diff --git a/po/it.po b/po/it.po index 51651ed6a..15a123059 100644 --- a/po/it.po +++ b/po/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Weechat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-23 11:57+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -4163,6 +4163,11 @@ msgstr "visualizza messaggio al cambio dello stato di assenza" msgid "display channel modes in \"buffer_name\" bar item" msgstr "visualizza le modalità canale nell'elemento barra \"buffer_name\"" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "visualizza messaggio CTCP anche se bloccato" diff --git a/po/pl.po b/po/pl.po index 397557441..9b972a5bd 100644 --- a/po/pl.po +++ b/po/pl.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-23 11:57+0100\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: Polish\n" @@ -4146,6 +4146,11 @@ msgstr "wyświetla wiadomość, kiedy stajemy sie/przestajemy być nieobecni" msgid "display channel modes in \"buffer_name\" bar item" msgstr "wyświetl atrybuty kanału w elemencie paska \"buffer_name\"" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "wyświetl wiadomość CTCP nawet jeśli jest blokowana" diff --git a/po/ru.po b/po/ru.po index 39cd324dc..364463df0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: 2010-01-23 11:57+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -4026,6 +4026,11 @@ msgstr "показывать сообщение во все каналы при msgid "display channel modes in \"buffer_name\" bar item" msgstr "" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 79a36825f..f59585905 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: 2010-01-26 16:02+0100\n" +"POT-Creation-Date: 2010-02-02 13:21+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -3422,6 +3422,11 @@ msgstr "" msgid "display channel modes in \"buffer_name\" bar item" msgstr "" +msgid "" +"hide channel key if modes are displayed in \"buffer_name\" bar item (this " +"will hide all channel modes arguments if mode +k is set on channel)" +msgstr "" + msgid "display CTCP message even if it is blocked" msgstr "" diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 6f84e3ea6..495c80701 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -172,8 +172,8 @@ char * irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item, struct t_gui_window *window) { - char buf[512], buf_name[256], modes[128]; - const char *name; + char buf[512], buf_name[256], modes[128], *modes_without_args; + const char *name, *pos_space, *pos_key; int part_from_channel, display_server; struct t_gui_buffer *buffer; struct t_irc_server *server; @@ -230,12 +230,28 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item, && channel->modes && channel->modes[0] && (strcmp (channel->modes, "+") != 0)) { + modes_without_args = NULL; + if (weechat_config_boolean (irc_config_look_display_channel_modes_hide_key)) + { + 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); + } + } + } snprintf (modes, sizeof (modes), "%s(%s%s%s)", IRC_COLOR_BAR_DELIM, IRC_COLOR_ITEM_CHANNEL_MODES, - channel->modes, + (modes_without_args) ? modes_without_args : channel->modes, IRC_COLOR_BAR_DELIM); + if (modes_without_args) + free (modes_without_args); } } } diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index e6de7672c..50dcc552b 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -56,6 +56,7 @@ struct t_config_option *irc_config_look_nick_suffix; struct t_config_option *irc_config_look_nick_completion_smart; struct t_config_option *irc_config_look_display_away; struct t_config_option *irc_config_look_display_channel_modes; +struct t_config_option *irc_config_look_display_channel_modes_hide_key; struct t_config_option *irc_config_look_display_ctcp_blocked; struct t_config_option *irc_config_look_display_ctcp_reply; struct t_config_option *irc_config_look_display_ctcp_unknown; @@ -231,6 +232,24 @@ irc_config_change_look_display_channel_modes (void *data, weechat_bar_item_update ("buffer_name"); } +/* + * irc_config_change_look_display_channel_modes_hide_key: called when the + * "display channel modes + * hide key" option is + * changed + */ + +void +irc_config_change_look_display_channel_modes_hide_key (void *data, + struct t_config_option *option) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + weechat_bar_item_update ("buffer_name"); +} + /* * irc_config_change_look_display_nick_modes: called when the "display * nick modes" option is changed @@ -1365,6 +1384,14 @@ irc_config_init () N_("display channel modes in \"buffer_name\" bar item"), NULL, 0, 0, "on", NULL, 0, NULL, NULL, &irc_config_change_look_display_channel_modes, NULL, NULL, NULL); + irc_config_look_display_channel_modes_hide_key = weechat_config_new_option ( + irc_config_file, ptr_section, + "display_channel_modes_hide_key", "boolean", + N_("hide channel key if modes are displayed in \"buffer_name\" bar " + "item (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_display_channel_modes_hide_key, NULL, NULL, NULL); irc_config_look_display_ctcp_blocked = weechat_config_new_option ( irc_config_file, ptr_section, "display_ctcp_blocked", "boolean", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index b4a45ef5d..96603a3c5 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -78,6 +78,7 @@ extern struct t_config_option *irc_config_look_nick_suffix; extern struct t_config_option *irc_config_look_nick_completion_smart; extern struct t_config_option *irc_config_look_display_away; extern struct t_config_option *irc_config_look_display_channel_modes; +extern struct t_config_option *irc_config_look_display_channel_modes_hide_key; extern struct t_config_option *irc_config_look_display_ctcp_blocked; extern struct t_config_option *irc_config_look_display_ctcp_reply; extern struct t_config_option *irc_config_look_display_ctcp_unknown;