1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 14:56:39 +02:00

Add option irc.look.display_channel_modes_hide_key to hide channel key in channel modes (bug #23961)

This commit is contained in:
Sebastien Helleu
2010-02-02 13:56:35 +01:00
parent 94ddf61d20
commit 5aa82a85e3
19 changed files with 126 additions and 17 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
FlashCode <flashcode@flashtux.org>
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)
+5
View File
@@ -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
+1 -1
View File
@@ -155,7 +155,7 @@
value: number of history entries to show
........................................
&bull; *`/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]`::
&bull; *`/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
+5
View File
@@ -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
+1 -1
View File
@@ -155,7 +155,7 @@
valeur: nombre d'entrées dans l'historique à afficher
........................................
&bull; *`/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]`::
&bull; *`/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
+5
View File
@@ -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
+1 -1
View File
@@ -155,7 +155,7 @@
valore: numero delle voci nella cronologia da mostrare
........................................
&bull; *`/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]`::
&bull; *`/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
+6 -1
View File
@@ -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 <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 ""
+6 -1
View File
@@ -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 <weechatter@arcor.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"
+6 -1
View File
@@ -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 <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"
+10 -2
View File
@@ -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 <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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é"
+6 -1
View File
@@ -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 <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 ""
+6 -1
View File
@@ -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 <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"
+6 -1
View File
@@ -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 <soltys@szluug.org>\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"
+6 -1
View File
@@ -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 <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 ""
+6 -1
View File
@@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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 ""
+19 -3
View File
@@ -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);
}
}
}
+27
View File
@@ -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",
+1
View File
@@ -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;