mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 21:36:37 +02:00
core: add "full_name" in buffer structure
This commit is contained in:
@@ -228,6 +228,7 @@
|
||||
'layout_number' (integer) +
|
||||
'layout_number_merge_order' (integer) +
|
||||
'name' (string) +
|
||||
'full_name' (string) +
|
||||
'short_name' (string) +
|
||||
'type' (integer) +
|
||||
'notify' (integer) +
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
'layout_number' (integer) +
|
||||
'layout_number_merge_order' (integer) +
|
||||
'name' (string) +
|
||||
'full_name' (string) +
|
||||
'short_name' (string) +
|
||||
'type' (integer) +
|
||||
'notify' (integer) +
|
||||
|
||||
@@ -8536,6 +8536,7 @@ Content of hashtable sent to callback (keys and values are of type "string"):
|
||||
| _buffer_number | number of buffer | "1" ... "n" | "-1"
|
||||
| _buffer_plugin | plugin name of buffer | "core", "irc", ... | ""
|
||||
| _buffer_name | name of buffer | "weechat", "freenode.#weechat", ... | ""
|
||||
| _buffer_full_name | full name of buffer | "core.weechat", "irc.freenode.#weechat", ... | ""
|
||||
| _buffer_localvar_XXX ^(2)^ | local variables of buffer | any value | not set
|
||||
| _chat | chat area indicator | "0" or "1" | "0"
|
||||
| _chat_line_x | column in line ^(3)^ | "0" ... "n" | "-1"
|
||||
@@ -9144,6 +9145,7 @@ Arguments:
|
||||
** 'plugin': name of plugin which created this buffer ("core" for WeeChat main
|
||||
buffer)
|
||||
** 'name': name of buffer
|
||||
** 'full_name': full name of buffer ("plugin.name") (_new in version 0.3.7_)
|
||||
** 'short_name': short name of buffer
|
||||
** 'title': title of buffer
|
||||
** 'input': input text
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
'layout_number' (integer) +
|
||||
'layout_number_merge_order' (integer) +
|
||||
'name' (string) +
|
||||
'full_name' (string) +
|
||||
'short_name' (string) +
|
||||
'type' (integer) +
|
||||
'notify' (integer) +
|
||||
|
||||
@@ -8670,35 +8670,36 @@ Contenu de la hashtable envoyée au "callback" (les clés et valeurs sont de typ
|
||||
|
||||
[width="100%",cols="5m,5,8,3",options="header"]
|
||||
|========================================
|
||||
| Clé ^(1)^ | Description | Exemples de valeur | Valeur si non applicable
|
||||
| _x | colonne sur l'écran 2+| "0" ... "n"
|
||||
| _y | ligne sur l'écran 2+| "0" ... "n"
|
||||
| _key | touche ou évènement souris 2+| "button1", "button2-gesture-left", ...
|
||||
| _window | pointeur vers la fenêtre | "0x12345678" | ""
|
||||
| _window_number | numéro de la fenêtre | "1" ... "n" | "*"
|
||||
| _buffer | pointeur vers le tampon | "0x12345678" | ""
|
||||
| _buffer_number | numéro du tampon | "1" ... "n" | "-1"
|
||||
| _buffer_plugin | nom d'extension du tampon | "core", "irc", ... | ""
|
||||
| _buffer_name | nom du tampon | "weechat", "freenode.#weechat", ... | ""
|
||||
| _buffer_localvar_XXX ^(2)^ | variables locales du tampon | toute chaîne | non défini
|
||||
| _chat | indicateur zone "chat" | "0" ou "1" | "0"
|
||||
| _chat_line_x | colonne de la ligne ^(3)^ | "0" ... "n" | "-1"
|
||||
| _chat_line_y | numéro de ligne ^(3)^ | "0" ... "n" | "-1"
|
||||
| _chat_line_date | date/heure de la ligne | "1313237175" | "0"
|
||||
| _chat_line_date_printed | date/heure de la ligne ^(4)^ | "1313237175" | "0"
|
||||
| _chat_line_time | heure affichée | "14:06:15" | ""
|
||||
| _chat_line_tags | étiquettes de la ligne | "irc_privmsg,notify_message,nick_FlashCode,log1" | ""
|
||||
| _chat_line_nick | pseudo de la ligne | "FlashCode" | ""
|
||||
| _chat_line_prefix | préfixe de la ligne | "@FlashCode" | ""
|
||||
| _chat_line_message | message de la ligne | "Hello world!" | ""
|
||||
| _chat_word | mot à la position (x,y) | "Hello" | ""
|
||||
| _chat_bol | début de ligne ⇒ (x-1,y) | "He" | ""
|
||||
| _chat_eol | (x,y) ⇒ fin de ligne | "llo world!" | ""
|
||||
| _bar_name | nom de la barre | "title", "nicklist", ... | ""
|
||||
| _bar_filling | remplissage de la barre | "horizontal", "vertical", ... | ""
|
||||
| _bar_item_name | nom de l'objet de barre | "buffer_nicklist", "hotlist", ... | ""
|
||||
| _bar_item_line | ligne dans l'objet de barre | "0" ... "n" | "-1"
|
||||
| _bar_item_col | colonne dans l'objet de barre | "0" ... "n" | "-1"
|
||||
| Clé ^(1)^ | Description | Exemples de valeur | Valeur si non applicable
|
||||
| _x | colonne sur l'écran 2+| "0" ... "n"
|
||||
| _y | ligne sur l'écran 2+| "0" ... "n"
|
||||
| _key | touche ou évènement souris 2+| "button1", "button2-gesture-left", ...
|
||||
| _window | pointeur vers la fenêtre | "0x12345678" | ""
|
||||
| _window_number | numéro de la fenêtre | "1" ... "n" | "*"
|
||||
| _buffer | pointeur vers le tampon | "0x12345678" | ""
|
||||
| _buffer_number | numéro du tampon | "1" ... "n" | "-1"
|
||||
| _buffer_plugin | nom d'extension du tampon | "core", "irc", ... | ""
|
||||
| _buffer_name | nom du tampon | "weechat", "freenode.#weechat", ... | ""
|
||||
| _buffer_full_name | nom complet du tampon | "core.weechat", "irc.freenode.#weechat", ... | ""
|
||||
| _buffer_localvar_XXX ^(2)^ | variables locales du tampon | toute chaîne | non défini
|
||||
| _chat | indicateur zone "chat" | "0" ou "1" | "0"
|
||||
| _chat_line_x | colonne de la ligne ^(3)^ | "0" ... "n" | "-1"
|
||||
| _chat_line_y | numéro de ligne ^(3)^ | "0" ... "n" | "-1"
|
||||
| _chat_line_date | date/heure de la ligne | "1313237175" | "0"
|
||||
| _chat_line_date_printed | date/heure de la ligne ^(4)^ | "1313237175" | "0"
|
||||
| _chat_line_time | heure affichée | "14:06:15" | ""
|
||||
| _chat_line_tags | étiquettes de la ligne | "irc_privmsg,notify_message,nick_FlashCode,log1" | ""
|
||||
| _chat_line_nick | pseudo de la ligne | "FlashCode" | ""
|
||||
| _chat_line_prefix | préfixe de la ligne | "@FlashCode" | ""
|
||||
| _chat_line_message | message de la ligne | "Hello world!" | ""
|
||||
| _chat_word | mot à la position (x,y) | "Hello" | ""
|
||||
| _chat_bol | début de ligne ⇒ (x-1,y) | "He" | ""
|
||||
| _chat_eol | (x,y) ⇒ fin de ligne | "llo world!" | ""
|
||||
| _bar_name | nom de la barre | "title", "nicklist", ... | ""
|
||||
| _bar_filling | remplissage de la barre | "horizontal", "vertical", ... | ""
|
||||
| _bar_item_name | nom de l'objet de barre | "buffer_nicklist", "hotlist", ... | ""
|
||||
| _bar_item_line | ligne dans l'objet de barre | "0" ... "n" | "-1"
|
||||
| _bar_item_col | colonne dans l'objet de barre | "0" ... "n" | "-1"
|
||||
|========================================
|
||||
|
||||
[NOTE]
|
||||
@@ -9294,6 +9295,7 @@ Paramètres :
|
||||
** 'plugin' : nom de l'extension qui a créé ce tampon ("core" pour le tampon
|
||||
principal WeeChat)
|
||||
** 'name' : nom du tampon
|
||||
** 'full_name' : nom complet du tampon ("extension.nom") (_nouveau dans la version 0.3.7_)
|
||||
** 'short_name' : nom court du tampon
|
||||
** 'title' : titre du tampon
|
||||
** 'input' : texte saisi
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
'layout_number' (integer) +
|
||||
'layout_number_merge_order' (integer) +
|
||||
'name' (string) +
|
||||
'full_name' (string) +
|
||||
'short_name' (string) +
|
||||
'type' (integer) +
|
||||
'notify' (integer) +
|
||||
|
||||
@@ -8596,6 +8596,8 @@ Contenuto della tabella hash inviata alla callback (tasti e valori sono di tipo
|
||||
| _buffer_number | numero del buffer | "1" ... "n" | "-1"
|
||||
| _buffer_plugin | nome plugin del buffer | "core", "irc", ... | ""
|
||||
| _buffer_name | nome del buffer | "weechat", "freenode.#weechat", ... | ""
|
||||
// TRANSLATION MISSING
|
||||
| _buffer_full_name | full name of buffer | "core.weechat", "irc.freenode.#weechat", ... | ""
|
||||
| _buffer_localvar_XXX ^(2)^ | variabili locali del buffer | qualsiasi valore | non impostato
|
||||
| _chat | indicatore area di chat | "0" o "1" | "0"
|
||||
| _chat_line_x | colonna nella riga ^(3)^ | "0" ... "n" | "-1"
|
||||
@@ -9208,6 +9210,8 @@ Argomenti:
|
||||
** 'plugin': nome del plugin che ha creato questo buffer ("core"
|
||||
per il buffer principale di WeeChat)
|
||||
** 'name': nome del buffer
|
||||
// TRANSLATION MISSING
|
||||
** 'full_name': full name of buffer ("plugin.name") (_novità nella versione 0.3.7_)
|
||||
** 'short_name': nome breve del buffer
|
||||
** 'title': titolo del buffer
|
||||
** 'input': testo in ingresso
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3312,8 +3312,8 @@ msgstr "%s-VÍCE(%d)-"
|
||||
msgid "Act: "
|
||||
msgstr "Akt: "
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "Notifikace pro \"%s%s.%s%s\" změněna: \"%s%s%s\" na \"%s%s%s\""
|
||||
|
||||
#, c-format
|
||||
|
||||
@@ -22,7 +22,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-08 22:03+0100\n"
|
||||
"Last-Translator: Nils Görs\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3589,8 +3589,8 @@ msgstr "%s-MEHR(%d)-"
|
||||
msgid "Act: "
|
||||
msgstr "Aktiv: "
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr ""
|
||||
"Benachrichtigung wurde von \"%s%s.%s%s\": \"%s%s%s\" auf \"%s%s%s\" geändert"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3476,8 +3476,8 @@ msgstr "%s-MÁS(%d)-"
|
||||
msgid "Act: "
|
||||
msgstr "Act: "
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "Notificación cambiada para \"%s%s.%s%s\": \"%s%s%s\" a \"%s%s%s\""
|
||||
|
||||
#, c-format
|
||||
|
||||
@@ -21,8 +21,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"PO-Revision-Date: 2011-11-19 11:25+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-21 12:36+0100\n"
|
||||
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
"Language: French\n"
|
||||
@@ -3510,8 +3510,8 @@ msgid "Act: "
|
||||
msgstr "Act: "
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "Notification changée pour \"%s%s.%s%s\": \"%s%s%s\" à \"%s%s%s\""
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "Notification changée pour \"%s%s%s\": \"%s%s%s\" à \"%s%s%s\""
|
||||
|
||||
#, c-format
|
||||
msgid "%sError: a buffer with same name (%s) already exists"
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-10-22 12:21+0200\n"
|
||||
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -2984,7 +2984,7 @@ msgid "Act: "
|
||||
msgstr "Akt: "
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "%s%s%s megváltoztatta a %s%s%s szoba témáját:"
|
||||
|
||||
#, fuzzy, c-format
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-15 19:37+0100\n"
|
||||
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3472,8 +3472,8 @@ msgstr "%s-ANCORA(%d)-"
|
||||
msgid "Act: "
|
||||
msgstr "Attività: "
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "Notifica modificata per \"%s%s,%s%s\": \"%s%s%s\" a \"%s%s%s\""
|
||||
|
||||
#, c-format
|
||||
|
||||
@@ -21,7 +21,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:57+0100\n"
|
||||
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3460,8 +3460,8 @@ msgstr "%s-Więcej(%d)-"
|
||||
msgid "Act: "
|
||||
msgstr "Akt: "
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "Zmieniono powiadomienia dla \"%s%s.%s%s\": \"%s%s%s\" na \"%s%s%s\""
|
||||
|
||||
#, c-format
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-11-03 16:58+0100\n"
|
||||
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3406,7 +3406,7 @@ msgid "Act: "
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
|
||||
@@ -20,7 +20,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WeeChat 0.3.7-dev\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+0100\n"
|
||||
"PO-Revision-Date: 2011-10-22 12:21+0200\n"
|
||||
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
|
||||
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
|
||||
@@ -3002,7 +3002,7 @@ msgid "Act: "
|
||||
msgstr ""
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr "%s%s%s сменил тему %s%s%s на:"
|
||||
|
||||
#, fuzzy, c-format
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
|
||||
"POT-Creation-Date: 2011-11-19 11:35+0100\n"
|
||||
"POT-Creation-Date: 2011-11-21 12:36+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"
|
||||
@@ -2619,7 +2619,7 @@ msgid "Act: "
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgid "Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
|
||||
+20
-25
@@ -825,10 +825,9 @@ COMMAND_CALLBACK(buffer)
|
||||
if (gui_buffer_property_in_list (gui_buffer_properties_get_integer,
|
||||
argv[2]))
|
||||
{
|
||||
gui_chat_printf (NULL, "%s%s.%s%s: (int) %s = %d",
|
||||
gui_chat_printf (NULL, "%s%s%s: (int) %s = %d",
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name,
|
||||
buffer->full_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
argv[2],
|
||||
gui_buffer_get_integer (buffer, argv[2]));
|
||||
@@ -836,10 +835,9 @@ COMMAND_CALLBACK(buffer)
|
||||
if (gui_buffer_property_in_list (gui_buffer_properties_get_string,
|
||||
argv[2]))
|
||||
{
|
||||
gui_chat_printf (NULL, "%s%s.%s%s: (str) %s = %s",
|
||||
gui_chat_printf (NULL, "%s%s%s: (str) %s = %s",
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name,
|
||||
buffer->full_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
argv[2],
|
||||
gui_buffer_get_string (buffer, argv[2]));
|
||||
@@ -847,10 +845,9 @@ COMMAND_CALLBACK(buffer)
|
||||
if (gui_buffer_property_in_list (gui_buffer_properties_get_pointer,
|
||||
argv[2]))
|
||||
{
|
||||
gui_chat_printf (NULL, "%s%s.%s%s: (ptr) %s = 0x%lx",
|
||||
gui_chat_printf (NULL, "%s%s%s: (ptr) %s = 0x%lx",
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name,
|
||||
buffer->full_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
argv[2],
|
||||
gui_buffer_get_pointer (buffer, argv[2]));
|
||||
@@ -3998,21 +3995,21 @@ command_repeat_timer_cb (void *data, int remaining_calls)
|
||||
if (!repeat_args)
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
if (repeat_args[0] && repeat_args[1] && repeat_args[2])
|
||||
if (repeat_args[0] && repeat_args[1])
|
||||
{
|
||||
/* search buffer, fallback to core buffer if not found */
|
||||
ptr_buffer = gui_buffer_search_by_name (repeat_args[0], repeat_args[1]);
|
||||
ptr_buffer = gui_buffer_search_by_full_name (repeat_args[0]);
|
||||
if (!ptr_buffer)
|
||||
ptr_buffer = gui_buffer_search_main ();
|
||||
|
||||
/* execute command */
|
||||
if (ptr_buffer)
|
||||
input_exec_command (ptr_buffer, 1, NULL, repeat_args[2]);
|
||||
input_exec_command (ptr_buffer, 1, NULL, repeat_args[1]);
|
||||
}
|
||||
|
||||
if (remaining_calls == 0)
|
||||
{
|
||||
for (i = 0; i < 3; i++)
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (repeat_args[i])
|
||||
free (repeat_args[i]);
|
||||
@@ -4086,7 +4083,7 @@ COMMAND_CALLBACK(repeat)
|
||||
}
|
||||
else
|
||||
{
|
||||
repeat_args = malloc (3 * sizeof (*repeat_args));
|
||||
repeat_args = malloc (2 * sizeof (*repeat_args));
|
||||
if (!repeat_args)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
@@ -4094,9 +4091,8 @@ COMMAND_CALLBACK(repeat)
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
repeat_args[0] = strdup (gui_buffer_get_plugin_name (buffer));
|
||||
repeat_args[1] = strdup (buffer->name);
|
||||
repeat_args[2] = command;
|
||||
repeat_args[0] = strdup (buffer->full_name);
|
||||
repeat_args[1] = command;
|
||||
hook_timer (NULL, interval, 0, count - 1,
|
||||
&command_repeat_timer_cb, repeat_args);
|
||||
}
|
||||
@@ -4859,19 +4855,19 @@ command_wait_timer_cb (void *data, int remaining_calls)
|
||||
if (!timer_args)
|
||||
return WEECHAT_RC_ERROR;
|
||||
|
||||
if (timer_args[0] && timer_args[1] && timer_args[2])
|
||||
if (timer_args[0] && timer_args[1])
|
||||
{
|
||||
/* search buffer, fallback to core buffer if not found */
|
||||
ptr_buffer = gui_buffer_search_by_name (timer_args[0], timer_args[1]);
|
||||
ptr_buffer = gui_buffer_search_by_full_name (timer_args[0]);
|
||||
if (!ptr_buffer)
|
||||
ptr_buffer = gui_buffer_search_main ();
|
||||
|
||||
/* execute command */
|
||||
if (ptr_buffer)
|
||||
input_data (ptr_buffer, timer_args[2]);
|
||||
input_data (ptr_buffer, timer_args[1]);
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
if (timer_args[i])
|
||||
free (timer_args[i]);
|
||||
@@ -4932,7 +4928,7 @@ COMMAND_CALLBACK(wait)
|
||||
delay = number * factor;
|
||||
|
||||
/* build arguments for timer callback */
|
||||
timer_args = malloc (3 * sizeof (*timer_args));
|
||||
timer_args = malloc (2 * sizeof (*timer_args));
|
||||
if (!timer_args)
|
||||
{
|
||||
gui_chat_printf (NULL,
|
||||
@@ -4940,9 +4936,8 @@ COMMAND_CALLBACK(wait)
|
||||
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
|
||||
return WEECHAT_RC_OK;
|
||||
}
|
||||
timer_args[0] = strdup (gui_buffer_get_plugin_name (buffer));
|
||||
timer_args[1] = strdup (buffer->name);
|
||||
timer_args[2] = strdup (argv_eol[2]);
|
||||
timer_args[0] = strdup (buffer->full_name);
|
||||
timer_args[1] = strdup (argv_eol[2]);
|
||||
|
||||
/* schedule command, execute it after "delay" milliseconds */
|
||||
hook_timer (NULL, delay, 0, 1,
|
||||
|
||||
@@ -174,7 +174,6 @@ completion_list_add_buffers_plugins_names_cb (void *data,
|
||||
struct t_gui_completion *completion)
|
||||
{
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
char name[512];
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -184,10 +183,7 @@ completion_list_add_buffers_plugins_names_cb (void *data,
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer;
|
||||
ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
snprintf (name, sizeof (name), "%s.%s",
|
||||
gui_buffer_get_plugin_name (ptr_buffer),
|
||||
ptr_buffer->name);
|
||||
gui_completion_list_add (completion, name,
|
||||
gui_completion_list_add (completion, ptr_buffer->full_name,
|
||||
0, WEECHAT_LIST_POS_SORT);
|
||||
}
|
||||
|
||||
|
||||
+9
-21
@@ -1373,9 +1373,7 @@ config_weechat_notify_delete_option_cb (void *data,
|
||||
int
|
||||
config_weechat_notify_set (struct t_gui_buffer *buffer, const char *notify)
|
||||
{
|
||||
const char *plugin_name;
|
||||
char *option_name;
|
||||
int i, value, length;
|
||||
int i, value;
|
||||
|
||||
if (!buffer || !notify)
|
||||
return 0;
|
||||
@@ -1392,24 +1390,14 @@ config_weechat_notify_set (struct t_gui_buffer *buffer, const char *notify)
|
||||
if ((value < 0) && (strcmp (notify, "reset") != 0))
|
||||
return 0;
|
||||
|
||||
plugin_name = gui_buffer_get_plugin_name (buffer);
|
||||
length = strlen (plugin_name) + 1 + strlen (buffer->name) + 1;
|
||||
option_name = malloc (length);
|
||||
if (option_name)
|
||||
{
|
||||
snprintf (option_name, length, "%s.%s", plugin_name, buffer->name);
|
||||
|
||||
/* create/update option */
|
||||
config_weechat_notify_create_option_cb (NULL,
|
||||
weechat_config_file,
|
||||
weechat_config_section_notify,
|
||||
option_name,
|
||||
(value < 0) ?
|
||||
NULL : gui_buffer_notify_string[value]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
/* create/update option */
|
||||
config_weechat_notify_create_option_cb (NULL,
|
||||
weechat_config_file,
|
||||
weechat_config_section_notify,
|
||||
buffer->full_name,
|
||||
(value < 0) ?
|
||||
NULL : gui_buffer_notify_string[value]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -437,6 +437,7 @@ upgrade_weechat_read_cb (void *data,
|
||||
upgrade_set_current_buffer = upgrade_current_buffer;
|
||||
upgrade_current_buffer->plugin_name_for_upgrade =
|
||||
strdup (infolist_string (infolist, "plugin_name"));
|
||||
gui_buffer_build_full_name (upgrade_current_buffer);
|
||||
upgrade_current_buffer->short_name =
|
||||
(infolist_string (infolist, "short_name")) ?
|
||||
strdup (infolist_string (infolist, "short_name")) : NULL;
|
||||
|
||||
+53
-31
@@ -86,8 +86,8 @@ char *gui_buffer_properties_get_integer[] =
|
||||
NULL
|
||||
};
|
||||
char *gui_buffer_properties_get_string[] =
|
||||
{ "plugin", "name", "short_name", "title", "input", "text_search_input",
|
||||
"highlight_words", "highlight_regex", "highlight_tags",
|
||||
{ "plugin", "name", "full_name", "short_name", "title", "input",
|
||||
"text_search_input", "highlight_words", "highlight_regex", "highlight_tags",
|
||||
"hotlist_max_level_nicks",
|
||||
NULL
|
||||
};
|
||||
@@ -135,6 +135,28 @@ gui_buffer_get_short_name (struct t_gui_buffer *buffer)
|
||||
return (buffer->short_name) ? buffer->short_name : buffer->name;
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_buffer_build_full_name: build "full_name" of buffer (for example after
|
||||
* changing name or plugin_name_for_upgrade)
|
||||
*/
|
||||
|
||||
void
|
||||
gui_buffer_build_full_name (struct t_gui_buffer *buffer)
|
||||
{
|
||||
int length;
|
||||
|
||||
if (buffer->full_name)
|
||||
free (buffer->full_name);
|
||||
length = strlen (gui_buffer_get_plugin_name (buffer)) + 1 +
|
||||
strlen (buffer->name) + 1;
|
||||
buffer->full_name = malloc (length);
|
||||
if (buffer->full_name)
|
||||
{
|
||||
snprintf (buffer->full_name, length, "%s.%s",
|
||||
gui_buffer_get_plugin_name (buffer), buffer->name);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_buffer_local_var_add: add a new local variable to a buffer
|
||||
*/
|
||||
@@ -200,17 +222,15 @@ gui_buffer_local_var_remove_all (struct t_gui_buffer *buffer)
|
||||
int
|
||||
gui_buffer_notify_get (struct t_gui_buffer *buffer)
|
||||
{
|
||||
const char *plugin_name;
|
||||
char *option_name, *ptr_end;
|
||||
int length;
|
||||
struct t_config_option *ptr_option;
|
||||
|
||||
plugin_name = gui_buffer_get_plugin_name (buffer);
|
||||
length = strlen (plugin_name) + 1 + strlen (buffer->name) + 1;
|
||||
length = strlen (buffer->full_name) + 1;
|
||||
option_name = malloc (length);
|
||||
if (option_name)
|
||||
{
|
||||
snprintf (option_name, length, "%s.%s", plugin_name, buffer->name);
|
||||
snprintf (option_name, length, "%s", buffer->full_name);
|
||||
|
||||
ptr_end = option_name + strlen (option_name);
|
||||
while (ptr_end >= option_name)
|
||||
@@ -261,10 +281,9 @@ gui_buffer_notify_set (struct t_gui_buffer *buffer)
|
||||
{
|
||||
buffer->notify = new_notify;
|
||||
gui_chat_printf (NULL,
|
||||
_("Notify changed for \"%s%s.%s%s\": \"%s%s%s\" to \"%s%s%s\""),
|
||||
_("Notify changed for \"%s%s%s\": \"%s%s%s\" to \"%s%s%s\""),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name,
|
||||
buffer->full_name,
|
||||
GUI_COLOR(GUI_COLOR_CHAT),
|
||||
GUI_COLOR(GUI_COLOR_CHAT_VALUE),
|
||||
gui_buffer_notify_string[old_notify],
|
||||
@@ -445,6 +464,8 @@ gui_buffer_new (struct t_weechat_plugin *plugin,
|
||||
&(new_buffer->layout_number),
|
||||
&(new_buffer->layout_number_merge_order));
|
||||
new_buffer->name = strdup (name);
|
||||
new_buffer->full_name = NULL;
|
||||
gui_buffer_build_full_name (new_buffer);
|
||||
new_buffer->short_name = NULL;
|
||||
new_buffer->type = GUI_BUFFER_TYPE_FORMATTED;
|
||||
new_buffer->notify = CONFIG_INTEGER(config_look_buffer_notify_default);
|
||||
@@ -681,13 +702,13 @@ gui_buffer_string_replace_local_var (struct t_gui_buffer *buffer,
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_buffer_full_name_match_list: return 1 if full name of buffer matches
|
||||
* list of buffers
|
||||
* gui_buffer_match_list_split: return 1 if full name of buffer matches
|
||||
* (split) list of buffers
|
||||
*/
|
||||
|
||||
int
|
||||
gui_buffer_full_name_match_list (const char *full_name,
|
||||
int num_buffers, char **buffers)
|
||||
gui_buffer_match_list_split (struct t_gui_buffer *buffer,
|
||||
int num_buffers, char **buffers)
|
||||
{
|
||||
int i, match;
|
||||
char *ptr_name;
|
||||
@@ -699,7 +720,7 @@ gui_buffer_full_name_match_list (const char *full_name,
|
||||
ptr_name = buffers[i];
|
||||
if (ptr_name[0] == '!')
|
||||
ptr_name++;
|
||||
if (string_match (full_name, ptr_name, 0))
|
||||
if (string_match (buffer->full_name, ptr_name, 0))
|
||||
{
|
||||
if (buffers[i][0] == '!')
|
||||
return 0;
|
||||
@@ -727,7 +748,7 @@ gui_buffer_full_name_match_list (const char *full_name,
|
||||
int
|
||||
gui_buffer_match_list (struct t_gui_buffer *buffer, const char *string)
|
||||
{
|
||||
char **buffers, buffer_full_name[512];
|
||||
char **buffers;
|
||||
int num_buffers, match;
|
||||
|
||||
if (!string || !string[0])
|
||||
@@ -738,11 +759,7 @@ gui_buffer_match_list (struct t_gui_buffer *buffer, const char *string)
|
||||
buffers = string_split (string, ",", 0, 0, &num_buffers);
|
||||
if (buffers)
|
||||
{
|
||||
snprintf (buffer_full_name, sizeof (buffer_full_name), "%s.%s",
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name);
|
||||
match = gui_buffer_full_name_match_list (buffer_full_name,
|
||||
num_buffers, buffers);
|
||||
match = gui_buffer_match_list_split (buffer, num_buffers, buffers);
|
||||
string_free_split (buffers);
|
||||
}
|
||||
|
||||
@@ -769,6 +786,8 @@ gui_buffer_set_plugin_for_upgrade (char *name, struct t_weechat_plugin *plugin)
|
||||
ptr_buffer->plugin_name_for_upgrade = NULL;
|
||||
|
||||
ptr_buffer->plugin = plugin;
|
||||
|
||||
gui_buffer_build_full_name (ptr_buffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -879,6 +898,8 @@ gui_buffer_get_string (struct t_gui_buffer *buffer, const char *property)
|
||||
return gui_buffer_get_plugin_name (buffer);
|
||||
else if (string_strcasecmp (property, "name") == 0)
|
||||
return buffer->name;
|
||||
else if (string_strcasecmp (property, "full_name") == 0)
|
||||
return buffer->full_name;
|
||||
else if (string_strcasecmp (property, "short_name") == 0)
|
||||
return gui_buffer_get_short_name (buffer);
|
||||
else if (string_strcasecmp (property, "title") == 0)
|
||||
@@ -948,6 +969,7 @@ gui_buffer_set_name (struct t_gui_buffer *buffer, const char *name)
|
||||
if (buffer->name)
|
||||
free (buffer->name);
|
||||
buffer->name = strdup (name);
|
||||
gui_buffer_build_full_name (buffer);
|
||||
|
||||
gui_buffer_local_var_add (buffer, "name", name);
|
||||
|
||||
@@ -1797,23 +1819,19 @@ struct t_gui_buffer *
|
||||
gui_buffer_search_by_full_name (const char *full_name)
|
||||
{
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
char *name, *pos;
|
||||
|
||||
ptr_buffer = NULL;
|
||||
|
||||
name = strdup (full_name);
|
||||
if (name)
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer;
|
||||
ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
pos = strchr (name, '.');
|
||||
if (pos)
|
||||
if (ptr_buffer->full_name
|
||||
&& (strcmp (ptr_buffer->full_name, full_name) == 0))
|
||||
{
|
||||
pos[0] = '\0';
|
||||
ptr_buffer = gui_buffer_search_by_name (name, pos + 1);
|
||||
return ptr_buffer;
|
||||
}
|
||||
free (name);
|
||||
}
|
||||
|
||||
return ptr_buffer;
|
||||
/* buffer not found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3071,6 +3089,7 @@ gui_buffer_hdata_buffer_cb (void *data, const char *hdata_name)
|
||||
HDATA_VAR(struct t_gui_buffer, layout_number, INTEGER, NULL);
|
||||
HDATA_VAR(struct t_gui_buffer, layout_number_merge_order, INTEGER, NULL);
|
||||
HDATA_VAR(struct t_gui_buffer, name, STRING, NULL);
|
||||
HDATA_VAR(struct t_gui_buffer, full_name, STRING, NULL);
|
||||
HDATA_VAR(struct t_gui_buffer, short_name, STRING, NULL);
|
||||
HDATA_VAR(struct t_gui_buffer, type, INTEGER, NULL);
|
||||
HDATA_VAR(struct t_gui_buffer, notify, INTEGER, NULL);
|
||||
@@ -3220,6 +3239,8 @@ gui_buffer_add_to_infolist (struct t_infolist *infolist,
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "name", buffer->name))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "full_name", buffer->full_name))
|
||||
return 0;
|
||||
if (!infolist_new_var_string (ptr_item, "short_name", gui_buffer_get_short_name (buffer)))
|
||||
return 0;
|
||||
if (!infolist_new_var_integer (ptr_item, "type", buffer->type))
|
||||
@@ -3412,6 +3433,7 @@ gui_buffer_print_log ()
|
||||
log_printf (" layout_number . . . . . : %d", ptr_buffer->layout_number);
|
||||
log_printf (" layout_number_merge_order: %d", ptr_buffer->layout_number_merge_order);
|
||||
log_printf (" name. . . . . . . . . . : '%s'", ptr_buffer->name);
|
||||
log_printf (" full_name . . . . . . . : '%s'", ptr_buffer->full_name);
|
||||
log_printf (" short_name. . . . . . . : '%s'", ptr_buffer->short_name);
|
||||
log_printf (" type. . . . . . . . . . : %d", ptr_buffer->type);
|
||||
log_printf (" notify. . . . . . . . . : %d", ptr_buffer->notify);
|
||||
|
||||
@@ -77,6 +77,7 @@ struct t_gui_buffer
|
||||
int layout_number; /* number of buffer saved in layout */
|
||||
int layout_number_merge_order; /* order in merge for layout */
|
||||
char *name; /* buffer name */
|
||||
char *full_name; /* plugin name + '.' + buffer name */
|
||||
char *short_name; /* short buffer name */
|
||||
enum t_gui_buffer_type type; /* buffer type (formatted, free, ..) */
|
||||
int notify; /* 0 = never */
|
||||
@@ -205,6 +206,7 @@ extern char *gui_buffer_properties_set[];
|
||||
|
||||
extern const char *gui_buffer_get_plugin_name (struct t_gui_buffer *buffer);
|
||||
extern const char *gui_buffer_get_short_name (struct t_gui_buffer *buffer);
|
||||
extern void gui_buffer_build_full_name (struct t_gui_buffer *buffer);
|
||||
extern void gui_buffer_notify_set_all ();
|
||||
extern void gui_buffer_input_buffer_init (struct t_gui_buffer *buffer);
|
||||
extern struct t_gui_buffer *gui_buffer_new (struct t_weechat_plugin *plugin,
|
||||
@@ -219,8 +221,8 @@ extern struct t_gui_buffer *gui_buffer_new (struct t_weechat_plugin *plugin,
|
||||
extern int gui_buffer_valid (struct t_gui_buffer *buffer);
|
||||
extern char *gui_buffer_string_replace_local_var (struct t_gui_buffer *buffer,
|
||||
const char *string);
|
||||
extern int gui_buffer_full_name_match_list (const char *full_name,
|
||||
int num_buffers, char **buffers);
|
||||
extern int gui_buffer_match_list_split (struct t_gui_buffer *buffer,
|
||||
int num_buffers, char **buffers);
|
||||
extern int gui_buffer_match_list (struct t_gui_buffer *buffer,
|
||||
const char *string);
|
||||
extern void gui_buffer_set_plugin_for_upgrade (char *name,
|
||||
|
||||
+5
-10
@@ -75,7 +75,7 @@ gui_filter_line_has_tag_no_filter (struct t_gui_line *line)
|
||||
*/
|
||||
|
||||
int
|
||||
gui_filter_check_line (struct t_gui_line *line, const char *buffer_full_name)
|
||||
gui_filter_check_line (struct t_gui_line *line)
|
||||
{
|
||||
struct t_gui_filter *ptr_filter;
|
||||
int rc;
|
||||
@@ -93,9 +93,9 @@ gui_filter_check_line (struct t_gui_line *line, const char *buffer_full_name)
|
||||
if (ptr_filter->enabled)
|
||||
{
|
||||
/* check buffer */
|
||||
if (gui_buffer_full_name_match_list (buffer_full_name,
|
||||
ptr_filter->num_buffers,
|
||||
ptr_filter->buffers))
|
||||
if (gui_buffer_match_list_split (line->data->buffer,
|
||||
ptr_filter->num_buffers,
|
||||
ptr_filter->buffers))
|
||||
{
|
||||
if ((strcmp (ptr_filter->tags, "*") == 0)
|
||||
|| (gui_line_match_tags (line,
|
||||
@@ -134,20 +134,15 @@ gui_filter_buffer (struct t_gui_buffer *buffer)
|
||||
{
|
||||
struct t_gui_line *ptr_line;
|
||||
int line_displayed, lines_hidden;
|
||||
char buffer_full_name[512];
|
||||
|
||||
lines_hidden = 0;
|
||||
|
||||
buffer->lines->prefix_max_length = CONFIG_INTEGER(config_look_prefix_align_min);
|
||||
|
||||
snprintf (buffer_full_name, sizeof (buffer_full_name), "%s.%s",
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name);
|
||||
|
||||
for (ptr_line = buffer->lines->first_line; ptr_line;
|
||||
ptr_line = ptr_line->next_line)
|
||||
{
|
||||
line_displayed = gui_filter_check_line (ptr_line, buffer_full_name);
|
||||
line_displayed = gui_filter_check_line (ptr_line);
|
||||
|
||||
if (line_displayed
|
||||
&& (ptr_line->data->prefix_length > buffer->lines->prefix_max_length))
|
||||
|
||||
@@ -53,8 +53,7 @@ extern int gui_filters_enabled;
|
||||
|
||||
/* filter functions */
|
||||
|
||||
extern int gui_filter_check_line (struct t_gui_line *line,
|
||||
const char *buffer_full_name);
|
||||
extern int gui_filter_check_line (struct t_gui_line *line);
|
||||
extern void gui_filter_all_buffers ();
|
||||
extern void gui_filter_global_enable ();
|
||||
extern void gui_filter_global_disable ();
|
||||
|
||||
@@ -180,6 +180,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
|
||||
FOCUS_INT("_buffer_number", ((focus_info->window)->buffer)->number);
|
||||
FOCUS_STR("_buffer_plugin", plugin_get_name (((focus_info->window)->buffer)->plugin));
|
||||
FOCUS_STR("_buffer_name", ((focus_info->window)->buffer)->name);
|
||||
FOCUS_STR("_buffer_full_name", ((focus_info->window)->buffer)->full_name);
|
||||
hashtable_map (focus_info->window->buffer->local_variables,
|
||||
&gui_focus_buffer_localvar_map_cb, hashtable);
|
||||
}
|
||||
@@ -190,6 +191,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
|
||||
FOCUS_STR("_buffer_number", "-1");
|
||||
FOCUS_STR("_buffer_plugin", "");
|
||||
FOCUS_STR("_buffer_name", "");
|
||||
FOCUS_STR("_buffer_full_name", "");
|
||||
}
|
||||
|
||||
/* chat area */
|
||||
|
||||
+4
-10
@@ -897,8 +897,7 @@ gui_key_focus_matching (struct t_gui_key *key,
|
||||
struct t_hashtable **hashtable_focus)
|
||||
{
|
||||
int match[2], area;
|
||||
char buffer_full_name[512];
|
||||
const char *chat, *buffer_plugin, *buffer_name, *bar_name, *bar_item_name;
|
||||
const char *chat, *buffer_full_name, *bar_name, *bar_item_name;
|
||||
|
||||
for (area = 0; area < 2; area++)
|
||||
{
|
||||
@@ -910,16 +909,11 @@ gui_key_focus_matching (struct t_gui_key *key,
|
||||
break;
|
||||
case GUI_KEY_FOCUS_CHAT:
|
||||
chat = hashtable_get (hashtable_focus[area], "_chat");
|
||||
buffer_plugin = hashtable_get (hashtable_focus[area],
|
||||
"_buffer_plugin");
|
||||
buffer_name = hashtable_get (hashtable_focus[area],
|
||||
"_buffer_name");
|
||||
buffer_full_name = hashtable_get (hashtable_focus[area],
|
||||
"_buffer_full_name");
|
||||
if (chat && (strcmp (chat, "1") == 0)
|
||||
&& buffer_plugin && buffer_plugin[0]
|
||||
&& buffer_name && buffer_name[0])
|
||||
&& buffer_full_name && buffer_full_name[0])
|
||||
{
|
||||
snprintf (buffer_full_name, sizeof (buffer_full_name),
|
||||
"%s.%s", buffer_plugin, buffer_name);
|
||||
if (string_match (buffer_full_name, key->area_name[area], 0))
|
||||
match[area] = 1;
|
||||
}
|
||||
|
||||
+3
-12
@@ -793,7 +793,7 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
|
||||
struct t_gui_line *new_line;
|
||||
struct t_gui_line_data *new_line_data;
|
||||
struct t_gui_window *ptr_win;
|
||||
char *message_for_signal, buffer_full_name[512];
|
||||
char *message_for_signal;
|
||||
const char *nick;
|
||||
int notify_level, *max_notify_level, lines_removed;
|
||||
time_t current_time;
|
||||
@@ -880,11 +880,7 @@ gui_line_add (struct t_gui_buffer *buffer, time_t date,
|
||||
gui_line_add_to_list (buffer->own_lines, new_line);
|
||||
|
||||
/* check if line is filtered or not */
|
||||
snprintf (buffer_full_name, sizeof (buffer_full_name), "%s.%s",
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name);
|
||||
new_line->data->displayed = gui_filter_check_line (new_line,
|
||||
buffer_full_name);
|
||||
new_line->data->displayed = gui_filter_check_line (new_line);
|
||||
if (new_line->data->displayed)
|
||||
{
|
||||
if (new_line->data->highlight)
|
||||
@@ -967,7 +963,6 @@ gui_line_add_y (struct t_gui_buffer *buffer, int y, const char *message)
|
||||
{
|
||||
struct t_gui_line *ptr_line, *new_line;
|
||||
struct t_gui_line_data *new_line_data;
|
||||
char buffer_full_name[512];
|
||||
|
||||
/* search if line exists for "y" */
|
||||
for (ptr_line = buffer->own_lines->first_line; ptr_line;
|
||||
@@ -1044,11 +1039,7 @@ gui_line_add_y (struct t_gui_buffer *buffer, int y, const char *message)
|
||||
ptr_line->data->message = (message) ? strdup (message) : strdup ("");
|
||||
|
||||
/* check if line is filtered or not */
|
||||
snprintf (buffer_full_name, sizeof (buffer_full_name), "%s.%s",
|
||||
gui_buffer_get_plugin_name (buffer),
|
||||
buffer->name);
|
||||
ptr_line->data->displayed = gui_filter_check_line (ptr_line,
|
||||
buffer_full_name);
|
||||
ptr_line->data->displayed = gui_filter_check_line (ptr_line);
|
||||
if (!ptr_line->data->displayed)
|
||||
{
|
||||
if (!buffer->own_lines->lines_hidden)
|
||||
|
||||
@@ -400,7 +400,6 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name,
|
||||
struct t_gui_hotlist *ptr_hotlist;
|
||||
struct t_gui_key *ptr_key;
|
||||
struct t_weechat_plugin *ptr_plugin;
|
||||
char buffer_full_name[1024];
|
||||
int context, number;
|
||||
char *error;
|
||||
|
||||
@@ -563,12 +562,8 @@ plugin_api_infolist_get_internal (void *data, const char *infolist_name,
|
||||
for (ptr_buffer = gui_buffers; ptr_buffer;
|
||||
ptr_buffer = ptr_buffer->next_buffer)
|
||||
{
|
||||
snprintf (buffer_full_name, sizeof (buffer_full_name),
|
||||
"%s.%s",
|
||||
gui_buffer_get_plugin_name (ptr_buffer),
|
||||
ptr_buffer->name);
|
||||
if (!arguments || !arguments[0]
|
||||
|| string_match (buffer_full_name, arguments, 0))
|
||||
|| string_match (ptr_buffer->full_name, arguments, 0))
|
||||
{
|
||||
if (!gui_buffer_add_to_infolist (ptr_infolist, ptr_buffer))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user