diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/de/weechat_user.de.txt | 1 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/en/weechat_user.en.txt | 1 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/fr/weechat_user.fr.txt | 1 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_commands.txt | 2 | ||||
-rw-r--r-- | doc/it/weechat_user.it.txt | 1 | ||||
-rw-r--r-- | po/cs.po | 7 | ||||
-rw-r--r-- | po/de.po | 7 | ||||
-rw-r--r-- | po/es.po | 7 | ||||
-rw-r--r-- | po/fr.po | 14 | ||||
-rw-r--r-- | po/hu.po | 7 | ||||
-rw-r--r-- | po/it.po | 7 | ||||
-rw-r--r-- | po/pl.po | 7 | ||||
-rw-r--r-- | po/pt_BR.po | 7 | ||||
-rw-r--r-- | po/ru.po | 7 | ||||
-rw-r--r-- | po/weechat.pot | 7 | ||||
-rw-r--r-- | src/core/wee-command.c | 20 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-keyboard.c | 1 | ||||
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 25 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-window.c | 15 | ||||
-rw-r--r-- | src/gui/gui-window.h | 1 |
24 files changed, 116 insertions, 38 deletions
@@ -1,12 +1,13 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.5-rc1, 2011-04-22 +v0.3.5-rc1, 2011-04-23 Version 0.3.5 (under dev!) -------------------------- +* core: add option "balance" for command /window (key: alt+"w" + alt+"b") * core: add option "swap" for command /window (key: alt+"w" + alt+"s") (task #11001) * core: apply new value of option weechat.look.buffer_notify_default to all diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt index 7f10bcb81..f4b07e2d8 100644 --- a/doc/de/autogen/user/weechat_commands.txt +++ b/doc/de/autogen/user/weechat_commands.txt @@ -520,6 +520,7 @@ Beispiele: -1|+1|b#|up|down|left|right splith|splitv [<pct>] resize [+/-]<pct> + balance merge [all] page_up|page_down refresh @@ -538,6 +539,7 @@ Beispiele: splith: split current window horizontally splitv: split current window vertically resize: resize window size, new size is <pct> percentage of parent window + balance: resize all windows to 50% merge: merge window with another (all = keep only one window) page_up: scroll one page up page_down: scroll one page down diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt index 90fdb2150..8b6a0797e 100644 --- a/doc/de/weechat_user.de.txt +++ b/doc/de/weechat_user.de.txt @@ -502,6 +502,7 @@ Tastenbefehle für Buffer / Fenster | @k(A-)@k(w) , @k(A-)@k(←) | wechselt zum linken Fenster | /window left | @k(A-)@k(w) , @k(A-)@k(→) | wechselt zum rechten Fenster | /window right // TRANSLATION MISSING +| @k(A-)@k(w) , @k(A-)@k(b) | Resize all windows to 50% | /window balance | @k(A-)@k(w) , @k(A-)@k(s) | Swap buffers of two windows | /window swap | @k(A-)@k(z) | Zoom für aktuelles Fenster (nochmals @k(A-)@k(z): stellt die vorherigen Einstellungen wieder her) | /window zoom | @k(A-)@k(<) | springt zum letzten besuchten Buffer | /input jump_previously_visited_buffer diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt index 20f87453e..29db19b91 100644 --- a/doc/en/autogen/user/weechat_commands.txt +++ b/doc/en/autogen/user/weechat_commands.txt @@ -520,6 +520,7 @@ Examples: -1|+1|b#|up|down|left|right splith|splitv [<pct>] resize [+/-]<pct> + balance merge [all] page_up|page_down refresh @@ -538,6 +539,7 @@ Examples: splith: split current window horizontally splitv: split current window vertically resize: resize window size, new size is <pct> percentage of parent window + balance: resize all windows to 50% merge: merge window with another (all = keep only one window) page_up: scroll one page up page_down: scroll one page down diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt index b2e144ed9..62fd8e1b5 100644 --- a/doc/en/weechat_user.en.txt +++ b/doc/en/weechat_user.en.txt @@ -503,6 +503,7 @@ Keys for buffers / windows | @k(A-)@k(w) , @k(A-)@k(↓) | Switch to window below | /window down | @k(A-)@k(w) , @k(A-)@k(←) | Switch to window on the left | /window left | @k(A-)@k(w) , @k(A-)@k(→) | Switch to window on the right | /window right +| @k(A-)@k(w) , @k(A-)@k(b) | Resize all windows to 50% | /window balance | @k(A-)@k(w) , @k(A-)@k(s) | Swap buffers of two windows | /window swap | @k(A-)@k(z) | Zoom on current window (@k(A-)@k(z) again: restore initial windows state, before zoom) | /window zoom | @k(A-)@k(<) | Switch to previous buffer in list of visited buffers | /input jump_previously_visited_buffer diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt index 1f528f287..4a9fc4731 100644 --- a/doc/fr/autogen/user/weechat_commands.txt +++ b/doc/fr/autogen/user/weechat_commands.txt @@ -520,6 +520,7 @@ Exemples: -1|+1|b#|up|down|left|right splith|splitv [<pct>] resize [+/-]<pct> + balance merge [all] page_up|page_down refresh @@ -538,6 +539,7 @@ Exemples: splith: éclater la fenêtre en deux horizontalement splitv: éclater la fenêtre en deux verticalement resize: redimensionner une fenêtre, la nouvelle taille est <pct> pourcentage de la fenêtre parent + balance: redimensionner toutes les fenêtres à 50% merge: fusionner la fenêtre avec une autre page_up: faire défiler d'une page vers le haut page_down: faire défiler d'une page vers le bas diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt index 618dab190..8aa42d40b 100644 --- a/doc/fr/weechat_user.fr.txt +++ b/doc/fr/weechat_user.fr.txt @@ -511,6 +511,7 @@ Touches pour les tampons / fenêtres | @k(A-)@k(w) , @k(A-)@k(↓) | Sauter à la fenêtre en dessous | /window down | @k(A-)@k(w) , @k(A-)@k(←) | Sauter à la fenêtre de gauche | /window left | @k(A-)@k(w) , @k(A-)@k(→) | Sauter à la fenêtre de droite | /window right +| @k(A-)@k(w) , @k(A-)@k(b) | Redimensionner toutes les fenêtres à 50% | /window balance | @k(A-)@k(w) , @k(A-)@k(s) | Echanger les tampons de deux fenêtres | /window swap | @k(A-)@k(z) | Zoom sur la fenêtre courante (@k(A-)@k(z) de nouveau : restaurer l'état initial des fenêtres, avant le zoom) | /window zoom | @k(A-)@k(<) | Sauter au tampon précédent dans la liste des tampons visités | /input jump_previously_visited_buffer diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt index 7fdbf4c77..ecfa10eb5 100644 --- a/doc/it/autogen/user/weechat_commands.txt +++ b/doc/it/autogen/user/weechat_commands.txt @@ -520,6 +520,7 @@ Esempi: -1|+1|b#|up|down|left|right splith|splitv [<pct>] resize [+/-]<pct> + balance merge [all] page_up|page_down refresh @@ -538,6 +539,7 @@ Esempi: splith: split current window horizontally splitv: split current window vertically resize: resize window size, new size is <pct> percentage of parent window + balance: resize all windows to 50% merge: merge window with another (all = keep only one window) page_up: scroll one page up page_down: scroll one page down diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt index 81b0c5815..87e95ecaf 100644 --- a/doc/it/weechat_user.it.txt +++ b/doc/it/weechat_user.it.txt @@ -513,6 +513,7 @@ Tasti per buffer / finestre | @k(A-)@k(w) , @k(A-)@k(←) | Passa alla finestra sulla sinistra | /window left | @k(A-)@k(w) , @k(A-)@k(→) | Passa alla finestrs sulla destra | /window right // TRANSLATION MISSING +| @k(A-)@k(w) , @k(A-)@k(b) | Resize all windows to 50% | /window balance | @k(A-)@k(w) , @k(A-)@k(s) | Swap buffers of two windows | /window swap | @k(A-)@k(z) | Ingrandimento sulla finestra attiva (@k(A-)@k(z) di nuovo: ripristina lo stato iniziale della finestra, prima dell'ingrandimento) | /window zoom | @k(A-)@k(<) | Passa al buffer precedente nella lista dei buffer visitati | /input jump_previously_visited_buffer @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 17:32+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1721,8 +1721,8 @@ msgstr "spravuje okna" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv " @@ -1745,6 +1745,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-15 21:04+0100\n" "Last-Translator: Nils G.\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1864,8 +1864,8 @@ msgstr "Fenster verwalten" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" @@ -1888,6 +1888,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 17:31+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1760,8 +1760,8 @@ msgstr "gestión de ventanas" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv " @@ -1784,6 +1784,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -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-04-22 21:56+0200\n" -"PO-Revision-Date: 2011-04-22 17:52+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" +"PO-Revision-Date: 2011-04-23 13:10+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: French\n" @@ -1818,13 +1818,13 @@ msgstr "gestion des fenêtres" msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgid "" @@ -1841,6 +1841,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -1884,6 +1885,7 @@ msgstr "" " splitv: éclater la fenêtre en deux verticalement\n" " resize: redimensionner une fenêtre, la nouvelle taille est <pct> " "pourcentage de la fenêtre parent\n" +" balance: redimensionner toutes les fenêtres à 50%\n" " merge: fusionner la fenêtre avec une autre\n" " page_up: faire défiler d'une page vers le haut\n" " page_down: faire défiler d'une page vers le bas\n" @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 11:21+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1521,8 +1521,8 @@ msgstr "ablakok kezelése" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv " @@ -1543,6 +1543,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 17:33+0200\n" "Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1811,8 +1811,8 @@ msgstr "gestione finestre" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-] " @@ -1835,6 +1835,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 17:32+0200\n" "Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1766,8 +1766,8 @@ msgstr "zarządza oknami" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv " @@ -1790,6 +1790,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" diff --git a/po/pt_BR.po b/po/pt_BR.po index e749dc957..bd33cb2c5 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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 11:22+0200\n" "Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1750,8 +1750,8 @@ msgstr "gerencia janelas" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv " @@ -1774,6 +1774,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" @@ -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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+0200\n" "PO-Revision-Date: 2011-04-10 17:33+0200\n" "Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -1530,8 +1530,8 @@ msgstr "управление окнами" #, fuzzy msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" "[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv " @@ -1552,6 +1552,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" diff --git a/po/weechat.pot b/po/weechat.pot index 761786c7e..342ae5caa 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-04-22 21:56+0200\n" +"POT-Creation-Date: 2011-04-23 13:17+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" @@ -1332,8 +1332,8 @@ msgstr "" msgid "" "list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]" -"<pct> || merge [all] || page_up|page_down || refresh || scroll|scroll_up|" -"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" +"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|" +"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|" "scroll_next_highlight || swap [up|down|left|right] || zoom" msgstr "" @@ -1351,6 +1351,7 @@ msgid "" " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> percentage of parent " "window\n" +" balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one window)\n" " page_up: scroll one page up\n" " page_down: scroll one page down\n" diff --git a/src/core/wee-command.c b/src/core/wee-command.c index a48a50643..683f76110 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -4477,6 +4477,14 @@ COMMAND_CALLBACK(window) return WEECHAT_RC_OK; } + /* balance windows */ + if (string_strcasecmp (argv[1], "balance") == 0) + { + if (gui_window_balance (gui_windows_tree)) + gui_window_ask_refresh (1); + return WEECHAT_RC_OK; + } + /* merge windows */ if (string_strcasecmp (argv[1], "merge") == 0) { @@ -4515,8 +4523,10 @@ COMMAND_CALLBACK(window) error = NULL; number = strtol (argv[1] + 1, &error, 10); if (error && !error[0]) + { gui_window_switch_by_buffer (gui_current_window, number); - return WEECHAT_RC_OK; + return WEECHAT_RC_OK; + } } /* switch to previous window */ @@ -5255,6 +5265,7 @@ command_init () " || -1|+1|b#|up|down|left|right" " || splith|splitv [<pct>]" " || resize [+/-]<pct>" + " || balance" " || merge [all]" " || page_up|page_down" " || refresh" @@ -5276,6 +5287,7 @@ command_init () " splitv: split current window vertically\n" " resize: resize window size, new size is <pct> " "percentage of parent window\n" + " balance: resize all windows to 50%\n" " merge: merge window with another (all = keep only one " "window)\n" " page_up: scroll one page up\n" @@ -5306,9 +5318,9 @@ command_init () " scroll to beginning of current day:\n" " /window scroll -d"), "list || -1 || +1 || up || down || left || right" - " || splith || splitv || resize || page_up || page_down" - " || refresh || scroll || scroll_up || scroll_down" - " || scroll_top || scroll_bottom" + " || splith || splitv || resize || balance || page_up" + " || page_down || refresh || scroll || scroll_up" + " || scroll_down || scroll_top || scroll_bottom" " || scroll_previous_highlight || scroll_next_highlight" " || swap up|down|left|right || zoom || merge all", &command_window, NULL); diff --git a/src/gui/curses/gui-curses-keyboard.c b/src/gui/curses/gui-curses-keyboard.c index f7467937c..8331bf4c2 100644 --- a/src/gui/curses/gui-curses-keyboard.c +++ b/src/gui/curses/gui-curses-keyboard.c @@ -185,6 +185,7 @@ gui_keyboard_default_bindings () BIND(/* m-w,m-right */ "meta-wmeta2-1;3C", "/window right"); BIND(/* m-w,m-left */ "meta-wmeta-meta2-D", "/window left"); BIND(/* m-w,m-left */ "meta-wmeta2-1;3D", "/window left"); + BIND(/* m-w,m-b */ "meta-wmeta-b", "/window balance"); BIND(/* m-w,m-s */ "meta-wmeta-s", "/window swap"); BIND(/* m-z */ "meta-z", "/window zoom"); BIND(/* m-= */ "meta-=", "/filter toggle"); diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 2fc3208ab..0c229ef91 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -1955,6 +1955,31 @@ gui_window_switch_right (struct t_gui_window *window) } /* + * gui_window_balance: balance windows (set all splits to 50%) + * return 1 if some windows have been balanced + * 0 if nothing was changed + */ + +int +gui_window_balance (struct t_gui_window_tree *tree) +{ + int balanced; + + balanced = 0; + if (tree && tree->child1 && tree->child2) + { + if (tree->split_pct != 50) + { + tree->split_pct = 50; + balanced = 1; + } + balanced |= gui_window_balance (tree->child1); + balanced |= gui_window_balance (tree->child2); + } + return balanced; +} + +/* * gui_window_swap: swap buffers of two windows * direction can be: 0 = auto (swap with sister) * 1 = window above diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index ba64b7d38..c7bd94041 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -792,6 +792,21 @@ gui_window_switch_right (struct t_gui_window *window) } /* + * gui_window_balance: balance windows (set all splits to 50%) + * return 1 if some windows have been balanced + * 0 if nothing was changed + */ + +int +gui_window_balance (struct t_gui_window_tree *tree) +{ + (void) tree; + + /* TODO: write this function for Gtk */ + return 0; +} + +/* * gui_window_swap: swap buffer of two windows * direction can be: 0 = auto (swap with sister) * 1 = window above diff --git a/src/gui/gui-window.h b/src/gui/gui-window.h index 06acca662..8e82e5686 100644 --- a/src/gui/gui-window.h +++ b/src/gui/gui-window.h @@ -187,6 +187,7 @@ extern void gui_window_switch_up (struct t_gui_window *window); extern void gui_window_switch_down (struct t_gui_window *window); extern void gui_window_switch_left (struct t_gui_window *window); extern void gui_window_switch_right (struct t_gui_window *window); +extern int gui_window_balance (struct t_gui_window_tree *tree); extern void gui_window_swap (struct t_gui_window *window, int direction); extern void gui_window_refresh_screen (int full_refresh); extern void gui_window_set_title (const char *title); |