1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

Add new option irc.look.item_away_message

This commit is contained in:
Sebastien Helleu
2010-10-12 08:31:12 +02:00
parent 000a222378
commit 6e695ebe65
17 changed files with 124 additions and 20 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.4-dev, 2010-10-11
v0.3.4-dev, 2010-10-12
Version 0.3.4 (under dev!)
@@ -21,6 +21,7 @@ Version 0.3.4 (under dev!)
* api: add priority for hooks (task #10550)
* api: add new functions: hashtable_get_string, hook_info_hashtable,
info_get_hashtable
* irc: add new option irc.look.item_away_message
* irc: add tag "nick_xxx" in user messages
* irc: move options from network section to server section: connection_timeout,
anti_flood_prio_high, anti_flood_prio_low, away_check, away_check_max_nicks,
+5
View File
@@ -133,6 +133,11 @@
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"irc_privmsg,irc_notice"`)
* *irc.look.item_away_message*
** Beschreibung: `display server away message in away bar item`
** Typ: boolesch
** Werte: on, off (Standardwert: `on`)
* *irc.look.item_channel_modes*
** Beschreibung: `Zeige die Channel-Modi mittels "buffer_name" in der Bar-Item an`
** Typ: boolesch
+5
View File
@@ -133,6 +133,11 @@
** type: string
** values: any string (default value: `"irc_privmsg,irc_notice"`)
* *irc.look.item_away_message*
** description: `display server away message in away bar item`
** type: boolean
** values: on, off (default value: `on`)
* *irc.look.item_channel_modes*
** description: `display channel modes in "buffer_name" bar item`
** type: boolean
+5
View File
@@ -133,6 +133,11 @@
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"irc_privmsg,irc_notice"`)
* *irc.look.item_away_message*
** description: `afficher le message d'absence du serveur dans l'objet de barre d'absence`
** type: booléen
** valeurs: on, off (valeur par défaut: `on`)
* *irc.look.item_channel_modes*
** description: `affiche les modes du canal dans l'objet de barre "buffer_name"`
** type: booléen
+5
View File
@@ -133,6 +133,11 @@
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"irc_privmsg,irc_notice"`)
* *irc.look.item_away_message*
** descrizione: `display server away message in away bar item`
** tipo: bool
** valori: on, off (valore predefinito: `on`)
* *irc.look.item_channel_modes*
** descrizione: `visualizza le modalità canale nell'elemento barra "buffer_name"`
** tipo: bool
+6 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4584,6 +4584,11 @@ msgstr ""
"zobrazit v soukromém okně zprávu po tom co se uživatel vráti (po odpojení od "
"serveru)"
#, fuzzy
msgid "display server away message in away bar item"
msgstr ""
"v soukromém okně zobrazit vzdálenou zprávu o nepřítomnosti pouze jednou"
msgid "display channel modes in \"buffer_name\" bar item"
msgstr "zobrazit módy kanálu v položce pole \"buffer_name\""
+6 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-11 16:31+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-10-11 16:32+0200\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4768,6 +4768,11 @@ msgstr ""
"Es wird bei einer privaten Unterhaltung eine Mitteilung ausgegeben falls der "
"User wieder zurück ist (falls der User sich beim Server abgemeldet hat)"
#, fuzzy
msgid "display server away message in away bar item"
msgstr ""
"In einer privaten Unterhaltung nur einmal eine Abwesenheitsnachricht anzeigen"
msgid "display channel modes in \"buffer_name\" bar item"
msgstr "Zeige die Channel-Modi mittels \"buffer_name\" in der Bar-Item an"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4639,6 +4639,10 @@ msgstr ""
"mostrar un mensaje en privado cuando el usuario esta de vuelta (después de "
"salir del servidor)"
#, fuzzy
msgid "display server away message in away bar item"
msgstr "mostrar mensaje de ausencia remota únicamente una vez en privado"
msgid "display channel modes in \"buffer_name\" bar item"
msgstr "mostrar los modos del canal en el elemento de barra \"buffer_name\""
+13 -2
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"PO-Revision-Date: 2010-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-10-12 08:25+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -4697,6 +4697,10 @@ msgstr ""
"afficher un message en privé lorsque l'utilisateur est de retour (après "
"avoir quitté le serveur)"
msgid "display server away message in away bar item"
msgstr ""
"afficher le message d'absence du serveur dans l'objet de barre d'absence"
msgid "display channel modes in \"buffer_name\" bar item"
msgstr "affiche les modes du canal dans l'objet de barre \"buffer_name\""
@@ -7039,6 +7043,13 @@ msgstr "Hashtable (sortie)"
msgid "Pointer"
msgstr "Pointeur"
#~ msgid ""
#~ "display full away message in away bar item (if not set, display "
#~ "translated string \"away\")"
#~ msgstr ""
#~ "afficher le message complet d'absence dans l'objet de barre d'absence (si "
#~ "non défini, affiche la chaîne tra"
#~ msgid "open new channels near server"
#~ msgstr "ouvrir les nouveaux canaux près du serveur"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4370,6 +4370,10 @@ msgstr "privát beszélgetésben a másik fél távollétét csak egyszer jelezz
msgid "display a message in private when user is back (after quit on server)"
msgstr ""
#, fuzzy
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 "display channel modes in \"buffer_name\" bar item"
msgstr ""
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 19:10+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-10-10 19:30+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4652,6 +4652,10 @@ msgstr ""
"visualizza un messaggio in privato quando l'utente è tornato (dopo l'uscita "
"dal server)"
#, fuzzy
msgid "display server away message in away bar item"
msgstr "mostra il messaggio di assenza remota una sola volta in privato"
msgid "display channel modes in \"buffer_name\" bar item"
msgstr "visualizza le modalità canale nell'elemento barra \"buffer_name\""
+6 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4620,6 +4620,11 @@ msgstr ""
msgid "display a message in private when user is back (after quit on server)"
msgstr "pokaż pywatną wiadomość, kiedy użytkownik wróci na serwer"
#, fuzzy
msgid "display server away message in away bar item"
msgstr ""
"pokazuj wiadomości o nieobecności rozmówcy tylko raz w prywatnej rozmiowie"
msgid "display channel modes in \"buffer_name\" bar item"
msgstr "wyświetl atrybuty kanału w elemencie paska \"buffer_name\""
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2010-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4374,6 +4374,10 @@ msgstr "отображать уведомление об отсутствии е
msgid "display a message in private when user is back (after quit on server)"
msgstr ""
#, fuzzy
msgid "display server away message in away bar item"
msgstr "отображать уведомление об отсутствии единожды в привате"
msgid "display channel modes in \"buffer_name\" bar item"
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-10-10 17:17+0200\n"
"POT-Creation-Date: 2010-10-12 08:24+0200\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"
@@ -3731,6 +3731,9 @@ msgstr ""
msgid "display a message in private when user is back (after quit on server)"
msgstr ""
msgid "display server away message in away bar item"
msgstr ""
msgid "display channel modes in \"buffer_name\" bar item"
msgstr ""
+23 -9
View File
@@ -45,13 +45,15 @@ irc_bar_item_away (void *data, struct t_gui_bar_item *item,
{
struct t_gui_buffer *buffer;
struct t_irc_server *server;
char *buf;
char *buf, *message;
int length;
/* make C compiler happy */
(void) data;
(void) item;
buf = NULL;
buffer = weechat_window_get_pointer (window, "buffer");
if (buffer)
@@ -60,19 +62,31 @@ irc_bar_item_away (void *data, struct t_gui_bar_item *item,
if (server && server->is_away)
{
length = strlen (_("away")) + 64 + 1;
buf = malloc (length);
if (buf)
if (weechat_config_boolean (irc_config_look_item_away_message)
&& server->away_message && server->away_message[0])
{
snprintf (buf, length, "%s%s",
IRC_COLOR_ITEM_AWAY,
_("away"));
return buf;
message = strdup (server->away_message);
}
else
{
message = strdup (_("away"));
}
if (message)
{
length = strlen (message) + 64 + 1;
buf = malloc (length);
if (buf)
{
snprintf (buf, length, "%s%s",
IRC_COLOR_ITEM_AWAY,
message);
}
free (message);
}
}
}
return NULL;
return buf;
}
/*
+23
View File
@@ -67,6 +67,7 @@ struct t_config_option *irc_config_look_display_host_quit;
struct t_config_option *irc_config_look_display_old_topic;
struct t_config_option *irc_config_look_display_pv_away_once;
struct t_config_option *irc_config_look_display_pv_back;
struct t_config_option *irc_config_look_item_away_message;
struct t_config_option *irc_config_look_item_channel_modes;
struct t_config_option *irc_config_look_item_channel_modes_hide_key;
struct t_config_option *irc_config_look_item_nick_modes;
@@ -241,6 +242,22 @@ irc_config_change_look_server_buffer (void *data,
}
}
/*
* irc_config_change_look_item_away_message: called when the "item
* away message" option is changed
*/
void
irc_config_change_look_item_away_message (void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) data;
(void) option;
weechat_bar_item_update ("away");
}
/*
* irc_config_change_look_item_channel_modes: called when the "display
* channel modes" option is changed
@@ -1701,6 +1718,12 @@ irc_config_init ()
N_("display a message in private when user is back (after quit on "
"server)"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_item_away_message = weechat_config_new_option (
irc_config_file, ptr_section,
"item_away_message", "boolean",
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 = weechat_config_new_option (
irc_config_file, ptr_section,
"item_channel_modes", "boolean",
+1
View File
@@ -93,6 +93,7 @@ extern struct t_config_option *irc_config_look_display_host_quit;
extern struct t_config_option *irc_config_look_display_old_topic;
extern struct t_config_option *irc_config_look_display_pv_away_once;
extern struct t_config_option *irc_config_look_display_pv_back;
extern struct t_config_option *irc_config_look_item_away_message;
extern struct t_config_option *irc_config_look_item_channel_modes;
extern struct t_config_option *irc_config_look_item_channel_modes_hide_key;
extern struct t_config_option *irc_config_look_item_nick_modes;