diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-06-10 09:51:03 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-06-10 09:51:03 +0200 |
commit | 25c795a26fdc779d4891e78b199e771a17c20004 (patch) | |
tree | b82ee2b2fc23f0a4da4bf8a9a493e34ac13f0d1f | |
parent | 9f09c26fcaa54fc4a722ae4df1db648ae8f1d164 (diff) | |
download | weechat-25c795a26fdc779d4891e78b199e771a17c20004.zip |
core: add horizontal separator between windows, two new options to toggle horizontal/vertical separators between windows
New boolean options, enabled by default:
- weechat.look.window_separator_horizontal
- weechat.look.window_separator_vertical
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_options.txt | 14 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_options.txt | 14 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_options.txt | 14 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_options.txt | 14 | ||||
-rw-r--r-- | po/cs.po | 19 | ||||
-rw-r--r-- | po/de.po | 20 | ||||
-rw-r--r-- | po/es.po | 20 | ||||
-rw-r--r-- | po/fr.po | 32 | ||||
-rw-r--r-- | po/hu.po | 18 | ||||
-rw-r--r-- | po/it.po | 20 | ||||
-rw-r--r-- | po/ja.po | 20 | ||||
-rw-r--r-- | po/pl.po | 20 | ||||
-rw-r--r-- | po/pt_BR.po | 20 | ||||
-rw-r--r-- | po/ru.po | 18 | ||||
-rw-r--r-- | po/weechat.pot | 18 | ||||
-rw-r--r-- | src/core/wee-config.c | 25 | ||||
-rw-r--r-- | src/core/wee-config.h | 2 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 162 | ||||
-rw-r--r-- | src/gui/curses/gui-curses.h | 3 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-window.c | 12 | ||||
-rw-r--r-- | src/gui/gui-window.h | 2 |
22 files changed, 344 insertions, 147 deletions
@@ -1,12 +1,14 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.9-dev, 2012-06-09 +v0.3.9-dev, 2012-06-10 Version 0.3.9 (under dev!) -------------------------- +* core: add horizontal separator between windows, new options + weechat.look.window_separator_{horizontal|vertical} * core: add options weechat.look.color_nick_offline and weechat.color.chat_nick_offline{_highlight|_highlight_bg} to use different color for offline nicks in prefix (task #11109) diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index f00f494a6..c50c76e42 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -729,12 +729,12 @@ ** Werte: on, off (Standardwert: `on`) * [[option_weechat.look.separator_horizontal]] *weechat.look.separator_horizontal* -** Beschreibung: `das genutzte Zeichen wird verwendet um damit die horizontalen Linien zu zeichnen. Wird kein Zeichen angegeben dann zeichnet ncurses eine durchgezogene Linie. Dies kann allerdings bei einigen Terminals zu Fehlern 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), wide chars are NOT allowed here` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"-"`) * [[option_weechat.look.separator_vertical]] *weechat.look.separator_vertical* -** Beschreibung: `das genutzte Zeichen wird verwendet um damit die vertikale Linien zu zeichnen. Wird kein Zeichen angegeben dann zeichnet ncurses eine durchgezogene 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), wide chars are NOT allowed here` ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `""`) @@ -748,6 +748,16 @@ ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `"%a, %d %b %Y %T"`) +* [[option_weechat.look.window_separator_horizontal]] *weechat.look.window_separator_horizontal* +** Beschreibung: `display an horizontal separator between windows` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + +* [[option_weechat.look.window_separator_vertical]] *weechat.look.window_separator_vertical* +** Beschreibung: `display a vertical separator between windows` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + * [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* ** Beschreibung: `Zeitüberschreitung (in Sekunden) für eine Verbindung zu einem entfernten Rechner (mittels einem Kindprozess)` ** Typ: integer diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 65936eb83..a75821c60 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -729,12 +729,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 (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), wide chars are NOT allowed here` ** 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 (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), wide chars are NOT allowed here` ** type: string ** values: any string (default value: `""`) @@ -748,6 +748,16 @@ ** type: string ** values: any string (default value: `"%a, %d %b %Y %T"`) +* [[option_weechat.look.window_separator_horizontal]] *weechat.look.window_separator_horizontal* +** description: `display an horizontal separator between windows` +** type: boolean +** values: on, off (default value: `on`) + +* [[option_weechat.look.window_separator_vertical]] *weechat.look.window_separator_vertical* +** description: `display a vertical separator between windows` +** type: boolean +** values: on, off (default value: `on`) + * [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* ** description: `timeout (in seconds) for connection to a remote host (made in a child process)` ** type: integer diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 46f847eb0..1700023eb 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -729,12 +729,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 (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), les caractères larges ne sont PAS autorisés ici` ** 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 (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), les caractères larges ne sont PAS autorisés ici` ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `""`) @@ -748,6 +748,16 @@ ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `"%a, %d %b %Y %T"`) +* [[option_weechat.look.window_separator_horizontal]] *weechat.look.window_separator_horizontal* +** description: `afficher un séparateur horizontal entre les fenêtres` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + +* [[option_weechat.look.window_separator_vertical]] *weechat.look.window_separator_vertical* +** description: `afficher un séparateur vertical entre les fenêtres` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + * [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* ** description: `délai d'attente maximum (en secondes) pour la connexion à une machine distante (effectuée dans un processus fils)` ** type: entier diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index dc63be3b7..38a64f880 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -729,12 +729,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 (un valore vuoto disegnerà una vera riga con ncurses, ma può causare errori con la selezione dell'URL in alcuni terminali), i caratteri wide 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), wide chars are NOT allowed here` ** 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 (un valore vuoto disegnerà una riga reale con ncurses), i caratteri wide NON sono consentiti` +** descrizione: `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` ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `""`) @@ -748,6 +748,16 @@ ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `"%a, %d %b %Y %T"`) +* [[option_weechat.look.window_separator_horizontal]] *weechat.look.window_separator_horizontal* +** descrizione: `display an horizontal separator between windows` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + +* [[option_weechat.look.window_separator_vertical]] *weechat.look.window_separator_vertical* +** descrizione: `display a vertical separator between windows` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + * [[option_weechat.network.connection_timeout]] *weechat.network.connection_timeout* ** descrizione: `timeout (in secondi) per la connessione ad un host remoto (eseguita in un processo figlio)` ** tipo: intero @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2634,10 +2634,11 @@ msgstr "" msgid "alert user when text sought is not found in buffer" msgstr "upozornit uživatele, když není hledaný text nalezen v bufferu" +#, fuzzy msgid "" -"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" +"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" 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 " @@ -2646,8 +2647,8 @@ msgstr "" #, fuzzy msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" 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 " @@ -2660,6 +2661,12 @@ msgstr "nastaví titulek okna (terminálu pro Cruses GUI) s jménem a verzí" msgid "time format for dates converted to strings and displayed in messages" msgstr "formát času pro data konvertovaná v řetězec a zobrazené ve zprávách" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "barva pozadí děliče oken (při rozdělení)" @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" @@ -2914,10 +2914,11 @@ msgstr "" "Informiert den Anwender falls der gesuchte Text nicht im Buffer gefunden " "wurde" +#, fuzzy msgid "" -"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" +"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" msgstr "" "das genutzte Zeichen wird verwendet um damit die horizontalen Linien zu " "zeichnen. Wird kein Zeichen angegeben dann zeichnet ncurses eine " @@ -2925,9 +2926,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 (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" "das genutzte Zeichen wird verwendet um damit die vertikale Linien zu " "zeichnen. Wird kein Zeichen angegeben dann zeichnet ncurses eine " @@ -2943,6 +2945,12 @@ msgstr "" "Zeitstempel für das Datum. Der Zeitstempel wird in eine Zeichenkette " "umgewandelt und in Nachrichten dargestellt." +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "" "Hintergrundfarbe der Fenster-Separatoren im Chatfenster (bei geteiltem " @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2798,19 +2798,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 (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" +"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" 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 (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" 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 " @@ -2824,6 +2826,12 @@ msgstr "" msgid "time format for dates converted to strings and displayed in messages" msgstr "formato para la fecha mostrada en los mensajes" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "color de fondo para los separadores de ventana (cuando se dividen)" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" -"PO-Revision-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" +"PO-Revision-Date: 2012-06-10 09:31+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -2809,22 +2809,22 @@ msgstr "" "tampon" msgid "" -"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" +"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" msgstr "" "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" +"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" msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" -"caractère utilisé pour tracer les séparateurs verticaux autour des barres " -"(une valeur vide tracera une vraie ligne avec ncurses), les caractères " -"larges ne sont PAS autorisés ici" +"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" msgid "set title for window (terminal for Curses GUI) with name and version" msgstr "" @@ -2836,6 +2836,12 @@ msgstr "" "format de date/heure pour les dates converties en chaînes et affichées dans " "les messages" +msgid "display an horizontal separator between windows" +msgstr "afficher un séparateur horizontal entre les fenêtres" + +msgid "display a vertical separator between windows" +msgstr "afficher un séparateur vertical entre les fenêtres" + msgid "background color for window separators (when split)" msgstr "couleur du fond pour les séparateurs de fenêtres (quand divisé)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2269,14 +2269,14 @@ msgid "alert user when text sought is not found in buffer" msgstr "" msgid "" -"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" +"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" msgstr "" msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" msgid "set title for window (terminal for Curses GUI) with name and version" @@ -2288,6 +2288,12 @@ msgstr "" msgid "time format for dates converted to strings and displayed in messages" msgstr "új nap kezdetével megjelenő időbélyeg" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + #, fuzzy msgid "background color for window separators (when split)" msgstr "ablakelválasztó színe (ha meg van osztva)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2787,19 +2787,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 (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" +"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" msgstr "" "carattere usato per disegnare i separatori orizzontali intorno alle barre " "(un valore vuoto disegnerà una vera riga con ncurses, ma può causare errori " "con la selezione dell'URL in alcuni terminali), i caratteri wide NON sono " "consentiti" +#, fuzzy msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" "carattere usato per disegnare i separatori verticali intorno alle barre (un " "valore vuoto disegnerà una riga reale con ncurses), i caratteri wide NON " @@ -2815,6 +2817,12 @@ msgstr "" "formato dell'ora per le date convertite a stringhe e visualizzate nei " "messaggi" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "colore di sfondo per i separatori delle finestre (quando divise)" @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" @@ -2724,18 +2724,20 @@ msgstr "" msgid "alert user when text sought is not found in buffer" msgstr "バッファ内に検索テキストが見つからなかった場合はユーザに警告" +#, fuzzy msgid "" -"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" +"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" msgstr "" "バー周囲の水平セパレータの描画に使われる文字 (空の場合は ncurses の実行が描画" "されるが、いくつかのターミナルでは URL 選択の際にバグを生ずる可能性がある)、" "ワイドキャラクタは使えない" +#, fuzzy msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" "バー周囲の垂直セパレータの描画に使われる文字 (空の場合は ncurses の実行が描画" "されるが、いくつかのターミナルでは URL 選択の際にバグを生ずる可能性がある)、" @@ -2748,6 +2750,12 @@ msgstr "" msgid "time format for dates converted to strings and displayed in messages" msgstr "文字列へ変換されるかメッセージ中に表示される日付の時間フォーマット" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "ウィンドウセパレータの背景色 (分割時)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2793,19 +2793,21 @@ msgstr "" "powiadamia użytkownika, kiedy wyszukiwany tekst nie został znaleziony w " "buforze" +#, fuzzy msgid "" -"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" +"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" msgstr "" "znak używany do rysowania poziomych separatorów dookoła pasków (pusta " "wartość oznacza rysowanie prawdziwych linii za pomocą ncurses, jednak może " "powodować błędy w zaznaczaniu URLi w niektórych terminalach), szerokie znaki " "są NIE dozwolone" +#, fuzzy msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" "znak używany do rysowania poziomych separatorów dookoła pasków (pusta " "wartość oznacza rysowanie prawdziwych linii za pomocą ncurses), szerokie " @@ -2818,6 +2820,12 @@ msgid "time format for dates converted to strings and displayed in messages" msgstr "" "format czasu dla dat, konwertowany do ciągu i wyświetlany w wiadomościach" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "kolor tła dla separatorów okna (kiedy podzielone)" diff --git a/po/pt_BR.po b/po/pt_BR.po index 7cefb2977..553d57e3e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2718,19 +2718,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 (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" +"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" msgstr "" "caractere usado para desenhar separadores horizontais em volta de barras " "(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 (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" "caractere usado para desenhar separadores verticais em volta de barras " "(valor vazio vai desenhar uam linha real com ncurses), caracteres extendidos " @@ -2745,6 +2747,12 @@ msgid "time format for dates converted to strings and displayed in messages" msgstr "" "formato de tempo para datas convertidas para strings e mostradas em mensagens" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "cor de fundo para separadores de janelas (quando divididas)" @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -2297,14 +2297,14 @@ msgid "alert user when text sought is not found in buffer" msgstr "" msgid "" -"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" +"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" msgstr "" msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" msgid "set title for window (terminal for Curses GUI) with name and version" @@ -2316,6 +2316,12 @@ msgstr "" msgid "time format for dates converted to strings and displayed in messages" msgstr "отображение маркера даты при смене дня" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + #, fuzzy msgid "background color for window separators (when split)" msgstr "цвет разделителей окна (при разбитом экране)" diff --git a/po/weechat.pot b/po/weechat.pot index eb6a315a8..1aacbcf99 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: 2012-06-09 13:19+0200\n" +"POT-Creation-Date: 2012-06-10 09:48+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -2004,14 +2004,14 @@ msgid "alert user when text sought is not found in buffer" msgstr "" msgid "" -"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" +"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" msgstr "" msgid "" -"char used to draw vertical separators around bars (empty value will draw a " -"real line with ncurses), wide chars are NOT allowed here" +"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" msgstr "" msgid "set title for window (terminal for Curses GUI) with name and version" @@ -2020,6 +2020,12 @@ msgstr "" msgid "time format for dates converted to strings and displayed in messages" msgstr "" +msgid "display an horizontal separator between windows" +msgstr "" + +msgid "display a vertical separator between windows" +msgstr "" + msgid "background color for window separators (when split)" msgstr "" diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 88762bece..94ace91cd 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -153,6 +153,8 @@ struct t_config_option *config_look_separator_horizontal; struct t_config_option *config_look_separator_vertical; struct t_config_option *config_look_set_title; struct t_config_option *config_look_time_format; +struct t_config_option *config_look_window_separator_horizontal; +struct t_config_option *config_look_window_separator_vertical; /* config, colors section */ @@ -2203,16 +2205,17 @@ config_weechat_init_options () config_look_separator_horizontal = config_file_new_option ( weechat_config_file, ptr_section, "separator_horizontal", "string", - 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"), + 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); 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 (empty value " - "will draw a real line with ncurses), wide chars are NOT allowed " - "here"), + 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); config_look_set_title = config_file_new_option ( weechat_config_file, ptr_section, @@ -2226,6 +2229,16 @@ config_weechat_init_options () N_("time format for dates converted to strings and displayed in " "messages"), NULL, 0, 0, "%a, %d %b %Y %T", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + config_look_window_separator_horizontal = config_file_new_option ( + weechat_config_file, ptr_section, + "window_separator_horizontal", "boolean", + N_("display an horizontal separator between windows"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); + config_look_window_separator_vertical = config_file_new_option ( + weechat_config_file, ptr_section, + "window_separator_vertical", "boolean", + N_("display a vertical separator between windows"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, &config_change_buffers, NULL, NULL, NULL); /* palette */ ptr_section = config_file_new_section (weechat_config_file, "palette", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 81da71db2..738ddeb2b 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -176,6 +176,8 @@ extern struct t_config_option *config_look_separator_horizontal; extern struct t_config_option *config_look_separator_vertical; extern struct t_config_option *config_look_set_title; extern struct t_config_option *config_look_time_format; +extern struct t_config_option *config_look_window_separator_horizontal; +extern struct t_config_option *config_look_window_separator_vertical; extern struct t_config_option *config_color_separator; extern struct t_config_option *config_color_bar_more; diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index b62d3719d..4ba665ada 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -122,7 +122,8 @@ gui_window_objects_init (struct t_gui_window *window) { window->gui_objects = new_objects; GUI_WINDOW_OBJECTS(window)->win_chat = NULL; - GUI_WINDOW_OBJECTS(window)->win_separator = NULL; + GUI_WINDOW_OBJECTS(window)->win_separator_horiz = NULL; + GUI_WINDOW_OBJECTS(window)->win_separator_vertic = NULL; return 1; } return 0; @@ -133,17 +134,25 @@ gui_window_objects_init (struct t_gui_window *window) */ void -gui_window_objects_free (struct t_gui_window *window, int free_separator) +gui_window_objects_free (struct t_gui_window *window, int free_separators) { if (GUI_WINDOW_OBJECTS(window)->win_chat) { delwin (GUI_WINDOW_OBJECTS(window)->win_chat); GUI_WINDOW_OBJECTS(window)->win_chat = NULL; } - if (free_separator && GUI_WINDOW_OBJECTS(window)->win_separator) + if (free_separators) { - delwin (GUI_WINDOW_OBJECTS(window)->win_separator); - GUI_WINDOW_OBJECTS(window)->win_separator = NULL; + if (GUI_WINDOW_OBJECTS(window)->win_separator_horiz) + { + delwin (GUI_WINDOW_OBJECTS(window)->win_separator_horiz); + GUI_WINDOW_OBJECTS(window)->win_separator_horiz = NULL; + } + if (GUI_WINDOW_OBJECTS(window)->win_separator_vertic) + { + delwin (GUI_WINDOW_OBJECTS(window)->win_separator_vertic); + GUI_WINDOW_OBJECTS(window)->win_separator_vertic = NULL; + } } } @@ -961,39 +970,71 @@ gui_window_calculate_pos_size (struct t_gui_window *window) } /* - * gui_window_draw_separator: draw window separation + * gui_window_draw_separators: draw window separators */ void -gui_window_draw_separator (struct t_gui_window *window) +gui_window_draw_separators (struct t_gui_window *window) { - int separator_vertical; + int separator; + + /* remove separators */ + if (GUI_WINDOW_OBJECTS(window)->win_separator_horiz) + { + delwin (GUI_WINDOW_OBJECTS(window)->win_separator_horiz); + GUI_WINDOW_OBJECTS(window)->win_separator_horiz = NULL; + } + if (GUI_WINDOW_OBJECTS(window)->win_separator_vertic) + { + delwin (GUI_WINDOW_OBJECTS(window)->win_separator_vertic); + GUI_WINDOW_OBJECTS(window)->win_separator_vertic = NULL; + } - if (GUI_WINDOW_OBJECTS(window)->win_separator) + /* create/draw horizontal separator */ + if (CONFIG_BOOLEAN(config_look_window_separator_horizontal) + && (window->win_y + window->win_height < + gui_window_get_height () - gui_bar_root_get_size (NULL, GUI_BAR_POSITION_BOTTOM))) { - delwin (GUI_WINDOW_OBJECTS(window)->win_separator); - GUI_WINDOW_OBJECTS(window)->win_separator = NULL; + GUI_WINDOW_OBJECTS(window)->win_separator_horiz = newwin (1, + window->win_width, + window->win_y + window->win_height, + window->win_x); + gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_separator_horiz, + GUI_COLOR_SEPARATOR); + separator = ACS_HLINE; + if (CONFIG_STRING(config_look_separator_horizontal) + && CONFIG_STRING(config_look_separator_horizontal)[0]) + { + separator = utf8_char_int (CONFIG_STRING(config_look_separator_horizontal)); + if (separator > 127) + separator = ACS_VLINE; + } + mvwhline (GUI_WINDOW_OBJECTS(window)->win_separator_horiz, 0, 0, + separator, window->win_width); + wnoutrefresh (GUI_WINDOW_OBJECTS(window)->win_separator_horiz); } - if (window->win_x > gui_bar_root_get_size (NULL, GUI_BAR_POSITION_LEFT)) + /* create/draw vertical separator */ + if (CONFIG_BOOLEAN(config_look_window_separator_vertical) + && (window->win_x > gui_bar_root_get_size (NULL, GUI_BAR_POSITION_LEFT))) { - GUI_WINDOW_OBJECTS(window)->win_separator = newwin (window->win_height, - 1, - window->win_y, - window->win_x - 1); - gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_separator, + GUI_WINDOW_OBJECTS(window)->win_separator_vertic = newwin (window->win_height, + 1, + window->win_y, + window->win_x - 1); + gui_window_set_weechat_color (GUI_WINDOW_OBJECTS(window)->win_separator_vertic, GUI_COLOR_SEPARATOR); - separator_vertical = ACS_VLINE; + separator = ACS_VLINE; 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; + separator = utf8_char_int (CONFIG_STRING(config_look_separator_vertical)); + if (separator > 127) + separator = ACS_VLINE; } - mvwvline (GUI_WINDOW_OBJECTS(window)->win_separator, 0, 0, - separator_vertical, window->win_height); - wnoutrefresh (GUI_WINDOW_OBJECTS(window)->win_separator); + mvwvline (GUI_WINDOW_OBJECTS(window)->win_separator_vertic, 0, 0, + separator, window->win_height); + wnoutrefresh (GUI_WINDOW_OBJECTS(window)->win_separator_vertic); } } @@ -1116,7 +1157,7 @@ gui_window_switch_to_buffer (struct t_gui_window *window, window->win_chat_y, window->win_chat_x); } - gui_window_draw_separator (window); + gui_window_draw_separators (window); gui_buffer_ask_chat_refresh (window->buffer, 2); if (window->buffer->type == GUI_BUFFER_TYPE_FREE) @@ -1474,7 +1515,7 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, int x, int y, int width, int height, int simulate) { - int size1, size2; + int size1, size2, separator; struct t_gui_window_tree *parent; if (!gui_init_ok) @@ -1514,23 +1555,25 @@ gui_window_auto_resize (struct t_gui_window_tree *tree, { if (tree->split_horizontal) { + separator = (CONFIG_BOOLEAN(config_look_window_separator_horizontal)) ? 1 : 0; size1 = (height * tree->split_pct) / 100; - size2 = height - size1; - if (gui_window_auto_resize (tree->child1, x, y + size1, - width, size2, simulate) < 0) + size2 = height - size1 - separator; + if (gui_window_auto_resize (tree->child1, x, y + size2 + separator, + width, size1, simulate) < 0) return -1; if (gui_window_auto_resize (tree->child2, x, y, - width, size1, simulate) < 0) + width, size2, simulate) < 0) return -1; } else { + separator = (CONFIG_BOOLEAN(config_look_window_separator_vertical)) ? 1 : 0; size1 = (width * tree->split_pct) / 100; - size2 = width - size1 - 1; + size2 = width - size1 - separator; if (gui_window_auto_resize (tree->child1, x, y, size1, height, simulate) < 0) return -1; - if (gui_window_auto_resize (tree->child2, x + size1 + 1, y, + if (gui_window_auto_resize (tree->child2, x + size1 + separator, y, size2, height, simulate) < 0) return -1; } @@ -1608,28 +1651,32 @@ struct t_gui_window * gui_window_split_horizontal (struct t_gui_window *window, int percentage) { struct t_gui_window *new_window; - int height1, height2; + int height1, height2, separator; if (!gui_init_ok) return NULL; new_window = NULL; + separator = (CONFIG_BOOLEAN(config_look_window_separator_horizontal)) ? 1 : 0; + height1 = (window->win_height * percentage) / 100; - height2 = window->win_height - height1; + height2 = window->win_height - height1 - separator; if ((height1 >= 2) && (height2 >= 2) && (percentage > 0) && (percentage < 100)) { new_window = gui_window_new (window, window->buffer, - window->win_x, window->win_y, - window->win_width, height1, + window->win_x, + window->win_y, + window->win_width, + height2, 100, percentage); if (new_window) { /* reduce old window height (bottom window) */ - window->win_y = new_window->win_y + new_window->win_height; - window->win_height = height2; + window->win_y = new_window->win_y + new_window->win_height + separator; + window->win_height = height1; window->win_height_pct = 100 - percentage; /* assign same buffer for new window (top window) */ @@ -1653,22 +1700,26 @@ struct t_gui_window * gui_window_split_vertical (struct t_gui_window *window, int percentage) { struct t_gui_window *new_window; - int width1, width2; + int width1, width2, separator; if (!gui_init_ok) return NULL; new_window = NULL; + separator = (CONFIG_BOOLEAN(config_look_window_separator_vertical)) ? 1 : 0; + width1 = (window->win_width * percentage) / 100; - width2 = window->win_width - width1 - 1; + width2 = window->win_width - width1 - separator; if ((width1 >= 1) && (width2 >= 1) && (percentage > 0) && (percentage < 100)) { new_window = gui_window_new (window, window->buffer, - window->win_x + width1 + 1, window->win_y, - width2, window->win_height, + window->win_x + width1 + separator, + window->win_y, + width2, + window->win_height, percentage, 100); if (new_window) { @@ -1684,8 +1735,8 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage) gui_window_switch (new_window); - /* create & draw separator */ - gui_window_draw_separator (gui_current_window); + /* create & draw separators */ + gui_window_draw_separators (gui_current_window); } } @@ -1788,6 +1839,7 @@ int gui_window_merge (struct t_gui_window *window) { struct t_gui_window_tree *parent, *sister; + int separator; if (!gui_init_ok) return 0; @@ -1804,13 +1856,15 @@ gui_window_merge (struct t_gui_window *window) if (window->win_y == sister->window->win_y) { /* horizontal merge */ - window->win_width += sister->window->win_width + 1; + separator = (CONFIG_BOOLEAN(config_look_window_separator_horizontal)) ? 1 : 0; + window->win_width += sister->window->win_width + separator; window->win_width_pct += sister->window->win_width_pct; } else { /* vertical merge */ - window->win_height += sister->window->win_height; + separator = (CONFIG_BOOLEAN(config_look_window_separator_vertical)) ? 1 : 0; + window->win_height += sister->window->win_height + separator; window->win_height_pct += sister->window->win_height_pct; } if (sister->window->win_x < window->win_x) @@ -1881,11 +1935,16 @@ gui_window_merge_all (struct t_gui_window *window) int gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) { + int separator_horizontal, separator_vertical; + if (!gui_init_ok) return 0; + separator_horizontal = (CONFIG_BOOLEAN(config_look_window_separator_horizontal)) ? 1 : 0; + separator_vertical = (CONFIG_BOOLEAN(config_look_window_separator_vertical)) ? 1 : 0; + /* win2 over win1 ? */ - if (win2->win_y + win2->win_height == win1->win_y) + if (win2->win_y + win2->win_height + separator_horizontal == win1->win_y) { if (win2->win_x >= win1->win_x + win1->win_width) return 0; @@ -1895,7 +1954,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) } /* win2 on the right ? */ - if (win2->win_x == win1->win_x + win1->win_width + 1) + if (win2->win_x == win1->win_x + win1->win_width + separator_vertical) { if (win2->win_y >= win1->win_y + win1->win_height) return 0; @@ -1905,7 +1964,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) } /* win2 below win1 ? */ - if (win2->win_y == win1->win_y + win1->win_height) + if (win2->win_y == win1->win_y + win1->win_height + separator_horizontal) { if (win2->win_x >= win1->win_x + win1->win_width) return 0; @@ -1915,7 +1974,7 @@ gui_window_side_by_side (struct t_gui_window *win1, struct t_gui_window *win2) } /* win2 on the left ? */ - if (win2->win_x + win2->win_width + 1 == win1->win_x) + if (win2->win_x + win2->win_width + separator_vertical == win1->win_x) { if (win2->win_y >= win1->win_y + win1->win_height) return 0; @@ -2334,7 +2393,8 @@ gui_window_objects_print_log (struct t_gui_window *window) { log_printf (" window specific objects for Curses:"); log_printf (" win_chat. . . . . . . : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_chat); - log_printf (" win_separator . . . . : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_separator); + log_printf (" win_separator_horiz . : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_separator_horiz); + log_printf (" win_separator_vertic. : 0x%lx", GUI_WINDOW_OBJECTS(window)->win_separator_vertic); log_printf (" first_line_with_prefix: 0x%lx", GUI_WINDOW_OBJECTS(window)->first_line_with_prefix); log_printf (" force_prefix_for_line : %d", GUI_WINDOW_OBJECTS(window)->force_prefix_for_line); } diff --git a/src/gui/curses/gui-curses.h b/src/gui/curses/gui-curses.h index 78b04a388..74831da8c 100644 --- a/src/gui/curses/gui-curses.h +++ b/src/gui/curses/gui-curses.h @@ -48,7 +48,8 @@ struct t_gui_bar_window; struct t_gui_window_curses_objects { WINDOW *win_chat; /* chat window (example: channel) */ - WINDOW *win_separator; /* separation between 2 split (V) win */ + WINDOW *win_separator_horiz; /* horizontal separator (optional) */ + WINDOW *win_separator_vertic; /* vertical separator (optional) */ struct t_gui_line *first_line_with_prefix; /* first (full) line displayed with a */ /* prefix (for opt "prefix_same_nick") */ diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index 24ce6c22a..ad43e0036 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -89,11 +89,11 @@ gui_window_objects_init (struct t_gui_window *window) */ void -gui_window_objects_free (struct t_gui_window *window, int free_separator) +gui_window_objects_free (struct t_gui_window *window, int free_separators) { /* TODO: write this function for Gtk */ (void) window; - (void) free_separator; + (void) free_separators; } /* @@ -124,11 +124,11 @@ gui_window_calculate_pos_size (struct t_gui_window *window) } /* - * gui_window_draw_separator: draw window separation + * gui_window_draw_separators: draw window separation */ void -gui_window_draw_separator (struct t_gui_window *window) +gui_window_draw_separators (struct t_gui_window *window) { /* TODO: write this function for Gtk */ /*if (window->win_separator) @@ -561,8 +561,8 @@ gui_window_split_vertical (struct t_gui_window *window, int percentage) gui_window_switch_to_buffer (gui_current_window, gui_current_window->buffer, 1); gui_window_redraw_buffer (gui_current_window->buffer); - /* create & draw separator */ - gui_window_draw_separator (gui_current_window); + /* create & draw separators */ + gui_window_draw_separators (gui_current_window); } } diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h index f0eabb1ca..568bcfa99 100644 --- a/src/gui/gui-window.h +++ b/src/gui/gui-window.h @@ -200,7 +200,7 @@ extern int gui_window_get_width (); extern int gui_window_get_height (); extern int gui_window_objects_init (struct t_gui_window *window); extern void gui_window_objects_free (struct t_gui_window *window, - int free_separator); + int free_separators); extern void gui_window_save_style (); extern void gui_window_restore_style (); extern void gui_window_calculate_pos_size (struct t_gui_window *window); |