core: display day change message dynamically (do not store it as a line in buffer) (task #12775)

Changes in options:
- rename option weechat.look.day_change_time_format to weechat.look.day_change_message
  (color codes are allowed in this option)
- new option weechat.color.chat_day_change.
v2.8-utf8proc
Sebastien Helleu 2013-08-25 09:39:59 +02:00
parent 73f2c2c488
commit 03b6b4c1cf
29 changed files with 377 additions and 205 deletions

View File

@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-dev, 2013-08-19
v0.4.2-dev, 2013-08-25
This document lists all changes for each version.
@ -14,6 +14,10 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
Version 0.4.2 (under dev!)
--------------------------
* core: display day change message dynamically (do not store it as a line in
buffer), rename option weechat.look.day_change_time_format to
weechat.look.day_change_message, new option weechat.color.chat_day_change
(task #12775)
* core: add syntax "@buffer:item" in bar items to force the buffer used when
displaying the bar item (task #12717)
* core: add search of regular expression in buffer, don't reset search type on

17
NEWS
View File

@ -1,7 +1,7 @@
WeeChat Release Notes
=====================
Sébastien Helleu <flashcode@flashtux.org>
v0.4.2-dev, 2013-08-17
v0.4.2-dev, 2013-08-25
This document lists important changes for each version, that require manual
@ -16,6 +16,21 @@ http://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
Version 0.4.2 (under dev!)
--------------------------
=== Day change message ===
The day change message is now dynamically displayed, and therefore is not stored
as a line in buffer any more.
Option 'weechat.look.day_change_time_format' has been renamed to
'weechat.look.day_change_message' (color codes are allowed in this option, see
`/help eval`).
New color option 'weechat.color.chat_day_change' has been added.
After `/upgrade` from an old version, you will see two messages for each day
change. This is a normal behavior and will not happen again with the next day
changes.
=== Regex search in buffer ===
Search with regular expression has been added, and therefore some keys in search

View File

@ -23,6 +23,11 @@
** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `white`)
* [[option_weechat.color.chat_day_change]] *weechat.color.chat_day_change*
** Beschreibung: `text color for message displayed when the day has changed`
** Typ: Farbe
** Werte: ein Farbname für WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), eine Terminal-Farbnummer oder ein Alias; Attribute können vor eine Farbe gesetzt werden (gilt ausschließlich für die Textfarbe und nicht für den Hintergrund): "*" für fett, "!" für invertiert, "_" für unterstrichen (Standardwert: `cyan`)
* [[option_weechat.color.chat_delimiters]] *weechat.color.chat_delimiters*
** Beschreibung: `Farbe der Infobar-Trennzeichen`
** Typ: Farbe
@ -478,10 +483,10 @@
** Typ: boolesch
** Werte: on, off (Standardwert: `on`)
* [[option_weechat.look.day_change_time_format]] *weechat.look.day_change_time_format*
** Beschreibung: `Format für die Datumsanzeige, wenn ein neuer Tag anbricht (siehe man strftime für Platzhalter für das Datum und die Uhrzeit)`
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message*
** Beschreibung: `message displayed when the day has changed (see man strftime for date/time specifiers) (note: content is evaluated, see /help eval)`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"%a, %d %b %Y"`)
** Werte: beliebige Zeichenkette (Standardwert: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.eat_newline_glitch]] *weechat.look.eat_newline_glitch*
** Beschreibung: `aktiviert man diese Option, dann wird "eat_newline_glitch" auf 0 gesetzt; dies bedeutet, dass am Ende einer Zeile kein Zeilenumbruch an gehangen wird und somit der Text beim kopieren aus WeeChat und beim einfügen in einer anderen Applikation nicht umgebrochen wird (diese Option ist standardmäßig deaktiviert, da es zu schwerwiegenden Grafikfehlern kommen kann)`

View File

@ -23,6 +23,11 @@
** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `white`)
* [[option_weechat.color.chat_day_change]] *weechat.color.chat_day_change*
** description: `text color for message displayed when the day has changed`
** type: color
** values: a WeeChat color name (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), a terminal color number or an alias; attributes are allowed before color (for text color only, not background): "*" for bold, "!" for reverse, "_" for underline (default value: `cyan`)
* [[option_weechat.color.chat_delimiters]] *weechat.color.chat_delimiters*
** description: `text color for delimiters`
** type: color
@ -478,10 +483,10 @@
** type: boolean
** values: on, off (default value: `on`)
* [[option_weechat.look.day_change_time_format]] *weechat.look.day_change_time_format*
** description: `time format for date displayed when day changed (see man strftime for date/time specifiers)`
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message*
** description: `message displayed when the day has changed (see man strftime for date/time specifiers) (note: content is evaluated, see /help eval)`
** type: string
** values: any string (default value: `"%a, %d %b %Y"`)
** values: any string (default value: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.eat_newline_glitch]] *weechat.look.eat_newline_glitch*
** description: `if set, the eat_newline_glitch will be set to 0; this is used to not add new line char at end of each line, and then not break text when you copy/paste text from WeeChat to another application (this option is disabled by default because it can cause serious display bugs)`

View File

@ -827,6 +827,7 @@ Color codes using options (see 't_gui_color_enum', in file 'src/gui/gui-color.h'
| 40 | weechat.color.chat_nick_prefix _(new in version 0.4.1)_
| 41 | weechat.color.chat_nick_suffix _(new in version 0.4.1)_
| 42 | weechat.color.emphasis _(new in version 0.4.2)_
| 43 | weechat.color.chat_day_change _(new in version 0.4.2)_
|========================================
WeeChat colors are:

View File

@ -6373,7 +6373,8 @@ before tab will not be displayed).
[NOTE]
With two tabs ("\t") at beginning of message, time will not be displayed and
message will have no alignment at all (like the message "Day changed to").
message will have no alignment at all. Moreover, the date in message will be
set to 0.
C example:

View File

@ -23,6 +23,11 @@
** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `white`)
* [[option_weechat.color.chat_day_change]] *weechat.color.chat_day_change*
** description: `couleur du texte pour le message affiché lorsque le jour a changé`
** type: couleur
** valeurs: un nom de couleur WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numéro de couleur du terminal ou un alias; des attributs sont autorisés avant la couleur (seulement pour la couleur du texte, pas le fond) : "*" pour du gras, "!" pour la vidéo inverse, "_" pour du souligné (valeur par défaut: `cyan`)
* [[option_weechat.color.chat_delimiters]] *weechat.color.chat_delimiters*
** description: `couleur du texte pour les délimiteurs`
** type: couleur
@ -478,10 +483,10 @@
** type: booléen
** valeurs: on, off (valeur par défaut: `on`)
* [[option_weechat.look.day_change_time_format]] *weechat.look.day_change_time_format*
** description: `format de date pour la date affichée quand le jour a changé (voir man strftime pour le format de date/heure)`
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message*
** description: `message affiché lorsque le jour a changé (voir man strftime pour le format de date/heure) (note: le contenu est évalué, voir /help eval)`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"%a, %d %b %Y"`)
** valeurs: toute chaîne (valeur par défaut: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.eat_newline_glitch]] *weechat.look.eat_newline_glitch*
** description: `si activé, le eat_newline_glitch sera positionné à 0; cela est utilisé pour ne pas ajouter de nouvelle ligne à la fin de chaque ligne, et donc ne pas couper le texte quand vous copiez/collez du texte depuis WeeChat vers une autre application (cette option est désactivée par défaut car elle peut causer de sérieux problèmes d'affichages)`

