From b1c8989835499c52677b092044f91da9d769e597 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 5 Feb 2011 15:29:51 +0100 Subject: [PATCH] Add option weechat.look.read_marker_string, use option hline_char for horizontal bar separators only --- ChangeLog | 1 + doc/de/autogen/user/weechat_options.txt | 9 +++-- doc/en/autogen/user/weechat_options.txt | 9 +++-- doc/fr/autogen/user/weechat_options.txt | 9 +++-- doc/it/autogen/user/weechat_options.txt | 9 +++-- po/cs.po | 12 +++++-- po/de.po | 18 ++++++++-- po/es.po | 16 +++++++-- po/fr.po | 25 ++++++++++---- po/hu.po | 11 ++++-- po/it.po | 16 +++++++-- po/pl.po | 16 +++++++-- po/pt_BR.po | 12 +++++-- po/ru.po | 11 ++++-- po/weechat.pot | 11 ++++-- src/core/wee-config.c | 17 +++++++--- src/core/wee-config.h | 2 +- src/gui/curses/gui-curses-bar-window.c | 17 +++++++--- src/gui/curses/gui-curses-chat.c | 45 ++++++++++--------------- src/gui/curses/gui-curses-window.c | 20 ----------- src/gui/curses/gui-curses.h | 1 - 21 files changed, 185 insertions(+), 102 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22886420e..58e17da8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ v0.3.5-dev, 2011-02-05 Version 0.3.5 (under dev!) -------------------------- +* core: add option weechat.look.read_marker_string * core: improve arguments displayed in /help of commands * core: fix terminal title when $TERM starts with "screen" * core: add some chars after cursor when scrolling input line: new option diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index c50314a8a..88b9bacfd 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -344,7 +344,7 @@ ** Werte: beliebige Zeichenkette (Standardwert: `""`) * *weechat.look.hline_char* -** Beschreibung: `Das angegebene Zeichen wird genutzt um damit die horizontalen Linien zu zeichnen. Hinweis: Ein leerer Wert bewirkt das ncurses eine durchgezogene Linie zeichnet. Dies kann aber bei einigen Terminals, in URL Sektionen, zu Fehlern führen.` +** Beschreibung: `char used to draw horizontal separators around bars (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals), wide chars are NOT allowed here` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"-"`) @@ -501,13 +501,18 @@ * *weechat.look.read_marker* ** Beschreibung: `Nutzt eine Linie oder ein Zeichen um die erste ungelesene Nachricht in einem Buffer zu markieren` ** Typ: integer -** Werte: none, line, dotted-line, char (Standardwert: `dotted-line`) +** Werte: none, line, char (Standardwert: `line`) * *weechat.look.read_marker_always_show* ** Beschreibung: `Das Lesezeichen wird immer dargestellt auch wenn noch keine neue Nachricht im Buffer geschrieben wurde` ** Typ: boolesch ** Werte: on, off (Standardwert: `off`) +* *weechat.look.read_marker_string* +** Beschreibung: `string used to draw read marker line (string is repeated until end of line)` +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette (Standardwert: `"- "`) + * *weechat.look.save_config_on_exit* ** Beschreibung: `Konfiguration beim Beenden abspeichern` ** Typ: boolesch diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index e6cf30f4e..6592e90a6 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -344,7 +344,7 @@ ** values: any string (default value: `""`) * *weechat.look.hline_char* -** description: `char used to draw horizontal lines, note that empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals` +** description: `char used to draw horizontal separators around bars (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals), wide chars are NOT allowed here` ** type: string ** values: any string (default value: `"-"`) @@ -501,13 +501,18 @@ * *weechat.look.read_marker* ** description: `use a marker (line or char) on buffers to show first unread line` ** type: integer -** values: none, line, dotted-line, char (default value: `dotted-line`) +** values: none, line, char (default value: `line`) * *weechat.look.read_marker_always_show* ** description: `always show read marker, even if it is after last buffer line` ** type: boolean ** values: on, off (default value: `off`) +* *weechat.look.read_marker_string* +** description: `string used to draw read marker line (string is repeated until end of line)` +** type: string +** values: any string (default value: `"- "`) + * *weechat.look.save_config_on_exit* ** description: `save configuration file on exit` ** type: boolean diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 9159a7a18..31f07406f 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -344,7 +344,7 @@ ** valeurs: toute chaîne (valeur par défaut: `""`) * *weechat.look.hline_char* -** description: `caractère utilisé pour tracer les lignes horizontales, notez qu'une valeur vide tracera une vraie ligne avec ncurses, mais peut causer des problèmes d'affichage avec la sélection d'URL sous certains terminaux` +** description: `caractère utilisé pour tracer les séparateurs horizontaux autour des barres (une valeur vide tracera une vraie ligne avec ncurses, mais peut causer des problèmes d'affichage avec la sélection d'URL sous certains terminaux), les caractères larges ne sont PAS autorisés ici` ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `"-"`) @@ -501,13 +501,18 @@ * *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 -** valeurs: none, line, dotted-line, char (valeur par défaut: `dotted-line`) +** valeurs: none, line, char (valeur par défaut: `line`) * *weechat.look.read_marker_always_show* ** description: `toujours afficher le marqueur de lecture, même s'il est après la dernière ligne du tampon` ** type: booléen ** valeurs: on, off (valeur par défaut: `off`) +* *weechat.look.read_marker_string* +** description: `chaîne utilisée pour tracer la ligne de marqueur des données non lues (la chaîne est répétée jusqu'à la fin de la ligne)` +** type: chaîne +** valeurs: toute chaîne (valeur par défaut: `"- "`) + * *weechat.look.save_config_on_exit* ** description: `sauvegarder la configuration en quittant` ** type: booléen diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 9c7f27fa3..5f5f17034 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -344,7 +344,7 @@ ** valori: qualsiasi stringa (valore predefinito: `""`) * *weechat.look.hline_char* -** descrizione: `carattere utilizzato per disegnare le righe orizzontali; notare che un valore vuoto disegnerà una vera riga con ncurses, ma può causare errori con la selezione dell'URL in alcuni terminali` +** descrizione: `char used to draw horizontal separators around bars (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals), wide chars are NOT allowed here` ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `"-"`) @@ -501,13 +501,18 @@ * *weechat.look.read_marker* ** descrizione: `usa un evidenziatore (riga o carattere) sui buffer per mostrare la prima riga non letta` ** tipo: intero -** valori: none, line, dotted-line, char (valore predefinito: `dotted-line`) +** valori: none, line, char (valore predefinito: `line`) * *weechat.look.read_marker_always_show* ** descrizione: `mostra sempre l'evidenziatore di lettura, anche se si trova dopo l'ultima riga del buffer` ** tipo: bool ** valori: on, off (valore predefinito: `off`) +* *weechat.look.read_marker_string* +** descrizione: `string used to draw read marker line (string is repeated until end of line)` +** tipo: stringa +** valori: qualsiasi stringa (valore predefinito: `"- "`) + * *weechat.look.save_config_on_exit* ** descrizione: `salva file di configurazione all'uscita` ** tipo: bool diff --git a/po/cs.po b/po/cs.po index f8d469e62..6ca796012 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-01-31 14:50+0100\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -1985,9 +1985,11 @@ msgid "" "flashy\"" msgstr "" +#, fuzzy msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" "znak použitý pro vykreslení horizontálních čar, všimněte si, že prázdná " "hodnota vykreslí skutečnou čáru při použití ncurses, ale může způsobit " @@ -2149,6 +2151,10 @@ msgstr "" msgid "always show read marker, even if it is after last buffer line" msgstr "vždy zobrazovat značku čtení, i když je až za posledním řádkem bufferu" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "uložit soubor s nastavením při ukončení" diff --git a/po/de.po b/po/de.po index 17e0da2d4..8169086a5 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-02-03 18:59+0100\n" "Last-Translator: Nils G.\n" "Language-Team: weechat-dev \n" @@ -2086,9 +2086,11 @@ msgstr "" "\" oder \"|\"), das Suchmuster unterscheidet zwischen Groß-und " "Kleinschreibung. Beispiel: \"FlashCode|flashy\"" +#, fuzzy msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" "Das angegebene Zeichen wird genutzt um damit die horizontalen Linien zu " "zeichnen. Hinweis: Ein leerer Wert bewirkt das ncurses eine durchgezogene " @@ -2261,6 +2263,10 @@ msgstr "" "Das Lesezeichen wird immer dargestellt auch wenn noch keine neue Nachricht " "im Buffer geschrieben wurde" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "Konfiguration beim Beenden abspeichern" @@ -7757,6 +7763,12 @@ msgstr "Hashtable (Ausgabe)" msgid "Pointer" msgstr "Pointer" +#, fuzzy +#~ msgid "char used to draw read marker line" +#~ msgstr "" +#~ "Zeichen welches benutzt werden soll um die Eingabe einer Zeichenkette zu " +#~ "verbergen" + #~ msgid "user/password: used to get privileges on current IRC server" #~ msgstr "" #~ "Benutzername/Passwort: wird verwendet um Sonderrechte auf aktuellem IRC-" diff --git a/po/es.po b/po/es.po index 0d6df2a5f..953135559 100644 --- a/po/es.po +++ b/po/es.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-02-03 19:00+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -2034,9 +2034,11 @@ msgstr "" "(alfanumérico, \"-\", \"_\" o \"|\"), la expresión regular distingue " "mayúsculas/minúsculas, ejemplo: \"FlashCode|flashy\"" +#, fuzzy msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" "carácter usado para dibujar líneas horizontales, nótese que un valor vacío " "dibujará una línea verdadera con ncurses, pero puede causar errores con la " @@ -2205,6 +2207,10 @@ msgstr "" "siempre mostrar el marcador de lectura, incluso si está después de la última " "línea del buffer" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "guardar archivo de configuración al salir" @@ -7591,6 +7597,10 @@ msgstr "Tabla hash (salida)" msgid "Pointer" msgstr "Puntero" +#, fuzzy +#~ msgid "char used to draw read marker line" +#~ msgstr "carácter usado para ocultar parte de un texto" + #~ msgid "user/password: used to get privileges on current IRC server" #~ msgstr "" #~ "usuario/contraseña: usado para obtener privilegios en el servidor IRC " diff --git a/po/fr.po b/po/fr.po index b7d1d4ee7..e817b78fd 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" -"PO-Revision-Date: 2011-02-04 15:21+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" +"PO-Revision-Date: 2011-02-05 15:21+0100\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -2071,12 +2071,14 @@ msgstr "" "régulière est sensible à la casse, exemple: \"FlashCode|flashy\"" msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" -"caractère utilisé pour tracer les lignes horizontales, notez qu'une valeur " -"vide tracera une vraie ligne avec ncurses, mais peut causer des problèmes " -"d'affichage avec la sélection d'URL sous certains terminaux" +"caractère utilisé pour tracer les séparateurs horizontaux autour des barres " +"(une valeur vide tracera une vraie ligne avec ncurses, mais peut causer des " +"problèmes d'affichage avec la sélection d'URL sous certains terminaux), les " +"caractères larges ne sont PAS autorisés ici" msgid "" "max number of names in hotlist (0 = no name displayed, only buffer numbers)" @@ -2242,6 +2244,12 @@ msgstr "" "toujours afficher le marqueur de lecture, même s'il est après la dernière " "ligne du tampon" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" +"chaîne utilisée pour tracer la ligne de marqueur des données non lues (la " +"chaîne est répétée jusqu'à la fin de la ligne)" + msgid "save configuration file on exit" msgstr "sauvegarder la configuration en quittant" @@ -7577,6 +7585,9 @@ msgstr "Hashtable (sortie)" msgid "Pointer" msgstr "Pointeur" +#~ msgid "char used to draw read marker line" +#~ msgstr "caractère utilisé pour tracer la ligne de marqueur de lecture" + #~ msgid "user/password: used to get privileges on current IRC server" #~ msgstr "" #~ "utilisateur/mot_de_passe: utilisé pour obtenir les privilèges sur le " diff --git a/po/hu.po b/po/hu.po index 8362808c7..929eab9ef 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-01-31 14:50+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -1774,8 +1774,9 @@ msgid "" msgstr "" msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" msgid "" @@ -1912,6 +1913,10 @@ msgstr "jelölje a szerveren/szobában utoljára olvasott sort" msgid "always show read marker, even if it is after last buffer line" msgstr "" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + #, fuzzy msgid "save configuration file on exit" msgstr "beállítások mentése kilépéskor" diff --git a/po/it.po b/po/it.po index 194ad8685..7fa1358ec 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-02-03 18:58+0100\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -2035,9 +2035,11 @@ msgstr "" "circondata da caratteri :(alfanumerici, \"-\", \"_\" or \"|\"), " "l'espressione regolare è esatta, esempio \"FlashCode|flashy\"" +#, fuzzy msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" "carattere utilizzato per disegnare le righe orizzontali; notare che un " "valore vuoto disegnerà una vera riga con ncurses, ma può causare errori con " @@ -2204,6 +2206,10 @@ msgstr "" "mostra sempre l'evidenziatore di lettura, anche se si trova dopo l'ultima " "riga del buffer" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "salva file di configurazione all'uscita" @@ -7583,6 +7589,10 @@ msgstr "Tabella hash (output)" msgid "Pointer" msgstr "Puntatore" +#, fuzzy +#~ msgid "char used to draw read marker line" +#~ msgstr "carattere usato per nascondere parte di una stringa" + #~ msgid "user/password: used to get privileges on current IRC server" #~ msgstr "" #~ "utente/password: utilizzata per ottenere i privilegi sul server IRC " diff --git a/po/pl.po b/po/pl.po index 9d2f8ad1a..60267b8e7 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-02-03 18:59+0100\n" "Last-Translator: Krzysztof Koroscik \n" "Language-Team: weechat-dev \n" @@ -2042,9 +2042,11 @@ msgstr "" "znakami (alfanumierycznymi, \"-\", \"_\" lub \"|\"), wyrażenia regularne są " "czułe na wielkość znaków, np: \"FlashCode|flashy\"" +#, fuzzy msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" "znak używany do rysowania linii poziomych, pusta wartość sprawi lisowanie " "linii w ncurses, jednak może powodowac błędy w zaznaczaniu URLi w niektórych " @@ -2209,6 +2211,10 @@ msgstr "" "zawsze pokazuj wskaźnik przeczytania, nawet jeśli jest po ostatniej linii w " "buforze" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "zapisz plik konfiguracyjny przy wyjściu" @@ -7513,6 +7519,10 @@ msgstr "Hashtable (wyjście)" msgid "Pointer" msgstr "Wskaźnik" +#, fuzzy +#~ msgid "char used to draw read marker line" +#~ msgstr "znak używany do ukrycia części ciągu" + #~ msgid "user/password: used to get privileges on current IRC server" #~ msgstr "" #~ "użytkownik/hasło: użyte do uzyskania uprawnień na obecnym serwerze IRC" diff --git a/po/pt_BR.po b/po/pt_BR.po index a32533215..4e9a5b354 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-01-31 14:51+0100\n" "Last-Translator: Ivan Sichmann Freitas \n" "Language-Team: weechat-dev \n" @@ -2030,9 +2030,11 @@ msgid "" "flashy\"" msgstr "" +#, fuzzy msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" "caractere usado para desenhar linhas horizontais, note que um valor vazio " "vai desenha ruma linha real com ncurses, mas pode causar bugs com seleção de " @@ -2175,6 +2177,10 @@ msgstr "" msgid "always show read marker, even if it is after last buffer line" msgstr "" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "" diff --git a/po/ru.po b/po/ru.po index 2ff3979da..cd4aea3aa 100644 --- a/po/ru.po +++ b/po/ru.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.5-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: 2011-01-31 14:51+0100\n" "Last-Translator: Pavel Shevchuk \n" "Language-Team: weechat-dev \n" @@ -1783,8 +1783,9 @@ msgid "" msgstr "" msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" msgid "" @@ -1930,6 +1931,10 @@ msgstr "использовать маркер непрочитанных соо msgid "always show read marker, even if it is after last buffer line" msgstr "" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + #, fuzzy msgid "save configuration file on exit" msgstr "сохранять конфигурационный файл при выходе" diff --git a/po/weechat.pot b/po/weechat.pot index 14911b476..a0a589a54 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2011-02-04 21:55+0100\n" +"POT-Creation-Date: 2011-02-05 15:20+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1528,8 +1528,9 @@ msgid "" msgstr "" msgid "" -"char used to draw horizontal lines, note that empty value will draw a real " -"line with ncurses, but may cause bugs with URL selection under some terminals" +"char used to draw horizontal separators around bars (empty value will draw a " +"real line with ncurses, but may cause bugs with URL selection under some " +"terminals), wide chars are NOT allowed here" msgstr "" msgid "" @@ -1654,6 +1655,10 @@ msgstr "" msgid "always show read marker, even if it is after last buffer line" msgstr "" +msgid "" +"string used to draw read marker line (string is repeated until end of line)" +msgstr "" + msgid "save configuration file on exit" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 8614adc02..f71d90cba 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -114,6 +114,7 @@ struct t_config_option *config_look_prefix_buffer_align_more; struct t_config_option *config_look_prefix_suffix; 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; struct t_config_option *config_look_save_config_on_exit; struct t_config_option *config_look_save_layout_on_exit; struct t_config_option *config_look_scroll_amount; @@ -1514,9 +1515,9 @@ config_weechat_init_options () config_look_hline_char = config_file_new_option ( weechat_config_file, ptr_section, "hline_char", "string", - N_("char used to draw horizontal lines, note that empty value will " - "draw a real line with ncurses, but may cause bugs with URL " - "selection under some terminals"), + N_("char used to draw horizontal separators around bars (empty value " + "will draw a real line with ncurses, but may cause bugs with URL " + "selection under some terminals), wide chars are NOT allowed here"), NULL, 0, 0, "-", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); config_look_hotlist_names_count = config_file_new_option ( weechat_config_file, ptr_section, @@ -1694,13 +1695,19 @@ config_weechat_init_options () weechat_config_file, ptr_section, "read_marker", "integer", N_("use a marker (line or char) on buffers to show first unread line"), - "none|line|dotted-line|char", - 0, 0, "dotted-line", NULL, 0, NULL, NULL, &config_change_read_marker, NULL, NULL, NULL); + "none|line|char", + 0, 0, "line", NULL, 0, NULL, NULL, &config_change_read_marker, NULL, NULL, NULL); config_look_read_marker_always_show = config_file_new_option ( weechat_config_file, ptr_section, "read_marker_always_show", "boolean", N_("always show read marker, even if it is after last buffer line"), NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_read_marker_string = config_file_new_option ( + weechat_config_file, ptr_section, + "read_marker_string", "string", + N_("string used to draw read marker line (string is repeated until " + "end of line)"), + NULL, 0, 0, "- ", NULL, 0, NULL, NULL, &config_change_read_marker, NULL, NULL, NULL); config_look_save_config_on_exit = config_file_new_option ( weechat_config_file, ptr_section, "save_config_on_exit", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 9ab0df34a..e3052a87e 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -81,7 +81,6 @@ enum t_config_look_read_marker { CONFIG_LOOK_READ_MARKER_NONE = 0, CONFIG_LOOK_READ_MARKER_LINE, - CONFIG_LOOK_READ_MARKER_DOTTED_LINE, CONFIG_LOOK_READ_MARKER_CHAR, }; @@ -143,6 +142,7 @@ extern struct t_config_option *config_look_prefix_buffer_align_more; extern struct t_config_option *config_look_prefix_suffix; 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; extern struct t_config_option *config_look_save_config_on_exit; extern struct t_config_option *config_look_save_layout_on_exit; extern struct t_config_option *config_look_scroll_amount; diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index 19e8c9223..c7b0ad7fc 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -552,7 +552,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, int chars_available, index, size; int length_screen_before_cursor, length_screen_after_cursor; int diff, max_length, optimal_number_of_lines; - int some_data_not_displayed; + int some_data_not_displayed, hline_char; if (!gui_init_ok) return; @@ -834,21 +834,28 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, if (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_SEPARATOR])) { + if (CONFIG_STRING(config_look_hline_char) + && CONFIG_STRING(config_look_hline_char)[0]) + { + hline_char = utf8_char_int (CONFIG_STRING(config_look_hline_char)); + if (hline_char > 127) + hline_char = ACS_HLINE; + } + else + hline_char = ACS_HLINE; switch (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_POSITION])) { case GUI_BAR_POSITION_BOTTOM: gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, GUI_COLOR_SEPARATOR); mvwhline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, - 0, 0, gui_window_get_hline_char (), - bar_window->width); + 0, 0, hline_char, bar_window->width); break; case GUI_BAR_POSITION_TOP: gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, GUI_COLOR_SEPARATOR); mvwhline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, - 0, 0, gui_window_get_hline_char (), - bar_window->width); + 0, 0, hline_char, bar_window->width); break; case GUI_BAR_POSITION_LEFT: gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index a462631c4..c9e12b370 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -70,8 +70,7 @@ gui_chat_marker_for_line (struct t_gui_buffer *buffer, struct t_gui_line *line) struct t_gui_line *last_read_line; /* marker is disabled in config? */ - if ((CONFIG_INTEGER(config_look_read_marker) != CONFIG_LOOK_READ_MARKER_LINE) - && (CONFIG_INTEGER(config_look_read_marker) != CONFIG_LOOK_READ_MARKER_DOTTED_LINE)) + if (CONFIG_INTEGER(config_look_read_marker) != CONFIG_LOOK_READ_MARKER_LINE) return 0; /* marker is not set for buffer? */ @@ -134,36 +133,26 @@ gui_chat_display_new_line (struct t_gui_window *window, int num_lines, int count void gui_chat_display_horizontal_line (struct t_gui_window *window, int simulate) { - int i, n, hline_char; - - hline_char = gui_window_get_hline_char (); + int x, size_on_screen; if (!simulate) { - gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_chat, - GUI_COLOR_CHAT_READ_MARKER); - switch (CONFIG_INTEGER(config_look_read_marker)) + if (CONFIG_INTEGER(config_look_read_marker) == CONFIG_LOOK_READ_MARKER_LINE) { - case CONFIG_LOOK_READ_MARKER_LINE: - mvwhline (GUI_WINDOW_OBJECTS(window)->win_chat, - window->win_chat_cursor_y, window->win_chat_cursor_x, - hline_char, window->win_chat_width - 1); - break; - case CONFIG_LOOK_READ_MARKER_DOTTED_LINE: - wmove (GUI_WINDOW_OBJECTS(window)->win_chat, - window->win_chat_cursor_y, window->win_chat_cursor_x); - wclrtoeol (GUI_WINDOW_OBJECTS(window)->win_chat); - n = (window->win_chat_width % 2); - for (i = 0; i < window->win_chat_width - 1; i++) - { - if (i % 2 == n) - mvwhline (GUI_WINDOW_OBJECTS(window)->win_chat, - window->win_chat_cursor_y, i, - hline_char, 1); - } - break; - default: - break; + size_on_screen = utf8_strlen_screen (CONFIG_STRING(config_look_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 < window->win_chat_width - 1) + { + mvwprintw (GUI_WINDOW_OBJECTS(window)->win_chat, + window->win_chat_cursor_y, x, + "%s", CONFIG_STRING(config_look_read_marker_string)); + x += size_on_screen; + } } window->win_chat_cursor_x = window->win_chat_width; } diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index ed5fcd71d..776b61186 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -144,26 +144,6 @@ gui_window_objects_free (struct t_gui_window *window, int free_separator) } } -/* - * gui_window_get_hline_char: get char used to draw horizontal lines - * Note: ACS_HLINE from ncurses is better for - * render, but it introduces bug with URLs - * selected by terminal: below this line, - * some URLs are not visible or shifted - */ - -int -gui_window_get_hline_char () -{ - const char *hline_char; - - hline_char = CONFIG_STRING(config_look_hline_char); - if (!hline_char || !hline_char[0]) - return ACS_HLINE; - - return utf8_char_int (hline_char); -} - /* * gui_window_wprintw: decode then display string with wprintw */ diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h index 3fb339d57..69481bd78 100644 --- a/src/gui/curses/gui-curses.h +++ b/src/gui/curses/gui-curses.h @@ -80,7 +80,6 @@ extern int gui_keyboard_read_cb (void *data, int fd); /* window functions */ extern void gui_window_read_terminal_size (); extern void gui_window_redraw_buffer (struct t_gui_buffer *buffer); -extern int gui_window_get_hline_char (); extern void gui_window_clear (WINDOW *window, int fg, int bg); extern void gui_window_reset_style (WINDOW *window, int num_color); extern void gui_window_set_color_style (WINDOW *window, int style);