core: add option "swap" for command /window (key: alt+"w" + alt+"s") (task #11001)

This commit is contained in:
Sebastien Helleu 2011-04-22 21:56:54 +02:00
parent b7853444d8
commit 634478dd54
24 changed files with 246 additions and 89 deletions

View File

@ -1,12 +1,14 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.5-rc1, 2011-04-21
v0.3.5-rc1, 2011-04-22
Version 0.3.5 (under dev!)
--------------------------
* 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
opened buffers
* core: prohibit names beginning with "#" for bars, proxies, filters and IRC

View File

@ -524,42 +524,44 @@ Beispiele:
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
list: listet die geöffneten Fenster (ohne Angabe von Parametern wird diese Funktion aufgerufen)
-1: springt zum vorherigen Fenster
+1: springt zum nächsten Fenster
b#: springt zum nächsten Fenster, welches die Buffer Nummer # besitzt
up: wechselt zum Fenster über dem aktuellen
down: wechselt zum Fenster unter dem aktuellen
left: wechselt zum linken Fenster
right: wechselt zum rechten Fenster
splith: teilt das aktuelle Fenster horizontal
splitv: teilt das aktuelle Fenster vertikal
resize: verändert die Größe des aktuellen Fensters. Die neue Größe des Fensters ist prozentual <pct> zum Stammfensters groß
merge: vereinigt Fenster miteinander (all = alle Fenster vereinigen)
page_up: Scrollt eine Seite nach oben
page_down: Scrollt eine Seite nach unten
refresh: Seite wird neu aufgebaut
scroll: Scrollt eine Anzahl an Zeilen (+/-N) oder zu einer gewissen Zeit: s=Sekunden, m=Minuten, h=Stunden, d=Tage, M=Monate, y=Jahre
scroll_up: Scrollt ein paar Zeilen nach oben
scroll_down: Scrollt ein paar Zeilen nach unten
scroll_top: Scrollt zum Anfang des Buffers
scroll_bottom: Scrollt zum Ende des Buffers
scroll_previous_highlight: Scrollt zum vorherigen Hightlight
scroll_next_highlight: Scrollt zum nächsten Highlight
zoom: vergrößert auf Fenster
list: list opened windows (without argument, this list is displayed)
-1: jump to previous window
+1: jump to next window
b#: jump to next window displaying buffer number #
up: switch to window above current one
down: switch to window below current one
left: switch to window on the left
right: switch to window on the right
splith: split current window horizontally
splitv: split current window vertically
resize: resize window size, new size is <pct> percentage of parent window
merge: merge window with another (all = keep only one window)
page_up: scroll one page up
page_down: scroll one page down
refresh: refresh screen
scroll: scroll number of lines (+/-N) or with time: s=seconds, m=minutes, h=hours, d=days, M=months, y=years
scroll_up: scroll a few lines up
scroll_down: scroll a few lines down
scroll_top: scroll to top of buffer
scroll_bottom: scroll to bottom of buffer
scroll_previous_highlight: scroll to previous highlight
scroll_next_highlight: scroll to next highlight
swap: swap buffers of two windows (with optional direction for target window)
zoom: zoom on window
Bei splith und splitv gibt "pct" die neue Größe des Fensters im Verhältnis zur aktuellen Größe an. Zum Beispiel würde der Wert 25 bedeuten, dass das neue Fenster nur noch ein Viertel der Größe des alten Fensters hat.
For splith and splitv, pct is a percentage which represents size of new window, computed with current window as size reference. For example 25 means create a new window with size = current_size / 4
Beispiele:
Springt zum Fenster mit dem Buffer #1:
Examples:
jump to window displaying buffer #1:
/window b1
Scrollt zwei Zeilen hoch:
scroll 2 lines up:
/window scroll -2
Scrollt zwei Tage hoch: /window scroll -2d
scroll 2 days up:
/window scroll -2d
Scrollt zum Beginn des aktuellen Tages:
scroll to beginning of current day:
/window scroll -d
........................................

View File

@ -501,6 +501,8 @@ Tastenbefehle für Buffer / Fenster
| @k(A-)@k(w) , @k(A-)@k(↓) | wechselt zum unteren Fenster | /window down
| @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(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
| @k(A-)@k(>) | springt zum nächsten besuchten Buffer | /input jump_next_visited_buffer

View File

@ -524,6 +524,7 @@ Examples:
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
list: list opened windows (without argument, this list is displayed)
@ -548,6 +549,7 @@ Examples:
scroll_bottom: scroll to bottom of buffer
scroll_previous_highlight: scroll to previous highlight
scroll_next_highlight: scroll to next highlight
swap: swap buffers of two windows (with optional direction for target window)
zoom: zoom on window
For splith and splitv, pct is a percentage which represents size of new window, computed with current window as size reference. For example 25 means create a new window with size = current_size / 4

View File

@ -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(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
| @k(A-)@k(>) | Switch to next buffer in list of visited buffers | /input jump_next_visited_buffer

View File

@ -524,6 +524,7 @@ Exemples:
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
list: lister les fenêtres ouvertes (sans paramètre, cette liste est affichée)
@ -548,6 +549,7 @@ Exemples:
scroll_bottom: faire défiler jusqu'en bas du tampon
scroll_previous_highlight: faire défiler jusqu'au highlight précédent
scroll_next_highlight: faire défiler jusqu'au highlight suivant
swap: échanger les tampons de deux fenêtres (avec une direction facultative pour la fenêtre cible)
zoom: zoomer sur la fenêtre
Pour splith et splitv, pct est un pourcentage qui représente la taille de la nouvelle fenêtre, calculée par rapport à la taille de la fenêtre courante. Par exemple 25 signifie créer une fenêtre qui a pour taille: taille_courante / 4

View File

@ -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(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
| @k(A-)@k(>) | Sauter au tampon suivant dans la liste des tampons visités | /input jump_next_visited_buffer

View File

@ -519,47 +519,49 @@ Esempi:
/window list
-1|+1|b#|up|down|left|right
splith|splitv [<pct>]
resize [+/-] <pct>
resize [+/-]<pct>
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
list: elenca le finestre aperte (senza argomento, questa lista viene visualizzata)
-1: salta alla finestra precedente
+1: salta alla finestra successiva
b#: salta alla finestra successiva che visualizza il buffer numero #
up: passa alla finestra superiore a quella corrente
down: passa alla finestra inferiore a quella attiva
left: passa alla finestra a sinistra
right: passa alla finestra a destra
splith: divide la finestra attiva orizzontalmente
splitv: divide la finestra attiva verticalmente
resize: ridimensiona finestra, la nuova dimensione è <pct> percentuale della finestra genitore
merge: unisce la finestra con un'altra (all = mantiente una sola finestra)
page_up: scorre di una pagina in alto
page_down: scorre di una pagina in basso
refresh: aggiorna lo schermo
scroll: scorre di un numero di righe (+/-N) o in base al tempo: s=secondi, m=minuti, h=ore, d=giorni, M=mesi, y=anni
scroll_up: scorre di alcune righe in alto
scroll_down: scorre di alcune righe in basso
scroll_top: scorre fino all'inizio del buffer
scroll_bottom: scorre fino alla fine del buffer buffer
scroll_previous_highlight: passa all'evento precedente
scroll_next_highlight: passa all'evento successivo
zoom: ingrandimento sulla finestra
list: list opened windows (without argument, this list is displayed)
-1: jump to previous window
+1: jump to next window
b#: jump to next window displaying buffer number #
up: switch to window above current one
down: switch to window below current one
left: switch to window on the left
right: switch to window on the right
splith: split current window horizontally
splitv: split current window vertically
resize: resize window size, new size is <pct> percentage of parent window
merge: merge window with another (all = keep only one window)
page_up: scroll one page up
page_down: scroll one page down
refresh: refresh screen
scroll: scroll number of lines (+/-N) or with time: s=seconds, m=minutes, h=hours, d=days, M=months, y=years
scroll_up: scroll a few lines up
scroll_down: scroll a few lines down
scroll_top: scroll to top of buffer
scroll_bottom: scroll to bottom of buffer
scroll_previous_highlight: scroll to previous highlight
scroll_next_highlight: scroll to next highlight
swap: swap buffers of two windows (with optional direction for target window)
zoom: zoom on window
Per splith e splitv, pct è una percentuale che rappresenta la dimensione della nuova finestra, calcolata con la finestra attiva come riferimento per la dimensione. Per esempio 25 vuol dire creare una finestra di dimensione = dimensione_attuale / 4
For splith and splitv, pct is a percentage which represents size of new window, computed with current window as size reference. For example 25 means create a new window with size = current_size / 4
Esempi:
salta alla finestra che visualizza il buffer #1:
Examples:
jump to window displaying buffer #1:
/window b1
scorre di due righe in alto:
scroll 2 lines up:
/window scroll -2
scorre all'indietro di due giorni:
scroll 2 days up:
/window scroll -2d
scorre all'inizio del giorno attuale:
/window scroll -d
scroll to beginning of current day:
/window scroll -d
........................................

View File

@ -512,6 +512,8 @@ Tasti per buffer / finestre
| @k(A-)@k(w) , @k(A-)@k(↓) | Passa alla finestra in basso | /window down
| @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(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
| @k(A-)@k(>) | Passa al buffer successivo nella lista dei buffer visitati | /input jump_next_visited_buffer

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1723,13 +1723,14 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
"[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv "
"[pct] | resize pct | merge [all] | page_up | page_down | refresh | scroll | "
"scroll_up | scroll_down | scroll_top | scroll_bottom | "
"scroll_previous_highlight | scroll_next_highlight | zoom]"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1756,6 +1757,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1861,17 +1861,19 @@ msgstr ""
msgid "manage windows"
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|"
"scroll_next_highlight || zoom"
"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|"
"scroll_next_highlight || zoom"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1898,6 +1900,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1762,13 +1762,14 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
"[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv "
"[pct] | resize pct | merge [all] | page_up | page_down | refresh | scroll | "
"scroll_up | scroll_down | scroll_top | scroll_bottom | "
"scroll_previous_highlight | scroll_next_highlight | zoom]"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1795,6 +1796,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"PO-Revision-Date: 2011-04-19 20:10+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+0200\n"
"PO-Revision-Date: 2011-04-22 17:52+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -1820,12 +1820,12 @@ 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|"
"scroll_next_highlight || zoom"
"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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgid ""
" list: list opened windows (without argument, this list is "
@ -1853,6 +1853,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "
@ -1894,6 +1896,8 @@ msgstr ""
"scroll_bottom: faire défiler jusqu'en bas du tampon\n"
"scroll_previous_highlight: faire défiler jusqu'au highlight précédent\n"
"scroll_next_highlight: faire défiler jusqu'au highlight suivant\n"
" swap: échanger les tampons de deux fenêtres (avec une direction "
"facultative pour la fenêtre cible)\n"
" zoom: zoomer sur la fenêtre\n"
"\n"
"Pour splith et splitv, pct est un pourcentage qui représente la taille de la "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1523,7 +1523,7 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
"[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv "
"[pct] | resize pct | merge [all]]"
@ -1555,6 +1555,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1808,17 +1808,19 @@ msgstr ""
msgid "manage windows"
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|"
"scroll_next_highlight || zoom"
"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|"
"scroll_next_highlight || zoom"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1845,6 +1847,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1768,13 +1768,14 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
"[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv "
"[pct] | resize pct | merge [all] | page_up | page_down | refresh | scroll | "
"scroll_up | scroll_down | scroll_top | scroll_bottom | "
"scroll_previous_highlight | scroll_next_highlight | zoom]"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1801,6 +1802,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1752,13 +1752,14 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
"[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv "
"[pct] | resize pct | merge [all] | page_up | page_down | refresh | scroll | "
"scroll_up | scroll_down | scroll_top | scroll_bottom | "
"scroll_previous_highlight | scroll_next_highlight | zoom]"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1785,6 +1786,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1532,7 +1532,7 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
"[list | -1 | +1 | b# | up | down | left | right | splith [pct] | splitv "
"[pct] | resize pct | merge [all]]"
@ -1564,6 +1564,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -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-19 20:09+0200\n"
"POT-Creation-Date: 2011-04-22 21:56+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"
@ -1334,7 +1334,7 @@ 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|"
"scroll_next_highlight || zoom"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
msgstr ""
msgid ""
@ -1363,6 +1363,8 @@ msgid ""
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional direction for "
"target window)\n"
" zoom: zoom on window\n"
"\n"
"For splith and splitv, pct is a percentage which represents size of new "

View File

@ -4568,7 +4568,37 @@ COMMAND_CALLBACK(window)
gui_window_scroll (gui_current_window, argv[2]);
return WEECHAT_RC_OK;
}
/* swap windows */
if (string_strcasecmp (argv[1], "swap") == 0)
{
if (argc > 2)
{
if (string_strcasecmp (argv[2], "up") == 0)
gui_window_swap (gui_current_window, 1);
else if (string_strcasecmp (argv[2], "down") == 0)
gui_window_swap (gui_current_window, 3);
else if (string_strcasecmp (argv[2], "left") == 0)
gui_window_swap (gui_current_window, 4);
else if (string_strcasecmp (argv[2], "right") == 0)
gui_window_swap (gui_current_window, 2);
else
{
gui_chat_printf (NULL,
_("%sError: unknown option for \"%s\" "
"command"),
gui_chat_prefix[GUI_CHAT_PREFIX_ERROR],
"window swap");
return WEECHAT_RC_OK;
}
}
else
{
gui_window_swap (gui_current_window, 0);
}
return WEECHAT_RC_OK;
}
/* zoom window */
if (string_strcasecmp (argv[1], "zoom") == 0)
{
@ -5231,6 +5261,7 @@ command_init ()
" || scroll|scroll_up|scroll_down|scroll_top|"
"scroll_bottom|scroll_previous_highlight|"
"scroll_next_highlight"
" || swap [up|down|left|right]"
" || zoom"),
N_(" list: list opened windows (without argument, "
"this list is displayed)\n"
@ -5258,6 +5289,8 @@ command_init ()
"scroll_bottom: scroll to bottom of buffer\n"
"scroll_previous_highlight: scroll to previous highlight\n"
"scroll_next_highlight: scroll to next highlight\n"
" swap: swap buffers of two windows (with optional "
"direction for target window)\n"
" zoom: zoom on window\n\n"
"For splith and splitv, pct is a percentage which "
"represents size of new window, computed with current "
@ -5272,11 +5305,12 @@ command_init ()
" /window scroll -2d\n"
" 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_up|scroll|scroll_down|scroll_top|"
"scroll_bottom|scroll_previous_highlight|"
"scroll_next_highlight|zoom"
" || merge all",
"list || -1 || +1 || up || down || left || right"
" || splith || splitv || resize || 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);
}

View File

@ -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-s */ "meta-wmeta-s", "/window swap");
BIND(/* m-z */ "meta-z", "/window zoom");
BIND(/* m-= */ "meta-=", "/filter toggle");
BIND(/* m-0 */ "meta-0", "/buffer *10");

View File

@ -1954,6 +1954,63 @@ gui_window_switch_right (struct t_gui_window *window)
}
}
/*
* gui_window_swap: swap buffers of two windows
* direction can be: 0 = auto (swap with sister)
* 1 = window above
* 2 = window on the right
* 3 = window below
* 4 = window on the left
*/
void
gui_window_swap (struct t_gui_window *window, int direction)
{
struct t_gui_window_tree *parent, *sister;
struct t_gui_window *window2, *ptr_win;
struct t_gui_buffer *buffer1;
if (!window || !gui_ok)
return;
window2 = NULL;
if (direction == 0)
{
/* search sister window */
parent = window->ptr_tree->parent_node;
if (parent)
{
sister = (parent->child1->window == window) ?
parent->child2 : parent->child1;
if (sister->window)
window2 = sister->window;
}
}
else
{
/* search window using direction */
for (ptr_win = gui_windows; ptr_win;
ptr_win = ptr_win->next_window)
{
if ((ptr_win != window) &&
(gui_window_side_by_side (window, ptr_win) == direction))
{
window2 = ptr_win;
break;
}
}
}
/* let's swap! */
if (window2 && (window->buffer != window2->buffer))
{
buffer1 = window->buffer;
gui_window_switch_to_buffer (window, window2->buffer, 0);
gui_window_switch_to_buffer (window2, buffer1, 0);
}
}
/*
* gui_window_refresh_screen: called when term size is modified
* full_refresh == 1 when Ctrl+L is pressed,

View File

@ -791,6 +791,24 @@ gui_window_switch_right (struct t_gui_window *window)
}
}
/*
* gui_window_swap: swap buffer of two windows
* direction can be: 0 = auto (swap with sister)
* 1 = window above
* 2 = window on the right
* 3 = window below
* 4 = window on the left
*/
void
gui_window_swap (struct t_gui_window *window, int direction)
{
(void) window;
(void) direction;
/* TODO: write this function for Gtk */
}
/*
* gui_window_refresh_screen: called when term size is modified
*/

View File

@ -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 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);
extern void gui_window_term_display_infos ();