1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 21:36:37 +02:00

Add new option irc.look.part_closes_buffer to close buffer when /part is issued on channel (task #10295)

This commit is contained in:
Sebastien Helleu
2010-03-26 20:02:17 +01:00
parent 2bbc228381
commit 485e884751
19 changed files with 84 additions and 28 deletions
+2
View File
@@ -57,6 +57,8 @@ Version 0.3.2 (under dev!)
* irc: fix crash with SSL connection if option ssl_cert is set (bug #28752)
* irc: fix bug with SSL connection (fails sometimes when ssl_verify is on)
(bug #28741)
* irc: add new option irc.look.part_closes_buffer to close buffer when /part
is issued on channel (task #10295)
* irc: fix PART message received on Undernet server (bug #28825)
* irc: fix bug with /away -all: set or unset future away for disconnected
servers (bug #29022)
+5
View File
@@ -133,6 +133,11 @@
** type: boolean
** values: on, off (default value: off)
* *irc.look.part_closes_buffer*
** description: close buffer when /part is issued on a channel
** type: boolean
** values: on, off (default value: off)
* *irc.look.raw_messages*
** description: number of IRC raw messages to save in memory when raw data buffer is closed (messages will be displayed when opening raw data buffer)
** type: integer
+5
View File
@@ -133,6 +133,11 @@
** type: booléen
** valeurs: on, off (valeur par défaut: off)
* *irc.look.part_closes_buffer*
** description: fermer le tampon lorsque /part est exécuté sur un canal
** type: booléen
** valeurs: on, off (valeur par défaut: off)
* *irc.look.raw_messages*
** description: nombre de messages IRC bruts à sauvegarder en mémoire lorsque le tampon des données brutes est fermé (ces messages seront affichés lors de l'ouverture du tampon des données brutes)
** type: entier
+5
View File
@@ -133,6 +133,11 @@
** tipo: bool
** valori: on, off (valore predefinito: off)
* *irc.look.part_closes_buffer*
** descrizione: close buffer when /part is issued on a channel
** tipo: bool
** valori: on, off (valore predefinito: off)
* *irc.look.raw_messages*
** descrizione: numero di messaggi grezzi IRC da salvare quando il buffer dei dati grezzi chiuso (i messaggi verranno visualizzati all'apertura del buffer dei dati grezzi)
** tipo: intero
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-23 10:19+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4381,6 +4381,9 @@ msgstr ""
"zobrazovat upozornění jako soukromé zprávy (pokud je automaticky, použije se "
"soukromý buffer, kdy existuje)"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
"ořezávat barvy z tématu rozhovoru (použito pouze při zobrazování titulku "
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-23 15:44+0100\n"
"Last-Translator: Nils G <weechatter@arcor.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4574,6 +4574,9 @@ msgstr ""
"Zeigt Notizen als private Nachricht an (wird die \"auto\" Option verwendet "
"dann wird ein privater Buffer genutzt, falls vorhanden)"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
"Farben werden im Topic gestrippt (wird nur genutzt wenn der Buffer-Titel "
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-23 10:20+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4425,6 +4425,9 @@ msgstr ""
"mostrar avisos como mensajes privados (si es auto, usa un buffer privado si "
"lo encuentra)"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
"remover colores en el tema (usado solamente cuando se esté mostrando el "
+5 -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-03-26 10:59+0100\n"
"PO-Revision-Date: 2010-03-26 11:02+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-26 19:58+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -4529,6 +4529,9 @@ msgstr ""
"afficher les notices comme des messages privés (si auto, utilise le tampon "
"privé s'il est trouvé)"
msgid "close buffer when /part is issued on a channel"
msgstr "fermer le tampon lorsque /part est exécuté sur un canal"
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
"supprimer les couleurs dans le titre (utilisé seulement lors de l'affichage "
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-23 10:20+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4257,6 +4257,9 @@ msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr "figyelmeztetések privát üzenetként való mutatása"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-24 14:20+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4486,6 +4486,9 @@ msgstr ""
"visualizza notifiche come messaggi privati (se automatico, utilizza il "
"buffer privato se viene trovato)"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
"elimina colori nell'argomento (utilizzato solo quando viene visualizzato il "
+4 -1
View File
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.0-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-23 10:20+0100\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: Polish\n"
@@ -4420,6 +4420,9 @@ msgstr ""
"wyświetlaj powiadomienia jako prywatne wiadomości (jeśli auto, użwa "
"prywatnego bufora jeśli taki istnieje)"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr "usuń kolory w tematach (używane przy wuświetlaniu tytyłu bufora)"
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+0100\n"
"PO-Revision-Date: 2010-03-23 10:20+0100\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4258,6 +4258,9 @@ msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr "отображать notice'ы в виде личных сообщений"
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
+4 -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-03-26 10:59+0100\n"
"POT-Creation-Date: 2010-03-26 19:57+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"
@@ -3642,6 +3642,9 @@ msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
msgid "close buffer when /part is issued on a channel"
msgstr ""
msgid "strip colors in topic (used only when displaying buffer title)"
msgstr ""
+6 -6
View File
@@ -54,7 +54,7 @@ irc_bar_item_away (void *data, struct t_gui_bar_item *item,
if (buffer)
{
irc_buffer_get_server_channel (buffer, &server, NULL);
irc_buffer_get_server_and_channel (buffer, &server, NULL);
if (server && server->is_away)
{
@@ -140,7 +140,7 @@ irc_bar_item_buffer_plugin (void *data, struct t_gui_bar_item *item,
name = weechat_plugin_get_name (ptr_plugin);
if (ptr_plugin == weechat_irc_plugin)
{
irc_buffer_get_server_channel (buffer, &server, &channel);
irc_buffer_get_server_and_channel (buffer, &server, &channel);
if (server && channel
&& (weechat_config_integer (irc_config_look_item_display_server) == IRC_CONFIG_LOOK_ITEM_DISPLAY_SERVER_PLUGIN))
{
@@ -196,7 +196,7 @@ irc_bar_item_buffer_name (void *data, struct t_gui_bar_item *item,
if (buffer)
{
irc_buffer_get_server_channel (buffer, &server, &channel);
irc_buffer_get_server_and_channel (buffer, &server, &channel);
if (server || channel)
{
if (server && !channel)
@@ -305,7 +305,7 @@ irc_bar_item_channel (void *data, struct t_gui_bar_item *item,
if (buffer)
{
irc_buffer_get_server_channel (buffer, &server, &channel);
irc_buffer_get_server_and_channel (buffer, &server, &channel);
if (server || channel)
{
if (server && !channel)
@@ -375,7 +375,7 @@ irc_bar_item_lag (void *data, struct t_gui_bar_item *item,
if (buffer)
{
irc_buffer_get_server_channel (buffer, &server, NULL);
irc_buffer_get_server_and_channel (buffer, &server, NULL);
if (server
&& (server->lag >= weechat_config_integer (irc_config_network_lag_min_show) * 1000))
@@ -417,7 +417,7 @@ irc_bar_item_input_prompt (void *data, struct t_gui_bar_item *item,
if (buffer)
{
irc_buffer_get_server_channel (buffer, &server, &channel);
irc_buffer_get_server_and_channel (buffer, &server, &channel);
if (!server || !server->nick)
return NULL;
+6 -6
View File
@@ -35,15 +35,15 @@
/*
* irc_buffer_get_server_channel: get IRC server and channel pointers with a
* buffer pointer
* (buffer may be a server or a channel)
* irc_buffer_get_server_and_channel: get IRC server and channel pointers with
* a buffer pointer
* (buffer may be a server or a channel)
*/
void
irc_buffer_get_server_channel (struct t_gui_buffer *buffer,
struct t_irc_server **server,
struct t_irc_channel **channel)
irc_buffer_get_server_and_channel (struct t_gui_buffer *buffer,
struct t_irc_server **server,
struct t_irc_channel **channel)
{
struct t_irc_server *ptr_server;
struct t_irc_channel *ptr_channel;
+6 -6
View File
@@ -25,7 +25,7 @@
struct t_irc_server *ptr_server = NULL; \
buffer_plugin = weechat_buffer_get_pointer (__buffer, "plugin"); \
if (buffer_plugin == weechat_irc_plugin) \
irc_buffer_get_server_channel (__buffer, &ptr_server, NULL);
irc_buffer_get_server_and_channel (__buffer, &ptr_server, NULL);
#define IRC_BUFFER_GET_SERVER_CHANNEL(__buffer) \
struct t_weechat_plugin *buffer_plugin = NULL; \
@@ -34,8 +34,8 @@
buffer_plugin = weechat_buffer_get_pointer (__buffer, "plugin"); \
if (buffer_plugin == weechat_irc_plugin) \
{ \
irc_buffer_get_server_channel (__buffer, &ptr_server, \
&ptr_channel); \
irc_buffer_get_server_and_channel (__buffer, &ptr_server, \
&ptr_channel); \
}
#define IRC_BUFFER_RAW_NAME "irc_raw"
@@ -48,9 +48,9 @@ struct t_gui_buffer;
struct t_irc_server;
struct t_irc_channel;
extern void irc_buffer_get_server_channel (struct t_gui_buffer *buffer,
struct t_irc_server **server,
struct t_irc_channel **channel);
extern void irc_buffer_get_server_and_channel (struct t_gui_buffer *buffer,
struct t_irc_server **server,
struct t_irc_channel **channel);
extern char *irc_buffer_build_name (const char *server, const char *channel);
extern int irc_buffer_close_cb (void *data, struct t_gui_buffer *buffer);
extern struct t_gui_buffer *irc_buffer_search_first_for_all_servers ();
+6
View File
@@ -68,6 +68,7 @@ struct t_config_option *irc_config_look_highlight_tags;
struct t_config_option *irc_config_look_item_display_server;
struct t_config_option *irc_config_look_msgbuffer_fallback;
struct t_config_option *irc_config_look_notice_as_pv;
struct t_config_option *irc_config_look_part_closes_buffer;
struct t_config_option *irc_config_look_raw_messages;
struct t_config_option *irc_config_look_show_away_once;
struct t_config_option *irc_config_look_smart_filter;
@@ -1572,6 +1573,11 @@ irc_config_init ()
N_("display notices as private messages (if auto, use private buffer "
"if found)"),
"auto|never|always", 0, 0, "auto", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_part_closes_buffer = weechat_config_new_option (
irc_config_file, ptr_section,
"part_closes_buffer", "boolean",
N_("close buffer when /part is issued on a channel"),
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",
+1
View File
@@ -90,6 +90,7 @@ extern struct t_config_option *irc_config_look_highlight_tags;
extern struct t_config_option *irc_config_look_item_display_server;
extern struct t_config_option *irc_config_look_msgbuffer_fallback;
extern struct t_config_option *irc_config_look_notice_as_pv;
extern struct t_config_option *irc_config_look_part_closes_buffer;
extern struct t_config_option *irc_config_look_raw_messages;
extern struct t_config_option *irc_config_look_show_away_once;
extern struct t_config_option *irc_config_look_smart_filter;
+5
View File
@@ -1255,6 +1255,11 @@ IRC_PROTOCOL_CALLBACK(part)
else
irc_command_join_server (server, ptr_channel->name);
}
else
{
if (weechat_config_boolean (irc_config_look_part_closes_buffer))
weechat_buffer_close (ptr_channel->buffer);
}
}
else
irc_nick_free (ptr_channel, ptr_nick);