summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc2
-rw-r--r--doc/de/autogen/user/weechat_options.asciidoc15
-rw-r--r--doc/en/autogen/user/weechat_options.asciidoc15
-rw-r--r--doc/fr/autogen/user/weechat_options.asciidoc15
-rw-r--r--doc/it/autogen/user/weechat_options.asciidoc15
-rw-r--r--doc/ja/autogen/user/weechat_options.asciidoc15
-rw-r--r--doc/pl/autogen/user/weechat_options.asciidoc15
-rw-r--r--po/cs.po13
-rw-r--r--po/de.po13
-rw-r--r--po/es.po13
-rw-r--r--po/fr.po17
-rw-r--r--po/hu.po13
-rw-r--r--po/it.po16
-rw-r--r--po/ja.po15
-rw-r--r--po/pl.po14
-rw-r--r--po/pt_BR.po15
-rw-r--r--po/ru.po13
-rw-r--r--po/tr.po11
-rw-r--r--po/weechat.pot11
-rw-r--r--src/core/wee-config.c20
-rw-r--r--src/core/wee-config.h3
-rw-r--r--src/gui/gui-chat.c80
22 files changed, 330 insertions, 29 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index a5fbc2b84..3d0aea351 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -19,6 +19,8 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
=== New features
+* core: add options weechat.look.quote_{nick_prefix|nick_suffix|time_format} to
+ customize quoted messages in cursor mode (closes #403)
* core: add a welcome message on first WeeChat run (closes #318)
* core: add options weechat.look.word_chars_{highlight|input}
(closes #55, task #9459)
diff --git a/doc/de/autogen/user/weechat_options.asciidoc b/doc/de/autogen/user/weechat_options.asciidoc
index 1710ec513..3c4ac9374 100644
--- a/doc/de/autogen/user/weechat_options.asciidoc
+++ b/doc/de/autogen/user/weechat_options.asciidoc
@@ -827,6 +827,21 @@
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"|"`)
+* [[option_weechat.look.quote_nick_prefix]] *weechat.look.quote_nick_prefix*
+** Beschreibung: `text to display before nick when quoting a message (see /help cursor)`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `"<"`)
+
+* [[option_weechat.look.quote_nick_suffix]] *weechat.look.quote_nick_suffix*
+** Beschreibung: `text to display after nick when quoting a message (see /help cursor)`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `">"`)
+
+* [[option_weechat.look.quote_time_format]] *weechat.look.quote_time_format*
+** Beschreibung: `time format when quoting a message (see /help cursor)`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `"%H:%M:%S"`)
+
* [[option_weechat.look.read_marker]] *weechat.look.read_marker*
** Beschreibung: `nutzt eine Linie oder ein Zeichen, als Lesezeichen, um die erste ungelesene Nachricht in einem Buffer hervorzuheben`
** Typ: integer
diff --git a/doc/en/autogen/user/weechat_options.asciidoc b/doc/en/autogen/user/weechat_options.asciidoc
index 0bd7ac022..ea2109bba 100644
--- a/doc/en/autogen/user/weechat_options.asciidoc
+++ b/doc/en/autogen/user/weechat_options.asciidoc
@@ -827,6 +827,21 @@
** type: string
** values: any string (default value: `"|"`)
+* [[option_weechat.look.quote_nick_prefix]] *weechat.look.quote_nick_prefix*
+** description: `text to display before nick when quoting a message (see /help cursor)`
+** type: string
+** values: any string (default value: `"<"`)
+
+* [[option_weechat.look.quote_nick_suffix]] *weechat.look.quote_nick_suffix*
+** description: `text to display after nick when quoting a message (see /help cursor)`
+** type: string
+** values: any string (default value: `">"`)
+
+* [[option_weechat.look.quote_time_format]] *weechat.look.quote_time_format*
+** description: `time format when quoting a message (see /help cursor)`
+** type: string
+** values: any string (default value: `"%H:%M:%S"`)
+
* [[option_weechat.look.read_marker]] *weechat.look.read_marker*
** description: `use a marker (line or char) on buffers to show first unread line`
** type: integer
diff --git a/doc/fr/autogen/user/weechat_options.asciidoc b/doc/fr/autogen/user/weechat_options.asciidoc
index 56e65d1d0..061200382 100644
--- a/doc/fr/autogen/user/weechat_options.asciidoc
+++ b/doc/fr/autogen/user/weechat_options.asciidoc
@@ -827,6 +827,21 @@
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"|"`)
+* [[option_weechat.look.quote_nick_prefix]] *weechat.look.quote_nick_prefix*
+** description: `texte à afficher avant le pseudo dans la citation d'un message (voir /help cursor)`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `"<"`)
+
+* [[option_weechat.look.quote_nick_suffix]] *weechat.look.quote_nick_suffix*
+** description: `texte à afficher après le pseudo dans la citation d'un message (voir /help cursor)`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `">"`)
+
+* [[option_weechat.look.quote_time_format]] *weechat.look.quote_time_format*
+** description: `format de date/heure dans la citation d'un message (voir /help cursor)`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `"%H:%M:%S"`)
+
* [[option_weechat.look.read_marker]] *weechat.look.read_marker*
** description: `utiliser un marqueur (ligne ou caractère) sur les tampons pour montrer la première ligne non lue`
** type: entier
diff --git a/doc/it/autogen/user/weechat_options.asciidoc b/doc/it/autogen/user/weechat_options.asciidoc
index 7ddd62fe4..6044c876f 100644
--- a/doc/it/autogen/user/weechat_options.asciidoc
+++ b/doc/it/autogen/user/weechat_options.asciidoc
@@ -827,6 +827,21 @@
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"|"`)
+* [[option_weechat.look.quote_nick_prefix]] *weechat.look.quote_nick_prefix*
+** descrizione: `text to display before nick when quoting a message (see /help cursor)`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `"<"`)
+
+* [[option_weechat.look.quote_nick_suffix]] *weechat.look.quote_nick_suffix*
+** descrizione: `text to display after nick when quoting a message (see /help cursor)`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `">"`)
+
+* [[option_weechat.look.quote_time_format]] *weechat.look.quote_time_format*
+** descrizione: `time format when quoting a message (see /help cursor)`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `"%H:%M:%S"`)
+
* [[option_weechat.look.read_marker]] *weechat.look.read_marker*
** descrizione: `usa segnalibro (riga o carattere) sui buffer per mostrare la prima riga non letta`
** tipo: intero
diff --git a/doc/ja/autogen/user/weechat_options.asciidoc b/doc/ja/autogen/user/weechat_options.asciidoc
index 97f81f03f..f0694d8eb 100644
--- a/doc/ja/autogen/user/weechat_options.asciidoc
+++ b/doc/ja/autogen/user/weechat_options.asciidoc
@@ -827,6 +827,21 @@
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"|"`)
+* [[option_weechat.look.quote_nick_prefix]] *weechat.look.quote_nick_prefix*
+** 説明: `text to display before nick when quoting a message (see /help cursor)`
+** タイプ: 文字列
+** 値: 未制約文字列 (デフォルト値: `"<"`)
+
+* [[option_weechat.look.quote_nick_suffix]] *weechat.look.quote_nick_suffix*
+** 説明: `text to display after nick when quoting a message (see /help cursor)`
+** タイプ: 文字列
+** 値: 未制約文字列 (デフォルト値: `">"`)
+
+* [[option_weechat.look.quote_time_format]] *weechat.look.quote_time_format*
+** 説明: `time format when quoting a message (see /help cursor)`
+** タイプ: 文字列
+** 値: 未制約文字列 (デフォルト値: `"%H:%M:%S"`)
+
* [[option_weechat.look.read_marker]] *weechat.look.read_marker*
** 説明: `最初の未読行を表示するマーカー (line か char) をバッファ内で使用`
** タイプ: 整数
diff --git a/doc/pl/autogen/user/weechat_options.asciidoc b/doc/pl/autogen/user/weechat_options.asciidoc
index 0e8fb566a..5cf15d50c 100644
--- a/doc/pl/autogen/user/weechat_options.asciidoc
+++ b/doc/pl/autogen/user/weechat_options.asciidoc
@@ -827,6 +827,21 @@
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `"|"`)
+* [[option_weechat.look.quote_nick_prefix]] *weechat.look.quote_nick_prefix*
+** opis: `text to display before nick when quoting a message (see /help cursor)`
+** typ: ciąg
+** wartości: dowolny ciąg (domyślna wartość: `"<"`)
+
+* [[option_weechat.look.quote_nick_suffix]] *weechat.look.quote_nick_suffix*
+** opis: `text to display after nick when quoting a message (see /help cursor)`
+** typ: ciąg
+** wartości: dowolny ciąg (domyślna wartość: `">"`)
+
+* [[option_weechat.look.quote_time_format]] *weechat.look.quote_time_format*
+** opis: `time format when quoting a message (see /help cursor)`
+** typ: ciąg
+** wartości: dowolny ciąg (domyślna wartość: `"%H:%M:%S"`)
+
* [[option_weechat.look.read_marker]] *weechat.look.read_marker*
** opis: `używaj znacznika (linii albo znaku) do zaznaczania pierwszej nieprzeczytanej linii w buforze`
** typ: liczba
diff --git a/po/cs.po b/po/cs.po
index 82fcf62e6..4675d3fb2 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3262,6 +3262,17 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "řetězec zobrazený za prefixem"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr "text pro zobrazení před přezdívkou v okně rozhovoru"
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr "text pro zobrazení za přezdívkou v okně rozhovoru"
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"použít značku (řádek nebo znak) v bufferech pro zobrazení první nepřečtené "
diff --git a/po/de.po b/po/de.po
index b72dbb859..8b56a2aef 100644
--- a/po/de.po
+++ b/po/de.po
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-04-15 18:52+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <>\n"
@@ -3863,6 +3863,17 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "Nach dem Präfix anzufügende Zeichenfolge"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr "Text, der vor dem Nick dargestellt werden soll, Beispiel: \"<\""
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr "Text, der nach dem Nick dargestellt werden soll, Beispiel: \">\""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"nutzt eine Linie oder ein Zeichen, als Lesezeichen, um die erste ungelesene "
diff --git a/po/es.po b/po/es.po
index 721db60d7..ff36e461a 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3454,6 +3454,17 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "cadena mostrada después del prefijo"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr "texto a mostrar antes del apodo en la ventana de charla"
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr "texto a mostrar tras el apodo en la ventana de charla"
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"usa un marcador (línea o carácter) para indicar la primera línea sin leer en "
diff --git a/po/fr.po b/po/fr.po
index 04934c204..2929d77ef 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
-"PO-Revision-Date: 2015-04-19 09:06+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
+"PO-Revision-Date: 2015-04-19 11:30+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -3769,6 +3769,19 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "chaîne affichée après le préfixe"
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr ""
+"texte à afficher avant le pseudo dans la citation d'un message (voir /help "
+"cursor)"
+
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+"texte à afficher après le pseudo dans la citation d'un message (voir /help "
+"cursor)"
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr "format de date/heure dans la citation d'un message (voir /help cursor)"
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"utiliser un marqueur (ligne ou caractère) sur les tampons pour montrer la "
diff --git a/po/hu.po b/po/hu.po
index fc080fb6c..83eec30d4 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2871,6 +2871,17 @@ msgid "string displayed after prefix"
msgstr "névkiegészítés után beszúrt szöveg"
#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr "a név előtt megjelenítendő szöveg a beszédablakban"
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr "a név után megjelenítendő szöveg a beszédablakban"
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
+#, fuzzy
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr "jelölje a szerveren/szobában utoljára olvasott sort"
diff --git a/po/it.po b/po/it.po
index 8b108d7f9..263a13abe 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3562,6 +3562,20 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "stringa visualizzata dopo il prefisso"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr ""
+"testo da visualizzare prima del nick nel prefisso del messaggio, esempio: \"<"
+"\""
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+"testo da visualizzare dopo il nick nel prefisso del messaggio, esempio: \">\""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"usa segnalibro (riga o carattere) sui buffer per mostrare la prima riga non "
diff --git a/po/ja.po b/po/ja.po
index 12b434c37..701283a9b 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-04-13 00:40+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
@@ -3629,6 +3629,19 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "プレフィックスの後ろに表示される文字列"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr ""
+"メッセージプレフィックス中のニックネームの前に表示するテキスト、例: \"<\""
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+"メッセージプレフィックス中のニックネームの後に表示するテキスト、例: \">\""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr "最初の未読行を表示するマーカー (line か char) をバッファ内で使用"
diff --git a/po/pl.po b/po/pl.po
index 86c5dbd3c..18c40a241 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3707,6 +3707,18 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "ciąg wyświetlany po przedrostku"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr "teks wyświetlany przed nickiem w prefiksie wiadomości, przykład: \"<\""
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+"teks wyświetlany za nickiem w prefiksie wiadomości, przykład: przykład: \">\""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"używaj znacznika (linii albo znaku) do zaznaczania pierwszej nieprzeczytanej "
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 2411cd91f..ca1d58c7e 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -3456,6 +3456,19 @@ msgstr ""
msgid "string displayed after prefix"
msgstr "cadeia de caracteres mostrada após prefixo"
+#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr ""
+"texto a ser exibido antes do apelido no prefixo da mensagem, exemplo: \"<\""
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+"texto a ser exibido depois do apelido no prefixo da mensage, examplo: \">\""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
"use uma marcação (linha ou caractere) em buffers para mostrar a primeira "
diff --git a/po/ru.po b/po/ru.po
index 3c7821c3a..2038d9c95 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-21 08:41+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2901,6 +2901,17 @@ msgid "string displayed after prefix"
msgstr "строка, вставляемая после автодополнения ника"
#, fuzzy
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr "текст, который отображать до ника в окне чата"
+
+#, fuzzy
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr "текст, который отображать после ника в окне чата"
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
+#, fuzzy
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr "использовать маркер непрочитанных сообщений в окнах серверов и каналов"
diff --git a/po/tr.po b/po/tr.po
index 8b427d040..d683e213e 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2015-03-10 21:33+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2605,6 +2605,15 @@ msgstr ""
msgid "string displayed after prefix"
msgstr ""
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr ""
+
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
diff --git a/po/weechat.pot b/po/weechat.pot
index 53ca9ca37..ec6a09b26 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-04-19 09:05+0200\n"
+"POT-Creation-Date: 2015-04-19 11:28+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2602,6 +2602,15 @@ msgstr ""
msgid "string displayed after prefix"
msgstr ""
+msgid "text to display before nick when quoting a message (see /help cursor)"
+msgstr ""
+
+msgid "text to display after nick when quoting a message (see /help cursor)"
+msgstr ""
+
+msgid "time format when quoting a message (see /help cursor)"
+msgstr ""
+
msgid "use a marker (line or char) on buffers to show first unread line"
msgstr ""
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index cba1c7379..72d46690b 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -161,6 +161,9 @@ struct t_config_option *config_look_prefix_buffer_align_more;
struct t_config_option *config_look_prefix_buffer_align_more_after;
struct t_config_option *config_look_prefix_same_nick;
struct t_config_option *config_look_prefix_suffix;
+struct t_config_option *config_look_quote_nick_prefix;
+struct t_config_option *config_look_quote_nick_suffix;
+struct t_config_option *config_look_quote_time_format;
struct t_config_option *config_look_read_marker;
struct t_config_option *config_look_read_marker_always_show;
struct t_config_option *config_look_read_marker_string;
@@ -2767,6 +2770,23 @@ config_weechat_init_options ()
"prefix_suffix", "string",
N_("string displayed after prefix"),
NULL, 0, 0, "|", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
+ config_look_quote_nick_prefix = config_file_new_option (
+ weechat_config_file, ptr_section,
+ "quote_nick_prefix", "string",
+ N_("text to display before nick when quoting a message (see /help "
+ "cursor)"),
+ NULL, 0, 0, "<", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ config_look_quote_nick_suffix = config_file_new_option (
+ weechat_config_file, ptr_section,
+ "quote_nick_suffix", "string",
+ N_("text to display after nick when quoting a message (see /help "
+ "cursor)"),
+ NULL, 0, 0, ">", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ config_look_quote_time_format = config_file_new_option (
+ weechat_config_file, ptr_section,
+ "quote_time_format", "string",
+ N_("time format when quoting a message (see /help cursor)"),
+ NULL, 0, 0, "%H:%M:%S", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_read_marker = config_file_new_option (
weechat_config_file, ptr_section,
"read_marker", "integer",
diff --git a/src/core/wee-config.h b/src/core/wee-config.h
index 878b81664..d851f3476 100644
--- a/src/core/wee-config.h
+++ b/src/core/wee-config.h
@@ -207,6 +207,9 @@ extern struct t_config_option *config_look_prefix_buffer_align_more;
extern struct t_config_option *config_look_prefix_buffer_align_more_after;
extern struct t_config_option *config_look_prefix_same_nick;
extern struct t_config_option *config_look_prefix_suffix;
+extern struct t_config_option *config_look_quote_nick_prefix;
+extern struct t_config_option *config_look_quote_nick_suffix;
+extern struct t_config_option *config_look_quote_time_format;
extern struct t_config_option *config_look_read_marker;
extern struct t_config_option *config_look_read_marker_always_show;
extern struct t_config_option *config_look_read_marker_string;
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index b8a25e41f..48e2e236c 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -978,9 +978,15 @@ int
gui_chat_hsignal_quote_line_cb (void *data, const char *signal,
struct t_hashtable *hashtable)
{
- const char *time, *prefix, *message;
- int length_time, length_prefix, length_message, length;
- char *str;
+ const char *date, *line, *prefix, *ptr_prefix, *message;
+ long unsigned int value;
+ long number;
+ struct tm *local_time;
+ struct t_gui_line *ptr_line;
+ int is_nick, length_time, length_nick_prefix, length_prefix;
+ int length_nick_suffix, length_message, length, rc;
+ time_t line_date;
+ char str_time[128], *str, *error;
/* make C compiler happy */
(void) data;
@@ -988,33 +994,75 @@ gui_chat_hsignal_quote_line_cb (void *data, const char *signal,
if (!gui_current_window->buffer->input)
return WEECHAT_RC_OK;
- time = (strstr (signal, "time")) ?
- hashtable_get (hashtable, "_chat_line_time") : NULL;
+ /* get time */
+ str_time[0] = '\0';
+ date = (strstr (signal, "time")) ?
+ hashtable_get (hashtable, "_chat_line_date") : NULL;
+ if (date)
+ {
+ number = strtol (date, &error, 10);
+ if (error && !error[0])
+ {
+ line_date = (time_t)number;
+ local_time = localtime (&line_date);
+ if (local_time)
+ {
+ strftime (str_time, sizeof (str_time),
+ CONFIG_STRING(config_look_quote_time_format),
+ local_time);
+ }
+ }
+ }
+
+ /* check if the prefix is a nick */
+ is_nick = 0;
+ line = hashtable_get (hashtable, "_chat_line");
+ if (line && line[0])
+ {
+ rc = sscanf (line, "%lx", &value);
+ if ((rc != EOF) && (rc != 0))
+ {
+ ptr_line = (struct t_gui_line *)value;
+ if (gui_line_search_tag_starting_with (ptr_line, "prefix_nick"))
+ is_nick = 1;
+ }
+ }
+
+ /* get prefix + message */
prefix = (strstr (signal, "prefix")) ?
hashtable_get (hashtable, "_chat_line_prefix") : NULL;
+ ptr_prefix = prefix;
+ if (ptr_prefix)
+ {
+ while (ptr_prefix[0] == ' ')
+ {
+ ptr_prefix++;
+ }
+ }
message = hashtable_get (hashtable, "_chat_line_message");
if (!message)
return WEECHAT_RC_OK;
- length_time = (time) ? strlen (time) : 0;
- length_prefix = (prefix) ? strlen (prefix) : 0;
+ length_time = strlen (str_time);
+ length_nick_prefix = strlen (CONFIG_STRING(config_look_quote_nick_prefix));
+ length_prefix = (ptr_prefix) ? strlen (ptr_prefix) : 0;
+ length_nick_suffix = strlen (CONFIG_STRING(config_look_quote_nick_suffix));
length_message = strlen (message);
- length = length_time + 1 + length_prefix + 1 +
- strlen (CONFIG_STRING(config_look_prefix_suffix)) + 1 +
+ length = length_time + 1 +
+ length_nick_prefix + length_prefix + length_nick_suffix + 1 +
length_message + 1 + 1;
str = malloc (length);
if (str)
{
snprintf (str, length, "%s%s%s%s%s%s%s ",
- (time) ? time : "",
- (time) ? " " : "",
- (prefix) ? prefix : "",
- (prefix) ? " " : "",
- (time || prefix) ? CONFIG_STRING(config_look_prefix_suffix) : "",
- ((time || prefix) && CONFIG_STRING(config_look_prefix_suffix)
- && CONFIG_STRING(config_look_prefix_suffix)[0]) ? " " : "",
+ str_time,
+ (str_time[0]) ? " " : "",
+ (ptr_prefix && ptr_prefix[0] && is_nick) ? CONFIG_STRING(config_look_quote_nick_prefix) : "",
+ (ptr_prefix) ? ptr_prefix : "",
+ (ptr_prefix && ptr_prefix[0] && is_nick) ? CONFIG_STRING(config_look_quote_nick_suffix) : "",
+ (ptr_prefix && ptr_prefix[0]) ? " " : "",
message);
gui_input_insert_string (gui_current_window->buffer, str, -1);
gui_input_text_changed_modifier_and_signal (gui_current_window->buffer,