View File

@ -6453,7 +6453,8 @@ préfixe (l'espace avant la tabulation ne sera pas affiché).
[NOTE]
Avec deux tabulations ("\t") au début du message, l'heure ne sera pas affichée
et le message n'aura pas d'alignement (comme le message "Jour changé").
et le message n'aura pas d'alignement. De plus, la date dans le message sera
positionnée à 0.
Exemple en C :

View File

@ -23,6 +23,11 @@
** tipo: colore
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `white`)
* [[option_weechat.color.chat_day_change]] *weechat.color.chat_day_change*
** descrizione: `text color for message displayed when the day has changed`
** tipo: colore
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `cyan`)
* [[option_weechat.color.chat_delimiters]] *weechat.color.chat_delimiters*
** descrizione: `colore del testo per i delimitatori`
** tipo: colore
@ -478,10 +483,10 @@
** tipo: bool
** valori: on, off (valore predefinito: `on`)
* [[option_weechat.look.day_change_time_format]] *weechat.look.day_change_time_format*
** descrizione: `time format for date displayed when day changed (see man strftime for date/time specifiers)`
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message*
** descrizione: `message displayed when the day has changed (see man strftime for date/time specifiers) (note: content is evaluated, see /help eval)`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"%a, %d %b %Y"`)
** valori: qualsiasi stringa (valore predefinito: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.eat_newline_glitch]] *weechat.look.eat_newline_glitch*
** descrizione: `se attivo, eat_newline_glitch verrà impostato a 0; viene usato per non aggiungere il carattere a capo alla fine di ogni riga, al fine di non danneggiare il testo quando viene copiato/incollato da WeeChat in un'altra applicazione (l'opzione è disabilitata per default, dato che può causare seri errori di visualizzazione)`

View File

@ -6403,7 +6403,8 @@ tabulazione non verrà mostrato).
// TRANSLATION MISSING
[NOTE]
With two tabs ("\t") at beginning of message, time will not be displayed and
message will have no alignment at all (like the message "Day changed to").
message will have no alignment at all. Moreover, the date in message will be
set to 0.
Esempio in C:

View File

@ -23,6 +23,11 @@
** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、ターミナル色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、下線は "_"。 (デフォルト値: `white`)
* [[option_weechat.color.chat_day_change]] *weechat.color.chat_day_change*
** 説明: `text color for message displayed when the day has changed`
** タイプ: 色
** 値: WeeChat の色名 (default、black、(dark)gray、white、(light)red、(light)green、brown、yellow、(light)blue、(light)magenta、(light)cyan) 、ターミナル色番号またはその別名; 色の前に属性を置くことができます (テキスト前景色のみ、背景色は出来ません): 太字は "*"、反転は "!"、下線は "_"。 (デフォルト値: `cyan`)
* [[option_weechat.color.chat_delimiters]] *weechat.color.chat_delimiters*
** 説明: `区切りのテキスト色`
** タイプ: 色
@ -478,10 +483,10 @@
** タイプ: ブール
** 値: on, off (デフォルト値: `on`)
* [[option_weechat.look.day_change_time_format]] *weechat.look.day_change_time_format*
** 説明: `time format for date displayed when day changed (see man strftime for date/time specifiers)`
* [[option_weechat.look.day_change_message]] *weechat.look.day_change_message*
** 説明: `message displayed when the day has changed (see man strftime for date/time specifiers) (note: content is evaluated, see /help eval)`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"%a, %d %b %Y"`)
** 値: 未制約文字列 (デフォルト値: `"-- %a, %d %b %Y --"`)
* [[option_weechat.look.eat_newline_glitch]] *weechat.look.eat_newline_glitch*
** 説明: `セットされた場合、eat_newline_glitch は 0 になる; これは各行の末尾に新しい行を追加しないために使われ、WeeChat から別のアプリケーションにテキストをコピー/ペーストする際にテキストの改行を行わない (致命的な表示上の問題を引き起こすため、このオプションはデフォルトで無効化されている)`

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2452,10 +2452,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tZměnil se den na %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "úroveň ladění pro plugin (\"core\" pro jádro WeeChat)"
@ -2642,8 +2638,8 @@ msgstr "zobrazit speiální zprávy při změně dne"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"časový formát pro \"time\" položku panelu (viz. man strftime pro specifikaci "
"data/času)"
@ -3029,6 +3025,10 @@ msgstr "barva textu pro jeméno bufferu"
msgid "text color for channel names"
msgstr "barva textu pro jméno kanálu"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr "barva textu pro počet ostatních zpráv v hostlistu (stavový řádek)"
msgid "text color for delimiters"
msgstr "barva textu pro děliče v infobaru"
@ -9796,3 +9796,6 @@ msgstr ""
msgid "Constants"
msgstr ""
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tZměnil se den na %s"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-18 19:01+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@ -2782,10 +2782,6 @@ msgstr ""
"%sWarnung: Proxy \"%s\" existiert nicht (kann mit dem Befehl /proxy angelegt "
"werden)"
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tEin neuer Tag bricht an. Heute ist %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "Debug-Level für Erweiterung (\"core\" für den WeeChat Core)"
@ -3009,9 +3005,10 @@ msgstr ""
msgid "display special message when day changes"
msgstr "bei einem Datumswechsel wird eine entsprechende Nachricht angezeigt"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"Format für die Datumsanzeige, wenn ein neuer Tag anbricht (siehe man "
"strftime für Platzhalter für das Datum und die Uhrzeit)"
@ -3479,6 +3476,13 @@ msgstr "Textfarbe für den Namen des Buffers"
msgid "text color for channel names"
msgstr "Farbe für den Channel-Namen"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr ""
"Textfarbe in der die Schlagwörter, die nach der jeweiligen Nachricht "
"angezeigt werden, dargestellt werden sollen (wird durch den Befehl \"/debug "
"tags\" angezeigt)"
msgid "text color for delimiters"
msgstr "Farbe der Infobar-Trennzeichen"
@ -10800,3 +10804,6 @@ msgstr "Type"
msgid "Constants"
msgstr "Konstanten"
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tEin neuer Tag bricht an. Heute ist %s"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2583,10 +2583,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tNuevo día, %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "nivel de depurado para el plugin (\"core\" para el núcleo de WeeChat)"
@ -2792,8 +2788,8 @@ msgstr "mostrar un mensaje especial cuando el día cambia"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"formato de hora para el elemento de barra \"time\" (ver el manual de "
"strftime para los especificadores de fecha/hora)"
@ -3212,6 +3208,11 @@ msgstr "color para los nombres de los buffers"
msgid "text color for channel names"
msgstr "color para los nombres de los canales"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr ""
"color para las etiquetas de mensaje (mostrados con el comando /debug tags)"
msgid "text color for delimiters"
msgstr "color para los delimitadores"
@ -10052,3 +10053,6 @@ msgstr "Tipo"
msgid "Constants"
msgstr "Constantes"
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tNuevo día, %s"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"PO-Revision-Date: 2013-08-21 11:16+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-23 16:15+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -2708,10 +2708,6 @@ msgstr ""
"%sAttention: le proxy \"%s\" n'existe pas (vous pouvez le créer avec la "
"commande /proxy)"
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tJour changé: %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "niveau de debug pour l'extension (\"core\" pour le cœur de WeeChat)"
@ -2926,11 +2922,11 @@ msgid "display special message when day changes"
msgstr "affiche un message quand le jour change"
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"format de date pour la date affichée quand le jour a changé (voir man "
"strftime pour le format de date/heure)"
"message affiché lorsque le jour a changé (voir man strftime pour le format "
"de date/heure) (note: le contenu est évalué, voir /help eval)"
msgid ""
"if set, the eat_newline_glitch will be set to 0; this is used to not add new "
@ -3369,6 +3365,9 @@ msgstr "couleur du texte pour le nom des tampons"
msgid "text color for channel names"
msgstr "couleur du texte pour le nom des canaux"
msgid "text color for message displayed when the day has changed"
msgstr "couleur du texte pour le message affiché lorsque le jour a changé"
msgid "text color for delimiters"
msgstr "couleur du texte pour les délimiteurs"
@ -10537,3 +10536,6 @@ msgstr "Type"
msgid "Constants"
msgstr "Constantes"
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tJour changé: %s"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2134,10 +2134,6 @@ msgid ""
"proxy)"
msgstr ""
#, fuzzy, c-format
msgid "\t\tDay changed to %s"
msgstr "A mai dátum: %s\n"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
@ -2294,8 +2290,8 @@ msgstr "speciális üzenet az aktuális nap megváltozásakor"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr "új nap kezdetével megjelenő időbélyeg"
msgid ""
@ -2634,6 +2630,10 @@ msgstr "szerver nevének színe"
msgid "text color for channel names"
msgstr "szobanevek színe az eseményekben"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr "kiemelt üzenetet tartalmazó ablak színe (státuszsor)"
#, fuzzy
msgid "text color for delimiters"
msgstr "információs pult határolóinak színe"
@ -9234,3 +9234,7 @@ msgstr ""
msgid "Constants"
msgstr ""
#, fuzzy
#~ msgid "\t\tDay changed to %s"
#~ msgstr "A mai dátum: %s\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2627,10 +2627,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tOggi è %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "livello di debug per il plugin (\"core\" per il core di WeeChat)"
@ -2840,8 +2836,8 @@ msgstr "mostra un messaggio speciale al cambio di data"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"formato dell'ora per l'elemento barra \"time\" (consultare man strftime per "
"gli specificatori data/ora)"
@ -3274,6 +3270,12 @@ msgstr "colore del testo per i nomi dei buffer"
msgid "text color for channel names"
msgstr "colore del testo per i nomi dei canali"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr ""
"colore del testo per i tago dopo i messaggi (mostrati con il comando /debug "
"tags)"
msgid "text color for delimiters"
msgstr "colore del testo per i delimitatori"
@ -10149,3 +10151,6 @@ msgstr "Tipo"
msgid "Constants"
msgstr "Costanti"
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tOggi è %s"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@ -2605,10 +2605,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\t%s に日付変更"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "プラグイン (\"core\" は WeeChat コア) のデバッグレベル"
@ -2809,8 +2805,8 @@ msgstr "日付が変わった際に特殊メッセージを表示"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"\"time\" バーアイテムの時間フォーマット (日付/時間指定子は strftime の man を"
"参照)"
@ -3220,6 +3216,10 @@ msgstr "バッファ名のテキスト色"
msgid "text color for channel names"
msgstr "チャンネル名のテキスト色"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr "メッセージの後ろのタグのテキスト色 (/debug tags コマンドで表示)"
msgid "text color for delimiters"
msgstr "区切りのテキスト色"
@ -10105,3 +10105,6 @@ msgstr "タイプ"
msgid "Constants"
msgstr "定数"
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\t%s に日付変更"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2654,10 +2654,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tDzień zmienił się na %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "poziom debugowania dla wtyczki (\"core\" dla rdzenia WeeChat)"
@ -2865,8 +2861,8 @@ msgstr "wyświetlaj specjalną wiadomość, kiedy zmienia się dzień"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"format czasu dla elementu paska \"time\" (zobacz man strftime dla "
"specyfikatorów daty/czasu)"
@ -3295,6 +3291,12 @@ msgstr "kolor nazw buforów"
msgid "text color for channel names"
msgstr "kolor nazw kanałów"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr ""
"kolor tekstu dla tagów po wiadomościach (wyświetlanych za pomocą komendy /"
"debug tags)"
msgid "text color for delimiters"
msgstr "kolor separatorów"
@ -10263,3 +10265,6 @@ msgstr "Typ"
msgid "Constants"
msgstr "Stałe"
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tDzień zmienił się na %s"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2527,10 +2527,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\tDia mudado para %s"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
"nível de debug para o plugin (\"core\" para o componente principal do "
@ -2712,8 +2708,8 @@ msgstr "mostra uma mensagem especial quando o dia muda"
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
"formato de tempo para o item de barra \"time\" (veja man strftime para "
"especificadores de data/tempo)"
@ -3115,6 +3111,12 @@ msgstr "cor do texto para nomes de buffer"
msgid "text color for channel names"
msgstr "cor do texto para nomes de canal"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr ""
"cor de texto para marcadores de mensagens (mostrados com o comando /debug "
"tags)"
msgid "text color for delimiters"
msgstr "cor de texto para delimitadores"
@ -9430,3 +9432,6 @@ msgstr ""
msgid "Constants"
msgstr ""
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\tDia mudado para %s"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2156,10 +2156,6 @@ msgid ""
"proxy)"
msgstr ""
#, fuzzy, c-format
msgid "\t\tDay changed to %s"
msgstr "Дата сменилась на %s\n"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
@ -2316,8 +2312,8 @@ msgstr "отображать специальное сообщение при
#, fuzzy
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr "отображение маркера даты при смене дня"
msgid ""
@ -2665,6 +2661,10 @@ msgstr "цвет названия сервера"
msgid "text color for channel names"
msgstr "цвет имён при действиях"
#, fuzzy
msgid "text color for message displayed when the day has changed"
msgstr "цвет окна с подсвеченным сообщением (в строке состояния)"
#, fuzzy
msgid "text color for delimiters"
msgstr "цвет разделителей информационной панели"
@ -9254,3 +9254,7 @@ msgstr ""
msgid "Constants"
msgstr ""
#, fuzzy
#~ msgid "\t\tDay changed to %s"
#~ msgstr "Дата сменилась на %s\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.2-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-08-17 10:37+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1903,10 +1903,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr "\t\t %s olarak gün değişti"
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
@ -2055,8 +2051,8 @@ msgid "display special message when day changes"
msgstr ""
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
msgid ""
@ -2366,6 +2362,9 @@ msgstr ""
msgid "text color for channel names"
msgstr "kanal isimleri için metin rengi"
msgid "text color for message displayed when the day has changed"
msgstr ""
msgid "text color for delimiters"
msgstr ""
@ -8256,3 +8255,6 @@ msgstr "Tür"
msgid "Constants"
msgstr ""
#~ msgid "\t\tDay changed to %s"
#~ msgstr "\t\t %s olarak gün değişti"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-08-21 11:15+0200\n"
"POT-Creation-Date: 2013-08-23 16:15+0200\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -1907,10 +1907,6 @@ msgid ""
"proxy)"
msgstr ""
#, c-format
msgid "\t\tDay changed to %s"
msgstr ""
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr ""
@ -2059,8 +2055,8 @@ msgid "display special message when day changes"
msgstr ""
msgid ""
"time format for date displayed when day changed (see man strftime for date/"
"time specifiers)"
"message displayed when the day has changed (see man strftime for date/time "
"specifiers) (note: content is evaluated, see /help eval)"
msgstr ""
msgid ""
@ -2370,6 +2366,9 @@ msgstr ""
msgid "text color for channel names"
msgstr ""
msgid "text color for message displayed when the day has changed"
msgstr ""
msgid "text color for delimiters"
msgstr ""

View File

@ -99,7 +99,7 @@ struct t_config_option *config_look_color_real_white;
struct t_config_option *config_look_command_chars;
struct t_config_option *config_look_confirm_quit;
struct t_config_option *config_look_day_change;
struct t_config_option *config_look_day_change_time_format;
struct t_config_option *config_look_day_change_message;
struct t_config_option *config_look_eat_newline_glitch;
struct t_config_option *config_look_emphasized_attributes;
struct t_config_option *config_look_highlight;
@ -170,6 +170,7 @@ struct t_config_option *config_color_chat;
struct t_config_option *config_color_chat_bg;
struct t_config_option *config_color_chat_buffer;
struct t_config_option *config_color_chat_channel;
struct t_config_option *config_color_chat_day_change;
struct t_config_option *config_color_chat_delimiters;
struct t_config_option *config_color_chat_inactive_buffer;
struct t_config_option *config_color_chat_inactive_window;
@ -776,7 +777,9 @@ config_change_plugin_extension (void *data, struct t_config_option *option)
}
/*
* Displays message "Day changed to xxx".
* Timer called each minute: checks if the day has changed, and if yes:
* - refreshes screen (if needed)
* - sends signal "day_changed"
*/
int
@ -785,8 +788,7 @@ config_day_change_timer_cb (void *data, int remaining_calls)
struct timeval tv_time;
struct tm *local_time;
int new_mday;
char text_time[256], *text_time2;
struct t_gui_buffer *ptr_buffer;
char str_time[256];
/* make C compiler happy */
(void) data;
@ -801,30 +803,16 @@ config_day_change_timer_cb (void *data, int remaining_calls)
{
if (CONFIG_BOOLEAN(config_look_day_change))
{
strftime (text_time, sizeof (text_time),
CONFIG_STRING(config_look_day_change_time_format),
local_time);
text_time2 = string_iconv_to_internal (NULL, text_time);
gui_add_hotlist = 0;
for (ptr_buffer = gui_buffers; ptr_buffer;
ptr_buffer = ptr_buffer->next_buffer)
{
if (ptr_buffer->type == GUI_BUFFER_TYPE_FORMATTED)
{
gui_chat_printf (ptr_buffer,
_("\t\tDay changed to %s"),
(text_time2) ?
text_time2 : text_time);
}
}
if (text_time2)
free (text_time2);
gui_add_hotlist = 1;
/*
* refresh all windows so that the message with new day will be
* displayed
*/
gui_window_ask_refresh (1);
}
/* send signal "day_changed" */
strftime (text_time, sizeof (text_time), "%Y-%m-%d", local_time);
hook_signal_send ("day_changed", WEECHAT_HOOK_SIGNAL_STRING, text_time);
strftime (str_time, sizeof (str_time), "%Y-%m-%d", local_time);
hook_signal_send ("day_changed", WEECHAT_HOOK_SIGNAL_STRING, str_time);
}
config_day_change_old_day = new_mday;
@ -2079,13 +2067,13 @@ config_weechat_init_options ()
weechat_config_file, ptr_section,
"day_change", "boolean",
N_("display special message when day changes"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_day_change_time_format = config_file_new_option (
NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_day_change_message = config_file_new_option (
weechat_config_file, ptr_section,
"day_change_time_format", "string",
N_("time format for date displayed when day changed (see man strftime "
"for date/time specifiers)"),
NULL, 0, 0, "%a, %d %b %Y", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
"day_change_message", "string",
N_("message displayed when the day has changed (see man strftime for "
"date/time specifiers) (note: content is evaluated, see /help eval)"),
NULL, 0, 0, "-- %a, %d %b %Y --", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL);
config_look_eat_newline_glitch = config_file_new_option (
weechat_config_file, ptr_section,
"eat_newline_glitch", "boolean",
@ -2567,6 +2555,12 @@ config_weechat_init_options ()
N_("text color for channel names"),
NULL, GUI_COLOR_CHAT_CHANNEL, 0, "white", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_chat_day_change = config_file_new_option (
weechat_config_file, ptr_section,
"chat_day_change", "color",
N_("text color for message displayed when the day has changed"),
NULL, GUI_COLOR_CHAT_DAY_CHANGE, 0, "cyan", NULL, 0,
NULL, NULL, &config_change_color, NULL, NULL, NULL);
config_color_chat_delimiters = config_file_new_option (
weechat_config_file, ptr_section,
"chat_delimiters", "color",

View File

@ -116,7 +116,7 @@ extern struct t_config_option *config_look_color_real_white;
extern struct t_config_option *config_look_command_chars;
extern struct t_config_option *config_look_confirm_quit;
extern struct t_config_option *config_look_day_change;
extern struct t_config_option *config_look_day_change_time_format;
extern struct t_config_option *config_look_day_change_message;
extern struct t_config_option *config_look_eat_newline_glitch;
extern struct t_config_option *config_look_emphasized_attributes;
extern struct t_config_option *config_look_highlight;
@ -185,6 +185,7 @@ extern struct t_config_option *config_color_chat;
extern struct t_config_option *config_color_chat_bg;
extern struct t_config_option *config_color_chat_buffer;
extern struct t_config_option *config_color_chat_channel;
extern struct t_config_option *config_color_chat_day_change;
extern struct t_config_option *config_color_chat_delimiters;
extern struct t_config_option *config_color_chat_inactive_buffer;
extern struct t_config_option *config_color_chat_inactive_window;

View File

@ -25,9 +25,11 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "../../core/weechat.h"
#include "../../core/wee-config.h"
#include "../../core/wee-eval.h"
#include "../../core/wee-hook.h"
#include "../../core/wee-string.h"
#include "../../core/wee-utf8.h"
@ -178,31 +180,31 @@ gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate)
int x, size_on_screen;
char *read_marker_string, *default_string = "- ";
if (!simulate)
if (simulate)
return;
gui_window_coords_init_line (window, window->win_chat_cursor_y);
if (CONFIG_INTEGER(config_look_read_marker) == CONFIG_LOOK_READ_MARKER_LINE)
{
gui_window_coords_init_line (window, window->win_chat_cursor_y);
if (CONFIG_INTEGER(config_look_read_marker) == CONFIG_LOOK_READ_MARKER_LINE)
read_marker_string = CONFIG_STRING(config_look_read_marker_string);
if (!read_marker_string || !read_marker_string[0])
read_marker_string = default_string;
size_on_screen = utf8_strlen_screen (read_marker_string);
gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat,
GUI_COLOR_CHAT_READ_MARKER);
wmove (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x);
wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat);
x = 0;
while (x < gui_chat_get_real_width (window))
{
read_marker_string = CONFIG_STRING(config_look_read_marker_string);
if (!read_marker_string || !read_marker_string[0])
read_marker_string = default_string;
size_on_screen = utf8_strlen_screen (read_marker_string);
gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat,
GUI_COLOR_CHAT_READ_MARKER);
wmove (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x);
wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat);
x = 0;
while (x < gui_chat_get_real_width (window))
{
mvwprintw (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, x,
"%s", read_marker_string);
x += size_on_screen;
}
mvwprintw (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, x,
"%s", read_marker_string);
x += size_on_screen;
}
window->win_chat_cursor_x = window->win_chat_width;
}
window->win_chat_cursor_x = window->win_chat_width;
}
/*
@ -585,6 +587,44 @@ gui_chat_display_word (struct t_gui_window *window,
return chars_displayed;
}
/*
* Displays a message when the day has changed.
*/
void
gui_chat_display_day_changed (struct t_gui_window *window,
struct tm *date, int simulate)
{
char message[1024], *message_with_color;
if (simulate)
return;
message_with_color = NULL;
/* build the message to display */
strftime (message, sizeof (message),
CONFIG_STRING(config_look_day_change_message), date);
if (strstr (message, "${"))
message_with_color = eval_expression (message, NULL, NULL, NULL);
/* display the message */
gui_window_coords_init_line (window, window->win_chat_cursor_y);
gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat,
GUI_COLOR_CHAT_DAY_CHANGE);
wmove (GUI_WINDOW_OBJECTS(window)->win_chat,
window->win_chat_cursor_y, window->win_chat_cursor_x);
wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat);
gui_chat_display_word_raw (window, NULL,
(message_with_color) ? message_with_color : message,
0, simulate, 0, 0);
window->win_chat_cursor_x = window->win_chat_width;
if (message_with_color)
free (message_with_color);
}
/*
* Displays time, buffer name (for merged buffers) and prefix for a line.
*/
@ -1120,11 +1160,15 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
int count, int simulate)
{
int num_lines, x, y, lines_displayed, line_align;
int read_marker_x, read_marker_y, marker_line;
int read_marker_x, read_marker_y;
int word_start_offset, word_end_offset;
int word_length_with_spaces, word_length;
char *ptr_data, *ptr_end_offset, *next_char;
char *ptr_style, *message_with_tags, *message_with_search;
struct t_gui_line *ptr_prev_line, *ptr_next_line;
struct tm local_time, local_time2;
struct timeval tv_time;
time_t *ptr_time;
if (!line)
return 0;
@ -1149,6 +1193,34 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
gui_window_current_emphasis = 0;
}
/* display message before first line of buffer if date is not today */
if ((line->data->date != 0) && CONFIG_BOOLEAN(config_look_day_change))
{
ptr_time = NULL;
ptr_prev_line = gui_line_get_prev_displayed (line);
if (ptr_prev_line)
{
while (ptr_prev_line && (ptr_prev_line->data->date == 0))
{
ptr_prev_line = gui_line_get_prev_displayed (ptr_prev_line);
}
}
if (!ptr_prev_line)
{
gettimeofday (&tv_time, NULL);
localtime_r (&tv_time.tv_sec, &local_time);
localtime_r (&line->data->date, &local_time2);
if ((local_time.tm_mday != local_time2.tm_mday)
|| (local_time.tm_mon != local_time2.tm_mon)
|| (local_time.tm_year != local_time2.tm_year))
{
gui_chat_display_day_changed (window, &local_time2, simulate);
gui_chat_display_new_line (window, num_lines, count,
&lines_displayed, simulate);
}
}
}
/* calculate marker position (maybe not used for this line!) */
if (window->buffer->time_for_each_line && line->data->str_time)
read_marker_x = x + gui_chat_strlen_screen (line->data->str_time);
@ -1158,8 +1230,6 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
lines_displayed = 0;
marker_line = gui_chat_marker_for_line (window->buffer, line);
/* display time and prefix */
gui_chat_display_time_to_prefix (window, line, num_lines, count,
&lines_displayed, simulate);
@ -1189,12 +1259,8 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
}
}
if (!line->data->message || !line->data->message[0])
{
gui_chat_display_new_line (window, num_lines, count,
&lines_displayed, simulate);
}
else
/* display message */
if (line->data->message && line->data->message[0])
{
message_with_tags = (gui_chat_display_tags) ?
gui_chat_build_string_message_tags (line) : NULL;
@ -1306,8 +1372,53 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
if (message_with_search)
free (message_with_search);
}
else
{
/* no message */
gui_chat_display_new_line (window, num_lines, count,
&lines_displayed, simulate);
}
if (marker_line)
/* display message if day has changed after this line */
if ((line->data->date != 0) && CONFIG_BOOLEAN(config_look_day_change))
{
ptr_time = NULL;
ptr_next_line = gui_line_get_next_displayed (line);
if (ptr_next_line)
{
while (ptr_next_line && (ptr_next_line->data->date == 0))
{
ptr_next_line = gui_line_get_next_displayed (ptr_next_line);
}
}
if (ptr_next_line)
{
/* get time of next line */
ptr_time = &ptr_next_line->data->date;
}
else
{
/* it was the last line => compare with current system time */
gettimeofday (&tv_time, NULL);
ptr_time = &tv_time.tv_sec;
}
if (ptr_time && (*ptr_time != 0))
{
localtime_r (&line->data->date, &local_time);
localtime_r (ptr_time, &local_time2);
if ((local_time.tm_mday != local_time2.tm_mday)
|| (local_time.tm_mon != local_time2.tm_mon)
|| (local_time.tm_year != local_time2.tm_year))
{
gui_chat_display_day_changed (window, &local_time2, simulate);
gui_chat_display_new_line (window, num_lines, count,
&lines_displayed, simulate);
}
}
}
/* display read marker (after line) */
if (gui_chat_marker_for_line (window->buffer, line))
{
gui_chat_display_horizontal_line (window, simulate);
gui_chat_display_new_line (window, num_lines, count,

View File

@ -1435,6 +1435,7 @@ gui_color_init_weechat ()
gui_color_build (GUI_COLOR_CHAT_NICK_PREFIX, CONFIG_COLOR(config_color_chat_nick_prefix), CONFIG_COLOR(config_color_chat_bg));
gui_color_build (GUI_COLOR_CHAT_NICK_SUFFIX, CONFIG_COLOR(config_color_chat_nick_suffix), CONFIG_COLOR(config_color_chat_bg));
gui_color_build (GUI_COLOR_EMPHASIS, CONFIG_COLOR(config_color_emphasized), CONFIG_COLOR(config_color_emphasized_bg));
gui_color_build (GUI_COLOR_CHAT_DAY_CHANGE, CONFIG_COLOR(config_color_chat_day_change), CONFIG_COLOR(config_color_chat_bg));
/*
* define old nick colors for compatibility on /upgrade with previous

View File

@ -81,6 +81,7 @@ enum t_gui_color_enum
GUI_COLOR_CHAT_NICK_PREFIX,
GUI_COLOR_CHAT_NICK_SUFFIX,
GUI_COLOR_EMPHASIS,
GUI_COLOR_CHAT_DAY_CHANGE,
/* number of colors */
GUI_COLOR_NUM_COLORS,

View File

@ -928,23 +928,15 @@ logger_backlog (struct t_gui_buffer *buffer, const char *filename, int lines)
{
const char *charset;
struct t_logger_line *last_lines, *ptr_lines;
char *pos_message, *pos_tab, *error, *message, text_time[256], *text_time2;
struct timeval tv_time;
struct tm *local_time;
char *pos_message, *pos_tab, *error, *message;
time_t datetime, time_now;
struct tm tm_line;
int num_lines, old_mday, old_mon, old_year;
int num_lines;
charset = weechat_info_get ("charset_terminal", "");
weechat_buffer_set (buffer, "print_hooks_enabled", "0");
gettimeofday (&tv_time, NULL);
local_time = localtime (&tv_time.tv_sec);
old_mday = local_time->tm_mday;
old_mon = local_time->tm_mon;
old_year = local_time->tm_year;
num_lines = 0;
last_lines = logger_tail_file (filename, lines);
ptr_lines = last_lines;
@ -968,27 +960,7 @@ logger_backlog (struct t_gui_buffer *buffer, const char *filename, int lines)
weechat_config_string (logger_config_file_time_format),
&tm_line);
if (error && !error[0] && (tm_line.tm_year > 0))
{
datetime = mktime (&tm_line);
if ((tm_line.tm_mday != old_mday)
|| (tm_line.tm_mon != old_mon)
|| (tm_line.tm_year != old_year))
{
strftime (text_time, sizeof (text_time),
weechat_config_string (weechat_config_get ("weechat.look.day_change_time_format")),
&tm_line);
text_time2 = weechat_iconv_to_internal (NULL, text_time);
weechat_printf_tags (buffer,
"no_highlight,notify_none,logger_backlog_date",
_("\t\tDay changed to %s"),
(text_time2) ? text_time2 : text_time);
if (text_time2)
free (text_time2);
old_mday = tm_line.tm_mday;
old_mon = tm_line.tm_mon;
old_year = tm_line.tm_year;
}
}
pos_message[0] = '\t';
}
pos_message = (pos_message && (datetime != 0)) ?
@ -1019,11 +991,12 @@ logger_backlog (struct t_gui_buffer *buffer, const char *filename, int lines)
logger_tail_free (last_lines);
if (num_lines > 0)
{
weechat_printf_tags (buffer, "no_highlight,notify_none,logger_backlog_end",
_("%s===\t%s========== End of backlog (%d lines) =========="),
weechat_color (weechat_config_string (logger_config_color_backlog_end)),
weechat_color (weechat_config_string (logger_config_color_backlog_end)),
num_lines);
weechat_printf_date_tags (buffer, datetime,
"no_highlight,notify_none,logger_backlog_end",
_("%s===\t%s========== End of backlog (%d lines) =========="),
weechat_color (weechat_config_string (logger_config_color_backlog_end)),
weechat_color (weechat_config_string (logger_config_color_backlog_end)),
num_lines);
weechat_buffer_set (buffer, "unread", "");
}
weechat_buffer_set (buffer, "print_hooks_enabled", "1");