diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_options.txt | 4 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_options.txt | 4 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_options.txt | 4 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_options.txt | 4 | ||||
-rw-r--r-- | doc/ja/autogen/user/weechat_options.txt | 4 | ||||
-rw-r--r-- | po/cs.po | 6 | ||||
-rw-r--r-- | po/de.po | 8 | ||||
-rw-r--r-- | po/es.po | 8 | ||||
-rw-r--r-- | po/fr.po | 14 | ||||
-rw-r--r-- | po/hu.po | 6 | ||||
-rw-r--r-- | po/it.po | 8 | ||||
-rw-r--r-- | po/ja.po | 8 | ||||
-rw-r--r-- | po/pl.po | 8 | ||||
-rw-r--r-- | po/pt_BR.po | 8 | ||||
-rw-r--r-- | po/ru.po | 6 | ||||
-rw-r--r-- | po/tr.po | 6 | ||||
-rw-r--r-- | po/weechat.pot | 6 | ||||
-rw-r--r-- | src/core/wee-config.c | 29 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-bar-window.c | 38 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 83 | ||||
-rw-r--r-- | src/gui/curses/gui-curses.h | 4 |
22 files changed, 165 insertions, 103 deletions
@@ -11,6 +11,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.3 (under dev) +* core: add support of UTF-8 chars in horizontal/vertical separators (options + weechat.look.separator_{horizontal|vertical}) * core: add option weechat.look.window_auto_zoom, disable automatic zoom by default when terminal becomes too small for windows * core: add support of logical and/or for argument "tags" in function hook_print diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index 0582bfd1e..1ae1bb628 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -829,12 +829,12 @@ ** Werte: on, off (Standardwert: `on`) * [[option_weechat.look.separator_horizontal]] *weechat.look.separator_horizontal* -** Beschreibung: `das angegebene Zeichen wird verwendet um die horizontalen Linien zu zeichnen. Wird kein Zeichen angegeben, dann zeichnet ncurses eine durchgängige Linie. Dies kann allerdings bei einigen Terminals zu Problemen führen, falls die URL Auswahl genutzt wird. Wide Chars sind für diese Option NICHT erlaubt` +** Beschreibung: `char used to draw horizontal separators around bars and windows (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals); width on screen must be exactly one char` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"-"`) * [[option_weechat.look.separator_vertical]] *weechat.look.separator_vertical* -** Beschreibung: `das angegebene Zeichen wird verwendet um die vertikale Linien zu zeichnen. Wird kein Zeichen angegeben, dann zeichnet ncurses eine durchgängige Linie. Wide Chars sind für diese Option NICHT erlaubt` +** Beschreibung: `char used to draw vertical separators around bars and windows (empty value will draw a real line with ncurses); width on screen must be exactly one char` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `""`) diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 7706a7097..178c23a59 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -829,12 +829,12 @@ ** values: on, off (default value: `on`) * [[option_weechat.look.separator_horizontal]] *weechat.look.separator_horizontal* -** description: `char used to draw horizontal separators around bars and windows (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` +** description: `char used to draw horizontal separators around bars and windows (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals); width on screen must be exactly one char` ** type: string ** values: any string (default value: `"-"`) * [[option_weechat.look.separator_vertical]] *weechat.look.separator_vertical* -** description: `char used to draw vertical separators around bars and windows (empty value will draw a real line with ncurses), wide chars are NOT allowed here` +** description: `char used to draw vertical separators around bars and windows (empty value will draw a real line with ncurses); width on screen must be exactly one char` ** type: string ** values: any string (default value: `""`) diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 6a31c4d36..04c0ed818 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -829,12 +829,12 @@ ** valeurs: on, off (valeur par défaut: `on`) * [[option_weechat.look.separator_horizontal]] *weechat.look.separator_horizontal* -** description: `caractère utilisé pour tracer les séparateurs horizontaux autour des barres et fenêtres (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` +** description: `caractère utilisé pour tracer les séparateurs horizontaux autour des barres et fenêtres (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); la largeur à l'écran doit être exactement d'un caractère` ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `"-"`) * [[option_weechat.look.separator_vertical]] *weechat.look.separator_vertical* -** description: `caractère utilisé pour tracer les séparateurs verticaux autour des barres et fenêtres (une valeur vide tracera une vraie ligne avec ncurses), les caractères larges ne sont PAS autorisés ici` +** description: `caractère utilisé pour tracer les séparateurs verticaux autour des barres et fenêtres (une valeur vide tracera une vraie ligne avec ncurses); la largeur à l'écran doit être exactement d'un caractère` ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `""`) diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 4103bde2f..674a8ef34 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -829,12 +829,12 @@ ** valori: on, off (valore predefinito: `on`) * [[option_weechat.look.separator_horizontal]] *weechat.look.separator_horizontal* -** descrizione: `carattere usato per disegnare i separatori orizzontali intorno alle barre e alle finestre (un valore vuoto disegnerà una riga reale con ncurses, ma può causare bug con la selezione dell'URL in alcuni terminali), i caratteri wide qui NON sono consentiti` +** descrizione: `char used to draw horizontal separators around bars and windows (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals); width on screen must be exactly one char` ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `"-"`) * [[option_weechat.look.separator_vertical]] *weechat.look.separator_vertical* -** descrizione: `carattere usato per disegnare i separatori verticali intorno alle barre e alle finestre (un valore vuoto disegnerà una riga reale con ncurses), i caratteri wide qui NON sono consentiti` +** descrizione: `char used to draw vertical separators around bars and windows (empty value will draw a real line with ncurses); width on screen must be exactly one char` ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `""`) diff --git a/doc/ja/autogen/user/weechat_options.txt b/doc/ja/autogen/user/weechat_options.txt index bdd55ca42..cbfeb65b4 100644 --- a/doc/ja/autogen/user/weechat_options.txt +++ b/doc/ja/autogen/user/weechat_options.txt @@ -829,12 +829,12 @@ ** 値: on, off (デフォルト値: `on`) * [[option_weechat.look.separator_horizontal]] *weechat.look.separator_horizontal* -** 説明: `バーとウィンドウ周囲の水平セパレータの描画に使われる文字 (空の場合は ncurses の実行が描画されるが、いくつかのターミナルでは URL 選択の際にバグを生ずる可能性がある)、ワイドキャラクタは使えない` +** 説明: `char used to draw horizontal separators around bars and windows (empty value will draw a real line with ncurses, but may cause bugs with URL selection under some terminals); width on screen must be exactly one char` ** タイプ: 文字列 ** 値: 未制約文字列 (デフォルト値: `"-"`) * [[option_weechat.look.separator_vertical]] *weechat.look.separator_vertical* -** 説明: `バーとウィンドウ周囲の垂直セパレータの描画に使われる文字 (空の場合は ncurses の実行が描画されるが、いくつかのターミナルでは URL 選択の際にバグを生ずる可能性がある)、ワイドキャラクタは使えない` +** 説明: `char used to draw vertical separators around bars and windows (empty value will draw a real line with ncurses); width on screen must be exactly one char` ** タイプ: 文字列 ** 値: 未制約文字列 (デフォルト値: `""`) @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:39+0100\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3050,7 +3050,7 @@ msgstr "upozornit uživatele, když není hledaný text nalezen v bufferu" msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "znak použitý pro vykreslení horizontálních čar okolo panelů (prázdná hodnota " "vykreslí skutečnou čáru při použití ncurses, ale může způsobit problém s " @@ -3060,7 +3060,7 @@ msgstr "" #, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "znak použitý pro vykreslení horizontálních čar okolo panelů (prázdná hodnota " "vykreslí skutečnou čáru při použití ncurses, ale může způsobit problém s " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.3-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:39+0100\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -3517,10 +3517,11 @@ msgstr "" "Informiert den Anwender falls der gesuchte Text nicht im Buffer gefunden " "wurde" +#, fuzzy msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "das angegebene Zeichen wird verwendet um die horizontalen Linien zu " "zeichnen. Wird kein Zeichen angegeben, dann zeichnet ncurses eine " @@ -3528,9 +3529,10 @@ msgstr "" "führen, falls die URL Auswahl genutzt wird. Wide Chars sind für diese Option " "NICHT erlaubt" +#, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "das angegebene Zeichen wird verwendet um die vertikale Linien zu zeichnen. " "Wird kein Zeichen angegeben, dann zeichnet ncurses eine durchgängige Linie. " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:39+0100\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3235,19 +3235,21 @@ msgid "alert user when text sought is not found in buffer" msgstr "" "alertar al usuario cuando el texto buscado no es encontrado en el buffer" +#, fuzzy msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "carácter usado para dibujar separadores horizontales entre barras (un valor " "vacío dibujará una línea verdadera con ncurses, pero puede causar errores " "con la selección de URLs en algunas terminales), caracteres unicode NO están " "permitidos" +#, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "carácter usado para dibujar separadores horizontales entre barras (un valor " "vacío dibujará una línea verdadera con ncurses), caracteres unicode NO están " @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" -"PO-Revision-Date: 2013-12-18 13:05+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" +"PO-Revision-Date: 2013-12-18 16:34+0100\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -3432,20 +3432,20 @@ msgstr "" msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "caractère utilisé pour tracer les séparateurs horizontaux autour des barres " "et fenêtres (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" +"terminaux); la largeur à l'écran doit être exactement d'un caractère" msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "caractère utilisé pour tracer les séparateurs verticaux autour des barres et " -"fenêtres (une valeur vide tracera une vraie ligne avec ncurses), les " -"caractères larges ne sont PAS autorisés ici" +"fenêtres (une valeur vide tracera une vraie ligne avec ncurses); la largeur " +"à l'écran doit être exactement d'un caractère" msgid "" "time format for dates converted to strings and displayed in messages (see " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:39+0100\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2654,12 +2654,12 @@ msgstr "" msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" #, fuzzy @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:39+0100\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3336,19 +3336,21 @@ msgstr "" msgid "alert user when text sought is not found in buffer" msgstr "avvisa l'utente quando il testo cercato non viene trovato nel buffer" +#, fuzzy msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "carattere usato per disegnare i separatori orizzontali intorno alle barre e " "alle finestre (un valore vuoto disegnerà una riga reale con ncurses, ma può " "causare bug con la selezione dell'URL in alcuni terminali), i caratteri wide " "qui NON sono consentiti" +#, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "carattere usato per disegnare i separatori verticali intorno alle barre e " "alle finestre (un valore vuoto disegnerà una riga reale con ncurses), i " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:39+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -3289,18 +3289,20 @@ msgstr "" msgid "alert user when text sought is not found in buffer" msgstr "バッファ内に検索テキストが見つからなかった場合はユーザに警告" +#, fuzzy msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "バーとウィンドウ周囲の水平セパレータの描画に使われる文字 (空の場合は ncurses " "の実行が描画されるが、いくつかのターミナルでは URL 選択の際にバグを生ずる可能" "性がある)、ワイドキャラクタは使えない" +#, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "バーとウィンドウ周囲の垂直セパレータの描画に使われる文字 (空の場合は ncurses " "の実行が描画されるが、いくつかのターミナルでは URL 選択の際にバグを生ずる可能" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:40+0100\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3377,19 +3377,21 @@ msgstr "" "powiadamia użytkownika, kiedy wyszukiwany tekst nie został znaleziony w " "buforze" +#, fuzzy msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "znak używany do rysowania poziomych separatorów dookoła pasków i okien " "(pusta wartość oznacza rysowanie prawdziwych linii za pomocą ncurses, jednak " "może powodować błędy w zaznaczaniu URLi w niektórych terminalach), szerokie " "znaki NIE są dozwolone" +#, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "znak używany do rysowania poziomych separatorów dookoła pasków i okien " "(pusta wartość oznacza rysowanie prawdziwych linii za pomocą ncurses), " diff --git a/po/pt_BR.po b/po/pt_BR.po index c482279bb..70f270bac 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: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:40+0100\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -3134,19 +3134,21 @@ msgstr "" msgid "alert user when text sought is not found in buffer" msgstr "alertar usuário quando o texto solicitado não é encontrado no buffer" +#, fuzzy msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" "caractere usado para desenhar separadores horizontais em volta de barras e " "janelas(valor vazio vai desenhar uma linha real com ncurses, mas pode causar " "bugs com seleção de URL em alguns terminais), caracteres extendidos NÃO são " "aceitos aqui" +#, fuzzy msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" "caractere usado para desenhar separadores verticais em volta de barras e " "janelas(valor vazio vai desenhar uam linha real com ncurses), caracteres " @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-12-15 14:40+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2686,12 +2686,12 @@ msgstr "" msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" #, fuzzy @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\n" "PO-Revision-Date: 2013-11-09 10:13+0100\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2396,12 +2396,12 @@ msgstr "" msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" msgid "" diff --git a/po/weechat.pot b/po/weechat.pot index 575532852..8be14ffc5 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -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-12-18 13:02+0100\n" +"POT-Creation-Date: 2013-12-18 16:31+0100\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" @@ -2399,12 +2399,12 @@ msgstr "" msgid "" "char used to draw horizontal separators around bars and windows (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" +"under some terminals); width on screen must be exactly one char" msgstr "" msgid "" "char used to draw vertical separators around bars and windows (empty value " -"will draw a real line with ncurses), wide chars are NOT allowed here" +"will draw a real line with ncurses); width on screen must be exactly one char" msgstr "" msgid "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 66f63463d..8f0485cd4 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -729,6 +729,21 @@ config_check_prefix_buffer_align_more (void *data, } /* + * Checks options "weechat.look.separator_{horizontal|vertical}". + */ + +int +config_check_separator (void *data, struct t_config_option *option, + const char *value) +{ + /* make C compiler happy */ + (void) data; + (void) option; + + return (utf8_strlen_screen (value) <= 1) ? 1 : 0; +} + +/* * Callback for changes on a color option. */ @@ -2578,16 +2593,18 @@ config_weechat_init_options () "separator_horizontal", "string", N_("char used to draw horizontal separators around bars and windows " "(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); + "with URL selection under some terminals); " + "width on screen must be exactly one char"), + NULL, 0, 0, "-", NULL, 0, + &config_check_separator, NULL, &config_change_buffers, NULL, NULL, NULL); config_look_separator_vertical = config_file_new_option ( weechat_config_file, ptr_section, "separator_vertical", "string", N_("char used to draw vertical separators around bars and windows " - "(empty value will draw a real line with ncurses), wide chars are " - "NOT allowed here"), - NULL, 0, 0, "", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); + "(empty value will draw a real line with ncurses); " + "width on screen must be exactly one char"), + NULL, 0, 0, "", NULL, 0, + &config_check_separator, NULL, &config_change_buffers, NULL, NULL, NULL); config_look_time_format = config_file_new_option ( weechat_config_file, ptr_section, "time_format", "string", diff --git a/src/gui/curses/gui-curses-bar-window.c b/src/gui/curses/gui-curses-bar-window.c index 3e5ee5a1d..801a9078e 100644 --- a/src/gui/curses/gui-curses-bar-window.c +++ b/src/gui/curses/gui-curses-bar-window.c @@ -405,7 +405,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, separator_horizontal, separator_vertical; + int some_data_not_displayed; int index_item, index_subitem, index_line; if (!gui_init_ok) @@ -747,47 +747,35 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window, if (CONFIG_INTEGER(bar_window->bar->options[GUI_BAR_OPTION_SEPARATOR])) { - separator_horizontal = ACS_HLINE; - separator_vertical = ACS_VLINE; - if (CONFIG_STRING(config_look_separator_horizontal) - && CONFIG_STRING(config_look_separator_horizontal)[0]) - { - separator_horizontal = utf8_char_int (CONFIG_STRING(config_look_separator_horizontal)); - if (separator_horizontal > 127) - separator_horizontal = ACS_HLINE; - } - if (CONFIG_STRING(config_look_separator_vertical) - && CONFIG_STRING(config_look_separator_vertical)[0]) - { - separator_vertical = utf8_char_int (CONFIG_STRING(config_look_separator_vertical)); - if (separator_vertical > 127) - separator_vertical = ACS_VLINE; - } 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, separator_horizontal, bar_window->width); + gui_window_hline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, + 0, 0, bar_window->width, + CONFIG_STRING(config_look_separator_horizontal)); 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, separator_horizontal, bar_window->width); + gui_window_hline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, + 0, 0, bar_window->width, + CONFIG_STRING(config_look_separator_horizontal)); break; case GUI_BAR_POSITION_LEFT: gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, GUI_COLOR_SEPARATOR); - mvwvline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, - 0, 0, separator_vertical, bar_window->height); + gui_window_vline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, + 0, 0, bar_window->height, + CONFIG_STRING(config_look_separator_vertical)); break; case GUI_BAR_POSITION_RIGHT: gui_window_set_weechat_color (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, GUI_COLOR_SEPARATOR); - mvwvline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, - 0, 0, separator_vertical, bar_window->height); + gui_window_vline (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_separator, + 0, 0, bar_window->height, + CONFIG_STRING(config_look_separator_vertical)); break; case GUI_BAR_NUM_POSITIONS: break; diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index e89f106a1..107b656f7 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -39,7 +39,6 @@ #include "../../core/wee-hook.h" #include "../../core/wee-log.h" #include "../../core/wee-string.h" -#include "../../core/wee-utf8.h" #include "../../plugins/plugin.h" #include "../gui-window.h" #include "../gui-bar.h" @@ -1048,13 +1047,67 @@ gui_window_calculate_pos_size (struct t_gui_window *window) } /* + * Draws a horizontal line (like ncurses function "mvwhline", but UTF-8 chars + * are supported). + * + * If "string" is NULL or empty, the ACS_HLINE char is used (plain line). + * If "string" is not NULL and not empty, its width on screen must be exactly + * one char. + */ + +void +gui_window_hline (WINDOW *window, int x, int y, int width, const char *string) +{ + int i; + + if (string && string[0]) + { + for (i = 0; i < width; i++) + { + mvwaddstr (window, y, x + i, string); + } + } + else + { + mvwhline (window, y, x, ACS_HLINE, width); + } +} + +/* + * Draws a vertical line (like ncurses function "mvwvline", but UTF-8 chars + * are supported). + * + * If "string" is NULL or empty, the ACS_VLINE char is used (plain line). + * If "string" is not NULL and not empty, its width on screen must be exactly + * one char. + */ + +void +gui_window_vline (WINDOW *window, int x, int y, int height, const char *string) +{ + int i; + + if (string && string[0]) + { + for (i = 0; i < height; i++) + { + mvwaddstr (window, y + i, x, string); + } + } + else + { + mvwvline (window, y, x, ACS_VLINE, height); + } +} + +/* * Draws window separators. */ void gui_window_draw_separators (struct t_gui_window *window) { - int separator_char, separator_horizontal, separator_vertical, x, width; + int separator_horizontal, separator_vertical, x, width; /* remove separators */ if (GUI_WINDOW_OBJECTS(window)->win_separator_horiz) @@ -1086,16 +1139,9 @@ gui_window_draw_separators (struct t_gui_window *window) x); gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_separator_horiz, GUI_COLOR_SEPARATOR); - separator_char = ACS_HLINE; - if (CONFIG_STRING(config_look_separator_horizontal) - && CONFIG_STRING(config_look_separator_horizontal)[0]) - { - separator_char = utf8_char_int (CONFIG_STRING(config_look_separator_horizontal)); - if (separator_char > 127) - separator_char = ACS_VLINE; - } - mvwhline (GUI_WINDOW_OBJECTS(window)->win_separator_horiz, 0, 0, - separator_char, width); + gui_window_hline (GUI_WINDOW_OBJECTS(window)->win_separator_horiz, + 0, 0, width, + CONFIG_STRING(config_look_separator_horizontal)); wnoutrefresh (GUI_WINDOW_OBJECTS(window)->win_separator_horiz); } @@ -1108,16 +1154,9 @@ gui_window_draw_separators (struct t_gui_window *window) window->win_x - 1); gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_separator_vertic, GUI_COLOR_SEPARATOR); - separator_char = ACS_VLINE; - if (CONFIG_STRING(config_look_separator_vertical) - && CONFIG_STRING(config_look_separator_vertical)[0]) - { - separator_char = utf8_char_int (CONFIG_STRING(config_look_separator_vertical)); - if (separator_char > 127) - separator_char = ACS_VLINE; - } - mvwvline (GUI_WINDOW_OBJECTS(window)->win_separator_vertic, 0, 0, - separator_char, window->win_height); + gui_window_vline (GUI_WINDOW_OBJECTS(window)->win_separator_vertic, + 0, 0, window->win_height, + CONFIG_STRING(config_look_separator_vertical)); wnoutrefresh (GUI_WINDOW_OBJECTS(window)->win_separator_vertic); } } diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h index 74345ae5d..710c0459b 100644 --- a/src/gui/curses/gui-curses.h +++ b/src/gui/curses/gui-curses.h @@ -134,6 +134,10 @@ extern void gui_window_string_apply_color_set_attr (unsigned char **str, WINDOW *window); extern void gui_window_string_apply_color_remove_attr (unsigned char **str, WINDOW *window); +extern void gui_window_hline (WINDOW *window, int x, int y, int width, + const char *string); +extern void gui_window_vline (WINDOW *window, int x, int y, int height, + const char *string); extern void gui_window_set_title (const char *title); #endif /* __WEECHAT_GUI_CURSES_H */ |