core: add mouse support (task #5435), free cursor movement, hook_focus, fix bugs with key "^" (bug #32072, bug #21381), fix bugs with bar windows, completion and /buffer

New features and bugs fixed:
- mouse support: new command /mouse, new option weechat.look.mouse, new key context "mouse"
- free movement of cursor: new command /cursor, new key context "cursor"
- new hook_focus (used by cursor and mouse)
- info "cursor_mode"
- bugs fixed with key "^"
- allow plugin name in /buffer name
- fix bugs with bar windows: do not create bar windows for hidden bars
- fix completion bug when two words for completion are equal but with different case
- automatic scroll direction in /bar scroll (x/y is now optional)
v2.8-utf8proc
Sebastien Helleu 2011-07-26 18:50:29 +02:00
parent 2fec843144
commit e0781f0390
97 changed files with 6338 additions and 1376 deletions

View File

@ -1,12 +1,24 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.6-dev, 2011-07-18
v0.3.6-dev, 2011-07-26
Version 0.3.6 (under dev!)
--------------------------
* core: add support of mouse: new command /mouse, new option weechat.look.mouse
and new key context "mouse" (task #5435)
* core: add command /cursor (free movement of cursor on screen), with key
context "search"
* core: automatic scroll direction in /bar scroll (x/y is now optional)
* core: add optional delay for key grab (commands /input grab_key and
/input grab_key_command, default is 500 milliseconds)
* core: fix bugs with key "^" (bug #32072, bug #21381)
* core: allow plugin name in command /buffer name
* core: fix bugs with bar windows: do not create bar windows for hidden bars
* core: fix completion bug when two words for completion are equal but with
different case
* core: fix completion for command arguments when same command exists in many
plugins (bug #33753)
* core: add context "search" for keys (to define keys used during search in
@ -22,11 +34,12 @@ Version 0.3.6 (under dev!)
* core: add options "infolists", "hdata" and "tags" for command /debug
* core: add horizontal scrolling for buffers with free content (command
/window scroll_horiz) (task #11112)
* api: add new functions hdata_new, hdata_new_var, hdata_new_list, hdata_get,
hdata_get_var_offset, hdata_get_var_type, hdata_get_var_type_string,
hdata_get_var_hdata, hdata_get_var, hdata_get_var_at_offset, hdata_get_list,
hdata_move, hdata_integer, hdata_string, hdata_pointer, hdata_time,
hdata_get_string
* api: add info "cursor_mode"
* api: add new functions hook_focus, hdata_new, hdata_new_var, hdata_new_list,
hdata_get, hdata_get_var_offset, hdata_get_var_type,
hdata_get_var_type_string, hdata_get_var_hdata, hdata_get_var,
hdata_get_var_at_offset, hdata_get_list, hdata_move, hdata_integer,
hdata_string, hdata_pointer, hdata_time, hdata_get_string
* api: fix bug with function config_set_desc_plugin (use immediately
description for option when function is called)
* irc: fix crash when malformed IRC message 352 (WHO) is received (bug #33790)

View File

@ -78,6 +78,8 @@
| weechat | config_options | Konfigurationsoptionen
| weechat | cursor_areas | areas ("chat" or bar name) for free cursor movement
| weechat | filename | Dateinamen
| weechat | filters_names | Liste der Filter
@ -90,7 +92,7 @@
| weechat | keys_codes_for_reset | Tastenbelegungen die zurückgesetzt werden können (hinzugefügte/verändert/gelöschte Tastenbelegungen)
| weechat | keys_contexts | key contexts
| weechat | keys_contexts | Tastaturkontext
| weechat | nicks | Nicks in Nickliste des aktuellen Buffers

View File

@ -175,7 +175,10 @@
'items_count' (integer) +
'items_subcount' (pointer) +
'items_array' (pointer) +
'bar_window' (pointer) +
'items_prefix' (pointer) +
'items_name' (pointer) +
'items_suffix' (pointer) +
'bar_window' (pointer, hdata: 'bar_window') +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
@ -192,6 +195,30 @@
'gui_bar_items' +
'last_gui_bar_item'
| weechat | bar_window | bar window |
'bar' (pointer, hdata: 'bar') +
'x' (integer) +
'y' (integer) +
'width' (integer) +
'height' (integer) +
'scroll_x' (integer) +
'scroll_y' (integer) +
'cursor_x' (integer) +
'cursor_y' (integer) +
'current_size' (integer) +
'items_count' (integer) +
'items_subcount' (pointer) +
'items_content' (pointer) +
'items_num_lines' (pointer) +
'items_refresh_needed' (pointer) +
'screen_col_size' (integer) +
'coords_count' (integer) +
'coords' (pointer) +
'gui_objects' (pointer) +
'prev_bar_window' (pointer, hdata: 'bar_window') +
'next_bar_window' (pointer, hdata: 'bar_window') |
-
| weechat | buffer | Buffer |
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
@ -383,9 +410,21 @@
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_default_keys_cursor' +
'gui_default_keys_mouse' +
'gui_default_keys_search' +
'gui_keys' +
'gui_keys_cursor' +
'gui_keys_mouse' +
'gui_keys_search' +
'last_gui_default_key' +
'last_gui_key'
'last_gui_default_key_cursor' +
'last_gui_default_key_mouse' +
'last_gui_default_key_search' +
'last_gui_key' +
'last_gui_key_cursor' +
'last_gui_key_mouse' +
'last_gui_key_search'
| weechat | line | Struktur mit einer Zeile |
'data' (pointer, hdata: 'line_data') +
@ -445,7 +484,7 @@
'next_group' (pointer, hdata: 'nick_group') |
-
| weechat | plugin | plugin |
| weechat | plugin | Erweiterung |
'filename' (string) +
'handle' (pointer) +
'name' (string) +
@ -473,8 +512,8 @@
'win_chat_height' (integer) +
'win_chat_cursor_x' (integer) +
'win_chat_cursor_y' (integer) +
'bar_windows' (pointer) +
'last_bar_window' (pointer) +
'bar_windows' (pointer, hdata: 'bar_window') +
'last_bar_window' (pointer, hdata: 'bar_window') +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer, hdata: 'buffer') +

View File

@ -48,7 +48,7 @@
| weechat | hotlist | Liste der Buffer in Hotlist | - | -
| weechat | key | Auflistung der Tastenzuweisungen | - | context ("default" or "search") (optional)
| weechat | key | Auflistung der Tastenzuweisungen | - | Kontext ("default" oder "search") (optional)
| weechat | nicklist | Nicks in Nickliste für einen Buffer | Buffer Pointer | nick_xxx oder group_xxx um nur den Nick/Group xxx abzufragen (optional)

View File

@ -28,6 +28,8 @@
| weechat | charset_terminal | Terminal Zeichensatz | -
| weechat | cursor_mode | 1 if cursor mode is enabled | -
| weechat | date | Datum der WeeChat Kompilierung | -
| weechat | dir_separator | Verzeichnis-Trennzeichen | -

View File

@ -194,12 +194,12 @@
** Werte: current, server (Standardwert: `current`)
* *irc.look.new_channel_position*
** Beschreibung: `Ein öffentlicher Channel wird auf eine Position gezwungen (none = standardmäßige Position (sollte die letzte Position sein), next = aktueller Buffer + 1, near_server = nach letztem Channel/privaten Buffer des Servers)`
** Beschreibung: `Ein neu geöffneter Channel wird auf eine Position gezwungen (none = standardmäßige Position (sollte der letzte Buffer in der Liste sein), next = aktueller Buffer + 1, near_server = nach dem letztem Channel/privaten Buffer des jeweiligen Servers)`
** Typ: integer
** Werte: none, next, near_server (Standardwert: `none`)
* *irc.look.new_pv_position*
** Beschreibung: `Ein privater Buffer wird auf eine Position gezwungen (none = standardmäßige Position (sollte die letzte Position sein), next = aktueller Buffer + 1, near_server = nach letztem Channel/privaten Buffer des Servers)`
** Beschreibung: `Ein neuer privater Buffer wird auf eine Position gezwungen (none = standardmäßige Position (sollte der letzte Buffer in der Liste sein), next = aktueller Buffer + 1, near_server = nach dem letztem Channel/privaten Buffer des jeweiligen Servers)`
** Typ: integer
** Werte: none, next, near_server (Standardwert: `none`)

View File

@ -16,44 +16,44 @@ message: Abwesenheitsnachricht (ohne eine Nachricht wird der Abwesenheitszustand
hide|show|toggle <name>
scroll <name> <buffer> <scroll_value>
list: listet alle Infobars auf
listfull: listet alle Infobars detailliert auf (Standardaufruf)
listitems: listet alle Items auf, die in den Infobars genutzt werden
add: füge eine neue Infobar hinzu
name: Name der Infobar (muss einmalig sein)
type: root: außerhalb des Fensters,
window: innerhalb des Fensters, mit optionalen Merkmalen (siehe unten)
cond1,...: Merkmal(e) für eine Infobar (nur nutzbar mit der Type-Option "window"):
active: in einem aktiven Fenster
inactive: in einem inaktiven Fenster
nicklist: in Fenstern mit einer Nickliste
werden keine Merkmale angegeben, ist die Infobar immer sichtbar
position: bottom (unten), top (oben), left (links) oder right (rechts)
size: Größe der Infobar (in Zeichen)
separator: 1 um eine Trennlinien zu zeichnen, bei 0 oder ohne eine Angabe wird keine Trennlinien gezeichnet
item1,...: Items die in der Infobar genutzt werden sollen (Items können durch Kommata oder Leerzeichen getrennt werden ("+" (verbindet Items))
default: erstellt standardisierte Infobars
del: entfernt eine Infobar (alle Infobars können mit der Option "-all" entfernt werden).
set: setzt einen Wert für Infobar
option: Optionen die geändert werden (für eine List der möglichen Optionen, bitte folgenden Befehl nutzen: /set weechat.bar.<barname>.*)
value: neuer Wert für Option
hide: Infobar wird ausgeblendet
show: zeigt eine ausgeblendete Infobar an
toggle: zeigt/versteckt eine Infobar
scroll: scrollt Infobar hoch/runter
buffer: Name des Buffer der gescrollt werden soll ('*' für aktuellen Buffer, man sollte '*' für root-Infobars nutzen)
scroll_value: Werte für Scroll-Funktion: 'x' oder 'y', gefolgt von '+', '-', 'b' (Beginn) oder 'e' (Ende), Wert (für +/-), und Optional %% (zum scrollen für %% der Breite/Höhe, ansonsten wird der Wert als Anzahl der Zeichen interpretiert um die gescrollt werden soll)
list: list all bars
listfull: list all bars (verbose)
listitems: list all bar items
add: add a new bar
name: name of bar (must be unique)
type: root: outside windows,
window: inside windows, with optional conditions (see below)
cond1,...: condition(s) for displaying bar (only for type "window"):
active: on active window
inactive: on inactive windows
nicklist: on windows with nicklist
without condition, bar is always displayed
position: bottom, top, left or right
size: size of bar (in chars)
separator: 1 for using separator (line), 0 or nothing means no separator
item1,...: items for this bar (items can be separated by comma (space between items) or "+" (glued items))
default: create a default bar (all default bars if no bar name is given)
del: delete a bar (or all bars with -all)
set: set a value for a bar property
option: option to change (for options list, look at /set weechat.bar.<barname>.*)
value: new value for option
hide: hide a bar
show: show an hidden bar
toggle: hide/show a bar
scroll: scroll bar
buffer: name of buffer to scroll ('*' means current buffer, you should use '*' for root bars)
scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', '-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to scroll by % of width/height, otherwise value is number of chars)
Beispiele:
erstellt eine Infobar mit den Items: time, buffer number + name, und Vervollständigung:
Examples:
create a bar with time, buffer number + name, and completion:
/bar add mybar root bottom 1 0 [time],buffer_number+:+buffer_name,completion
versteckt die Infobar (meinebar):
/bar hide meinebar
scrollt die Nickliste im aktuellen Buffer um 10 Zeilen nach unten:
hide a bar:
/bar hide mybar
scroll nicklist 10 lines down on current buffer:
/bar scroll nicklist * y+10
scrollt die Nickliste im Buffer #weechat eine ganze Seite nach oben:
scroll nicklist one page up on #weechat buffer:
/bar scroll nicklist #weechat y-100%
scrollt zum Ende der Nicklist im aktuellen Buffer:
scroll to end of nicklist on current buffer:
/bar scroll nicklist * ye
........................................
@ -140,12 +140,33 @@ Erweiterung: Name der Erweiterung ('weechat' für interne WeeChat Befehle)
Befehl: auszuführender Befehl (es wird automatisch ein '/' vorangestellt, falls dieser nicht angegeben wurde)
........................................
[command]*`cursor`* free movement of cursor on screen to execute actions on specific areas of screen::
........................................
/cursor go chat|<bar>|<x>,<y>
move up|down|left|right|area_up|area_down|area_left|area_right
stop
go: move cursor to chat area, a bar (using bar name) or coordinates "x,y"
move: move cursor with direction
stop: stop cursor mode
Without argument, this command toggles cursor mode.
When mouse is enabled (see /help mouse), by default a middle click will start cursor mode at this point.
Examples:
go to nicklist:
/cursor go nicklist
go to coordinates x=10, y=5:
/cursor go 10,5
........................................
[command]*`debug`* Debug-Kontrolle für Hauptprogramm und/oder Erweiterung::
........................................
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|color|infolists|memory|tags|term|windows
buffer|color|cursor|infolists|memory|mouse|tags|term|windows
hdata [free]
list: list plugins with debug levels
@ -155,9 +176,11 @@ Erweiterung: Name der Erweiterung ('weechat' für interne WeeChat Befehle)
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
cursor: toggle debug for cursor mode
hdata: display infos about hdata (with free: remove all hdata in memory)
infolists: display infos about infolists
memory: display infos about memory usage
mouse: toggle debug for mouse
tags: display tags for lines
term: display infos about terminal
windows: display windows tree
@ -279,8 +302,8 @@ list of actions:
jump_previously_visited_buffer: jump to previously visited buffer
jump_next_visited_buffer: jump to next visited buffer
hotlist_clear: clear hotlist
grab_key: grab a key
grab_key_command: grab a key with its associated command
grab_key: grab a key (optional argument: delay for end of grab, default is 500 milliseconds)
grab_key_command: grab a key with its associated command (optional argument: delay for end of grab, default is 500 milliseconds)
scroll_unread: scroll to unread marker
set_unread: set unread marker for all buffers
set_unread_current_buffer: set unread marker for current buffer
@ -318,6 +341,14 @@ listdefault: list default keys
When binding a command to a key, it is recommended to use key alt+k (or Esc then k), and then press the key to bind: this will insert key code in command line.
For context "mouse" (possible in context "cursor" too), key has format: "@area:key" where area can be:
*: any area on screen
chat: chat area
bar(*): any bar
bar(xxx): bar "xxx"
item(*): any bar item
item(xxx): bar item "xxx"
Examples:
key alt-x to toggle nicklist bar:
/key bind meta-x /bar toggle nicklist
@ -327,6 +358,8 @@ Examples:
/key reset meta-r
key "tab" to stop search in buffer:
/key bindctxt search ctrl-I /input search_stop
middle button of mouse on a nick to retrieve info on nick:
/key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick}
........................................
[command]*`layout`* Layout für Buffer und Fenster speichern, anwenden oder zurücksetzen::
@ -344,6 +377,25 @@ windows: speichert/verwendet nur Fenster (Buffer welche im jeweiligen Fenster da
Wird der Befehl ohne Argumente aufgerufen wird das gespeicherte Layout dargestellt.
........................................
[command]*`mouse`* mouse control::
........................................
/mouse enable|disable|toggle [<delay>]
enable: enable mouse
disable: disable mouse
toggle: toggle mouse
delay: delay (in seconds) after which initial mouse state is restored (useful to temporarily disable mouse)
To enable/disable mouse at startup, use:
/set weechat.look.mouse on/off
Examples:
enable mouse:
/mouse enable
toggle mouse for 5 seconds:
/mouse toggle 5
........................................
[command]*`mute`* Führt einen Befehl ohne Textausgabe aus::
........................................
/mute [-current | -buffer <name> | -all] command

View File

@ -364,7 +364,7 @@
** Werte: beliebige Zeichenkette (Standardwert: `"%a, %d %b %Y"`)
* *weechat.look.eat_newline_glitch*
** Beschreibung: `wird diese Option aktiviert, dann wird /"eat_newline_glitch/" auf 0 gesetzt; dies wird genutzt um keinen Zeilenumbruch am Ende einer Zeile `
** Beschreibung: `aktiviert man diese Option, dann wird "eat_newline_glitch" auf 0 gesetzt; dies bedeutet, dass am Ende einer Zeile kein Zeilenumbruch angehangen wird und somit der Text beim kopieren aus WeeChat und beim einfügen in einer anderen Applikation nicht umgebrochen wird (diese Option ist standardmäßig deaktiviert, da es zu schwerwiegenden Grafikfehlern kommen kann)`
** Typ: boolesch
** Werte: on, off (Standardwert: `off`)
@ -473,6 +473,11 @@
** Typ: boolesch
** Werte: on, off (Standardwert: `on`)
* *weechat.look.mouse*
** Beschreibung: `enable mouse support at startup (to enable it now, see /help mouse)`
** Typ: boolesch
** Werte: on, off (Standardwert: `off`)
* *weechat.look.nickmode*
** Beschreibung: `Nickmode ((half)op/voice [@%+]) vor dem Nicknamen anzeigen`
** Typ: boolesch
@ -599,7 +604,7 @@
** Werte: beliebige Zeichenkette (Standardwert: `"-"`)
* *weechat.look.separator_vertical*
** Beschreibung: `char used to draw vertical separators around bars (empty value will draw a real line with ncurses), wide chars are NOT allowed here`
** Beschreibung: `Das angegebene Zeichen wird genutzt um damit die vertikale Linien zu zeichnen. Wird kein Zeichen angegeben zeichnet ncurses eine durchgezogene Linie. Wide Chars sind für diese Option NICHT erlaubt.`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)

View File

@ -411,20 +411,20 @@ Standard Tastenbelegung
Tastenbefehle für die Befehlszeile
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Taste | Beschreibung | Befehl
| @k(←) .2+| setzt den Cursor eine Position nach links .2+| /input move_previous_char
| @k(←) .2+| setzt den Cursor eine Position nach links .2+| /input move_previous_char
| @k(C-)@k(b)
| @k(→) .2+| setzt den Cursor eine Position nach rechts .2+| /input move_next_char
| @k(→) .2+| setzt den Cursor eine Position nach rechts .2+| /input move_next_char
| @k(C-)@k(f)
| @k(C-)@k(←) .2+| springt in der Befehlszeile zum Anfang des vorherigen Wortes .2+| /input move_previous_word
| @k(C-)@k(←) .2+| springt in der Befehlszeile zum Anfang des vorherigen Wortes .2+| /input move_previous_word
| @k(A-)@k(b)
| @k(C-)@k(→) .2+| springt in der Befehlszeile zum Anfang des nächsten Wortes .2+| /input move_next_word
| @k(C-)@k(→) .2+| springt in der Befehlszeile zum Anfang des nächsten Wortes .2+| /input move_next_word
| @k(A-)@k(f)
| @k(Home) .2+| springt zum Anfang der Befehlszeile .2+| /input move_beginning_of_line
| @k(Home) .2+| springt zum Anfang der Befehlszeile .2+| /input move_beginning_of_line
| @k(C-)@k(a)
| @k(End) .2+| springt ans Ende der Befehlszeile .2+| /input move_end_of_line
| @k(End) .2+| springt ans Ende der Befehlszeile .2+| /input move_end_of_line
| @k(C-)@k(e)
| @k(C-)@k(c) , @k(b) | fügt Steuerzeichen für fett geschrieben Text ein | /input insert \x02
| @k(C-)@k(c) , @k(c) | fügt Steuerzeichen für Textfarbe ein | /input insert \x03
@ -432,9 +432,9 @@ Tastenbefehle für die Befehlszeile
| @k(C-)@k(c) , @k(o) | fügt Steuerzeichen für Standardfarbe ein | /input insert \x0F
| @k(C-)@k(c) , @k(r) | fügt Steuerzeichen für Hintergrundfarbe ein | /input insert \x12
| @k(C-)@k(c) , @k(u) | fügt Steuerzeichen für unterstrichenen Text ein | /input insert \x15
| @k(Del) .2+| entfernt in der Befehlszeile das nächste Zeichen .2+| /input delete_next_char
| @k(Del) .2+| entfernt in der Befehlszeile das nächste Zeichen .2+| /input delete_next_char
| @k(C-)@k(d)
| @k(Backsp.) .2+| entfernt in der Befehlszeile das vorherige Zeichen .2+| /input delete_previous_char
| @k(Backsp.) .2+| entfernt in der Befehlszeile das vorherige Zeichen .2+| /input delete_previous_char
| @k(C-)@k(h)
| @k(C-)@k(k) | entfernt alle Zeichen vom Cursor bis zum Ende der Zeile (Zeichenkette wird in Zwischenablage kopiert) | /input delete_end_of_line
| @k(C-)@k(r) | Textsuche im Verlaufsspeicher des Buffers (siehe <<key_bindings_search_context,Tasten für Such-Kontext>>) | /input search_text
@ -446,7 +446,7 @@ Tastenbefehle für die Befehlszeile
| @k(A-)@k(_) | Wiederherstellen der letzten Aktion, in der Befehlszeile | /input redo
| @k(Tab) | Vervollständigung von Befehlen oder Nicks (nochmaliges @k(Tab): findet nächste Vervollständigung) | /input complete_next
| @k(S-)@k(Tab) | ohne Vervollständigung: führt eine teilweise Vervollständigung durch. Bei unerledigter Vervollständigung : wird die vorherige Vervollständigung genutzt | /input complete_previous
| @k(Enter) .3+| führt einen Befehl aus oder sendet den Text (im Such-Modus: stoppt Suche) .3+| /input return
| @k(Enter) .3+| führt einen Befehl aus oder sendet den Text (im Such-Modus: stoppt Suche) .3+| /input return
| @k(C-)@k(j)
| @k(C-)@k(m)
| @k(↑) | ruft vorherigen Befehl oder Nachricht aus dem Verlaufsspeicher auf (im Such-Modus: rückwärts suchen) | /input history_previous
@ -462,7 +462,7 @@ Tastenbefehle für die Befehlszeile
Tastenbefehle für Buffer / Fenster
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Taste | Beschreibung | Befehl
| @k(C-)@k(l) | Fenster wird neu gezeichnet | /window refresh
@ -474,23 +474,24 @@ Tastenbefehle für Buffer / Fenster
| @k(A-)@k(PgDn) | einige Zeilen im Verlaufsspeicher des Buffer nach unten blättern | /window scroll_down
| @k(A-)@k(Home) | springt zur ersten Zeile des Verlaufsspeichers des aktuellen Buffers| /window scroll_top
| @k(A-)@k(End) | springt zur letzten Zeile des Verlaufsspeichers des aktuellen Buffers | /window scroll_bottom
| @k(A-)@k(←) .4+| zum vorherigen Buffer springen .4+| /buffer -1
| @k(A-)@k(←) .4+| zum vorherigen Buffer springen .4+| /buffer -1
| @k(A-)@k(↑)
| @k(C-)@k(p)
| @k(F5)
| @k(A-)@k(→) .4+| zum nächsten Buffer springen .4+| /buffer +1
| @k(A-)@k(→) .4+| zum nächsten Buffer springen .4+| /buffer +1
| @k(A-)@k(↓)
| @k(C-)@k(n)
| @k(F6)
| @k(F7) | zum vorherigen Fenster wechseln | /window -1
| @k(F8) | zum nächsten Fenster wechseln | /window +1
| @k(F9) | Titel des Buffers nach links verschieben | /bar scroll title * x-50%
| @k(F10) | Titel des Buffers nach rechts verschieben | /bar scroll title * x+50%
| @k(F11) | Nickliste um eine Seite nach oben blättern | /bar scroll nicklist * y-100%
| @k(F12) | Nickliste um eine Seite nach unten blättern | /bar scroll nicklist * y+100%
| @k(A-)@k(F11) | springt zum Anfang der Nickliste | /bar scroll nicklist * yb
| @k(A-)@k(F12) | springt zum Ende der Nickliste | /bar scroll nicklist * ye
| @k(F9) | Titel des Buffers nach links verschieben | /bar scroll title * -30%
| @k(F10) | Titel des Buffers nach rechts verschieben | /bar scroll title * +30%
| @k(F11) | Nickliste um eine Seite nach oben blättern | /bar scroll nicklist * -100%
| @k(F12) | Nickliste um eine Seite nach unten blättern | /bar scroll nicklist * +100%
| @k(A-)@k(F11) | springt zum Anfang der Nickliste | /bar scroll nicklist * b
| @k(A-)@k(F12) | springt zum Ende der Nickliste | /bar scroll nicklist * e
| @k(A-)@k(a) | wechselt zum nächsten Buffer mit Aktivität (nach Priorität: highlight, Nachricht, ...) | /input jump_smart
| @k(A-)@k(h) | löscht Hotliste (Aktivitätsanzeige für die Buffer) | /input hotlist_clear
| @k(A-)@k(j) , @k(A-)@k(l) | wechselt zum letzten Buffer | /input jump_last_buffer
| @k(A-)@k(j) , @k(A-)@k(r) | wechselt zum IRC RAW Buffer | /server raw
| @k(A-)@k(j) , @k(A-)@k(s) | wechselt zum IRC Server Buffer | /server jump
@ -508,6 +509,7 @@ Tastenbefehle für Buffer / Fenster
| @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
| @k(A-)@k(=) | schaltet Filterfunktion an/aus | /filter toggle
|========================================
[[key_bindings_search_context]]
@ -517,26 +519,73 @@ Tasten für "Suchen"-Kontext
Diese Tasten werden im Kontext "search" verwendet (wenn @k(C-)@k(r) genutzt wird um
in einem Buffer nach einem Text zu suchen).
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Taste | Beschreibung | Befehl
| @k(C-)@k(r) | auf Groß-/Kleinschreibung umschalten | /input search_switch_case
| @k(↑) | sucht vorheriger Zeile | /input search_previous
| @k(↓) | sucht nächste Zeile | /input search_next
| @k(Enter) .3+| Suche abbrechen .3+| /input search_stop
| Taste | Beschreibung | Befehl
| @k(C-)@k(r) | auf Groß-/Kleinschreibung umschalten | /input search_switch_case
| @k(↑) | sucht vorheriger Zeile | /input search_previous
| @k(↓) | sucht nächste Zeile | /input search_next
| @k(Enter) .3+| Suche abbrechen .3+| /input search_stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
[[key_bindings_other]]
andere Tastenbefehle
^^^^^^^^^^^^^^^^^^^^
// TRANSLATION MISSING
[[key_bindings_cursor_context]]
Keys for "cursor" context
^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
These keys are used in context "cursor" (free movement of cursor on screen).
[width="100%",cols="^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Taste | Beschreibung | Befehl
| @k(A-)@k(h) | löscht Hotliste (Aktivitätsanzeige für die Buffer) | /input hotlist_clear
| @k(A-)@k(=) | schaltet Filterfunktion an/aus | /filter toggle
| Key | Area | Description | Command
| @k(↑) | - | Move cursor one line up | /cursor move up
| @k(↓) | - | Move cursor one line down | /cursor move down
| @k(←) | - | Move cursor one column left | /cursor move left
| @k(→) | - | Move cursor one column right | /cursor move right
| @k(A-)@k(↑) | - | Move cursor one area up | /cursor move area_up
| @k(A-)@k(↓) | - | Move cursor one area down | /cursor move area_down
| @k(A-)@k(←) | - | Move cursor one area left | /cursor move area_left
| @k(A-)@k(→) | - | Move cursor one area right | /cursor move area_right
| @k(b) | nicklist | Ban nick | /ban ${nick}
| @k(k) | nicklist | Kick nick | /kick ${nick}
| @k(K) | nicklist | Kick and ban nick | /kickban ${nick}
| @k(q) | nicklist | Open query with nick | /query ${nick};/cursor stop
| @k(w) | nicklist | Do a whois on nick | /whois ${nick}
| @k(Enter) .3+| - .3+| Stop cursor mode .3+| /cursor stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
// TRANSLATION MISSING
[[key_bindings_mouse_context]]
Keys for "mouse" context
^^^^^^^^^^^^^^^^^^^^^^^^
These keys are used in context "mouse", namely when a mouse event occurs.
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Button | Gesture | Area | Description | Command
| ◾◽◽ | left | chat | zum vorherigen Buffer springen | /buffer +1
| ◾◽◽ | right | chat | zum nächsten Buffer springen | /buffer +1
| ◾◽◽ | left (long) | chat | Switch to first buffer | /buffer 1
| ◾◽◽ | right (long) | chat | wechselt zum letzten Buffer | /input jump_last_buffer
| wheel ⇑ | - | chat | einige Zeilen im Verlaufsspeicher des Buffer nach oben blättern | /window scroll_up
| wheel ⇓ | - | chat | einige Zeilen im Verlaufsspeicher des Buffer nach unten blättern | /window scroll_down
| ◾◽◽ | up | nicklist | Nickliste um eine Seite nach oben blättern | /bar scroll nicklist * -100%
| ◾◽◽ | down | nicklist | Nickliste um eine Seite nach unten blättern | /bar scroll nicklist * +100%
| ◾◽◽ | up (long) | nicklist | springt zum Anfang der Nickliste | /bar scroll nicklist * b
| ◾◽◽ | down (long) | nicklist | springt zum Ende der Nickliste | /bar scroll nicklist * e
| ◾◽◽ | - | nicklist | Open query with nick | /query ${nick}
| ◽◽◾ | - | nicklist | Do a whois on nick | /whois ${nick}
| ◾◽◽ | left | nicklist | Kick nick | /kick ${nick}
| ◾◽◽ | left (long) | nicklist | Kick and ban nick | /kickban ${nick}
| ◽◽◾ | left | nicklist | Ban nick | /ban ${nick}
| wheel ⇑ | - | any bar | Scroll bar by -10% | /bar scroll ${_bar_name} * -10%
| wheel ⇓ | - | any bar | Scroll bar by +10% | /bar scroll ${_bar_name} * +10%
| ◽◾◽ | - | anywhere | Start cursor mode at this point | /cursor go ${_x},${_y}
|========================================
[[command_line]]

View File

@ -78,6 +78,8 @@
| weechat | config_options | configuration options
| weechat | cursor_areas | areas ("chat" or bar name) for free cursor movement
| weechat | filename | filename
| weechat | filters_names | names of filters

View File

@ -175,7 +175,10 @@
'items_count' (integer) +
'items_subcount' (pointer) +
'items_array' (pointer) +
'bar_window' (pointer) +
'items_prefix' (pointer) +
'items_name' (pointer) +
'items_suffix' (pointer) +
'bar_window' (pointer, hdata: 'bar_window') +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
@ -192,6 +195,30 @@
'gui_bar_items' +
'last_gui_bar_item'
| weechat | bar_window | bar window |
'bar' (pointer, hdata: 'bar') +
'x' (integer) +
'y' (integer) +
'width' (integer) +
'height' (integer) +
'scroll_x' (integer) +
'scroll_y' (integer) +
'cursor_x' (integer) +
'cursor_y' (integer) +
'current_size' (integer) +
'items_count' (integer) +
'items_subcount' (pointer) +
'items_content' (pointer) +
'items_num_lines' (pointer) +
'items_refresh_needed' (pointer) +
'screen_col_size' (integer) +
'coords_count' (integer) +
'coords' (pointer) +
'gui_objects' (pointer) +
'prev_bar_window' (pointer, hdata: 'bar_window') +
'next_bar_window' (pointer, hdata: 'bar_window') |
-
| weechat | buffer | buffer |
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
@ -383,9 +410,21 @@
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_default_keys_cursor' +
'gui_default_keys_mouse' +
'gui_default_keys_search' +
'gui_keys' +
'gui_keys_cursor' +
'gui_keys_mouse' +
'gui_keys_search' +
'last_gui_default_key' +
'last_gui_key'
'last_gui_default_key_cursor' +
'last_gui_default_key_mouse' +
'last_gui_default_key_search' +
'last_gui_key' +
'last_gui_key_cursor' +
'last_gui_key_mouse' +
'last_gui_key_search'
| weechat | line | structure with one line |
'data' (pointer, hdata: 'line_data') +
@ -473,8 +512,8 @@
'win_chat_height' (integer) +
'win_chat_cursor_x' (integer) +
'win_chat_cursor_y' (integer) +
'bar_windows' (pointer) +
'last_bar_window' (pointer) +
'bar_windows' (pointer, hdata: 'bar_window') +
'last_bar_window' (pointer, hdata: 'bar_window') +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer, hdata: 'buffer') +

View File

@ -28,6 +28,8 @@
| weechat | charset_terminal | terminal charset | -
| weechat | cursor_mode | 1 if cursor mode is enabled | -
| weechat | date | WeeChat compilation date | -
| weechat | dir_separator | directory separator | -

View File

@ -42,7 +42,7 @@ message: message for away (if no message is given, away status is removed)
toggle: hide/show a bar
scroll: scroll bar
buffer: name of buffer to scroll ('*' means current buffer, you should use '*' for root bars)
scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', 'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by %% of width/height, otherwise value is number of chars)
scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', '-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to scroll by % of width/height, otherwise value is number of chars)
Examples:
create a bar with time, buffer number + name, and completion:
@ -140,12 +140,33 @@ Examples:
command: command to execute (a '/' is automatically added if not found at beginning of command)
........................................
[command]*`cursor`* free movement of cursor on screen to execute actions on specific areas of screen::
........................................
/cursor go chat|<bar>|<x>,<y>
move up|down|left|right|area_up|area_down|area_left|area_right
stop
go: move cursor to chat area, a bar (using bar name) or coordinates "x,y"
move: move cursor with direction
stop: stop cursor mode
Without argument, this command toggles cursor mode.
When mouse is enabled (see /help mouse), by default a middle click will start cursor mode at this point.
Examples:
go to nicklist:
/cursor go nicklist
go to coordinates x=10, y=5:
/cursor go 10,5
........................................
[command]*`debug`* control debug for core/plugins::
........................................
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|color|infolists|memory|tags|term|windows
buffer|color|cursor|infolists|memory|mouse|tags|term|windows
hdata [free]
list: list plugins with debug levels
@ -155,9 +176,11 @@ command: command to execute (a '/' is automatically added if not found at beginn
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
cursor: toggle debug for cursor mode
hdata: display infos about hdata (with free: remove all hdata in memory)
infolists: display infos about infolists
memory: display infos about memory usage
mouse: toggle debug for mouse
tags: display tags for lines
term: display infos about terminal
windows: display windows tree
@ -279,8 +302,8 @@ list of actions:
jump_previously_visited_buffer: jump to previously visited buffer
jump_next_visited_buffer: jump to next visited buffer
hotlist_clear: clear hotlist
grab_key: grab a key
grab_key_command: grab a key with its associated command
grab_key: grab a key (optional argument: delay for end of grab, default is 500 milliseconds)
grab_key_command: grab a key with its associated command (optional argument: delay for end of grab, default is 500 milliseconds)
scroll_unread: scroll to unread marker
set_unread: set unread marker for all buffers
set_unread_current_buffer: set unread marker for current buffer
@ -318,6 +341,14 @@ listdefault: list default keys
When binding a command to a key, it is recommended to use key alt+k (or Esc then k), and then press the key to bind: this will insert key code in command line.
For context "mouse" (possible in context "cursor" too), key has format: "@area:key" where area can be:
*: any area on screen
chat: chat area
bar(*): any bar
bar(xxx): bar "xxx"
item(*): any bar item
item(xxx): bar item "xxx"
Examples:
key alt-x to toggle nicklist bar:
/key bind meta-x /bar toggle nicklist
@ -327,6 +358,8 @@ Examples:
/key reset meta-r
key "tab" to stop search in buffer:
/key bindctxt search ctrl-I /input search_stop
middle button of mouse on a nick to retrieve info on nick:
/key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick}
........................................
[command]*`layout`* save/apply/reset layout for buffers and windows::
@ -344,6 +377,25 @@ windows: save/apply only windows (buffer displayed by each window)
Without argument, this command displays saved layout.
........................................
[command]*`mouse`* mouse control::
........................................
/mouse enable|disable|toggle [<delay>]
enable: enable mouse
disable: disable mouse
toggle: toggle mouse
delay: delay (in seconds) after which initial mouse state is restored (useful to temporarily disable mouse)
To enable/disable mouse at startup, use:
/set weechat.look.mouse on/off
Examples:
enable mouse:
/mouse enable
toggle mouse for 5 seconds:
/mouse toggle 5
........................................
[command]*`mute`* execute a command silently::
........................................
/mute [-current | -buffer <name> | -all] command

View File

@ -473,6 +473,11 @@
** type: boolean
** values: on, off (default value: `on`)
* *weechat.look.mouse*
** description: `enable mouse support at startup (to enable it now, see /help mouse)`
** type: boolean
** values: on, off (default value: `off`)
* *weechat.look.nickmode*
** description: `display nick mode ((half)op/voice) before each nick`
** type: boolean

View File

@ -6042,7 +6042,7 @@ weechat_hook_modifier ("2000|input_text_display", &modifier_cb, NULL);
----------------------------------------
Following hook types allow priority: command, command_run, signal, hsignal,
config, completion, modifier, info, info_hashtable, infolist, hdata.
config, completion, modifier, info, info_hashtable, infolist, hdata, focus.
weechat_hook_command
^^^^^^^^^^^^^^^^^^^^
@ -8229,6 +8229,86 @@ struct t_hook *my_hdata = weechat_hook_hdata ("my_hdata",
[NOTE]
This function is not available in scripting API.
weechat_hook_focus
^^^^^^^^^^^^^^^^^^
Hook a focus: mouse event or key pressed in cursor mode (free movement of
cursor).
Prototype:
[source,C]
----------------------------------------
struct t_hook *weechat_hook_focus (const char *area,
struct t_hashtable *(*callback)(void *data,
struct t_hashtable *info),
void *callback_data);
----------------------------------------
Arguments:
* 'area': "chat" for chat area, or name of bar item
(priority allowed, see note about <<hook_priority,priority>>)
* 'callback': function called when focus is made, arguments and return
value:
** 'void *data': pointer
** 'struct t_hashtable *info': hashtable with info on focus and strings returned
by other calls to focus callbacks (with higher priority); keys and values
are of type "string"; info on focus (filled by WeeChat) are:
*** '_x': column of focus on screen (first column on the left is "0")
*** '_y': line of focus on screen (first line on top is "0")
*** '_window': pointer of window with focus ("0x0" for a bar of type "root"
or for unknown area)
*** '_bar_name': name of bar with focus (NULL for chat area or for unknown
area)
*** '_bar_item_name': name of bar item with focus (NULL if focus is not in a
bar or if focus is after the end of last bar item)
*** '_item_line': line with focus in bar item (first line of bar item is "0")
*** '_item_col': column with focus in bar item (first column of bar item is "0")
** return value: either "info" pointer (hashtable completed), or pointer to a
new hashtable (created by callback, with keys and values of type "string"),
this new hashtable content will be added to 'info' for other calls to focus
callbacks
* 'callback_data': pointer given to callback when it is called by WeeChat
Return value:
* pointer to new hook, NULL if error occured
C example:
[source,C]
----------------------------------------
struct t_hashtable *
my_focus_nicklist_cb (void *data, struct t_hashtable *info)
{
/* add strings in hashtable */
/* ... */
return info;
}
/* add focus on nicklist */
struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist",
&my_focus_nicklist_cb, NULL);
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototype
hook = weechat.hook_focus(area, callback, callback_data)
# example
def my_focus_nicklist_cb(data, info):
# build dict
# ...
return my_dict
hook = weechat.hook_focus("buffer_nicklist", "my_focus_nicklist_cb", "")
----------------------------------------
weechat_unhook
^^^^^^^^^^^^^^

View File

@ -412,20 +412,20 @@ Default key bindings
Keys for command line
^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Key | Description | Command
| @k(←) .2+| Go to previous char in command line .2+| /input move_previous_char
| @k(←) .2+| Go to previous char in command line .2+| /input move_previous_char
| @k(C-)@k(b)
| @k(→) .2+| Go to next char in command line .2+| /input move_next_char
| @k(→) .2+| Go to next char in command line .2+| /input move_next_char
| @k(C-)@k(f)
| @k(C-)@k(←) .2+| Go to previous word in command line .2+| /input move_previous_word
| @k(C-)@k(←) .2+| Go to previous word in command line .2+| /input move_previous_word
| @k(A-)@k(b)
| @k(C-)@k(→) .2+| Go to next word in command line .2+| /input move_next_word
| @k(C-)@k(→) .2+| Go to next word in command line .2+| /input move_next_word
| @k(A-)@k(f)
| @k(Home) .2+| Go to the beginning of command line .2+| /input move_beginning_of_line
| @k(Home) .2+| Go to the beginning of command line .2+| /input move_beginning_of_line
| @k(C-)@k(a)
| @k(End) .2+| Go to the end of command line .2+| /input move_end_of_line
| @k(End) .2+| Go to the end of command line .2+| /input move_end_of_line
| @k(C-)@k(e)
| @k(C-)@k(c) , @k(b) | Insert code for bold text | /input insert \x02
| @k(C-)@k(c) , @k(c) | Insert code for colored text | /input insert \x03
@ -433,9 +433,9 @@ Keys for command line
| @k(C-)@k(c) , @k(o) | Insert code for color reset | /input insert \x0F
| @k(C-)@k(c) , @k(r) | Insert code for reverse color | /input insert \x12
| @k(C-)@k(c) , @k(u) | Insert code for underlined text | /input insert \x15
| @k(Del) .2+| Delete next char in command line .2+| /input delete_next_char
| @k(Del) .2+| Delete next char in command line .2+| /input delete_next_char
| @k(C-)@k(d)
| @k(Backsp.) .2+| Delete previous char in command line .2+| /input delete_previous_char
| @k(Backsp.) .2+| Delete previous char in command line .2+| /input delete_previous_char
| @k(C-)@k(h)
| @k(C-)@k(k) | Delete from cursor until end of command line (deleted string is copied to clipboard) | /input delete_end_of_line
| @k(C-)@k(r) | Search for text in buffer history (see <<key_bindings_search_context,keys for search context>>) | /input search_text
@ -447,7 +447,7 @@ Keys for command line
| @k(A-)@k(_) | Redo last action on command line | /input redo
| @k(Tab) | Complete command or nick (@k(Tab) again: find next completion) | /input complete_next
| @k(S-)@k(Tab) | Without completion: do a partial completion, with pending completion: complete with previous completion | /input complete_previous
| @k(Enter) .3+| Execute command or send message (in search mode: stop search) .3+| /input return
| @k(Enter) .3+| Execute command or send message (in search mode: stop search) .3+| /input return
| @k(C-)@k(j)
| @k(C-)@k(m)
| @k(↑) | Call previous command/message (in search mode: search up) | /input history_previous
@ -463,7 +463,7 @@ Keys for command line
Keys for buffers / windows
^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Key | Description | Command
| @k(C-)@k(l) | Redraw whole window | /window refresh
@ -475,23 +475,24 @@ Keys for buffers / windows
| @k(A-)@k(PgDn) | Scroll down a few lines in buffer history | /window scroll_down
| @k(A-)@k(Home) | Scroll to top of buffer | /window scroll_top
| @k(A-)@k(End) | Scroll to bottom of buffer | /window scroll_bottom
| @k(A-)@k(←) .4+| Switch to previous buffer .4+| /buffer -1
| @k(A-)@k(←) .4+| Switch to previous buffer .4+| /buffer -1
| @k(A-)@k(↑)
| @k(C-)@k(p)
| @k(F5)
| @k(A-)@k(→) .4+| Switch to next buffer .4+| /buffer +1
| @k(A-)@k(→) .4+| Switch to next buffer .4+| /buffer +1
| @k(A-)@k(↓)
| @k(C-)@k(n)
| @k(F6)
| @k(F7) | Switch to previous window | /window -1
| @k(F8) | Switch to next window | /window +1
| @k(F9) | Scroll buffer's title on the left | /bar scroll title * x-50%
| @k(F10) | Scroll buffer's title on the right | /bar scroll title * x+50%
| @k(F11) | Scroll up one page in nicklist | /bar scroll nicklist * y-100%
| @k(F12) | Scroll down one page in nicklist | /bar scroll nicklist * y+100%
| @k(A-)@k(F11) | Go to the beginning of nicklist | /bar scroll nicklist * yb
| @k(A-)@k(F12) | Go to the end of nicklist | /bar scroll nicklist * ye
| @k(F9) | Scroll buffer's title on the left | /bar scroll title * -30%
| @k(F10) | Scroll buffer's title on the right | /bar scroll title * +30%
| @k(F11) | Scroll up one page in nicklist | /bar scroll nicklist * -100%
| @k(F12) | Scroll down one page in nicklist | /bar scroll nicklist * +100%
| @k(A-)@k(F11) | Go to the beginning of nicklist | /bar scroll nicklist * b
| @k(A-)@k(F12) | Go to the end of nicklist | /bar scroll nicklist * e
| @k(A-)@k(a) | Switch to next buffer with activity (with priority: highlight, message, other) | /input jump_smart
| @k(A-)@k(h) | Clear hotlist (activity notification on other buffers) | /input hotlist_clear
| @k(A-)@k(j) , @k(A-)@k(l) | Switch to last buffer | /input jump_last_buffer
| @k(A-)@k(j) , @k(A-)@k(r) | Switch to IRC raw buffer | /server raw
| @k(A-)@k(j) , @k(A-)@k(s) | Switch to IRC server buffer | /server jump
@ -509,6 +510,7 @@ Keys for buffers / windows
| @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
| @k(A-)@k(=) | Toggle filters on/off | /filter toggle
|========================================
[[key_bindings_search_context]]
@ -518,26 +520,71 @@ Keys for "search" context
These keys are used in context "search" (when @k(C-)@k(r) is pressed to search
text in buffer).
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Key | Description | Command
| @k(C-)@k(r) | Switch exact case for search | /input search_switch_case
| @k(↑) | Search previous line | /input search_previous
| @k(↓) | Search next line | /input search_next
| @k(Enter) .3+| Stop search .3+| /input search_stop
| Key | Description | Command
| @k(C-)@k(r) | Switch exact case for search | /input search_switch_case
| @k(↑) | Search previous line | /input search_previous
| @k(↓) | Search next line | /input search_next
| @k(Enter) .3+| Stop search .3+| /input search_stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
[[key_bindings_other]]
Other keys
^^^^^^^^^^
[[key_bindings_cursor_context]]
Keys for "cursor" context
^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
These keys are used in context "cursor" (free movement of cursor on screen).
[width="100%",cols="^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Key | Description | Command
| @k(A-)@k(h) | Clear hotlist (activity notification on other buffers) | /input hotlist_clear
| @k(A-)@k(=) | Toggle filters on/off | /filter toggle
| Key | Area | Description | Command
| @k(↑) | - | Move cursor one line up | /cursor move up
| @k(↓) | - | Move cursor one line down | /cursor move down
| @k(←) | - | Move cursor one column left | /cursor move left
| @k(→) | - | Move cursor one column right | /cursor move right
| @k(A-)@k(↑) | - | Move cursor one area up | /cursor move area_up
| @k(A-)@k(↓) | - | Move cursor one area down | /cursor move area_down
| @k(A-)@k(←) | - | Move cursor one area left | /cursor move area_left
| @k(A-)@k(→) | - | Move cursor one area right | /cursor move area_right
| @k(b) | nicklist | Ban nick | /ban ${nick}
| @k(k) | nicklist | Kick nick | /kick ${nick}
| @k(K) | nicklist | Kick and ban nick | /kickban ${nick}
| @k(q) | nicklist | Open query with nick | /query ${nick};/cursor stop
| @k(w) | nicklist | Do a whois on nick | /whois ${nick}
| @k(Enter) .3+| - .3+| Stop cursor mode .3+| /cursor stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
[[key_bindings_mouse_context]]
Keys for "mouse" context
^^^^^^^^^^^^^^^^^^^^^^^^
These keys are used in context "mouse", namely when a mouse event occurs.
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Button | Gesture | Area | Description | Command
| ◾◽◽ | left | chat | Switch to previous buffer | /buffer +1
| ◾◽◽ | right | chat | Switch to next buffer | /buffer +1
| ◾◽◽ | left (long) | chat | Switch to first buffer | /buffer 1
| ◾◽◽ | right (long) | chat | Switch to last buffer | /input jump_last_buffer
| wheel ⇑ | - | chat | Scroll up a few lines in buffer history | /window scroll_up
| wheel ⇓ | - | chat | Scroll down a few lines in buffer history | /window scroll_down
| ◾◽◽ | up | nicklist | Scroll up one page in nicklist | /bar scroll nicklist * -100%
| ◾◽◽ | down | nicklist | Scroll down one page in nicklist | /bar scroll nicklist * +100%
| ◾◽◽ | up (long) | nicklist | Go to the beginning of nicklist | /bar scroll nicklist * b
| ◾◽◽ | down (long) | nicklist | Go to the end of nicklist | /bar scroll nicklist * e
| ◾◽◽ | - | nicklist | Open query with nick | /query ${nick}
| ◽◽◾ | - | nicklist | Do a whois on nick | /whois ${nick}
| ◾◽◽ | left | nicklist | Kick nick | /kick ${nick}
| ◾◽◽ | left (long) | nicklist | Kick and ban nick | /kickban ${nick}
| ◽◽◾ | left | nicklist | Ban nick | /ban ${nick}
| wheel ⇑ | - | any bar | Scroll bar by -10% | /bar scroll ${_bar_name} * -10%
| wheel ⇓ | - | any bar | Scroll bar by +10% | /bar scroll ${_bar_name} * +10%
| ◽◾◽ | - | anywhere | Start cursor mode at this point | /cursor go ${_x},${_y}
|========================================
[[command_line]]

View File

@ -78,6 +78,8 @@
| weechat | config_options | options de configuration
| weechat | cursor_areas | zones ("chat" ou un nom de barre) pour le mouvement libre du curseur
| weechat | filename | nom de fichier
| weechat | filters_names | noms des filtres

View File

@ -175,7 +175,10 @@
'items_count' (integer) +
'items_subcount' (pointer) +
'items_array' (pointer) +
'bar_window' (pointer) +
'items_prefix' (pointer) +
'items_name' (pointer) +
'items_suffix' (pointer) +
'bar_window' (pointer, hdata: 'bar_window') +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
@ -192,6 +195,30 @@
'gui_bar_items' +
'last_gui_bar_item'
| weechat | bar_window | fenêtre de barre |
'bar' (pointer, hdata: 'bar') +
'x' (integer) +
'y' (integer) +
'width' (integer) +
'height' (integer) +
'scroll_x' (integer) +
'scroll_y' (integer) +
'cursor_x' (integer) +
'cursor_y' (integer) +
'current_size' (integer) +
'items_count' (integer) +
'items_subcount' (pointer) +
'items_content' (pointer) +
'items_num_lines' (pointer) +
'items_refresh_needed' (pointer) +
'screen_col_size' (integer) +
'coords_count' (integer) +
'coords' (pointer) +
'gui_objects' (pointer) +
'prev_bar_window' (pointer, hdata: 'bar_window') +
'next_bar_window' (pointer, hdata: 'bar_window') |
-
| weechat | buffer | tampon |
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
@ -383,9 +410,21 @@
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_default_keys_cursor' +
'gui_default_keys_mouse' +
'gui_default_keys_search' +
'gui_keys' +
'gui_keys_cursor' +
'gui_keys_mouse' +
'gui_keys_search' +
'last_gui_default_key' +
'last_gui_key'
'last_gui_default_key_cursor' +
'last_gui_default_key_mouse' +
'last_gui_default_key_search' +
'last_gui_key' +
'last_gui_key_cursor' +
'last_gui_key_mouse' +
'last_gui_key_search'
| weechat | line | structure avec une ligne |
'data' (pointer, hdata: 'line_data') +
@ -473,8 +512,8 @@
'win_chat_height' (integer) +
'win_chat_cursor_x' (integer) +
'win_chat_cursor_y' (integer) +
'bar_windows' (pointer) +
'last_bar_window' (pointer) +
'bar_windows' (pointer, hdata: 'bar_window') +
'last_bar_window' (pointer, hdata: 'bar_window') +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer, hdata: 'buffer') +

View File

@ -28,6 +28,8 @@
| weechat | charset_terminal | charset du terminal | -
| weechat | cursor_mode | 1 si le mode curseur est activé | -
| weechat | date | date de compilation de WeeChat | -
| weechat | dir_separator | séparateur de répertoire | -

View File

@ -42,7 +42,7 @@ message: message pour l'absence (si pas de message donné, le statut d'absence e
toggle: cacher/montrer une barre
scroll: faire défiler la barre
tampon: catégorie et nom du tampon ('*' signifie le tampon courant, vous devez utiliser '*' pour les barres de type root)
valeur_scroll: valeur pour le défilement: 'x' ou 'y', suivi par '+', '-', 'b' (début) ou 'e' (fin), valeur (pour +/-), et un %% optionnel (pour faire défiler par %% de la largeur/hauteur, sinon la valeur est un nombre de caractères)
valeur_scroll: valeur pour le défilement: 'x' ou 'y' (optionnel), suivi par '+', '-', 'b' (début) ou 'e' (fin), valeur (pour +/-), et un % optionnel (pour faire défiler par % de la largeur/hauteur, sinon la valeur est un nombre de caractères)
Exemples:
créer une barre avec l'heure, numéro + nom de tampon, et la complétion:
@ -140,12 +140,33 @@ extension: nom de l'extension ('weechat' pour une commande interne WeeChat)
commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est pas trouvé au début de la commande)
........................................
[command]*`cursor`* mouvement libre du curseur sur l'écran pour exécuter des actions sur des zones spécifiques de l'écran::
........................................
/cursor go chat|<barre>|<x>,<y>
move up|down|left|right|area_up|area_down|area_left|area_right
stop
go: déplacer le curseur vers la zone de discussion ("chat"), une barre (en utilisant son nom) ou les coordonnées "x,y"
move: déplacer le curseur dans une direction
stop: arrêter le mode curseur
Sans paramètre, cette commande active/désactive le mode curseur.
Lorsque la souris est activée (voir /help mouse), par défaut un clic du milieu démarre le mode curseur à ce point.
Exemples:
aller dans la liste des pseudos:
/cursor go nicklist
aller aux coordonnées x=10, y=5:
/cursor go 10,5
........................................
[command]*`debug`* contrôle du debug pour le coeur/les extensions::
........................................
/debug list
set <extension> <niveau>
dump [<extension>]
buffer|color|infolists|memory|tags|term|windows
buffer|color|cursor|infolists|memory|mouse|tags|term|windows
hdata [free]
list: lister les extensions avec leur niveau de debug
@ -155,9 +176,11 @@ extension: nom de l'extension ("core" pour le coeur de WeeChat)
dump: afficher les variables mémoire WeeChat dans le fichier log (les mêmes messages sont affichés lorsque WeeChat plante)
buffer: afficher le contenu du tampon en valeurs hexadécimales dans le fichier log
color: afficher des infos sur les paires de couleur courantes
cursor: activer/désactiver le debug pour le mode curseur
hdata: afficher des infos sur les hdata (avec free: supprimer tous les hdata en mémoire)
infolists: afficher des infos sur les infolists
memory: afficher des infos sur l'utilisation de la mémoire
mouse: activer/désactiver le debug pour la souris
tags: afficher les étiquettes pour les lignes
term: afficher des infos sur le terminal
windows: afficher l'arbre des fenêtres
@ -279,8 +302,8 @@ list des actions:
jump_previously_visited_buffer: sauter au tampon visité précédemment
jump_next_visited_buffer: sauter au tampon visité après
hotlist_clear: effacer la hotlist
grab_key: capturer une touche
grab_key_command: capturer une touche avec sa commande associée
grab_key: capturer une touche (paramètre facultatif: délai pour la fin de la capture, par défaut 500 millisecondes)
grab_key_command: capturer une touche avec sa commande associée (paramètre facultatif: délai pour la fin de la capture, par défaut 500 millisecondes)
scroll_unread: faire défiler jusqu'au marqueur de données non lues
set_unread: définir le marqueur de données non lues pour tous les tampons
set_unread_current_buffer: définir le marqueur de données non lues pour le tampon courant
@ -318,6 +341,14 @@ listdefault: afficher les touches par défaut
Lors de l'association d'une commande à une touche, il est recommandé d'utiliser la touche alt+k (ou Echap puis k), et puis de presser la touche à associer: cela insère le code de la touche dans la ligne de commande.
Pour le contexte "mouse" (possible aussi pour le contexte "cursor"), la touche a le format: "@aire:key" où aire peut être :
*: n'importe quelle zone à l'écran
chat: la zone de discussion
bar(*): n'importe quelle barre
bar(xxx): la barre "xxx"
item(*): n'importe quel objet de barre
item(xxx): l'objet de barre "xxx"
Exemples:
touche alt-x pour activer/désactiver la liste des pseudos:
/key bind meta-x /bar toggle nicklist
@ -327,6 +358,8 @@ Exemples:
/key reset meta-r
touche "tab" pour arrêter la recherche dans le tampon:
/key bindctxt search ctrl-I /input search_stop
bouton du milieu de la souris sur un pseudo pour récupérer les infos sur le pseudo:
/key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick}
........................................
[command]*`layout`* sauver/appliquer/réinitialiser la disposition des tampons et fenêtres::
@ -344,6 +377,25 @@ windows: sauver/appliquer seulement pour les fenêtres (le tampon affiché par c
Sans paramètre, cette commande affiche la disposition sauvegardée.
........................................
[command]*`mouse`* contrôle de la souris::
........................................
/mouse enable|disable|toggle [<délai>]
enable: activer la souris
disable: désactiver la souris
toggle: activer/désactiver la souris
délai: délai (en secondes) après lequel l'état initial de la souris est restauré (pratique pour désactiver temporairement la souris)
Pour activer/désactiver la souris au démarrage, faites :
/set weechat.look.mouse on/off
Exemples:
activer la souris:
/mouse enable
activer/désactiver la souris pendant 5 secondes:
/mouse toggle 5
........................................
[command]*`mute`* exécuter une commande silencieusement::
........................................
/mute [-current | -buffer <nom> | -all] commande

View File

@ -473,6 +473,11 @@
** type: booléen
** valeurs: on, off (valeur par défaut: `on`)
* *weechat.look.mouse*
** description: `activer le support de la souris au démarrage (pour l'activer maintenant, voir /help mouse)`
** type: booléen
** valeurs: on, off (valeur par défaut: `off`)
* *weechat.look.nickmode*
** description: `afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur`
** type: booléen

View File

@ -6109,7 +6109,8 @@ weechat_hook_modifier ("2000|input_text_display", &modifier_cb, NULL);
----------------------------------------
Les types de "hooks" suivants autorisent une priorité : command, command_run,
signal, hsignal, config, completion, modifier, info, info_hashtable, infolist, hdata.
signal, hsignal, config, completion, modifier, info, info_hashtable, infolist,
hdata, focus.
weechat_hook_command
^^^^^^^^^^^^^^^^^^^^
@ -8294,7 +8295,7 @@ hook = weechat.hook_infolist(infolist_name, description, pointer_description,
# exemple
def my_infolist_cb(data, infolist_name, pointer, arguments):
# build infolist
# construction de l'infolist
# ...
return my_infolist
@ -8351,7 +8352,7 @@ my_hdata_cb (void *data, const char *hdata_name)
return mon_hdata;
}
/* ajouts le hdata "mon_hdata" */
/* ajoute le hdata "mon_hdata" */
struct t_hook *my_hdata = weechat_hook_hdata ("mon_hdata",
"Hdata pour ma structure",
&my_hdata_cb, NULL);
@ -8360,6 +8361,92 @@ struct t_hook *my_hdata = weechat_hook_hdata ("mon_hdata",
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
weechat_hook_focus
^^^^^^^^^^^^^^^^^^
Accroche un focus : évènement souris ou touche du clavier pressée dans le mode
"curseur" (mouvement libre du curseur).
Prototype :
[source,C]
----------------------------------------
struct t_hook *weechat_hook_focus (const char *area,
struct t_hashtable *(*callback)(void *data,
struct t_hashtable *info),
void *callback_data);
----------------------------------------
Paramètres :
* 'area' : "chat" pour la zone de discussion, ou un nom d'objet de barre
(priorité autorisée, voir la note sur la <<hook_priority,priorité>>)
* 'callback' : fonction appelée quand le focus est fait paramètres et valeur de
retour :
** 'void *data' : pointeur
** 'struct t_hashtable *info' : hashtable avec les informations sur le focus et
les chaînes retournées par les autres appels aux "callbacks" de focus (avec
plus haute priorité); les clés et valeurs sont de type "string"; les
informations sur le focus (remplies par WeeChat) sont :
*** '_x' : colonne du focus sur l'écran (la première colonne sur la gauche
est "0")
*** '_y' : ligne du focus sur l'écran (la première ligne en haut est "0")
*** '_window' : pointeur de la fenêtre avec le focus (NULL pour une barre de
type "root" ou pour une zone inconnue)
*** '_bar_name' : nom de la barre avec le focus (NULL pour la zone de discussion
("chat") ou pour une zone inconnue)
*** '_bar_item_name' : nom de l'objet de barre avec le focus (NULL si le focus
n'est pas dans une barre ou si le focus est après le dernier objet de barre)
*** '_item_line' : ligne avec le focus dans l'objet de barre (la première ligne
de l'objet de barre est "0")
*** '_item_col' : colonne avec le focus dans l'objet de barre (la première
colonne de l'objet de barre est "0")
** valeur de retour : soit le pointeur vers la hashtable "info" (avec la
hashtable complétée), ou un pointeur vers une nouvelle hashtable (créée par
le "callback", avec clés et valeurs de type "string"), le contenu de cette
nouvelle hashtable sera ajouté à 'info' pour les autres appels aux
"callbacks" focus
* 'callback_data' : pointeur donné au "callback" lorsqu'il est appelé par
WeeChat
Valeur de retour :
* pointeur vers le nouveau "hook", NULL en cas d'erreur
Exemple en C :
[source,C]
----------------------------------------
struct t_hashtable *
my_focus_nicklist_cb (void *data, struct t_hashtable *info)
{
/* ajout de chaînes dans la hashtable */
/* ... */
return info;
}
/* ajoute le focus sur la liste des pseudos */
struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist",
&my_focus_nicklist_cb, NULL);
----------------------------------------
Script (Python) :
[source,python]
----------------------------------------
# prototype
hook = weechat.hook_focus(area, callback, callback_data)
# exemple
def my_focus_nicklist_cb(data, info):
# construction du dict
# ...
return my_dict
hook = weechat.hook_focus("buffer_nicklist", "my_focus_nicklist_cb", "")
----------------------------------------
weechat_unhook
^^^^^^^^^^^^^^

View File

@ -420,20 +420,20 @@ Raccourcis clavier par défaut
Touches pour la ligne de commande
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Touche | Description | Commande
| @k(←) .2+| Aller au caractère précédent sur la ligne de commande .2+| /input move_previous_char
| @k(←) .2+| Aller au caractère précédent sur la ligne de commande .2+| /input move_previous_char
| @k(C-)@k(b)
| @k(→) .2+| Aller au caractère suivant sur la ligne de commande .2+| /input move_next_char
| @k(→) .2+| Aller au caractère suivant sur la ligne de commande .2+| /input move_next_char
| @k(C-)@k(f)
| @k(C-)@k(←) .2+| Aller au mot précédent sur la ligne de commande .2+| /input move_previous_word
| @k(C-)@k(←) .2+| Aller au mot précédent sur la ligne de commande .2+| /input move_previous_word
| @k(A-)@k(b)
| @k(C-)@k(→) .2+| Aller au mot suivant sur la ligne de commande .2+| /input move_next_word
| @k(C-)@k(→) .2+| Aller au mot suivant sur la ligne de commande .2+| /input move_next_word
| @k(A-)@k(f)
| @k(Home) .2+| Aller au début de la ligne de commande .2+| /input move_beginning_of_line
| @k(Home) .2+| Aller au début de la ligne de commande .2+| /input move_beginning_of_line
| @k(C-)@k(a)
| @k(End) .2+| Aller à la fin de la ligne de commande .2+| /input move_end_of_line
| @k(End) .2+| Aller à la fin de la ligne de commande .2+| /input move_end_of_line
| @k(C-)@k(e)
| @k(C-)@k(c) , @k(b) | Insérer le code pour mettre le texte en gras | /input insert \x02
| @k(C-)@k(c) , @k(c) | Insérer le code pour écrire en couleur | /input insert \x03
@ -441,9 +441,9 @@ Touches pour la ligne de commande
| @k(C-)@k(c) , @k(o) | Insérer le code pour réinitaliser la couleur | /input insert \x0F
| @k(C-)@k(c) , @k(r) | Insérer le code pour écrire en couleur inversée | /input insert \x12
| @k(C-)@k(c) , @k(u) | Insérer le code pour écrire en souligné | /input insert \x15
| @k(Del) .2+| Effacer le caractère suivant sur la ligne de commande .2+| /input delete_next_char
| @k(Del) .2+| Effacer le caractère suivant sur la ligne de commande .2+| /input delete_next_char
| @k(C-)@k(d)
| @k(Backsp.) .2+| Effacer le caractère précédent sur la ligne de commande .2+| /input delete_previous_char
| @k(Backsp.) .2+| Effacer le caractère précédent sur la ligne de commande .2+| /input delete_previous_char
| @k(C-)@k(h)
| @k(C-)@k(k) | Effacer du curseur jusqu'à la fin de la ligne de commande (la chaîne supprimée est copiée dans le presse-papiers) | /input delete_end_of_line
| @k(C-)@k(r) | Chercher du texte dans l'historique du tampon (voir <<key_bindings_search_context,les touches pour le contexte de recherche>>) | /input search_text
@ -455,7 +455,7 @@ Touches pour la ligne de commande
| @k(A-)@k(_) | Refaire la dernière action sur la ligne de commande | /input redo
| @k(Tab) | Compléter la commande ou le pseudo (@k(Tab) de nouveau : trouver la complétion suivante) | /input complete_next
| @k(S-)@k(Tab) | Sans complétion, effectue une complétion partielle. Avec une complétion en cours, complète avec la complétion précédente | /input complete_previous
| @k(Enter) .3+| Exécuter la commande ou envoyer le message (en mode recherche : arrêter la recherche) .3+| /input return
| @k(Enter) .3+| Exécuter la commande ou envoyer le message (en mode recherche : arrêter la recherche) .3+| /input return
| @k(C-)@k(j)
| @k(C-)@k(m)
| @k(↑) | Rappeler la commande précédente (en mode recherche : chercher plus haut) | /input history_previous
@ -471,7 +471,7 @@ Touches pour la ligne de commande
Touches pour les tampons / fenêtres
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Touche | Description | Commande
| @k(C-)@k(l) | Réafficher toute la fenêtre | /window refresh
@ -483,23 +483,24 @@ Touches pour les tampons / fenêtres
| @k(A-)@k(PgDn) | Descendre de quelques lignes dans l'historique du tampon | /window scroll_down
| @k(A-)@k(Home) | Aller au début du tampon | /window scroll_top
| @k(A-)@k(End) | Aller à la fin du tampon | /window scroll_bottom
| @k(A-)@k(←) .4+| Aller au tampon précédent .4+| /buffer -1
| @k(A-)@k(←) .4+| Aller au tampon précédent .4+| /buffer -1
| @k(A-)@k(↑)
| @k(C-)@k(p)
| @k(F5)
| @k(A-)@k(→) .4+| Aller au tampon suivant .4+| /buffer +1
| @k(A-)@k(→) .4+| Aller au tampon suivant .4+| /buffer +1
| @k(A-)@k(↓)
| @k(C-)@k(n)
| @k(F6)
| @k(F7) | Aller à la fenêtre précédente | /window -1
| @k(F8) | Aller à la fenêtre suivante | /window +1
| @k(F9) | Faire défiler le titre du tampon vers la gauche | /bar scroll title * x-50%
| @k(F10) | Faire défiler le titre du tampon vers la droite | /bar scroll title * x+50%
| @k(F11) | Monter d'une page dans la liste des pseudos | /bar scroll nicklist * y-100%
| @k(F12) | Descendre d'une page dans la liste des pseudos | /bar scroll nicklist * y+100%
| @k(A-)@k(F11) | Aller au début de la liste des pseudos | /bar scroll nicklist * yb
| @k(A-)@k(F12) | Aller à la fin de la liste des pseudos | /bar scroll nicklist * ye
| @k(F9) | Faire défiler le titre du tampon vers la gauche | /bar scroll title * -30%
| @k(F10) | Faire défiler le titre du tampon vers la droite | /bar scroll title * +30%
| @k(F11) | Monter d'une page dans la liste des pseudos | /bar scroll nicklist * -100%
| @k(F12) | Descendre d'une page dans la liste des pseudos | /bar scroll nicklist * +100%
| @k(A-)@k(F11) | Aller au début de la liste des pseudos | /bar scroll nicklist * b
| @k(A-)@k(F12) | Aller à la fin de la liste des pseudos | /bar scroll nicklist * e
| @k(A-)@k(a) | Sauter au prochain tampon avec activité (avec priorité : highlight, message, autre) | /input jump_smart
| @k(A-)@k(h) | Vider la hotlist (notification d'activité sur les autres tampons) | /input hotlist_clear
| @k(A-)@k(j) , @k(A-)@k(l) | Sauter au dernier tampon | /input jump_last_buffer
| @k(A-)@k(j) , @k(A-)@k(r) | Sauter au tampon IRC de données brutes | /server raw
| @k(A-)@k(j) , @k(A-)@k(s) | Sauter au tampon IRC du serveur | /server jump
@ -517,36 +518,83 @@ Touches pour les tampons / fenêtres
| @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
| @k(A-)@k(=) | Activer/désactiver les filtres | /filter toggle
|========================================
[[key_bindings_search_context]]
Keys for "search" context
^^^^^^^^^^^^^^^^^^^^^^^^^
Touches pour le contexte "search"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ces touches sont utilisées dans le contexte "search" (lorsque @k(C-)@k(r) est
pressé pour chercher du texte dans le tampon).
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Touche | Description | Commande
| @k(C-)@k(r) | Basculer la casse exacte pour la recherche | /input search_switch_case
| @k(↑) | Chercher la ligne précédente | /input search_previous
| @k(↓) | Chercher la ligne suivante | /input search_next
| @k(Enter) .3+| Arrêter la recherche .3+| /input search_stop
| Touche | Description | Commande
| @k(C-)@k(r) | Basculer la casse exacte pour la recherche | /input search_switch_case
| @k(↑) | Chercher la ligne précédente | /input search_previous
| @k(↓) | Chercher la ligne suivante | /input search_next
| @k(Enter) .3+| Arrêter la recherche .3+| /input search_stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
[[key_bindings_cursor_context]]
Touches pour le contexte "cursor"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[[key_bindings_other]]
Autres touches
^^^^^^^^^^^^^^
Ces touches sont utilisées dans le contexte "cursor" (mouvement libre du curseur
à l'écran).
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Touche | Description | Commande
| @k(A-)@k(h) | Vider la hotlist (notification d'activité sur les autres tampons) | /input hotlist_clear
| @k(A-)@k(=) | Active/désactive les filtres | /filter toggle
| Touche | Zone | Description | Commande
| @k(↑) | - | Déplacer le curseur d'une ligne vers le haut | /cursor move up
| @k(↓) | - | Déplacer le curseur d'une ligne vers le bas | /cursor move down
| @k(←) | - | Déplacer le curseur d'une colonne vers la gauche | /cursor move left
| @k(→) | - | Déplacer le curseur d'une colonne vers la droite | /cursor move right
| @k(A-)@k(↑) | - | Déplacer le curseur vers la zone au dessus | /cursor move area_up
| @k(A-)@k(↓) | - | Déplacer le curseur vers la zone en dessous | /cursor move area_down
| @k(A-)@k(←) | - | Déplacer le curseur vers la zone sur la gauche | /cursor move area_left
| @k(A-)@k(→) | - | Déplacer le curseur vers la zone sur la droite | /cursor move area_right
| @k(b) | liste des pseudos | Bannir le pseudo | /ban ${nick}
| @k(k) | liste des pseudos | Retirer par la force le pseudo | /kick ${nick}
| @k(K) | liste des pseudos | Retirer par la force et bannir le pseudo | /kickban ${nick}
| @k(q) | liste des pseudos | Ouvrir une discussion avec le pseudo | /query ${nick};/cursor stop
| @k(w) | liste des pseudos | Effectuer un whois sur le pseudo | /whois ${nick}
| @k(Enter) .3+| - .3+| Stop cursor mode .3+| /cursor stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
[[key_bindings_mouse_context]]
Touches pour le contexte "mouse"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ces touches sont utilisées dans le contexte "mouse", c'est-à-dire lorsqu'un
évènement de la souris se produit.
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Bouton | Geste | Zone | Description | Commande
| ◾◽◽ | left | chat | Aller au tampon précédent | /buffer +1
| ◾◽◽ | right | chat | Aller au tampon suivant | /buffer +1
| ◾◽◽ | left (long) | chat | Aller au premier tampon | /buffer 1
| ◾◽◽ | right (long) | chat | Aller au dernier tampon | /input jump_last_buffer
| roulette ⇑ | - | chat | Monter de quelques lignes dans l'historique du tampon | /window scroll_up
| roulette ⇓ | - | chat | Descendre de quelques lignes dans l'historique du tampon | /window scroll_down
| ◾◽◽ | up | liste des pseudos | Monter d'une page dans la liste des pseudos | /bar scroll nicklist * -100%
| ◾◽◽ | down | liste des pseudos | Descendre d'une page dans la liste des pseudos | /bar scroll nicklist * +100%
| ◾◽◽ | up (long) | liste des pseudos | Aller au début de la liste des pseudos | /bar scroll nicklist * b
| ◾◽◽ | down (long) | liste des pseudos | Aller à la fin de la liste des pseudos | /bar scroll nicklist * e
| ◾◽◽ | - | liste des pseudos | Ouvrir une discussion avec le pseudo | /query ${nick}
| ◽◽◾ | - | liste des pseudos | Effectuer un whois sur le pseudo | /whois ${nick}
| ◾◽◽ | left | liste des pseudos | Retirer par la force le pseudo | /kick ${nick}
| ◾◽◽ | left (long) | liste des pseudos | Retirer par la force et bannir le pseudo | /kickban ${nick}
| ◽◽◾ | left | liste des pseudos | Bannir le pseudo | /ban ${nick}
| roulette ⇑ | - | toute barre | Faire défiler la barre de -10% | /bar scroll ${_bar_name} * -10%
| roulette ⇓ | - | toute barre | Faire défiler la barre de +10% | /bar scroll ${_bar_name} * +10%
| ◽◾◽ | - | n'importe où | Démarrer le mode curseur ("cursor") à ce point | /cursor go ${_x},${_y}
|========================================
[[command_line]]

View File

@ -78,6 +78,8 @@
| weechat | config_options | opzioni di configurazione
| weechat | cursor_areas | areas ("chat" or bar name) for free cursor movement
| weechat | filename | nome file
| weechat | filters_names | nomi dei filtri
@ -86,7 +88,7 @@
| weechat | infos | nomi degli hook sulle info
| weechat | keys_codes | codici tasti
| weechat | keys_codes | codici tasto
| weechat | keys_codes_for_reset | codici tasti che possono essere ripristinati (tasti aggiunti, ridefiniti o rimossi)

View File

@ -1,8 +1,8 @@
[width="100%",cols="^1,^2,5,5,5",options="header"]
|========================================
| Plugin | Nome | Descrizione | Variables | Lists
| Plugin | Nome | Descrizione | Variabili | Liste
| irc | irc_channel | irc channel |
| irc | irc_channel | canale irc |
'type' (integer) +
'name' (string) +
'topic' (string) +
@ -30,14 +30,14 @@
'next_channel' (pointer, hdata: 'irc_channel') |
-
| irc | irc_channel_speaking | irc channel_speaking |
| irc | irc_channel_speaking | channel_speaking irc |
'nick' (string) +
'time_last_message' (time) +
'prev_nick' (pointer, hdata: 'irc_channel_speaking') +
'next_nick' (pointer, hdata: 'irc_channel_speaking') |
-
| irc | irc_ignore | irc ignore |
| irc | irc_ignore | ignore irc |
'number' (integer) +
'mask' (string) +
'regex_mask' (pointer) +
@ -48,7 +48,7 @@
'irc_ignore_list' +
'last_irc_ignore'
| irc | irc_nick | irc nick |
| irc | irc_nick | nick irc |
'name' (string) +
'host' (string) +
'prefixes' (string) +
@ -59,7 +59,7 @@
'next_nick' (pointer, hdata: 'irc_nick') |
-
| irc | irc_notify | irc notify |
| irc | irc_notify | notify irc |
'server' (pointer, hdata: 'irc_server') +
'nick' (string) +
'check_away' (integer) +
@ -70,7 +70,7 @@
'next_notify' (pointer, hdata: 'irc_notify') |
-
| irc | irc_redirect | irc redirect |
| irc | irc_redirect | redirezione irc |
'server' (pointer, hdata: 'irc_server') +
'pattern' (string) +
'signal' (string) +
@ -92,7 +92,7 @@
'next_redirect' (pointer, hdata: 'irc_redirect') |
-
| irc | irc_redirect_pattern | pattern for irc redirect |
| irc | irc_redirect_pattern | schema per la redirezione irc |
'name' (string) +
'temp_pattern' (integer) +
'timeout' (integer) +
@ -104,7 +104,7 @@
'irc_redirect_patterns' +
'last_irc_redirect_pattern'
| irc | irc_server | irc server |
| irc | irc_server | server irc |
'name' (string) +
'options' (pointer) +
'temp_server' (integer) +
@ -167,7 +167,7 @@
'irc_servers' +
'last_irc_server'
| weechat | bar | bar |
| weechat | bar | barra |
'name' (string) +
'options' (pointer) +
'conditions_count' (integer) +
@ -175,14 +175,17 @@
'items_count' (integer) +
'items_subcount' (pointer) +
'items_array' (pointer) +
'bar_window' (pointer) +
'items_prefix' (pointer) +
'items_name' (pointer) +
'items_suffix' (pointer) +
'bar_window' (pointer, hdata: 'bar_window') +
'bar_refresh_needed' (integer) +
'prev_bar' (pointer, hdata: 'bar') +
'next_bar' (pointer, hdata: 'bar') |
'gui_bars' +
'last_gui_bar'
| weechat | bar_item | bar item |
| weechat | bar_item | elemento barra |
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'build_callback' (pointer) +
@ -192,6 +195,30 @@
'gui_bar_items' +
'last_gui_bar_item'
| weechat | bar_window | bar window |
'bar' (pointer, hdata: 'bar') +
'x' (integer) +
'y' (integer) +
'width' (integer) +
'height' (integer) +
'scroll_x' (integer) +
'scroll_y' (integer) +
'cursor_x' (integer) +
'cursor_y' (integer) +
'current_size' (integer) +
'items_count' (integer) +
'items_subcount' (pointer) +
'items_content' (pointer) +
'items_num_lines' (pointer) +
'items_refresh_needed' (pointer) +
'screen_col_size' (integer) +
'coords_count' (integer) +
'coords' (pointer) +
'gui_objects' (pointer) +
'prev_bar_window' (pointer, hdata: 'bar_window') +
'next_bar_window' (pointer, hdata: 'bar_window') |
-
| weechat | buffer | buffer |
'plugin' (pointer, hdata: 'plugin') +
'plugin_name_for_upgrade' (string) +
@ -260,7 +287,7 @@
'gui_buffers' +
'last_gui_buffer'
| weechat | completion | structure with completion |
| weechat | completion | struttura con completamento |
'buffer' (pointer, hdata: 'buffer') +
'context' (integer) +
'base_command' (string) +
@ -282,14 +309,14 @@
'last_partial_completion' (pointer, hdata: 'completion_partial') |
-
| weechat | completion_partial | structure with partial completion |
| weechat | completion_partial | struttura con completamento parziale |
'word' (string) +
'count' (integer) +
'prev_item' (pointer, hdata: 'completion_partial') +
'next_item' (pointer, hdata: 'completion_partial') |
-
| weechat | config_file | config file |
| weechat | config_file | file di configurazione |
'plugin' (pointer, hdata: 'plugin') +
'name' (string) +
'filename' (string) +
@ -303,7 +330,7 @@
'config_files' +
'last_config_file'
| weechat | config_option | config option |
| weechat | config_option | opzione di configurazione |
'config_file' (pointer, hdata: 'config_file') +
'section' (pointer, hdata: 'config_section') +
'name' (string) +
@ -326,7 +353,7 @@
'next_option' (pointer, hdata: 'config_option') |
-
| weechat | config_section | config section |
| weechat | config_section | sezione di configurazione |
'config_file' (pointer, hdata: 'config_file') +
'name' (string) +
'user_can_add_options' (integer) +
@ -347,7 +374,7 @@
'next_section' (pointer, hdata: 'config_section') |
-
| weechat | filter | filter |
| weechat | filter | filtro |
'enabled' (integer) +
'name' (string) +
'buffer_name' (string) +
@ -364,30 +391,42 @@
'gui_filters' +
'last_gui_filter'
| weechat | history | history of commands in buffer |
| weechat | history | cronologia dei comandi nel buffer |
'text' (string) +
'next_history' (pointer, hdata: 'history') +
'prev_history' (pointer, hdata: 'history') |
-
| weechat | input_undo | structure with undo for input line |
| weechat | input_undo | struttura con "undo"per la riga di input |
'data' (string) +
'pos' (integer) +
'prev_undo' (pointer, hdata: 'input_undo') +
'next_undo' (pointer, hdata: 'input_undo') |
-
| weechat | key | a key (keyboard shortcut) |
| weechat | key | un tasto (scorciatoia da tastiera) |
'key' (string) +
'command' (string) +
'prev_key' (pointer, hdata: 'key') +
'next_key' (pointer, hdata: 'key') |
'gui_default_keys' +
'gui_default_keys_cursor' +
'gui_default_keys_mouse' +
'gui_default_keys_search' +
'gui_keys' +
'gui_keys_cursor' +
'gui_keys_mouse' +
'gui_keys_search' +
'last_gui_default_key' +
'last_gui_key'
'last_gui_default_key_cursor' +
'last_gui_default_key_mouse' +
'last_gui_default_key_search' +
'last_gui_key' +
'last_gui_key_cursor' +
'last_gui_key_mouse' +
'last_gui_key_search'
| weechat | line | structure with one line |
| weechat | line | struttura con una sola riga |
'data' (pointer, hdata: 'line_data') +
'prev_line' (pointer, hdata: 'line') +
'next_line' (pointer, hdata: 'line') |
@ -409,7 +448,7 @@
'message' (string) |
-
| weechat | lines | structure with lines |
| weechat | lines | struttura con più righe |
'first_line' (pointer, hdata: 'line') +
'last_line' (pointer, hdata: 'line') +
'last_read_line' (pointer, hdata: 'line') +
@ -420,7 +459,7 @@
'prefix_max_length' (integer) |
-
| weechat | nick | nick in nicklist |
| weechat | nick | nick nella lista nick |
'group' (pointer, hdata: 'nick_group') +
'name' (string) +
'color' (string) +
@ -431,7 +470,7 @@
'next_nick' (pointer, hdata: 'nick') |
-
| weechat | nick_group | group in nicklist |
| weechat | nick_group | gruppo nella lista nick |
'name' (string) +
'color' (string) +
'visible' (integer) +
@ -460,7 +499,7 @@
'last_weechat_plugin' +
'weechat_plugins'
| weechat | window | window |
| weechat | window | finestra |
'win_x' (integer) +
'win_y' (integer) +
'win_width' (integer) +
@ -473,8 +512,8 @@
'win_chat_height' (integer) +
'win_chat_cursor_x' (integer) +
'win_chat_cursor_y' (integer) +
'bar_windows' (pointer) +
'last_bar_window' (pointer) +
'bar_windows' (pointer, hdata: 'bar_window') +
'last_bar_window' (pointer, hdata: 'bar_window') +
'refresh_needed' (integer) +
'gui_objects' (pointer) +
'buffer' (pointer, hdata: 'buffer') +
@ -488,7 +527,7 @@
'gui_windows' +
'last_gui_window'
| weechat | window_scroll | scroll info in window |
| weechat | window_scroll | scorrimento delle info nella finestra |
'buffer' (pointer, hdata: 'buffer') +
'first_line_displayed' (integer) +
'start_line' (pointer, hdata: 'line') +
@ -501,7 +540,7 @@
'next_scroll' (pointer, hdata: 'window_scroll') |
-
| weechat | window_tree | tree of windows |
| weechat | window_tree | albero delle finestre |
'parent_node' (pointer, hdata: 'window_tree') +
'split_pct' (integer) +
'split_horizontal' (integer) +

View File

@ -48,7 +48,7 @@
| weechat | hotlist | elenco dei buffer nella hotlist | - | -
| weechat | key | elenco di tasti associati | - | context ("default" or "search") (optional)
| weechat | key | elenco di tasti associati | - | contesto ("default" oppure "search") (opzionale)
| weechat | nicklist | nick nella lista nick per un buffer | puntatore al buffer | nick_xxx o group_xxx per ottenere solo xxx di nick/group (opzionale)

View File

@ -28,6 +28,8 @@
| weechat | charset_terminal | set caratteri terminale | -
| weechat | cursor_mode | 1 if cursor mode is enabled | -
| weechat | date | data di compilazione di WeeChat | -
| weechat | dir_separator | separatore cartella | -

View File

@ -141,22 +141,22 @@ server: nome del server da cui disconnettersi
add [re:]<nick> [<server> [<canale>]]
del <numero>|-all
list: list all ignores
add: add an ignore
nick: nick or hostname (can be regular expression if "re:" is given or a mask using "*" to replace one or more chars)
del: delete an ignore
number: number of ignore to delete (look at list to find it)
-all: delete all ignores
server: internal server name where ignore is working
channel: channel name where ignore is working
list: elenca tutti gli ignore
add: aggiungi un ignore
nick: nick oppure hostname (può essere un'espressione regolare se forinito il parametro "-re:")
del: elimina un ignore
numero: numero di ignore da eliminare (nella lista)
-all: elimina tutti gli ignore
server: nome interno del server dove l'ignore è attivo
canale: nome del canale dove l'ignore è attivo
Examples:
ignore nick "toto" everywhere:
/ignore add toto
ignore host "toto@domain.com" on freenode server:
/ignore add toto@domain.com freenode
ignore host "toto*@*.domain.com" on freenode/#weechat:
/ignore add toto*@*.domain.com freenode #weechat
Esempi:
ignora nick "tizio" su tutti gli host/canali:
/ignore add tizio
ignora l'host "tizio@dominio.com" sul server freenode:
/ignore add tizio@dominio.com freenode
ignora l'host "tizio*@*.dominio.com" su freenode/#weechat:
/ignore add tizio*@*.dominio.com freenode #weechat
........................................
[command]*`info`* ottieni informazioni sul server::

View File

@ -4,7 +4,7 @@
** valori: on, off (valore predefinito: `on`)
* *logger.file.flush_delay*
** descrizione: `number of seconds between flush of log files (0 = write in log files immediately for each line printed)`
** descrizione: `numero di secondi tra il flush (scrittura) dei file di log (0 = scrive sui file di log immediatamente per ogni riga stampata)`
** tipo: intero
** valori: 0 .. 3600 (valore predefinito: `120`)

View File

@ -16,44 +16,44 @@ messaggio: messaggio di assenza (se non specificato, lo stato di assenza viene r
hide|show|toggle <nome>
scroll <nome> <buffer> <scroll_value>
list: elenca tutte le barre
listfull: elenca tutte le barre (dettagliato)
listitems: elenca tutti gli elementi della barra
add: aggiunge una nuova barra
nome: nome della barra (deve essere unico)
tipo: root: al di fuori delle finestre,
window: all'interno delle finestre, con opzioni condizionali (a seguire)
cond1,...: condizione(i) per visualizzare la barra (solo per il tipo "window"):
active: sulla finestra attiva
inactive: sulle finestre inattive
nicklist: sulle finestre con la lista nick
senza condizione, viene sempre mostrata
posizione: bottom (basso), top (alto), left (sinistra) o right (destra)
dimensione: dimensione della barra (in caratteri)
separatore: 1 per utilizzarlo (riga), 0 o nulla equivale a nessun separatore
item1,...: elementi per questa barra (possono essere separati da virgole (spazio tra gli elementi) o "+" (elementi incollati))
default: crea una barra predefinita (saranno tutte predefinite se non viene dato un nome per la barra)
del: elimina una barra (o tutte le barre con -all)
set: imposta un valore per la proprietà di una barra
opzione: opzione da cambiare (per una lista di opzioni, consultare /set weechat.bar.<barname>.*)
valore: nuovo valore per l'opzione
hide: nasconde una barra
show: mostra una barra nascosta
toggle: nascone/mostra una barra
scroll: scorre una barra
buffer: nome del buffer da scorrere ('*' indica il buffer corrente, si dovrebbe utilizzare '*' per le barre root)
scroll_value: valore per lo scorrimento: 'x' o 'y', seguite da '+', '-', 'b' (inizio) or 'e' (fine), valore (per +/-), e %% opzionale (per scorrere di %% di larghezza/altezza, altrimenti il valore è il numero di caratteri)
list: list all bars
listfull: list all bars (verbose)
listitems: list all bar items
add: add a new bar
name: name of bar (must be unique)
type: root: outside windows,
window: inside windows, with optional conditions (see below)
cond1,...: condition(s) for displaying bar (only for type "window"):
active: on active window
inactive: on inactive windows
nicklist: on windows with nicklist
without condition, bar is always displayed
position: bottom, top, left or right
size: size of bar (in chars)
separator: 1 for using separator (line), 0 or nothing means no separator
item1,...: items for this bar (items can be separated by comma (space between items) or "+" (glued items))
default: create a default bar (all default bars if no bar name is given)
del: delete a bar (or all bars with -all)
set: set a value for a bar property
option: option to change (for options list, look at /set weechat.bar.<barname>.*)
value: new value for option
hide: hide a bar
show: show an hidden bar
toggle: hide/show a bar
scroll: scroll bar
buffer: name of buffer to scroll ('*' means current buffer, you should use '*' for root bars)
scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', '-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to scroll by % of width/height, otherwise value is number of chars)
Esempi:
crea una barra con l'ora, numero del buffer + nome, e completamento:
/bar add miabarra root bottom 1 0 [time],buffer_number+:+buffer_name,completion
nasconde una barra:
/bar hide miabarra
scorre la lista nick di 10 righe in basso sul buffer corrente:
Examples:
create a bar with time, buffer number + name, and completion:
/bar add mybar root bottom 1 0 [time],buffer_number+:+buffer_name,completion
hide a bar:
/bar hide mybar
scroll nicklist 10 lines down on current buffer:
/bar scroll nicklist * y+10
scorre la lista nick di una pagina in alto sul buffer #weechat:
scroll nicklist one page up on #weechat buffer:
/bar scroll nicklist #weechat y-100%
scorre fino alla fine della lista nick sul buffer corrente:
scroll to end of nicklist on current buffer:
/bar scroll nicklist * ye
........................................
@ -140,12 +140,33 @@ Esempi:
comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trovata all'inizio del comando)
........................................
[command]*`cursor`* free movement of cursor on screen to execute actions on specific areas of screen::
........................................
/cursor go chat|<bar>|<x>,<y>
move up|down|left|right|area_up|area_down|area_left|area_right
stop
go: move cursor to chat area, a bar (using bar name) or coordinates "x,y"
move: move cursor with direction
stop: stop cursor mode
Without argument, this command toggles cursor mode.
When mouse is enabled (see /help mouse), by default a middle click will start cursor mode at this point.
Examples:
go to nicklist:
/cursor go nicklist
go to coordinates x=10, y=5:
/cursor go 10,5
........................................
[command]*`debug`* attiva debug per core/plugin::
........................................
/debug list
set <plugin> <level>
dump [<plugin>]
buffer|color|infolists|memory|tags|term|windows
buffer|color|cursor|infolists|memory|mouse|tags|term|windows
hdata [free]
list: list plugins with debug levels
@ -155,9 +176,11 @@ comando: comando da eseguire (una '/' viene aggiunta automaticamente se non trov
dump: save memory dump in WeeChat log file (same dump is written when WeeChat crashes)
buffer: dump buffer content with hexadecimal values in log file
color: display infos about current color pairs
cursor: toggle debug for cursor mode
hdata: display infos about hdata (with free: remove all hdata in memory)
infolists: display infos about infolists
memory: display infos about memory usage
mouse: toggle debug for mouse
tags: display tags for lines
term: display infos about terminal
windows: display windows tree
@ -170,52 +193,52 @@ infolists: display infos about infolists
add <nome> <buffer>[,<buffer>...] <tag> <regex>]
del <nome>|-all
list: list all filters
enable: enable filters (filters are enabled by default)
disable: disable filters
toggle: toggle filters
name: filter name
add: add a filter
del: delete a filter
-all: delete all filters
buffer: comma separated list of buffers where filter is active:
- this is full name including plugin (example: "irc.freenode.#weechat")
- "*" means all buffers
- a name starting with '!' is excluded
- name can start or end with '*' to match many buffers
tags: comma separated list of tags, for example: "irc_join,irc_part,irc_quit"
regex: regular expression to search in line
- use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|'
- if regex starts with '!', then matching result is reversed (use '\!' to start with '!')
- two regular expressions are created: one for prefix and one for message
list: elenca tutti i filtri
enable: abilita filtri (i filtri sono abilitati di default)
disable: disabilita filtri
toggle: abilita/disabilita filtri
nome: nome del filtro
add: aggiunge un filtro
del: elimina un filtro
-all: elimina tutti i filtri
buffer: elenco separato da virgole di buffer in cui il filtro è attivo:
- nome completo che include il plugin (esempio: "irc.freenode.#weechat)
- "*" indica tutti i buffer
- un nome preceduto da '!' viene escluso
- un nome può iniziare o terminare con '*' per includere più buffer
tag: elenco di tag separati da virgole, per esempio: "irc_join,irc_part,irc_quit"
regex: espressione regolare da cercare nella riga
- usare '\t' per separare il prefisso dal messaggio, caratteri speciali come "|" vanno preceduti dal carattere escape: '\|')
- se l'espressione regolare inizia con '!', il risultato corrispondente viene invertito (usare '\!' per iniziare con '!')
The default key alt+'=' toggles filtering on/off.
-vengono create due espressioni regolari: una per il prefisso e l'altra per il messaggio
Tags most commonly used:
no_filter, no_highlight, no_log, log0..log9 (log level),
Il tasto predefinito alt+'=' abilita/disabilita il filtro.
Tag utilizzati di frequente:
no_filter, no_highlight, no_log, log0..log9 (livello di log),
notify_none, notify_message, notify_private, notify_highlight,
nick_xxx (xxx is nick in message),
irc_xxx (xxx is command name or number, see /server raw),
irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
To see tags for lines in buffers: /debug tags
nick_xxx (xxx è il nick nel messaggio),
irc_xxx (xxx è il nome comando o il numero, consultare /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
Per mostrare i tag per le righe nei buffer: /debug tags
Examples:
use IRC smart filter on all buffers:
/filter add irc_smart * irc_smart_filter *
use IRC smart filter on all buffers except those with "#weechat" in name:
/filter add irc_smart *,!*#weechat* irc_smart_filter *
filter all IRC join/part/quit messages:
/filter add joinquit * irc_join,irc_part,irc_quit *
filter nicks displayed when joining channels or with /names:
Esempi:
usa il filtro intelligente IRC per tutti i buffer:
/filter add irc_smart * irc_smart_filter *
usa il filtro intelligente IRC su tutti i buffer tranne quelli che contengono "#weechat" nel nome:
/filter add irc_smart *,!*weechat* irc_smart_filter
filtra tutti i messaggi entrata/uscita/abbandono di IRC:
/filter add joinquit * irc_join,irc_part,irc_quit *
filtra i nick visualizzati all'ingresso in un canale o con /names:
/filter add nicks * irc_366 *
filter nick "toto" on IRC channel #weechat:
/filter add toto irc.freenode.#weechat * toto\t
keep only nick "titi" on IRC channel #test:
/filter add titi irc.freenode.#test * !titi\t
filter lines containing word "spam":
filtra il nick "tizio" sul canale IRC #weechat
/filter add tizio irc.freenode.#esempio * tizio\t
filtra solo il nick "caio" sul canale IRC #test:
/filter add caio irc.freenode.#test * !caio\t
filtra le righe contententi la parola "spam":
/filter add filterspam * * spam
filter lines containing "weechat sucks" on IRC channel #weechat:
/filter add sucks irc.freenode.#weechat * weechat sucks
filtra le righe contententi "weechat fa schifo" sul canale IRC #weechat:
/filter add schifo irc.freenode.#weechat * weechat fa schifo
........................................
[command]*`help`* visualizza l'aiuto su comandi e opzioni::
@ -279,8 +302,8 @@ list of actions:
jump_previously_visited_buffer: jump to previously visited buffer
jump_next_visited_buffer: jump to next visited buffer
hotlist_clear: clear hotlist
grab_key: grab a key
grab_key_command: grab a key with its associated command
grab_key: grab a key (optional argument: delay for end of grab, default is 500 milliseconds)
grab_key_command: grab a key with its associated command (optional argument: delay for end of grab, default is 500 milliseconds)
scroll_unread: scroll to unread marker
set_unread: set unread marker for all buffers
set_unread_current_buffer: set unread marker for current buffer
@ -293,15 +316,15 @@ This command is used by key bindings or plugins.
[command]*`key`* associa/disassocia tasti::
........................................
/key list|listdefault|listdiff [<context>]
bind <key> [<command> [<args>]]
bindctxt <context> <key> [<command> [<args>]]
unbind <key>
unbindctxt <context> <key>
reset <key>
resetctxt <context> <key>
resetall -yes [<context>]
missing [<context>]
/key list|listdefault|listdiff [<contesto>]
bind <tasto> [<comando> [<arg>]]
bindctxt <contesto> <tasto> [<comando> <arg>]]
unbind <tasto>
unbindctxt <contesto> <chiave>
reset <tasto>
resetctxt <contesto> <tasto>
resetall -yes [<contesto>]
missing [<contesto>]
list: list all current keys (without argument, this list is displayed)
listdefault: list default keys
@ -318,6 +341,14 @@ listdefault: list default keys
When binding a command to a key, it is recommended to use key alt+k (or Esc then k), and then press the key to bind: this will insert key code in command line.
For context "mouse" (possible in context "cursor" too), key has format: "@area:key" where area can be:
*: any area on screen
chat: chat area
bar(*): any bar
bar(xxx): bar "xxx"
item(*): any bar item
item(xxx): bar item "xxx"
Examples:
key alt-x to toggle nicklist bar:
/key bind meta-x /bar toggle nicklist
@ -327,6 +358,8 @@ Examples:
/key reset meta-r
key "tab" to stop search in buffer:
/key bindctxt search ctrl-I /input search_stop
middle button of mouse on a nick to retrieve info on nick:
/key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info ${nick}
........................................
[command]*`layout`* salva/applica/ripristina il layout per i buffer e le finestre::
@ -344,6 +377,25 @@ windows: salva/applica modifiche solo alle finestre (buffer visualizzato da ogni
Senza argomenti, il comando visualizza il layout salvato.
........................................
[command]*`mouse`* mouse control::
........................................
/mouse enable|disable|toggle [<delay>]
enable: enable mouse
disable: disable mouse
toggle: toggle mouse
delay: delay (in seconds) after which initial mouse state is restored (useful to temporarily disable mouse)
To enable/disable mouse at startup, use:
/set weechat.look.mouse on/off
Examples:
enable mouse:
/mouse enable
toggle mouse for 5 seconds:
/mouse toggle 5
........................................
[command]*`mute`* esegue un comando in silenzio::
........................................
/mute [-current | -buffer <nome> | -all] comando
@ -372,16 +424,16 @@ Esempi:
autoload
reload|unload [<nome>]
list: list loaded plugins
listfull: list loaded plugins (verbose)
load: load a plugin
autoload: autoload plugins in system or user directory
reload: reload a plugin (if no name given, unload all plugins, then autoload plugins)
unload: unload a plugin (if no name given, unload all plugins)
filename: plugin (file) to load
name: a plugin name
list: elenca i plugin attivati
listfull: elenca i plugin attivati (dettagliato)
load: attiva un plugin
autoload: attiva automaticamente un plugin nella cartella di sistema o utente
reload: riattiva un plugin (se non specificato, disattiva e poi riattiva tutti i plugin)
unload: disattiva un plugin (se non specificato, disattiva tutti i plugin
nomefile: plugin (file) da attivare
nome: nome di un plugin
Without argument, this command lists loaded plugins.
Senza argomento, questo comando elenca i plugin attivati.
........................................
[command]*`proxy`* gestione proxy::
@ -539,54 +591,54 @@ Esempi:
/window list
-1|+1|b#|up|down|left|right
splith|splitv [<pct>]
resize [+/-]<pct>
resize [+/-] <pct>
balance
merge [all]
page_up|page_down
refresh
scroll [+/-]<value>[s|m|h|d|M|y]
scroll_horiz [+/-]<value>[%]
scroll|[+/-]<valore>[s|m|h|d|M|y]
scroll_horiz [+/-]<valore>[%]
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)
-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
balance: balance the sizes of all windows
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 a number of lines (+/-N) or with time: s=seconds, m=minutes, h=hours, d=days, M=months, y=years
scroll_horiz: scroll horizontally a number of columns (+/-N) or percentage of window size (this scrolling is possible only on buffers with free content)
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
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
balance: bilancia le dimensioni tutte le finestre
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_horiz: scorre orizzontalmente un numero di colonne (+/-N) una percentuale della dimensione della finestra (questo scorrimento è possibile solo sui buffer con contenuto libero)
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
swap: scambia i buffer di due finestra (con direzione opzionale per la finestra di destinazione)
zoom: ingrandimento sulla finestra
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
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
Examples:
jump to window displaying buffer #1:
Esempi:
salta alla finestra che visualizza il buffer #1:
/window b1
scroll 2 lines up:
scorre di due righe in alto:
/window scroll -2
scroll 2 days up:
scorre all'indietro di due giorni:
/window scroll -2d
scroll to beginning of current day:
/window scroll -d
scorre all'inizio del giorno attuale:
/window scroll -d
........................................

View File

@ -119,7 +119,7 @@
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `brown`)
* *weechat.color.chat_tags*
** descrizione: `text color for tags after messages (displayed with command /debug tags)`
** descrizione: `colore del testo per i tago dopo i messaggi (mostrati con il comando /debug tags)`
** tipo: colore
** valori: un nome colore di WeeChat (default, black, (dark)gray, white, (light)red, (light)green, brown, yellow, (light)blue, (light)magenta, (light)cyan), un numero colore del terminale o un alias; attributi consentiti prima del colore (solo per il colore del testo, non lo sfondo): "*" per il grassetto, "!" per l'inverso, "_" per la sottolineatura (valore predefinito: `red`)
@ -364,7 +364,7 @@
** valori: qualsiasi stringa (valore predefinito: `"%a, %d %b %Y"`)
* *weechat.look.eat_newline_glitch*
** descrizione: `if set, the eat_newline_glitch will be set to 0; this is used to not add new line char at end of each line, and then not break text when you copy/paste text from WeeChat to another application (this option is disabled by default because it can cause serious display bugs)`
** descrizione: `se attivo, eat_newline_glitch verrà impostato a 0; viene usato per non aggiungere il carattere a capo alla fine di ogni riga, al fine di non danneggiare il testo quando viene copiato/incollato da WeeChat in un'altra applicazione (l'opzione è disabilitata per default, dato che può causare seri errori di visualizzazione)`
** tipo: bool
** valori: on, off (valore predefinito: `off`)
@ -473,6 +473,11 @@
** tipo: bool
** valori: on, off (valore predefinito: `on`)
* *weechat.look.mouse*
** descrizione: `enable mouse support at startup (to enable it now, see /help mouse)`
** tipo: bool
** valori: on, off (valore predefinito: `off`)
* *weechat.look.nickmode*
** descrizione: `mostra modalità nick ((half)op/voice) prima di ogni nick`
** tipo: bool
@ -599,7 +604,7 @@
** valori: qualsiasi stringa (valore predefinito: `"-"`)
* *weechat.look.separator_vertical*
** descrizione: `char used to draw vertical separators around bars (empty value will draw a real line with ncurses), wide chars are NOT allowed here`
** 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`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)

View File

@ -6051,7 +6051,7 @@ weechat_hook_modifier ("2000|input_text_display", &modifier_cb, NULL);
I tipi di hook che seguono consentono la priorità: command, command_run,
signal, hsignal, config, completion, modifier, info, info_hashtable, infolist,
hdata.
hdata, focus.
weechat_hook_command
^^^^^^^^^^^^^^^^^^^^
@ -8283,6 +8283,87 @@ struct t_hook *my_hdata = weechat_hook_hdata ("my_hdata",
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
// TRANSLATION MISSING
weechat_hook_focus
^^^^^^^^^^^^^^^^^^
Hook a focus: mouse event or key pressed in cursor mode (free movement of
cursor).
Prototipo:
[source,C]
----------------------------------------
struct t_hook *weechat_hook_focus (const char *area,
struct t_hashtable *(*callback)(void *data,
struct t_hashtable *info),
void *callback_data);
----------------------------------------
Argomenti:
* 'area': "chat" for chat area, or name of bar item
(priority allowed, see note about <<hook_priority,priority>>)
* 'callback': function called when focus is made, arguments and return
value:
** 'void *data': pointer
** 'struct t_hashtable *info': hashtable with info on focus and strings returned
by other calls to focus callbacks (with higher priority); keys and values
are of type "string"; info on focus (filled by WeeChat) are:
*** '_x': column of focus on screen (first column on the left is "0")
*** '_y': line of focus on screen (first line on top is "0")
*** '_window': pointer of window with focus ("0x0" for a bar of type "root"
or for unknown area)
*** '_bar_name': name of bar with focus (NULL for chat area or for unknown
area)
*** '_bar_item_name': name of bar item with focus (NULL if focus is not in a
bar or if focus is after the end of last bar item)
*** '_item_line': line with focus in bar item (first line of bar item is "0")
*** '_item_col': column with focus in bar item (first column of bar item is "0")
** return value: either "info" pointer (hashtable completed), or pointer to a
new hashtable (created by callback, with keys and values of type "string"),
this new hashtable content will be added to 'info' for other calls to focus
callbacks
* 'callback_data': pointer given to callback when it is called by WeeChat
Valore restituito:
* pointer to new hook, NULL if error occured
Esempio in C:
[source,C]
----------------------------------------
struct t_hashtable *
my_focus_nicklist_cb (void *data, struct t_hashtable *info)
{
/* add strings in hashtable */
/* ... */
return info;
}
/* add focus on nicklist */
struct t_hook *my_focus = weechat_hook_focus ("buffer_nicklist",
&my_focus_nicklist_cb, NULL);
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototype
hook = weechat.hook_focus(area, callback, callback_data)
# example
def my_focus_nicklist_cb(data, info):
# build dict
# ...
return my_dict
hook = weechat.hook_focus("buffer_nicklist", "my_focus_nicklist_cb", "")
----------------------------------------
weechat_unhook
^^^^^^^^^^^^^^

View File

@ -419,20 +419,20 @@ Associazione tasti predefinita
Tasti per la riga di comando
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Tasti | Descrizione | Comando
| @k(←) .2+| Passa al carattere precedente nella riga di comando .2+| /input move_previous_char
| @k(←) .2+| Passa al carattere precedente nella riga di comando .2+| /input move_previous_char
| @k(C-)@k(b)
| @k(→) .2+| Passa al carattere successivo nella riga di comando .2+| /input move_next_char
| @k(→) .2+| Passa al carattere successivo nella riga di comando .2+| /input move_next_char
| @k(C-)@k(f)
| @k(C-)@k(←) .2+| Passa alla parola precedente nella riga di comando .2+| /input move_previous_word
| @k(C-)@k(←) .2+| Passa alla parola precedente nella riga di comando .2+| /input move_previous_word
| @k(A-)@k(b)
| @k(C-)@k(→) .2+| Passa alla parola successiva nella riga di comando .2+| /input move_next_word
| @k(C-)@k(→) .2+| Passa alla parola successiva nella riga di comando .2+| /input move_next_word
| @k(A-)@k(f)
| @k(Home) .2+| Si sposta all'inizio della riga di comando .2+| /input move_beginning_of_line
| @k(Home) .2+| Si sposta all'inizio della riga di comando .2+| /input move_beginning_of_line
| @k(C-)@k(a)
| @k(End) .2+| Si sposta alla fine della riga di comando .2+| /input move_end_of_line
| @k(End) .2+| Si sposta alla fine della riga di comando .2+| /input move_end_of_line
| @k(C-)@k(e)
| @k(C-)@k(c) , @k(b) | Inserisce il codice per il testo in grassetto | /input insert \x02
| @k(C-)@k(c) , @k(c) | Inserisce il codice per il testo colorato | /input insert \x03
@ -440,9 +440,9 @@ Tasti per la riga di comando
| @k(C-)@k(c) , @k(o) | Inserisce il codice per il reset dei colori | /input insert \x0F
| @k(C-)@k(c) , @k(r) | Inserisce il codice per l'inversione dei colori | /input insert \x12
| @k(C-)@k(c) , @k(u) | Inserisce il codice per il testo sottolineato | /input insert \x15
| @k(Del) .2+| Elimina il carattere successivo nella riga di comando .2+| /input delete_next_char
| @k(Del) .2+| Elimina il carattere successivo nella riga di comando .2+| /input delete_next_char
| @k(C-)@k(d)
| @k(Backsp.) .2+| Elimina il carattere precedente nella riga di comando .2+| /input delete_previous_char
| @k(Backsp.) .2+| Elimina il carattere precedente nella riga di comando .2+| /input delete_previous_char
| @k(C-)@k(h)
| @k(C-)@k(k) | Elimina dal cursore fino alla fine della riga di comando (la stringa eliminata viene copiata negli appunti) | /input delete_end_of_line
| @k(C-)@k(r) | Cerca del testo nella cronologia del buffer (consultare <<key_bindings_search_context,tasti per il contesto search>>) | /input search_text
@ -454,7 +454,7 @@ Tasti per la riga di comando
| @k(A-)@k(_) | Ripete l'ultima azione sulla riga di comando | /input redo
| @k(Tab) | Completa comando o nick (@k(Tab) di nuovo: trova prossimo completamento) | /input complete_next
| @k(S-)@k(Tab) | Senza completamento: effettua un completamento parziale, con completamento in sospeso: completa con il completamento precedente | /input complete_previous
| @k(Invio) .3+| Esegue comando o invia messaggio (in modalità ricerca: ferma ricerca) .3+| /input return
| @k(Invio) .3+| Esegue comando o invia messaggio (in modalità ricerca: ferma ricerca) .3+| /input return
| @k(C-)@k(j)
| @k(C-)@k(m)
| @k(↑) | Chiama comando/messaggio precedente (in modalità ricerca: cerca in alto) | /input history_previous
@ -470,7 +470,7 @@ Tasti per la riga di comando
Tasti per buffer / finestre
^^^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Tasti | Descrizione | Comando
| @k(C-)@k(l) | Ridisegna l'intera finestra | /window refresh
@ -482,23 +482,24 @@ Tasti per buffer / finestre
| @k(A-)@k(PgDn) | Scorre di qualche riga in basso nella cronologia del buffer | /window scroll_down
| @k(A-)@k(Home) | Scorre in cima al buffer | /window scroll_top
| @k(A-)@k(End) | Scorre alla fine del del buffer | /window scroll_bottom
| @k(A-)@k(←) .4+| Passa al buffer precedente .4+| /buffer -1
| @k(A-)@k(←) .4+| Passa al buffer precedente .4+| /buffer -1
| @k(A-)@k(↑)
| @k(C-)@k(p)
| @k(F5)
| @k(A-)@k(→) .4+| Passa al buffer successivo .4+| /buffer +1
| @k(A-)@k(→) .4+| Passa al buffer successivo .4+| /buffer +1
| @k(A-)@k(↓)
| @k(C-)@k(n)
| @k(F6)
| @k(F7) | Passa alla finestra precedente | /window -1
| @k(F8) | Passa alla finestra successiva | /window +1
| @k(F9) | Scorre il titolo del buffer sulla sinistra | /bar scroll title * x-50%
| @k(F10) | Scorre il titolo del buffer sulla destra | /bar scroll title * x+50%
| @k(F11) | Scorre di una pagina in alto nella lista nick | /bar scroll nicklist * y-100%
| @k(F12) | Scorre di una pagina in basso nella lista nick | /bar scroll nicklist * y+100%
| @k(A-)@k(F11) | Sposta all'inizio della lista nick | /bar scroll nicklist * yb
| @k(A-)@k(F12) | Sposta alla fine della lista nick | /bar scroll nicklist * ye
| @k(F9) | Scorre il titolo del buffer sulla sinistra | /bar scroll title * -30%
| @k(F10) | Scorre il titolo del buffer sulla destra | /bar scroll title * +30%
| @k(F11) | Scorre di una pagina in alto nella lista nick | /bar scroll nicklist * -100%
| @k(F12) | Scorre di una pagina in basso nella lista nick | /bar scroll nicklist * +100%
| @k(A-)@k(F11) | Sposta all'inizio della lista nick | /bar scroll nicklist * b
| @k(A-)@k(F12) | Sposta alla fine della lista nick | /bar scroll nicklist * e
| @k(A-)@k(a) | Passa al buffer successivo con attività (con priorità: evento, messaggio, altro) | /input jump_smart
| @k(A-)@k(h) | Pulisce hotlist (notifica di attività su altri buffer) | /input hotlist_clear
| @k(A-)@k(j) , @k(A-)@k(l) | Passa all'ultimo buffer | /input jump_last_buffer
| @k(A-)@k(j) , @k(A-)@k(r) | Passa al buffer raw IRC | /server raw
| @k(A-)@k(j) , @k(A-)@k(s) | Passa al buffer server IRC | /server jump
@ -516,6 +517,7 @@ Tasti per buffer / finestre
| @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
| @k(A-)@k(=) | Attiva/disattiva filtri | /filter toggle
|========================================
[[key_bindings_search_context]]
@ -525,26 +527,73 @@ Tasti per il contesto "search"
Questi tasti sono usati nel contesto "search" (quando viene digitato
@k(C-)@k(r) per cercare del testo nel buffer).
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
[width="100%",cols="^.^3,.^10,.^5l",options="header"]
|========================================
| Key | Descrizione | Comando
| @k(C-)@k(r) | Passa alla ricerca esatta | /input search_switch_case
| @k(↑) | Cerca riga precedente | /input search_previous
| @k(↓) | Cerca riga successiva | /input search_next
| @k(Invio) .3+| Ferma ricerca .3+| /input search_stop
| Key | Descrizione | Comando
| @k(C-)@k(r) | Passa alla ricerca esatta | /input search_switch_case
| @k(↑) | Cerca riga precedente | /input search_previous
| @k(↓) | Cerca riga successiva | /input search_next
| @k(Invio) .3+| Ferma ricerca .3+| /input search_stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
[[key_bindings_other]]
Altri tasti
^^^^^^^^^^^
// TRANSLATION MISSING
[[key_bindings_cursor_context]]
Keys for "cursor" context
^^^^^^^^^^^^^^^^^^^^^^^^^
[width="100%",cols="^.^3,.^10,.^5m",options="header"]
These keys are used in context "cursor" (free movement of cursor on screen).
[width="100%",cols="^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Tasti | Descrizione | Comando
| @k(A-)@k(h) | Pulisce hotlist (notifica di attività su altri buffer) | /input hotlist_clear
| @k(A-)@k(=) | Attiva/disattiva filtri | /filter toggle
| Key | Area | Description | Command
| @k(↑) | - | Move cursor one line up | /cursor move up
| @k(↓) | - | Move cursor one line down | /cursor move down
| @k(←) | - | Move cursor one column left | /cursor move left
| @k(→) | - | Move cursor one column right | /cursor move right
| @k(A-)@k(↑) | - | Move cursor one area up | /cursor move area_up
| @k(A-)@k(↓) | - | Move cursor one area down | /cursor move area_down
| @k(A-)@k(←) | - | Move cursor one area left | /cursor move area_left
| @k(A-)@k(→) | - | Move cursor one area right | /cursor move area_right
| @k(b) | nicklist | Ban nick | /ban ${nick}
| @k(k) | nicklist | Kick nick | /kick ${nick}
| @k(K) | nicklist | Kick and ban nick | /kickban ${nick}
| @k(q) | nicklist | Open query with nick | /query ${nick};/cursor stop
| @k(w) | nicklist | Do a whois on nick | /whois ${nick}
| @k(Enter) .3+| - .3+| Stop cursor mode .3+| /cursor stop
| @k(C-)@k(j)
| @k(C-)@k(m)
|========================================
// TRANSLATION MISSING
[[key_bindings_mouse_context]]
Keys for "mouse" context
^^^^^^^^^^^^^^^^^^^^^^^^
These keys are used in context "mouse", namely when a mouse event occurs.
[width="100%",cols="^.^3,^.^3,^.^3,.^10,.^5l",options="header"]
|========================================
| Button | Gesture | Area | Description | Command
| ◾◽◽ | left | chat | Passa al buffer precedente | /buffer +1
| ◾◽◽ | right | chat | Passa al buffer successivo | /buffer +1
| ◾◽◽ | left (long) | chat | Switch to first buffer | /buffer 1
| ◾◽◽ | right (long) | chat | Passa all'ultimo buffer | /input jump_last_buffer
| wheel ⇑ | - | chat | Scorre di qualche riga in alto nella cronologia del buffer | /window scroll_up
| wheel ⇓ | - | chat | Scorre di qualche riga in basso nella cronologia del buffer | /window scroll_down
| ◾◽◽ | up | nicklist | Scorre di una pagina in alto nella lista nick | /bar scroll nicklist * -100%
| ◾◽◽ | down | nicklist | Scorre di una pagina in basso nella lista nick | /bar scroll nicklist * +100%
| ◾◽◽ | up (long) | nicklist | Sposta all'inizio della lista nick | /bar scroll nicklist * b
| ◾◽◽ | down (long) | nicklist | Sposta alla fine della lista nick | /bar scroll nicklist * e
| ◾◽◽ | - | nicklist | Open query with nick | /query ${nick}
| ◽◽◾ | - | nicklist | Do a whois on nick | /whois ${nick}
| ◾◽◽ | left | nicklist | Kick nick | /kick ${nick}
| ◾◽◽ | left (long) | nicklist | Kick and ban nick | /kickban ${nick}
| ◽◽◾ | left | nicklist | Ban nick | /ban ${nick}
| wheel ⇑ | - | any bar | Scroll bar by -10% | /bar scroll ${_bar_name} * -10%
| wheel ⇓ | - | any bar | Scroll bar by +10% | /bar scroll ${_bar_name} * +10%
| ◽◾◽ | - | anywhere | Start cursor mode at this point | /cursor go ${_x},${_y}
|========================================
[[command_line]]

View File

@ -42,6 +42,7 @@
./src/gui/curses/gui-curses.h
./src/gui/curses/gui-curses-key.c
./src/gui/curses/gui-curses-main.c
./src/gui/curses/gui-curses-mouse.c
./src/gui/curses/gui-curses-window.c
./src/gui/gtk/gui-gtk-bar-window.c
./src/gui/gtk/gui-gtk-chat.c
@ -49,6 +50,7 @@
./src/gui/gtk/gui-gtk.h
./src/gui/gtk/gui-gtk-key.c
./src/gui/gtk/gui-gtk-main.c
./src/gui/gtk/gui-gtk-mouse.c
./src/gui/gtk/gui-gtk-window.c
./src/gui/gui-bar.c
./src/gui/gui-bar.h
@ -62,6 +64,10 @@
./src/gui/gui-chat.h
./src/gui/gui-color.c
./src/gui/gui-color.h
./src/gui/gui-cursor.c
./src/gui/gui-cursor.h
./src/gui/gui-mouse.c
./src/gui/gui-mouse.h
./src/gui/gui-completion.c
./src/gui/gui-completion.h
./src/gui/gui-filter.c

153
po/cs.po
View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -373,12 +373,14 @@ msgstr "Historie příkazů bufferu:"
msgid "default command:"
msgstr "výchozí příkaz:"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Klávesové zkratky přidány nebo předefinovány (%d):"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Klávesové zkratky smazány (%d):"
#, fuzzy, c-format
@ -409,17 +411,19 @@ msgstr "%sKlávesa \"%s\" nenalezena"
msgid "No key binding defined for context \"%s\""
msgstr "Žádné klávesové zkratky nejsou definovány"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Klávesové zkratky (%d):"
msgid "%d key bindings for context \"%s\":"
msgstr "Klávesové zkratky smazány (%d):"
#, fuzzy, c-format
msgid "No default key binding for context \"%s\""
msgstr "Žádné výchozí klávesové zkratky"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Výchozí klávesové zkratky (%d):"
msgid "%d default key bindings for context \"%s\":"
msgstr "Žádné výchozí klávesové zkratky"
msgid "Key:"
msgstr "Klávesa:"
@ -819,6 +823,7 @@ msgstr ""
"<hodnota> || hide|show|toggle <jméno> || scroll <jméno> <buffer> "
"<hodnota_posunu>"
#, fuzzy
msgid ""
" list: list all bars\n"
" listfull: list all bars (verbose)\n"
@ -851,9 +856,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1074,13 +1079,41 @@ msgstr ""
" příkaz: příkaz, který spustit ('/' je automaticky dodáno, pokud není "
"nalezeno na začátku příkazu)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr "spřáva ladění pro jádro/pluginy"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
@ -1095,10 +1128,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1315,8 +1350,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1407,6 +1444,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1415,7 +1461,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: vypsat všechny aktuální klávesy (pokud není vuveden žádný "
"argument, je vypsán tento list)\n"
@ -1467,6 +1516,30 @@ msgstr ""
"\n"
"Pokud je tento příkaz spuštěn bez argumentů je zobrazeno uložené rozložení."
#, fuzzy
msgid "mouse control"
msgstr "ovládání xfer"
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr "vykonat příkaz v tichosti"
@ -2018,6 +2091,9 @@ msgstr ""
"klávesové kódy mohou být resetovány (klávesy přidány, redefinovány nebo "
"smazány)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2267,6 +2343,9 @@ msgstr ""
"skočit na posledně navštívený buffer při zavírání bufferu (pokud je vypnuto "
"skočí na číslo bufferu - 1)"
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "zobrazit mód přezdívky ((částečný)op/voice) před každou přezdívkou"
@ -2954,6 +3033,14 @@ msgstr "Obdržen signál %s, ukončuji WeeChat.."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Obdržen signál SIGHUP, znovunačítám konfigurační soubory"
#, fuzzy
msgid "Mouse is enabled"
msgstr "1 pokud jsou filtry povoleny"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Filtrování zpráv zakázáno"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', velikost: %dx%d"
@ -3060,11 +3147,19 @@ msgstr "%sChyba: buffer se stejným jménem (%s) už existuje"
msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr "%sChyba: je možné spojovat pouze bufferz s formátovaným obsahem"
#, fuzzy
msgid "Debug enabled for cursor mode"
msgstr "Ladění vypnuto pro \"%s\""
#, fuzzy
msgid "Debug disabled for cursor mode"
msgstr "Ladění vypnuto pro \"%s\""
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr "Chyba: nedostatek paměti pro přidáni bufferu do hotlistu"
#, c-format
msgid "New key binding: %s%s => %s%s"
#, fuzzy, c-format
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Nová klávesová zkratka: %s%s => %s%s"
#, c-format
@ -3077,6 +3172,14 @@ msgstr "Chyba: nedostatek paměti pro klávesovou zkratku"
msgid "Not enough memory for new line"
msgstr "Nedostatek paměti pro nový řádek"
#, fuzzy
msgid "Debug enabled for mouse"
msgstr "Ladění vypnuto pro \"%s\""
#, fuzzy
msgid "Debug disabled for mouse"
msgstr "Ladění vypnuto pro \"%s\""
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s%s: chyba, cyklický odkaz při volání aliasu \"%s\""
@ -6536,6 +6639,10 @@ msgstr "nečinnost klávesnice (sekundy)"
msgid "1 if filters are enabled"
msgstr "1 pokud jsou filtry povoleny"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "1 pokud jsou filtry povoleny"
msgid "list of bars"
msgstr "seznam polí"
@ -6658,6 +6765,10 @@ msgstr ""
msgid "bar item"
msgstr "seznam položek polí"
#, fuzzy
msgid "bar window"
msgstr "spravuje okna"
#, fuzzy
msgid "buffer"
msgstr "řídit buffery"
@ -7804,6 +7915,14 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Klávesové zkratky (%d):"
#, fuzzy
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Výchozí klávesové zkratky (%d):"
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "historie příkazů"

276
po/de.po
View File

@ -22,9 +22,9 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Nils G.\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-07-14 20:53+0100\n"
"Last-Translator: Nils Görs\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
@ -88,9 +88,9 @@ msgstr ""
" zu den mögliche Optionen zu erhalten.)\n"
#. TRANSLATORS: first "%s" is "weechat"
#, fuzzy, c-format
#, c-format
msgid "%s default keys (context: \"%s\"):\n"
msgstr "%s Standardtastenbelegungen:\n"
msgstr "%s Standardtastenbelegungen (Kontext: \"%s\"):\n"
#, c-format
msgid "Error: missing argument for \"%s\" option\n"
@ -386,18 +386,23 @@ msgstr "Befehlsverlauf des Buffers:"
msgid "default command:"
msgstr "Standardbefehl:"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgstr "Tastenbelegungen die hinzugefügt oder verändert wurden (%d):"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr ""
"Tastenbelegungen die hinzugefügt oder verändert wurden (%d) für Kontext \"%s"
"\":"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgstr "Tastenbelegungen die gelöscht wurden (%d):"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Tastenbelegungen die gelöscht wurden (%d), für Kontext \"%s\":"
#, fuzzy, c-format
#, c-format
msgid "No key binding added, redefined or removed for context \"%s\""
msgstr ""
"Es sind keine Tastenbelegungen hinzugefügt, verändert oder gelöscht worden"
"Es sind für Kontext \"%s\" weder Tastenbelegungen hinzugefügt, verändert "
"oder gelöscht worden"
#, c-format
msgid "%sError: unable to bind key \"%s\""
@ -407,9 +412,9 @@ msgstr "%sFehler: kann die Taste \"%s\" nicht zuordnen"
msgid "Key \"%s\" has already default value"
msgstr "Die Taste \"%s\" ist schon mit einem Standardbefehl belegt"
#, fuzzy, c-format
#, c-format
msgid "Key \"%s\" unbound (context: \"%s\")"
msgstr "Tastenbelegung \"%s\" entfernt"
msgstr "Tastenbelegung \"%s\" entfernt (Kontext: \"%s\")"
#, c-format
msgid "%sError: unable to unbind key \"%s\""
@ -419,21 +424,23 @@ msgstr "%sFehler: kann die Tastenbelegung \"%s\" nicht entfernen"
msgid "%sKey \"%s\" not found"
msgstr "%sTastenbelegung \"%s\" nicht gefunden"
#, fuzzy, c-format
#, c-format
msgid "No key binding defined for context \"%s\""
msgstr "Keine Tastenbelegung definiert"
msgstr "Keine Tastenbelegung für Kontext \"%s\" definiert"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Tastenbelegungen (%d):"
msgid "%d key bindings for context \"%s\":"
msgstr "Tastenbelegungen die gelöscht wurden (%d), für Kontext \"%s\":"
#, fuzzy, c-format
#, c-format
msgid "No default key binding for context \"%s\""
msgstr "keine Standardtastenbelegungen vorhanden"
msgstr "keine Standardtastenbelegungen für Kontext \"%s\" vorhanden"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Standardtastenbelegungen (%d):"
msgid "%d default key bindings for context \"%s\":"
msgstr "keine Standardtastenbelegungen für Kontext \"%s\" vorhanden"
msgid "Key:"
msgstr "Taste:"
@ -441,13 +448,13 @@ msgstr "Taste:"
msgid "No key found"
msgstr "Keine Taste gefunden"
#, fuzzy, c-format
#, c-format
msgid "%sError: context \"%s\" not found"
msgstr "%sFehler: Filter \"%s\" nicht gefunden"
msgstr "%sFehler: Kontext\"%s\" nicht gefunden"
#, fuzzy, c-format
#, c-format
msgid "Default key bindings restored for context \"%s\""
msgstr "Standardtastenbelegungen wiederhergestellt"
msgstr "Standardtastenbelegungen wiederhergestellt für Kontext \"%s\""
#, c-format
msgid "%sError: \"-yes\" argument is required for keys reset (security reason)"
@ -455,11 +462,11 @@ msgstr ""
"%sFehler: \"-yes\" Argument ist aus Sicherheitsgründen für den Reset der "
"Tastenbelegung notwendig"
#, fuzzy, c-format
#, c-format
msgid "%d new key added"
msgid_plural "%d new keys added (context: \"%s\")"
msgstr[0] "(%d) neue Taste hinzugefügt"
msgstr[1] "(%d) neue Tasten hinzugefügt"
msgstr[1] "(%d) neue Tasten hinzugefügt (Kontext: \"%s\")"
#, c-format
msgid "leaf: id: %d, parent: %d, plugin: \"%s\", buffer: \"%s\""
@ -830,6 +837,7 @@ msgstr ""
"status|nicklist] || del <name>|-all || set <name> <option> <value> || hide|"
"show|toggle <name> || scroll <name> <buffer> <scroll_value>"
#, fuzzy
msgid ""
" list: list all bars\n"
" listfull: list all bars (verbose)\n"
@ -862,9 +870,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1093,16 +1101,44 @@ msgstr ""
" Befehl: auszuführender Befehl (es wird automatisch ein '/' "
"vorangestellt, falls dieser nicht angegeben wurde)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr "Debug-Kontrolle für Hauptprogramm und/oder Erweiterung"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|hdata|"
"infolists|memory|tags|term|windows"
#, fuzzy
msgid ""
@ -1114,10 +1150,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1131,8 +1169,8 @@ msgstr ""
" buffer: speichert den Bufferinhalt als hexadezimale Ausgabe in die "
"Protokolldatei\n"
" color: zeigt Informationen über die aktuellen Farbpaarungen an\n"
" hdata: zeigt Informationen zu hdata an (direkter Daten-Zugriff auf "
"WeeChat/Erweiterungen)\n"
" hdata: zeigt Informationen zu hdata an (mittels free werden alle hdata "
"Informationen aus dem Speicher entfernt)\n"
"infolists: zeigt Information über die Infolists an\n"
" memory: gibt Informationen über den genutzten Speicher aus\n"
" tags: zeigt für jede einzelne Zeile die dazugehörigen Tags an\n"
@ -1347,8 +1385,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1363,6 +1403,10 @@ msgstr ""
" complete_next: vervollständigt Word mit nächster Komplettierung\n"
" complete_previous: vervollständigt Word mit vorheriger Komplettierung\n"
" search_text: sucht nach Text im Buffer\n"
" search_switch_case: schaltet Groß-/Kleinschreibung ein und aus\n"
" search_previous: sucht vorheriger Zeile\n"
" search_next: sucht nächste Zeile\n"
" search_stop: suche stoppen\n"
" delete_previous_char: entfernt vorheriges Zeichen\n"
" delete_next_char: entfernt nächstes Zeichen\n"
" delete_previous_word: entfernt vorheriges Wort\n"
@ -1415,15 +1459,16 @@ msgstr ""
msgid "bind/unbind keys"
msgstr "Einer Taste einen Befehl zuordnen oder entfernen"
#, fuzzy
msgid ""
"list|listdefault|listdiff [<context>] || bind <key> [<command> [<args>]] || "
"bindctxt <context> <key> [<command> [<args>]] || unbind <key> || unbindctxt "
"<context> <key> || reset <key> || resetctxt <context> <key> || resetall -yes "
"[<context>] || missing [<context>]"
msgstr ""
"list|listdefault|listdiff || bind <key> [<command> [<args>]] || unbind <key> "
"|| reset <key> || resetall -yes || missing"
"list|listdefault|listdiff [<context>] || bind <key> [<command> [<args>]] || "
"bindctxt <context> <key> [<command> [<args>]] || unbind <key> || unbindctxt "
"<context> <key> || reset <key> || resetctxt <context> <key> || resetall -yes "
"[<context>] || missing [<context>]"
#, fuzzy
msgid ""
@ -1450,6 +1495,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1458,39 +1512,52 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: zeigt die aktuelle Tastenbelegungen an (Standardaufruf)\n"
"listdefault: zeigt die Standardeinstellung der Tastenbelegung an\n"
" listdiff: zeigt die Unterschiede zwischen der aktuell genutzten "
"Tastaturbelegung und der Standardbelegung an (hinzugefügte/verändert/"
"gelöschte Tastenbelegungen)\n"
" context: Name des Kontextes (\"default\" oder \"search\")\n"
" bind: belegt eine Taste mit einem Befehl oder zeigt an welcher Befehl "
"auf eine Taste gelegt wurde\n"
" unbind: hebt eine Tastenbelegung auf\n"
"auf eine Taste gelegt wurde (für Kontext \"default\")\n"
" bindctxt: belegt eine Taste mit einem Befehl oder zeigt an welcher Befehl "
"auf eine Taste gelegt wurde, dies trifft für Kontext definierte Tasten zu\n"
" unbind: hebt eine Tastenbelegung auf (für Kontext \"default\")\n"
" unbindctxt: hebt eine Tastenbelegung für den angegebenen Kontext auf\n"
" reset: die Tastenbelegung wird für die ausgewählte Taste auf die "
"Standardeinstellung zurück gesetzt\n"
"Standardeinstellung zurück gesetzt (für Kontext \"default\")\n"
" resetctxt: die Tastenbelegung wird für die ausgewählte Taste auf die "
"Standardeinstellung zurück gesetzt, dies trifft für den ausgewählten Kontext "
"zu\n"
" resetall: die Tastenbelegung wird auf die Standardeinstellungen zurück "
"gesetzt. Dies löscht ALLE persönlichen Tastenbelegungen (Vorsicht!)\n"
" missing: fügt fehlende Tastenbelegungen hinzu (dazu wird die "
"Standardbelegung genutzt). Dies kann sinnvoll sein wenn man auf eine neue "
"WeeChat Version umgestiegen ist\n"
"\n"
"Falls einer Taste ein Befehl zugeordnet werden soll ist es ratsam dies "
"mittels alt+k (oder Esc und k) zu machen um dann die Taste auszuwählen, die "
"belegt werden soll. Durch diesen Schritt wird der entsprechende Tasten-Code "
"in die Befehlszeile übernommen.\n"
"Falls einer Taste ein Befehl zugeordnet werden soll ist es ratsam zuerst mit "
"der Tastenkombination alt+k (oder Esc + k) einen Fangmodus zu aktivieren und "
"damit die neu zu belegende Taste zu greifen. Durch diesen Schritt wird der "
"entsprechende Tasten-Code in die Befehlszeile übernommen.\n"
"\n"
"Beispiele:\n"
" Mit der Tastenkombination \"alt-x\" kann die Nicklist-Bar an-und aus "
"geschaltet werden:\n"
" Mit der Tastenkombination kann die Nicklist-Bar an-und aus geschaltet "
"werden:\n"
" /key bind meta-x /bar toggle nicklist\n"
" Mit der Tastenkombination \"alt-r\" wird direkt zum IRC #weechat Buffer "
"gewechselt:\n"
" /key bind meta-r /buffer #weechat\n"
" Die Tastenkombination \"alt-r\" wird auf die Standardfunktion "
"zurückgesetzt:\n"
" /key reset meta-r"
" /key reset meta-r\n"
" \"Tab\"-Taste nutzen um im Kontext \"search\" die Suche innerhalb eines "
"Buffers zu beenden:\n"
" /key bindctxt search ctrl-I /input search_stop"
msgid "save/apply/reset layout for buffers and windows"
msgstr "Layout für Buffer und Fenster speichern, anwenden oder zurücksetzen"
@ -1519,6 +1586,30 @@ msgstr ""
"Wird der Befehl ohne Argumente aufgerufen wird das gespeicherte Layout "
"dargestellt."
#, fuzzy
msgid "mouse control"
msgstr "Transfer-Steuerung"
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr "Führt einen Befehl ohne Textausgabe aus"
@ -2083,9 +2174,8 @@ msgid "options for bars"
msgstr "Optionen für Infobars"
#. TRANSLATORS: "key" means "key on the keyboard"
#, fuzzy
msgid "key contexts"
msgstr "Tastaturcodes"
msgstr "Tastaturkontext"
#. TRANSLATORS: "key" means "key on the keyboard"
msgid "key codes"
@ -2097,6 +2187,9 @@ msgstr ""
"Tastenbelegungen die zurückgesetzt werden können (hinzugefügte/verändert/"
"gelöschte Tastenbelegungen)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2222,8 +2315,11 @@ msgid ""
"text from WeeChat to another application (this option is disabled by default "
"because it can cause serious display bugs)"
msgstr ""
"wird diese Option aktiviert, dann wird /\"eat_newline_glitch/\" auf 0 "
"gesetzt; dies wird genutzt um keinen Zeilenumbruch am Ende einer Zeile "
"aktiviert man diese Option, dann wird \"eat_newline_glitch\" auf 0 gesetzt; "
"dies bedeutet, dass am Ende einer Zeile kein Zeilenumbruch angehangen wird "
"und somit der Text beim kopieren aus WeeChat und beim einfügen in einer "
"anderen Applikation nicht umgebrochen wird (diese Option ist standardmäßig "
"deaktiviert, da es zu schwerwiegenden Grafikfehlern kommen kann)"
msgid ""
"comma separated list of words to highlight (case insensitive comparison, "
@ -2373,6 +2469,9 @@ msgstr ""
"wird (wenn diese Funktion deaktiviert ist wird zum Buffer gewechselt der die "
"Position -1 einnimmt)"
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "Nickmode ((half)op/voice [@%+]) vor dem Nicknamen anzeigen"
@ -2488,15 +2587,13 @@ msgstr ""
"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."
#, 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"
msgstr ""
"Das angegebene Zeichen wird genutzt um damit die horizontalen Linien zu "
"Das angegebene Zeichen wird genutzt um damit die vertikale Linien zu "
"zeichnen. Wird kein Zeichen angegeben 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."
"Linie. Wide Chars sind für diese Option NICHT erlaubt."
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
@ -2879,7 +2976,7 @@ msgstr ""
#, c-format
msgid "%sError: bad file descriptor (%d) used in hook_fd"
msgstr ""
msgstr "%sFehler: bad file descriptor (%d) wurde in hook_fd Funktion genutzt"
#, c-format
msgid "End of command '%s', timeout reached (%.1fs)"
@ -3098,6 +3195,14 @@ msgstr "Signal %s empfangen, beende WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Signal SIGHUP empfangen, lese Konfigurationsdateien neu"
#, fuzzy
msgid "Mouse is enabled"
msgstr "1, falls Filter aktiviert sind"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Filterung von Nachrichten deaktiviert"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', Größe: %dx%d"
@ -3213,12 +3318,20 @@ msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
"%sFehler: Es ist nur möglich Buffer mit formatiertem Inhalt zusammenzufügen"
#, fuzzy
msgid "Debug enabled for cursor mode"
msgstr "Debug deaktiviert für \"%s\""
#, fuzzy
msgid "Debug disabled for cursor mode"
msgstr "Debug deaktiviert für \"%s\""
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr ""
"Fehler: nicht genügend Speicher um den Buffer der Hotlist hinzu zu fügen"
#, c-format
msgid "New key binding: %s%s => %s%s"
#, fuzzy, c-format
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Neue Tastenbelegung: %s%s => %s%s"
#, c-format
@ -3231,6 +3344,14 @@ msgstr "Fehler: nicht genügend Speicher für Tastenzuordnung"
msgid "Not enough memory for new line"
msgstr "Nicht genügend Speicher für eine neue Zeile"
#, fuzzy
msgid "Debug enabled for mouse"
msgstr "Debug deaktiviert für \"%s\""
#, fuzzy
msgid "Debug disabled for mouse"
msgstr "Debug deaktiviert für \"%s\""
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s%s: Fehler, Zirkelbezug beim Aufruf des Alias \"%s\""
@ -5370,18 +5491,20 @@ msgid ""
"(should be last buffer), next = current buffer + 1, near_server = after last "
"channel/pv of server)"
msgstr ""
"Ein öffentlicher Channel wird auf eine Position gezwungen (none = "
"standardmäßige Position (sollte die letzte Position sein), next = aktueller "
"Buffer + 1, near_server = nach letztem Channel/privaten Buffer des Servers)"
"Ein neu geöffneter Channel wird auf eine Position gezwungen (none = "
"standardmäßige Position (sollte der letzte Buffer in der Liste sein), next = "
"aktueller Buffer + 1, near_server = nach dem letztem Channel/privaten Buffer "
"des jeweiligen Servers)"
msgid ""
"force position of new private in list of buffers (none = default position "
"(should be last buffer), next = current buffer + 1, near_server = after last "
"channel/pv of server)"
msgstr ""
"Ein privater Buffer wird auf eine Position gezwungen (none = standardmäßige "
"Position (sollte die letzte Position sein), next = aktueller Buffer + 1, "
"near_server = nach letztem Channel/privaten Buffer des Servers)"
"Ein neuer privater Buffer wird auf eine Position gezwungen (none = "
"standardmäßige Position (sollte der letzte Buffer in der Liste sein), next = "
"aktueller Buffer + 1, near_server = nach dem letztem Channel/privaten Buffer "
"des jeweiligen Servers)"
msgid "text to display before nick in chat window"
msgstr "Text, der im Chatfenster vor dem Nickname erscheinen soll"
@ -6820,6 +6943,10 @@ msgstr "Inaktivität der Tastatur (Sekunden)"
msgid "1 if filters are enabled"
msgstr "1, falls Filter aktiviert sind"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "1, falls Filter aktiviert sind"
msgid "list of bars"
msgstr "Auflistung der Bars"
@ -6899,7 +7026,7 @@ msgid "list of key bindings"
msgstr "Auflistung der Tastenzuweisungen"
msgid "context (\"default\" or \"search\") (optional)"
msgstr ""
msgstr "Kontext (\"default\" oder \"search\") (optional)"
msgid "nicks in nicklist for a buffer"
msgstr "Nicks in Nickliste für einen Buffer"
@ -6944,6 +7071,10 @@ msgstr "Bar"
msgid "bar item"
msgstr "Bar-Item"
#, fuzzy
msgid "bar window"
msgstr "Fenster"
msgid "buffer"
msgstr "Buffer"
@ -6989,7 +7120,6 @@ msgstr "Gruppen in Nickliste"
msgid "nick in nicklist"
msgstr "Nick in Nickliste"
#, fuzzy
msgid "plugin"
msgstr "Erweiterung"
@ -8111,6 +8241,12 @@ msgstr "Variablen"
msgid "Lists"
msgstr "Listen"
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Tastenbelegungen (%d) für Kontext \"%s\":"
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Standardtastenbelegungen (%d) für Kontext \"%s\" :"
#~ msgid "hook (variables common to all hook types)"
#~ msgstr "Hook (Variablen die für alle Hook-Typen geläufig sind)"

153
po/es.po
View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-07-05 15:37+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -377,12 +377,14 @@ msgstr "Historial de comandos:"
msgid "default command:"
msgstr "comando predeterminado:"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Atajos agregados o redefinidos (%d):"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Atajos borrados (%d):"
#, fuzzy, c-format
@ -413,17 +415,19 @@ msgstr "%sTecla \"%s\" no encontrada"
msgid "No key binding defined for context \"%s\""
msgstr "Ningún atajo definido"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Atajos (%d):"
msgid "%d key bindings for context \"%s\":"
msgstr "Atajos borrados (%d):"
#, fuzzy, c-format
msgid "No default key binding for context \"%s\""
msgstr "Ningún atajo predefinido"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Atajos predefinidos (%d):"
msgid "%d default key bindings for context \"%s\":"
msgstr "Ningún atajo predefinido"
msgid "Key:"
msgstr "Tecla:"
@ -820,6 +824,7 @@ msgstr ""
"<valor> || hide|show|toggle <nombre> || scroll <nombre> <buffer> "
"<desplazamiento>"
#, fuzzy
msgid ""
" list: list all bars\n"
" listfull: list all bars (verbose)\n"
@ -852,9 +857,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1080,13 +1085,41 @@ msgstr ""
"comando: comando a ejecutar (se añade una '/' automáticamente si no se "
"encuentra al principio del comando)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr "controla los mensajes de depuración para el núcleo/plugins"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <nivel> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
@ -1101,10 +1134,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1323,8 +1358,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1417,6 +1454,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1425,7 +1471,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: lista todas los atajos actuales (sin argumentos, esta lista es "
"mostrada)\n"
@ -1479,6 +1528,30 @@ msgstr ""
"\n"
"Sin ningún argumento, este comando muestra el esquema guardado."
#, fuzzy
msgid "mouse control"
msgstr "control de transferencias"
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr "ejecuta un comando silenciosamente"
@ -2040,6 +2113,9 @@ msgid "key codes that can be reset (keys added, redefined or removed)"
msgstr ""
"Atajos que se pueden restaurar (atajos agregados, redefinidos o borrados)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2299,6 +2375,9 @@ msgstr ""
"salta al buffer visitado anteriormente al cerrar un buffer (si es "
"desactivado, entonces salta al buffer de número menor)"
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "mostrar modo del usuario ((semi-)op/voz) antes de cada usuario"
@ -3009,6 +3088,14 @@ msgstr "Señal %s recibida, cerrando WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Señal SIGHUP recibida, recargando archivos de configuración"
#, fuzzy
msgid "Mouse is enabled"
msgstr "1 si los filtros están habilitados"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Filtro de mensajes desactivado"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', tamaño: %dx%d"
@ -3118,13 +3205,21 @@ msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
"%sError: solamente es posible fusionar buffers con contenido formateado"
#, fuzzy
msgid "Debug enabled for cursor mode"
msgstr "Depurado de \"%s\" desactivado"
#, fuzzy
msgid "Debug disabled for cursor mode"
msgstr "Depurado de \"%s\" desactivado"
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr ""
"Error: no hay suficiente memoria para agregar el buffer a la lista de "
"actividad"
#, c-format
msgid "New key binding: %s%s => %s%s"
#, fuzzy, c-format
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Nuevo atajo: %s%s => %s%s"
#, c-format
@ -3137,6 +3232,14 @@ msgstr "Error: no hay suficiente memoria para crear el atajo"
msgid "Not enough memory for new line"
msgstr "No hay suficiente memoria para una línea nueva"
#, fuzzy
msgid "Debug enabled for mouse"
msgstr "Depurado de \"%s\" desactivado"
#, fuzzy
msgid "Debug disabled for mouse"
msgstr "Depurado de \"%s\" desactivado"
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s%s: error, referencia circular al ejecutar el alias \"%s\""
@ -6642,6 +6745,10 @@ msgstr "inactividad del teclado (segundos)"
msgid "1 if filters are enabled"
msgstr "1 si los filtros están habilitados"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "1 si los filtros están habilitados"
msgid "list of bars"
msgstr "lista de barras"
@ -6765,6 +6872,10 @@ msgstr ""
msgid "bar item"
msgstr "lista de elementos de barra"
#, fuzzy
msgid "bar window"
msgstr "gestión de ventanas"
#, fuzzy
msgid "buffer"
msgstr "gestionar los buffers"
@ -7934,6 +8045,14 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Atajos (%d):"
#, fuzzy
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Atajos predefinidos (%d):"
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "historial de comandos"

209
po/fr.po
View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"PO-Revision-Date: 2011-07-10 23:04+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-07-26 14:08+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@ -377,14 +377,16 @@ msgstr "Historique des commandes du tampon:"
msgid "default command:"
msgstr "commande par défaut:"
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr ""
"Associations de touches ajoutées ou redéfinies (%d) pour le contexte \"%s\":"
"%d associations de touches ajoutées ou redéfinies pour le contexte \"%s\":"
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgstr "Associations de touches supprimées (%d) pour le contexte \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "%d associations de touches supprimées pour le contexte \"%s\":"
#, c-format
msgid "No key binding added, redefined or removed for context \"%s\""
@ -416,17 +418,19 @@ msgstr "%sTouche \"%s\" non trouvée"
msgid "No key binding defined for context \"%s\""
msgstr "Pas d'association de touche définie pour le contexte \"%s\""
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Associations de touches (%d) pour le contexte \"%s\":"
msgid "%d key bindings for context \"%s\":"
msgstr "%d associations de touches pour le contexte \"%s\":"
#, c-format
msgid "No default key binding for context \"%s\""
msgstr "Pas de touche par défaut pour le contexte \"%s\""
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Associations de touches par défaut (%d) pour le contexte \"%s\":"
msgid "%d default key bindings for context \"%s\":"
msgstr "%d associations de touches par défaut pour le contexte \"%s\":"
msgid "Key:"
msgstr "Touche:"
@ -853,9 +857,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -903,10 +907,10 @@ msgstr ""
" scroll: faire défiler la barre\n"
" tampon: catégorie et nom du tampon ('*' signifie le tampon courant, "
"vous devez utiliser '*' pour les barres de type root)\n"
"valeur_scroll: valeur pour le défilement: 'x' ou 'y', suivi par '+', '-', "
"'b' (début) ou 'e' (fin), valeur (pour +/-), et un %% optionnel (pour faire "
"défiler par %% de la largeur/hauteur, sinon la valeur est un nombre de "
"caractères)\n"
"valeur_scroll: valeur pour le défilement: 'x' ou 'y' (optionnel), suivi par "
"'+', '-', 'b' (début) ou 'e' (fin), valeur (pour +/-), et un % optionnel "
"(pour faire défiler par % de la largeur/hauteur, sinon la valeur est un "
"nombre de caractères)\n"
"\n"
"Exemples:\n"
" créer une barre avec l'heure, numéro + nom de tampon, et la complétion:\n"
@ -1083,15 +1087,62 @@ msgstr ""
" commande: commande à exécuter (un '/' est automatiquement ajouté s'il n'est "
"pas trouvé au début de la commande)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
"mouvement libre du curseur sur l'écran pour exécuter des actions sur des "
"zones spécifiques de l'écran"
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
"go chat|<barre>|<x>,<y> || move up|down|left|right|area_up|area_down|"
"area_left|area_right || stop"
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
" go: déplacer le curseur vers la zone de discussion (\"chat\"), une barre "
"(en utilisant son nom) ou les coordonnées \"x,y\"\n"
"move: déplacer le curseur dans une direction\n"
"stop: arrêter le mode curseur\n"
"\n"
"Sans paramètre, cette commande active/désactive le mode curseur.\n"
"\n"
"Lorsque la souris est activée (voir /help mouse), par défaut un clic du "
"milieu démarre le mode curseur à ce point.\n"
"\n"
"Exemples:\n"
" aller dans la liste des pseudos:\n"
" /cursor go nicklist\n"
" aller aux coordonnées x=10, y=5:\n"
" /cursor go 10,5"
msgid "control debug for core/plugins"
msgstr "contrôle du debug pour le coeur/les extensions"
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
"list || set <extension> <niveau> || dump [<extension>] || buffer|color|"
"infolists|memory|tags|term|windows || hdata [free]"
"cursor|infolists|memory|mouse|tags|term|windows || hdata [free]"
msgid ""
" list: list plugins with debug levels\n"
@ -1102,10 +1153,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1119,10 +1172,12 @@ msgstr ""
" buffer: afficher le contenu du tampon en valeurs hexadécimales dans le "
"fichier log\n"
" color: afficher des infos sur les paires de couleur courantes\n"
" cursor: activer/désactiver le debug pour le mode curseur\n"
" hdata: afficher des infos sur les hdata (avec free: supprimer tous les "
"hdata en mémoire)\n"
"infolists: afficher des infos sur les infolists\n"
" memory: afficher des infos sur l'utilisation de la mémoire\n"
" mouse: activer/désactiver le debug pour la souris\n"
" tags: afficher les étiquettes pour les lignes\n"
" term: afficher des infos sur le terminal\n"
" windows: afficher l'arbre des fenêtres"
@ -1328,8 +1383,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1378,8 +1435,10 @@ msgstr ""
" jump_previously_visited_buffer: sauter au tampon visité précédemment\n"
" jump_next_visited_buffer: sauter au tampon visité après\n"
" hotlist_clear: effacer la hotlist\n"
" grab_key: capturer une touche\n"
" grab_key_command: capturer une touche avec sa commande associée\n"
" grab_key: capturer une touche (paramètre facultatif: délai pour la fin de "
"la capture, par défaut 500 millisecondes)\n"
" grab_key_command: capturer une touche avec sa commande associée (paramètre "
"facultatif: délai pour la fin de la capture, par défaut 500 millisecondes)\n"
" scroll_unread: faire défiler jusqu'au marqueur de données non lues\n"
" set_unread: définir le marqueur de données non lues pour tous les tampons\n"
" set_unread_current_buffer: définir le marqueur de données non lues pour le "
@ -1428,6 +1487,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1436,7 +1504,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: afficher toutes les touches courantes (sans paramètre, cette "
"liste est affichée)\n"
@ -1462,6 +1533,15 @@ msgstr ""
"d'utiliser la touche alt+k (ou Echap puis k), et puis de presser la touche à "
"associer: cela insère le code de la touche dans la ligne de commande.\n"
"\n"
"Pour le contexte \"mouse\" (possible aussi pour le contexte \"cursor\"), la "
"touche a le format: \"@aire:key\" où aire peut être :\n"
" *: n'importe quelle zone à l'écran\n"
" chat: la zone de discussion\n"
" bar(*): n'importe quelle barre\n"
" bar(xxx): la barre \"xxx\"\n"
" item(*): n'importe quel objet de barre\n"
" item(xxx): l'objet de barre \"xxx\"\n"
"\n"
"Exemples:\n"
" touche alt-x pour activer/désactiver la liste des pseudos:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1470,7 +1550,11 @@ msgstr ""
" restaure l'association par défaut pour la touche alt-r:\n"
" /key reset meta-r\n"
" touche \"tab\" pour arrêter la recherche dans le tampon:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" bouton du milieu de la souris sur un pseudo pour récupérer les infos sur "
"le pseudo:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgid "save/apply/reset layout for buffers and windows"
msgstr "sauver/appliquer/réinitialiser la disposition des tampons et fenêtres"
@ -1498,6 +1582,43 @@ msgstr ""
"\n"
"Sans paramètre, cette commande affiche la disposition sauvegardée."
msgid "mouse control"
msgstr "contrôle de la souris"
msgid "enable|disable|toggle [<delay>]"
msgstr "enable|disable|toggle [<délai>]"
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
" enable: activer la souris\n"
"disable: désactiver la souris\n"
" toggle: activer/désactiver la souris\n"
" délai: délai (en secondes) après lequel l'état initial de la souris est "
"restauré (pratique pour désactiver temporairement la souris)\n"
"\n"
"Pour activer/désactiver la souris au démarrage, faites :\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Exemples:\n"
" activer la souris:\n"
" /mouse enable\n"
" activer/désactiver la souris pendant 5 secondes:\n"
" /mouse toggle 5"
msgid "execute a command silently"
msgstr "exécuter une commande silencieusement"
@ -2062,6 +2183,9 @@ msgstr ""
"codes des touches pouvant être réinitialisées (touches ajoutées, redéfinies "
"ou supprimées)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr "zones (\"chat\" ou un nom de barre) pour le mouvement libre du curseur"
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2328,6 +2452,11 @@ msgstr ""
"sauter au tampon précédemment visité lors de la fermeture d'un tampon (si "
"désactivé, alors le saut se fait vers le numéro de tampon - 1)"
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
"activer le support de la souris au démarrage (pour l'activer maintenant, "
"voir /help mouse)"
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "afficher le mode du pseudo ((half)op/voice) devant chaque utilisateur"
@ -3051,6 +3180,12 @@ msgstr "Signal %s reçu, sortie de WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Signal SIGHUP reçu, rechargement des fichiers de configuration"
msgid "Mouse is enabled"
msgstr "La souris est activée"
msgid "Mouse is disabled"
msgstr "La souris est désactivée"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', taille: %dx%d"
@ -3164,12 +3299,18 @@ msgstr ""
"%sErreur: il est possible de mélanger seulement des tampons avec du contenu "
"formaté"
msgid "Debug enabled for cursor mode"
msgstr "Debug activé pour le mode curseur"
msgid "Debug disabled for cursor mode"
msgstr "Debug désactivé pour le mode curseur"
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr "Erreur: impossible d'ajouter le tampon à la liste des tampons actifs"
#, c-format
msgid "New key binding: %s%s => %s%s"
msgstr "Nouvelle touche: %s%s => %s%s"
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Nouvelle touche (contexte \"%s\"): %s%s => %s%s"
#, c-format
msgid "Error: unable to bind key \"%s\""
@ -3181,6 +3322,12 @@ msgstr "Erreur: pas assez de mémoire pour la touche"
msgid "Not enough memory for new line"
msgstr "Pas assez de mémoire pour une nouvelle ligne"
msgid "Debug enabled for mouse"
msgstr "Debug activé pour la souris"
msgid "Debug disabled for mouse"
msgstr "Debug désactivé pour la souris"
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s%s: erreur, référence circulaire lors de l'appel à l'alias \"%s\""
@ -6692,6 +6839,9 @@ msgstr "inactivité du clavier (secondes)"
msgid "1 if filters are enabled"
msgstr "1 si les filtres sont activés"
msgid "1 if cursor mode is enabled"
msgstr "1 si le mode curseur est activé"
msgid "list of bars"
msgstr "liste des barres"
@ -6814,6 +6964,9 @@ msgstr "barre"
msgid "bar item"
msgstr "objet de barre"
msgid "bar window"
msgstr "fenêtre de barre"
msgid "buffer"
msgstr "tampon"

141
po/hu.po
View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-05-15 10:51+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -389,12 +389,14 @@ msgstr "a pufferben kiadott parancsok előzményének mutatása"
msgid "default command:"
msgstr "%s belső parancsok:\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Billentyűparancsok:\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Billentyűparancsok:\n"
#, fuzzy, c-format
@ -425,16 +427,18 @@ msgstr "%s a \"%s\" szerver nem található\n"
msgid "No key binding defined for context \"%s\""
msgstr "Nincs aliasz definiálva.\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgid "%d key bindings for context \"%s\":"
msgstr "Billentyűparancsok:\n"
#, fuzzy, c-format
msgid "No default key binding for context \"%s\""
msgstr "Alapértelmezett billentyűparancsok visszaállítva\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgid "%d default key bindings for context \"%s\":"
msgstr "Alapértelmezett billentyűparancsok visszaállítva\n"
#, fuzzy
@ -886,9 +890,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1027,13 +1031,41 @@ msgstr ""
"parancs: futtatandó parancs (egy '/' autómatikusan hozzáadódik, ha nincs "
"megadva a parancs elején)\n"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr ""
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr "dump | buffer | windows"
#, fuzzy
@ -1046,10 +1078,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1198,8 +1232,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1248,6 +1284,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1256,7 +1301,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
"billentyű: billentyű hozzárendelése valamely belső funkcióhoz vagy \"/\" "
"jellel kezdődő parancshoz\n"
@ -1282,6 +1330,29 @@ msgid ""
"Without argument, this command displays saved layout."
msgstr ""
msgid "mouse control"
msgstr ""
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
#, fuzzy
msgid "execute a command silently"
msgstr "%s belső parancsok:\n"
@ -1724,6 +1795,9 @@ msgstr ""
msgid "key codes that can be reset (keys added, redefined or removed)"
msgstr "Billentyűparancsok:\n"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
#, fuzzy
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
@ -1927,6 +2001,9 @@ msgid ""
"jump to buffer number - 1)"
msgstr ""
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "a felhasználó módjának ((fél)operátor/voice) mutatása a név előtt"
@ -2647,6 +2724,14 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "%s nem sikerült a konfigurációs fájlt elmenteni\n"
#, fuzzy
msgid "Mouse is enabled"
msgstr "a felhasználók le lettek tiltva"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Nincs aliasz definiálva.\n"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
@ -2752,12 +2837,18 @@ msgstr "%s nem sikerült a \"%s\" modult betölteni: már van ilyen nevű modul\
msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
msgid "Debug enabled for cursor mode"
msgstr ""
msgid "Debug disabled for cursor mode"
msgstr ""
#, fuzzy
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr "%s nincs elég memória az ignore elkészítéséhez\n"
#, fuzzy, c-format
msgid "New key binding: %s%s => %s%s"
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Új billentyűparancs: %s"
#, fuzzy, c-format
@ -2772,6 +2863,12 @@ msgstr "%s nincs elég memória a billentyűhozzárendeléshez\n"
msgid "Not enough memory for new line"
msgstr "Nincs elég memória az új sorhoz\n"
msgid "Debug enabled for mouse"
msgstr ""
msgid "Debug disabled for mouse"
msgstr ""
#, fuzzy, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s körreferencia a \"/%s\" aliasz hívásakor\n"
@ -6108,6 +6205,10 @@ msgstr ""
msgid "1 if filters are enabled"
msgstr "a felhasználók le lettek tiltva"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "a felhasználók le lettek tiltva"
#, fuzzy
msgid "list of bars"
msgstr "Aliaszok listája:\n"
@ -6228,6 +6329,10 @@ msgstr ""
msgid "bar item"
msgstr "Aliaszok listája:\n"
#, fuzzy
msgid "bar window"
msgstr "ablakok kezelése"
#, fuzzy
msgid "buffer"
msgstr "pufferek kezelése"
@ -7369,6 +7474,14 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Billentyűparancsok:\n"
#, fuzzy
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Alapértelmezett billentyűparancsok visszaállítva\n"
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "%s belső parancsok:\n"

425
po/it.po
View File

@ -20,8 +20,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"PO-Revision-Date: 2011-07-05 15:38+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-07-16 11:32+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: Italian\n"
@ -62,7 +62,7 @@ msgid ""
" about possible options)\n"
msgstr ""
" -a, --no-connect disabilta la connessione automatica all'avvio\n"
" -c, --colors\t\t mostra i colori predefiniti nel terminale\n"
" -c, --colors \t mostra i colori predefiniti nel terminale\n"
" -d, --dir <percorso> imposta la cartella principale di WeeChat "
"(predefinita: ~/.weechat)\n"
" -h, --help mostra questo aiuto\n"
@ -80,9 +80,9 @@ msgstr ""
" informazioni sulle opzioni disponibili)\n"
#. TRANSLATORS: first "%s" is "weechat"
#, fuzzy, c-format
#, c-format
msgid "%s default keys (context: \"%s\"):\n"
msgstr "tasti predefiniti di %s:\n"
msgstr "%s tasti predefiniti (contesto: \"%s\"):\n"
#, c-format
msgid "Error: missing argument for \"%s\" option\n"
@ -114,7 +114,7 @@ msgstr ""
"destra), %s: %s"
msgid "(hidden)"
msgstr "(nascosto)"
msgstr "(nascosta)"
msgid "height"
msgstr "altezza"
@ -373,17 +373,21 @@ msgstr "Cronologia comandi buffer:"
msgid "default command:"
msgstr "comando predefinito:"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgstr "Associazioni tasti aggiunte o ridefinite (%d):"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Associazioni tasti aggiunte o ridefinite (%d) per il contesto \"%s\":"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgstr "Associazioni tasti rimosse (%d):"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Associazioni tasti rimosse (%d) per il contesto \"%s\":"
#, fuzzy, c-format
#, c-format
msgid "No key binding added, redefined or removed for context \"%s\""
msgstr "Nessuna combinazione tasti aggiunta, ridefinita o rimossa"
msgstr ""
"Nessuna combinazione tasti aggiunta, ridefinita o rimossa per il contesto "
"\"%s\""
#, c-format
msgid "%sError: unable to bind key \"%s\""
@ -393,9 +397,9 @@ msgstr "%sErrore: impossibile associare il tasto \"%s\""
msgid "Key \"%s\" has already default value"
msgstr "Il tasto \"%s\" ha già un valore predefinito"
#, fuzzy, c-format
#, c-format
msgid "Key \"%s\" unbound (context: \"%s\")"
msgstr "Tasto \"%s\" non associato"
msgstr "Tasto \"%s\" non associato (contesto: \"%s\")"
#, c-format
msgid "%sError: unable to unbind key \"%s\""
@ -405,21 +409,23 @@ msgstr "%sErrore: impossibile rimuovere l'associazione del tasto \"%s\""
msgid "%sKey \"%s\" not found"
msgstr "%sTasto \"%s\" non trovato"
#, fuzzy, c-format
#, c-format
msgid "No key binding defined for context \"%s\""
msgstr "Nessuna combinazione tasti definita"
msgstr "Nessuna combinazione tasti definita per il contesto \"%s\""
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Combinazioni (%d):"
msgid "%d key bindings for context \"%s\":"
msgstr "Associazioni tasti rimosse (%d) per il contesto \"%s\":"
#, fuzzy, c-format
#, c-format
msgid "No default key binding for context \"%s\""
msgstr "Nessuna associazione tasti predefinita"
msgstr "Nessuna associazione tasti predefinita per il contesto \"%s\""
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Associazione tasti predefinita (%d):"
msgid "%d default key bindings for context \"%s\":"
msgstr "Nessuna associazione tasti predefinita per il contesto \"%s\""
msgid "Key:"
msgstr "Tasto:"
@ -427,13 +433,13 @@ msgstr "Tasto:"
msgid "No key found"
msgstr "Nessun tasto trovato"
#, fuzzy, c-format
#, c-format
msgid "%sError: context \"%s\" not found"
msgstr "%sErrore: filtro \"%s\" non trovato"
msgstr "%sErrore: contesto \"%s\" non trovato"
#, fuzzy, c-format
#, c-format
msgid "Default key bindings restored for context \"%s\""
msgstr "Associazione tasti predefinita ripristinata"
msgstr "Associazione tasti predefinita ripristinata per il contesto \"%s\""
#, c-format
msgid "%sError: \"-yes\" argument is required for keys reset (security reason)"
@ -441,11 +447,11 @@ msgstr ""
"%sErrore: l'argomento \"-yes\" è richiesto per il reset dei tasti (motivi di "
"sicurezza)"
#, fuzzy, c-format
#, c-format
msgid "%d new key added"
msgid_plural "%d new keys added (context: \"%s\")"
msgstr[0] "%d nuovo tasto aggiunto"
msgstr[1] "%d nuovi tasti aggiunti"
msgstr[0] "%d nuovo tasto aggiunto (contesto: \"%s\")"
msgstr[1] "%d nuovi tasti aggiunti (contesto: \"%s\")"
#, c-format
msgid "leaf: id: %d, parent: %d, plugin: \"%s\", buffer: \"%s\""
@ -815,6 +821,7 @@ msgstr ""
"<opzione> <valore> || hide|show|toggle <nome> || scroll <nome> <buffer> "
"<scroll_value>"
#, fuzzy
msgid ""
" list: list all bars\n"
" listfull: list all bars (verbose)\n"
@ -847,9 +854,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1072,16 +1079,44 @@ msgstr ""
"comando: comando da eseguire (una '/' viene aggiunta automaticamente se non "
"trovata all'inizio del comando)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr "attiva debug per core/plugin"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <livello> || dump [<plugin>] || buffer|color|memory|"
"term|windows"
"list || set <plugin> <livello> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
#, fuzzy
msgid ""
@ -1093,26 +1128,32 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
msgstr ""
" list: elenca i plugin con i livelli di debug\n"
" set: imposta il livello di debug per il plugin\n"
" plugin: nome del plugin (\"core\" per il core di WeeChat)\n"
"livello: livello di debug per il plugin (0 = disattiva debug)\n"
" dump: salva un dump della memoria nel file di log di WeeChat (lo stesso "
" list: elenca i plugin con i livelli di debug\n"
" set: imposta il livello di debug per il plugin\n"
" plugin: nome del plugin (\"core\" per il core di WeeChat)\n"
" livello: livello di debug per il plugin (0 = disattiva debug)\n"
" dump: salva un dump della memoria nel file di log di WeeChat (lo stesso "
"dump viene salvato in caso di crash di WeeChat)\n"
" buffer: esegue un dump del contenuto del buffer con valori esadecimali nel "
"file di log\n"
" color: mostra informazioni sulle coppie di colore correnti\n"
" memory: mostra informazioni sull'uso della memoria\n"
" term: mostra informazioni sul terminale\n"
"windows: mostra l'albero delle finestre"
" buffer: esegue un dump del contenuto del buffer con valori esadecimali "
"nel file di log\n"
" color: mostra informazioni sulle coppie di colore correnti\n"
" hdata: mostra informazioni su hdata (con free: rimuove tutti gli hdata "
"in memoria)\n"
"infolists: mostra informazioni sulle liste info\n"
" memory: mostra informazioni sull'uso della memoria\n"
" tags: mostra tag per le righe\n"
" term: mostra informazioni sul terminale\n"
" windows: mostra l'albero delle finestre"
msgid ""
"filter messages in buffers, to hide/show them according to tags or regex"
@ -1126,7 +1167,6 @@ msgstr ""
"list || enable|disable|toggle [<nome>] || add <nome> <buffer>[,<buffer>...] "
"<tag> <regex>] || del <nome>|-all"
#, fuzzy
msgid ""
" list: list all filters\n"
" enable: enable filters (filters are enabled by default)\n"
@ -1218,6 +1258,7 @@ msgstr ""
" irc_xxx (xxx è il nome comando o il numero, consultare /server raw), "
"irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, "
"irc_smart_filter, away_info.\n"
"Per mostrare i tag per le righe nei buffer: /debug tags\n"
"\n"
"Esempi:\n"
" usa il filtro intelligente IRC per tutti i buffer:\n"
@ -1316,8 +1357,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1332,6 +1375,10 @@ msgstr ""
" complete_next: completa la parola con il completamento successivo\n"
" complete_previous: completa la parola con il completamento precedente\n"
" search_text: cerca testo nel buffer\n"
" search_switch_case: passa alla ricerca esatta\n"
" search_previous: cerca la riga precedente\n"
" search_next: cerca la riga successiva\n"
" search_stop: ferma la ricerca\n"
" delete_previous_char: elimina carattere precedente\n"
" delete_next_char: elimina carattere successivo\n"
" delete_previous_word: elimina parola precedente\n"
@ -1377,15 +1424,16 @@ msgstr ""
msgid "bind/unbind keys"
msgstr "associa/disassocia tasti"
#, fuzzy
msgid ""
"list|listdefault|listdiff [<context>] || bind <key> [<command> [<args>]] || "
"bindctxt <context> <key> [<command> [<args>]] || unbind <key> || unbindctxt "
"<context> <key> || reset <key> || resetctxt <context> <key> || resetall -yes "
"[<context>] || missing [<context>]"
msgstr ""
"list|listdefault|listdiff || bind <tasto> [<comando> [<args>]] || unbind "
"<tasto> || reset <tasto> || resetall -yes || missing"
"list|listdefault|listdiff [<contesto>] || bind <tasto> [<comando> [<arg>]] "
"|| bindctxt <contesto> <tasto> [<comando> <arg>]] || unbind <tasto> || "
"unbindctxt <contesto> <chiave> || reset <tasto> || resetctxt <contesto> "
"<tasto> || resetall -yes [<contesto>] || missing [<contesto>]"
#, fuzzy
msgid ""
@ -1412,6 +1460,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1420,17 +1477,27 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: elenca tutti i tasti correnti (senza argomento, viene "
"visualizzata questa lista)\n"
"listdefault: elenca i tasti predefiniti\n"
" listdiff: elenca le differenze tra tasti attuali e predefiniti (tasti "
"aggiunti, ridefiniti o eliminati)\n"
" contesto: nome del contesto (\"default\" oppure \"search\")\n"
" bind: associa un comando ad un tasto o visualizza il comando "
"associato al tasto\n"
" unbind: rimuove una associazione di tasti\n"
"associato al tasto (per il contesto \"default\")\n"
" bindctxt: associa un comando ad un tasto o mostra il comando associato al "
"tasto, per il contesto fornito\n"
" unbind: rimuove una associazione di tasti (per il contesto \"default"
"\")\n"
" unbindctxt: rimuove l'associazione tasti per il contesto fornito\n"
" reset: ripristina un tasto all'assegnazione predefinita\n"
" resetctxt: ripristina un tasto all'associazione predefinita per il "
"contesto fornito\n"
" resetall: ripristina le associazioni ai valori predefiniti ed elimina "
"TUTTE le associazioni personalizzate (usare con cautela!)\n"
" missing: aggiunge tasti mancanti (utilizzando le associazioni "
@ -1446,7 +1513,9 @@ msgstr ""
" il tasto alt-r per passare al canale IRC #weechat:\n"
" /key bind meta-r /buffer #weechat\n"
" ripristinare l'associazione predefinita per il tasto alt-r:\n"
" /key reset meta-r"
" /key reset meta-r\n"
" il tasto \"tab\" per fermare la ricerca nel buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
msgid "save/apply/reset layout for buffers and windows"
msgstr "salva/applica/ripristina il layout per i buffer e le finestre"
@ -1474,6 +1543,30 @@ msgstr ""
"\n"
"Senza argomenti, il comando visualizza il layout salvato."
#, fuzzy
msgid "mouse control"
msgstr "controllo xfer"
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr "esegue un comando in silenzio"
@ -1529,7 +1622,6 @@ msgstr ""
"list|listfull [<nome>] || load <nomefile> || autoload || reload|unload "
"[<nome>]"
#, fuzzy
msgid ""
" list: list loaded plugins\n"
"listfull: list loaded plugins (verbose)\n"
@ -1548,10 +1640,11 @@ msgstr ""
" load: attiva un plugin\n"
"autoload: attiva automaticamente un plugin nella cartella di sistema o "
"utente\n"
" reload: riattiva un plugin (se non viene dato un nome, disattiva e poi "
"riattiva tutti i plugin)\n"
" unload: disattiva un plugin (se non viene dato un nome, disattiva tutti i "
"plugin\n"
" reload: riattiva un plugin (se non specificato, disattiva e poi riattiva "
"tutti i plugin)\n"
" unload: disattiva un plugin (se non specificato, disattiva tutti i plugin\n"
"nomefile: plugin (file) da attivare\n"
" nome: nome di un plugin\n"
"\n"
"Senza argomento, questo comando elenca i plugin attivati."
@ -1843,7 +1936,6 @@ msgstr ""
msgid "manage windows"
msgstr "gestione finestre"
#, fuzzy
msgid ""
"list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-]"
"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll "
@ -1853,10 +1945,10 @@ msgid ""
msgstr ""
"list || -1|+1|b#|up|down|left|right || splith|splitv [<pct>] || resize [+/-] "
"<pct> || balance || merge [all] || page_up|page_down || refresh || scroll|"
"scroll_up|scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|"
"[+/-]<valore>[s|m|h|d|M|y] || scroll_horiz [+/-]<valore>[%] || scroll_up|"
"scroll_down|scroll_top|scroll_bottom|scroll_previous_highlight|"
"scroll_next_highlight || swap [up|down|left|right] || zoom"
#, fuzzy
msgid ""
" list: list opened windows (without argument, this list is "
"displayed)\n"
@ -1927,6 +2019,9 @@ msgstr ""
" refresh: aggiorna lo schermo\n"
" 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\n"
" scroll_horiz: scorre orizzontalmente un numero di colonne (+/-N) una "
"percentuale della dimensione della finestra (questo scorrimento è possibile "
"solo sui buffer con contenuto libero)\n"
" scroll_up: scorre di alcune righe in alto\n"
" scroll_down: scorre di alcune righe in basso\n"
" scroll_top: scorre fino all'inizio del buffer\n"
@ -2025,11 +2120,11 @@ msgstr "opzioni per le barre"
#. TRANSLATORS: "key" means "key on the keyboard"
#, fuzzy
msgid "key contexts"
msgstr "codici tasti"
msgstr "contesti per tasto"
#. TRANSLATORS: "key" means "key on the keyboard"
msgid "key codes"
msgstr "codici tasti"
msgstr "codici tasto"
#. TRANSLATORS: "key" means "key on the keyboard"
msgid "key codes that can be reset (keys added, redefined or removed)"
@ -2037,6 +2132,9 @@ msgstr ""
"codici tasti che possono essere ripristinati (tasti aggiunti, ridefiniti o "
"rimossi)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2152,6 +2250,11 @@ msgid ""
"text from WeeChat to another application (this option is disabled by default "
"because it can cause serious display bugs)"
msgstr ""
"se attivo, eat_newline_glitch verrà impostato a 0; viene usato per non "
"aggiungere il carattere a capo alla fine di ogni riga, al fine di non "
"danneggiare il testo quando viene copiato/incollato da WeeChat in un'altra "
"applicazione (l'opzione è disabilitata per default, dato che può causare "
"seri errori di visualizzazione)"
msgid ""
"comma separated list of words to highlight (case insensitive comparison, "
@ -2294,6 +2397,9 @@ msgstr ""
"passa al buffer visitato in precedenza alla chiusura di un buffer (se "
"disabilitato, allora passa al buffer numero -1)"
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "mostra modalità nick ((half)op/voice) prima di ogni nick"
@ -2403,15 +2509,13 @@ msgstr ""
"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"
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"
"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"
msgid "set title for window (terminal for Curses GUI) with name and version"
msgstr ""
@ -2513,11 +2617,10 @@ msgstr "colore del testo per l'evidenziatore di dati non letti"
msgid "background color for unread data marker"
msgstr "colore di sfondo per l'evidenziatore di dati non letti"
#, fuzzy
msgid "text color for tags after messages (displayed with command /debug tags)"
msgstr ""
"colore del testo per il conteggio di altri messaggi nella hotlist (barra di "
"stato)"
"colore del testo per i tago dopo i messaggi (mostrati con il comando /debug "
"tags)"
msgid "text color for marker on lines where text sought is found"
msgstr "colore del testo per l'evidenziatore sulle righe per il testo trovato"
@ -2791,7 +2894,7 @@ msgstr ""
#, c-format
msgid "%sError: bad file descriptor (%d) used in hook_fd"
msgstr ""
msgstr "%sErrore: descrittore file errato (%d) usato in hook_fd"
#, c-format
msgid "End of command '%s', timeout reached (%.1fs)"
@ -3007,6 +3110,14 @@ msgstr "Ricevuto segnale %s, chiusura di WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Ricevuto segnale SIGHUP, caricamento dei file di configurazione"
#, fuzzy
msgid "Mouse is enabled"
msgstr "1 se i filtri sono abilitati"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Filtraggio dei messaggi disabilitato"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', dimensione %dx%d"
@ -3035,8 +3146,7 @@ msgstr "tipo di barra (root, window, window_active, window_inactive)"
msgid "condition(s) for displaying bar (for bars of type \"window\")"
msgstr ""
"condizione(i) per la visualizzazione della barra (per le barre di tipo "
"\"window\")"
"condizione(i) per la visualizzazione della barra (barre di tipo \"window\")"
msgid "bar position (bottom, top, left, right)"
msgstr ""
@ -3117,11 +3227,19 @@ msgstr "%sErrore: un buffer con lo stesso nome (%s) esiste già"
msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr "%sErrore: è possibile solo unire i buffer con il contenuto formattato"
#, fuzzy
msgid "Debug enabled for cursor mode"
msgstr "Debug disabilitato per \"%s\""
#, fuzzy
msgid "Debug disabled for cursor mode"
msgstr "Debug disabilitato per \"%s\""
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr "Errore: memoria non sufficiente per aggiungere un buffer alla hotlist"
#, c-format
msgid "New key binding: %s%s => %s%s"
#, fuzzy, c-format
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Nuova associazione tasti: %s%s => %s%s"
#, c-format
@ -3134,6 +3252,14 @@ msgstr "Errore: memoria non sufficiente per l'associazione tasti"
msgid "Not enough memory for new line"
msgstr "Memoria non sufficiente per una nuova riga"
#, fuzzy
msgid "Debug enabled for mouse"
msgstr "Debug disabilitato per \"%s\""
#, fuzzy
msgid "Debug disabled for mouse"
msgstr "Debug disabilitato per \"%s\""
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s%s: errore, riferimento circolare alla chiamata dell'alias \"%s\""
@ -4085,7 +4211,6 @@ msgstr "ignora nick/host dai server o dai canali"
msgid "list || add [re:]<nick> [<server> [<channel>]] || del <number>|-all"
msgstr "list || add [re:]<nick> [<server> [<canale>]] || del <numero>|-all"
#, fuzzy
msgid ""
" list: list all ignores\n"
" add: add an ignore\n"
@ -4112,9 +4237,6 @@ msgstr ""
" del: elimina un ignore\n"
" numero: numero di ignore da eliminare (nella lista)\n"
" -all: elimina tutti gli ignore\n"
"nick/host: nick o host da ignorare: la sintassi è \"re:regex\" o \"mask"
"\" (una mask è una stringa con alcuni \"*\" per sostituire uno o più "
"caratteri)\n"
" server: nome interno del server dove l'ignore è attivo\n"
" canale: nome del canale dove l'ignore è attivo\n"
"\n"
@ -5689,33 +5811,29 @@ msgstr "elenco delle notifiche"
msgid "notify pointer (optional)"
msgstr "puntatore alla notifica (opzionale)"
#, fuzzy
msgid "irc nick"
msgstr "nick: nick"
msgstr "nick irc"
#, fuzzy
msgid "irc channel"
msgstr "canale"
msgstr "canale irc"
msgid "irc channel_speaking"
msgstr ""
msgstr "channel_speaking irc"
msgid "irc ignore"
msgstr ""
msgstr "ignore irc"
#, fuzzy
msgid "irc notify"
msgstr "elenco delle notifiche"
msgstr "notify irc"
msgid "pattern for irc redirect"
msgstr ""
msgstr "schema per la redirezione irc"
msgid "irc redirect"
msgstr ""
msgstr "redirezione irc"
#, fuzzy
msgid "irc server"
msgstr "server"
msgstr "server irc"
#, c-format
msgid "%s%s: you are not connected to server"
@ -6541,6 +6659,8 @@ msgid ""
"number of seconds between flush of log files (0 = write in log files "
"immediately for each line printed)"
msgstr ""
"numero di secondi tra il flush (scrittura) dei file di log (0 = scrive sui "
"file di log immediatamente per ogni riga stampata)"
msgid "use only lower case for log filenames"
msgstr "utilizzare solo lettere minuscole per i nomi dei file di log"
@ -6634,6 +6754,10 @@ msgstr "inattività della tastiera (secondi)"
msgid "1 if filters are enabled"
msgstr "1 se i filtri sono abilitati"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "1 se i filtri sono abilitati"
msgid "list of bars"
msgstr "elenco delle barre"
@ -6713,7 +6837,7 @@ msgid "list of key bindings"
msgstr "elenco di tasti associati"
msgid "context (\"default\" or \"search\") (optional)"
msgstr ""
msgstr "contesto (\"default\" oppure \"search\") (opzionale)"
msgid "nicks in nicklist for a buffer"
msgstr "nick nella lista nick per un buffer"
@ -6752,81 +6876,71 @@ msgstr ""
"(opzionale)"
msgid "bar"
msgstr ""
msgstr "barra"
#, fuzzy
msgid "bar item"
msgstr "elenco degli elementi barra"
msgstr "elemento barra"
#, fuzzy
msgid "bar window"
msgstr "finestra"
msgid "buffer"
msgstr "gestione buffer"
msgstr "buffer"
#, fuzzy
msgid "structure with completion"
msgstr "funzioni per la riga di comando"
msgstr "struttura con completamento"
#, fuzzy
msgid "structure with partial completion"
msgstr "avvisa l'utente quando si verifica un completamento parziale"
msgstr "struttura con completamento parziale"
#, fuzzy
msgid "config file"
msgstr "file di configurazione"
#, fuzzy
msgid "config section"
msgstr "imposta le opzioni di configurazione"
msgstr "sezione di configurazione"
#, fuzzy
msgid "config option"
msgstr "imposta le opzioni di configurazione"
msgstr "opzione di configurazione"
msgid "filter"
msgstr ""
msgstr "filtro"
#, fuzzy
msgid "history of commands in buffer"
msgstr "cronologia dei comandi"
msgstr "cronologia dei comandi nel buffer"
#, fuzzy
msgid "structure with undo for input line"
msgstr "funzioni per la riga di comando"
msgstr "struttura con \"undo\"per la riga di input"
msgid "a key (keyboard shortcut)"
msgstr ""
msgstr "un tasto (scorciatoia da tastiera)"
msgid "structure with lines"
msgstr ""
msgstr "struttura con più righe"
msgid "structure with one line"
msgstr ""
msgstr "struttura con una sola riga"
msgid "structure with one line data"
msgstr ""
#, fuzzy
msgid "group in nicklist"
msgstr "colore del testo per i gruppi nella lista nick"
msgstr "gruppo nella lista nick"
#, fuzzy
msgid "nick in nicklist"
msgstr "nick nella lista notifiche"
msgstr "nick nella lista nick"
#, fuzzy
msgid "plugin"
msgstr "Plugin"
msgstr "plugin"
#, fuzzy
msgid "window"
msgstr "gestione finestre"
msgstr "finestra"
msgid "scroll info in window"
msgstr ""
msgstr "scorrimento delle info nella finestra"
#, fuzzy
msgid "tree of windows"
msgstr "elenco delle finestre"
msgstr "albero delle finestre"
#, c-format
msgid "%sError: unable to load plugin \"%s\": %s"
@ -7908,18 +8022,55 @@ msgid "Pointer"
msgstr "Puntatore"
msgid "Variables"
msgstr ""
msgstr "Variabili"
msgid "Lists"
msgstr ""
msgstr "Liste"
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Combinazioni (%d) per il contesto \"%s\":"
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Associazione tasti predefinita (%d) per il contesto \"%s\":"
#~ msgid "hook (variables common to all hook types)"
#~ msgstr "hook (variabili comuni a tutti i tipi di hook)"
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "cronologia dei comandi"
#~ msgstr "hook di tipo \"comando\""
#~ msgid "hook of type \"command_run\""
#~ msgstr "hook di tipo \"command_run\""
#~ msgid "hook of type \"timer\""
#~ msgstr "hook di tipo \"timer\""
#~ msgid "hook of type \"fd\""
#~ msgstr "hook di tipo \"fd\""
#~ msgid "hook of type \"process\""
#~ msgstr "hook di tipo \"process\""
#~ msgid "hook of type \"connect\""
#~ msgstr "hook di tipo \"connect\""
#~ msgid "hook of type \"print\""
#~ msgstr "hook di tipo \"print\""
#~ msgid "hook of type \"signal\""
#~ msgstr "hook di tipo \"signal\""
#~ msgid "hook of type \"hsignal\""
#~ msgstr "hook di tipo \"hsignal\""
#~ msgid "hook of type \"config\""
#~ msgstr "hook di tipo \"config\""
#~ msgid "hook of type \"completion\""
#~ msgstr "hook di tipo \"completion\""
#, fuzzy
#~ msgid "completion"
#~ msgstr "compilato il"
#~ msgstr "completamento"
#, fuzzy
#~ msgid "lines"
@ -7928,7 +8079,3 @@ msgstr ""
#, fuzzy
#~ msgid "line"
#~ msgstr "in linea"
#, fuzzy
#~ msgid "line data"
#~ msgstr "in linea"

153
po/pl.po
View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-07-05 15:38+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -376,12 +376,14 @@ msgstr "Historia komend bufora:"
msgid "default command:"
msgstr "domyślna komenda:"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Dodane lub przedefiniowane skróty klawiszowe (%d):"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Usunięte skróty klawiszowe (%d):"
#, fuzzy, c-format
@ -412,17 +414,19 @@ msgstr "%sKlawisz \"%s\" nie znaleziony"
msgid "No key binding defined for context \"%s\""
msgstr "Nie zdefiniowano powiązań klawiszy"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Powiązania klawiszy (%d):"
msgid "%d key bindings for context \"%s\":"
msgstr "Usunięte skróty klawiszowe (%d):"
#, fuzzy, c-format
msgid "No default key binding for context \"%s\""
msgstr "Brak domyślnych skrótów klawiszowych"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Domyślne skróty klawiszowe (%d):"
msgid "%d default key bindings for context \"%s\":"
msgstr "Brak domyślnych skrótów klawiszowych"
msgid "Key:"
msgstr "Klawisz:"
@ -827,6 +831,7 @@ msgstr ""
"title|status|nicklist] || del <nazwa>|-all || set <nazwa> <opcja> <wartość> "
"|| hide|show|toggle <nazwa> || scroll <nazwa> <bufor> <wartość_przewinięcia>"
#, fuzzy
msgid ""
" list: list all bars\n"
" listfull: list all bars (verbose)\n"
@ -859,9 +864,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1082,13 +1087,41 @@ msgstr ""
"command: komenda do wywołania ( '/' jest automatycznie dodawane jeśli nie "
"występuje na początku komendy)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr "kontrola debugu dla rdzenia/wtyczek"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
"list || set <plugin> <poziom> || dump [<plugin>] || buffer|color|memory|term|"
"windows"
@ -1103,10 +1136,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1326,8 +1361,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1421,6 +1458,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1429,7 +1475,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: wyświetla wszystkie obecne skróty (bez podanego argumentu, "
"pokazywana jest ta lista)\n"
@ -1482,6 +1531,30 @@ msgstr ""
"\n"
"Komenda wywołana bez argumentów wyświetli zapisany układ."
#, fuzzy
msgid "mouse control"
msgstr "kontrola xfer"
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr "wykonuje komende po cichu"
@ -2042,6 +2115,9 @@ msgstr ""
"kody klawiszy, które mogą być zresetowane (klawisze dodane, zredefiniowane "
"lub udunięte)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2296,6 +2372,9 @@ msgstr ""
"skocz do porzedniego buforu, po zamknięciu obecnego (jeśli wyłączona, wtedy "
"skocz do buferu numer -1)"
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "wyświetl atrybut nicku ((half)op/voice) przed każdym nickiem"
@ -2989,6 +3068,14 @@ msgstr "Otrzymano sygnał %s, wychodzę z WeeChat..."
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "Otrzymano sygnał SIGHUP, przeładowuję pliki konfiguracyjne"
#, fuzzy
msgid "Mouse is enabled"
msgstr "1 jeśli filtry są aktywne"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Filtrowanie wiadomości wyłączone"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr " TERM='%s', rozmiar: %dx%d"
@ -3098,11 +3185,19 @@ msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
"%sBłąd: możliwe jest tylko połączenie buforów z sformatowaną zawartością"
#, fuzzy
msgid "Debug enabled for cursor mode"
msgstr "Debugowanie wyłączone dla\"%s\""
#, fuzzy
msgid "Debug disabled for cursor mode"
msgstr "Debugowanie wyłączone dla\"%s\""
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr "Błąd: za mało pamięci, aby dodać bufor do hotlisty"
#, c-format
msgid "New key binding: %s%s => %s%s"
#, fuzzy, c-format
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Nowy skrót klawiszowy %s%s => %s%s"
#, c-format
@ -3115,6 +3210,14 @@ msgstr "Błąd: za mało pamięci do przypisania klawisza"
msgid "Not enough memory for new line"
msgstr "Za mało pamięci na nowy wiersz"
#, fuzzy
msgid "Debug enabled for mouse"
msgstr "Debugowanie wyłączone dla\"%s\""
#, fuzzy
msgid "Debug disabled for mouse"
msgstr "Debugowanie wyłączone dla\"%s\""
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s%s: błąd, cykliczna referencja przy wywoływaniu aliasu \"%s\""
@ -6581,6 +6684,10 @@ msgstr "brak aktywności klawiatury (sekundy)"
msgid "1 if filters are enabled"
msgstr "1 jeśli filtry są aktywne"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "1 jeśli filtry są aktywne"
msgid "list of bars"
msgstr "lista pasków"
@ -6691,6 +6798,10 @@ msgstr ""
msgid "bar item"
msgstr "lista elementów pasków"
#, fuzzy
msgid "bar window"
msgstr "zarządza oknami"
#, fuzzy
msgid "buffer"
msgstr "zarządzaj buforami"
@ -7838,6 +7949,14 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Powiązania klawiszy (%d):"
#, fuzzy
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Domyślne skróty klawiszowe (%d):"
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "historia komend"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Ivan Sichmann Freitas <ivansichfreitas@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -379,12 +379,14 @@ msgstr "Histórico de comandos de buffer:"
msgid "default command:"
msgstr "comando padrão:"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Atalhos de teclado adicionados ou redefinidos (%d):"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Atalhos de teclado deletados (%d):"
#, fuzzy, c-format
@ -415,17 +417,19 @@ msgstr "%sTecla \"%s\" não encontrada"
msgid "No key binding defined for context \"%s\""
msgstr "Nenhum atalho de teclado definido"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgstr "Atalhos de teclado (%d):"
msgid "%d key bindings for context \"%s\":"
msgstr "Atalhos de teclado deletados (%d):"
#, fuzzy, c-format
msgid "No default key binding for context \"%s\""
msgstr "Nenhum atalho de teclado padrão"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgstr "Atalhos de teclado padrão (%d):"
msgid "%d default key bindings for context \"%s\":"
msgstr "Nenhum atalho de teclado padrão"
msgid "Key:"
msgstr "Tecla:"
@ -864,9 +868,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1094,13 +1098,41 @@ msgstr ""
"command: comando a ser executado (um '/' é automaticamente adicionado se não "
"for encontrado no começo de um comando)"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr "cotrolar depuração para core/plugins"
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr "[list | set plugin level | dump [plugin] | buffer | windows | term]"
# find a better translation to dump?
@ -1115,10 +1147,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1326,8 +1360,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1418,6 +1454,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1426,7 +1471,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" list: lista todos as teclas atuais (sem argumentos, esta lista é "
"mostrada)\n"
@ -1479,6 +1527,29 @@ msgstr ""
"\n"
"Sem argumentos, este comando mosta a disposição salva"
msgid "mouse control"
msgstr ""
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr "executa um comando silenciosamente"
@ -2041,6 +2112,9 @@ msgstr ""
"códigos de tecla que podem ser restaurados (teclas adicionadas, redefinidas "
"ou removidas)"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -2278,6 +2352,9 @@ msgid ""
"jump to buffer number - 1)"
msgstr ""
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr ""
@ -2906,6 +2983,14 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr ""
#, fuzzy
msgid "Mouse is enabled"
msgstr "Filtro de mensagens habilitado"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Filtro de mensagens desabilitado"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
@ -3003,12 +3088,20 @@ msgstr ""
msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
#, fuzzy
msgid "Debug enabled for cursor mode"
msgstr "Debug desabilitado para \"%s\""
#, fuzzy
msgid "Debug disabled for cursor mode"
msgstr "Debug desabilitado para \"%s\""
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr ""
#, c-format
msgid "New key binding: %s%s => %s%s"
msgstr ""
#, fuzzy, c-format
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Nenhum atalho de teclado padrão"
#, c-format
msgid "Error: unable to bind key \"%s\""
@ -3020,6 +3113,14 @@ msgstr ""
msgid "Not enough memory for new line"
msgstr ""
#, fuzzy
msgid "Debug enabled for mouse"
msgstr "Debug desabilitado para \"%s\""
#, fuzzy
msgid "Debug disabled for mouse"
msgstr "Debug desabilitado para \"%s\""
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr ""
@ -5933,6 +6034,9 @@ msgstr ""
msgid "1 if filters are enabled"
msgstr ""
msgid "1 if cursor mode is enabled"
msgstr ""
msgid "list of bars"
msgstr ""
@ -6038,6 +6142,10 @@ msgstr ""
msgid "bar item"
msgstr "Lista de itens da barra:"
#, fuzzy
msgid "bar window"
msgstr "gerencia janelas"
#, fuzzy
msgid "buffer"
msgstr "gerenciar buffers"
@ -7085,6 +7193,14 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Atalhos de teclado (%d):"
#, fuzzy
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Atalhos de teclado padrão (%d):"
#, fuzzy
#~ msgid "completion"
#~ msgstr "compilado em"

141
po/ru.po
View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.6-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2011-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+0200\n"
"PO-Revision-Date: 2011-05-15 10:52+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -392,12 +392,14 @@ msgstr "показать историю буфера команд"
msgid "default command:"
msgstr "Внутренние команды %s:\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr "Комбинации клавиш:\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr "Комбинации клавиш:\n"
#, fuzzy, c-format
@ -428,16 +430,18 @@ msgstr "%s сервер \"%s\" не найден\n"
msgid "No key binding defined for context \"%s\""
msgstr "Сокращения не заданы.\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgid "%d key bindings for context \"%s\":"
msgstr "Комбинации клавиш:\n"
#, fuzzy, c-format
msgid "No default key binding for context \"%s\""
msgstr "Комбинации клавиш по умолчанию восстановлены\n"
#. TRANSLATORS: first "%d" is number of keys
#, fuzzy, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgid "%d default key bindings for context \"%s\":"
msgstr "Комбинации клавиш по умолчанию восстановлены\n"
#, fuzzy
@ -893,9 +897,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -1034,13 +1038,41 @@ msgstr ""
"команда: исполняемая команда ('/' автоматически добавляется в начало "
"команды)\n"
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr ""
#, fuzzy
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr "dump | buffer | windows"
#, fuzzy
@ -1053,10 +1085,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1206,8 +1240,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1256,6 +1292,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1264,7 +1309,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
" клавиша: отобразить или назначить этой клавише функцию или команду "
"(начинающуюся на \"/\")\n"
@ -1291,6 +1339,29 @@ msgid ""
"Without argument, this command displays saved layout."
msgstr ""
msgid "mouse control"
msgstr ""
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
#, fuzzy
msgid "execute a command silently"
msgstr "Внутренние команды %s:\n"
@ -1733,6 +1804,9 @@ msgstr ""
msgid "key codes that can be reset (keys added, redefined or removed)"
msgstr "Комбинации клавиш:\n"
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
#, fuzzy
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
@ -1944,6 +2018,9 @@ msgid ""
"jump to buffer number - 1)"
msgstr ""
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr "отображать режим ника (op/voice) перед каждым ником"
@ -2663,6 +2740,14 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr "%s не могу сохранить конфигурационный файл\n"
#, fuzzy
msgid "Mouse is enabled"
msgstr "команда users отключена"
#, fuzzy
msgid "Mouse is disabled"
msgstr "Сокращения не заданы.\n"
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
@ -2772,12 +2857,18 @@ msgstr ""
msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
msgid "Debug enabled for cursor mode"
msgstr ""
msgid "Debug disabled for cursor mode"
msgstr ""
#, fuzzy
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr "%s не могу добавить буфер в хотлист\n"
#, fuzzy, c-format
msgid "New key binding: %s%s => %s%s"
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr "Новая комбинация клавиш: %s"
#, fuzzy, c-format
@ -2792,6 +2883,12 @@ msgstr "%s недостаточно памяти для установки кл
msgid "Not enough memory for new line"
msgstr "Недостаточно памяти для новой строчки\n"
msgid "Debug enabled for mouse"
msgstr ""
msgid "Debug disabled for mouse"
msgstr ""
#, fuzzy, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr "%s рекурсия при вызове сокращения \"/%s\"\n"
@ -6123,6 +6220,10 @@ msgstr ""
msgid "1 if filters are enabled"
msgstr "команда users отключена"
#, fuzzy
msgid "1 if cursor mode is enabled"
msgstr "команда users отключена"
#, fuzzy
msgid "list of bars"
msgstr "Список сокращений:\n"
@ -6243,6 +6344,10 @@ msgstr ""
msgid "bar item"
msgstr "Список сокращений:\n"
#, fuzzy
msgid "bar window"
msgstr "управление окнами"
#, fuzzy
msgid "buffer"
msgstr "управление буферами"
@ -7378,6 +7483,14 @@ msgstr ""
msgid "Lists"
msgstr ""
#, fuzzy
#~ msgid "Key bindings (%d) for context \"%s\":"
#~ msgstr "Комбинации клавиш:\n"
#, fuzzy
#~ msgid "Default key bindings (%d) for context \"%s\":"
#~ msgstr "Комбинации клавиш по умолчанию восстановлены\n"
#, fuzzy
#~ msgid "hook of type \"command\""
#~ msgstr "Внутренние команды %s:\n"

View File

@ -43,6 +43,7 @@ SET(WEECHAT_SOURCES
./src/gui/curses/gui-curses.h
./src/gui/curses/gui-curses-key.c
./src/gui/curses/gui-curses-main.c
./src/gui/curses/gui-curses-mouse.c
./src/gui/curses/gui-curses-window.c
./src/gui/gtk/gui-gtk-bar-window.c
./src/gui/gtk/gui-gtk-chat.c
@ -50,6 +51,7 @@ SET(WEECHAT_SOURCES
./src/gui/gtk/gui-gtk.h
./src/gui/gtk/gui-gtk-key.c
./src/gui/gtk/gui-gtk-main.c
./src/gui/gtk/gui-gtk-mouse.c
./src/gui/gtk/gui-gtk-window.c
./src/gui/gui-bar.c
./src/gui/gui-bar.h
@ -63,6 +65,8 @@ SET(WEECHAT_SOURCES
./src/gui/gui-chat.h
./src/gui/gui-color.c
./src/gui/gui-color.h
./src/gui/gui-cursor.c
./src/gui/gui-cursor.h
./src/gui/gui-completion.c
./src/gui/gui-completion.h
./src/gui/gui-filter.c
@ -80,6 +84,8 @@ SET(WEECHAT_SOURCES
./src/gui/gui-line.c
./src/gui/gui-line.h
./src/gui/gui-main.h
./src/gui/gui-mouse.c
./src/gui/gui-mouse.h
./src/gui/gui-nicklist.c
./src/gui/gui-nicklist.h
./src/gui/gui-window.c

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-07-10 23:03+0200\n"
"POT-Creation-Date: 2011-07-26 14:08+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"
@ -334,12 +334,14 @@ msgstr ""
msgid "default command:"
msgstr ""
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Key bindings added or redefined (%d) for context \"%s\":"
msgid "%d key bindings added or redefined for context \"%s\":"
msgstr ""
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Key bindings deleted (%d) for context \"%s\":"
msgid "%d key bindings deleted for context \"%s\":"
msgstr ""
#, c-format
@ -370,16 +372,18 @@ msgstr ""
msgid "No key binding defined for context \"%s\""
msgstr ""
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Key bindings (%d) for context \"%s\":"
msgid "%d key bindings for context \"%s\":"
msgstr ""
#, c-format
msgid "No default key binding for context \"%s\""
msgstr ""
#. TRANSLATORS: first "%d" is number of keys
#, c-format
msgid "Default key bindings (%d) for context \"%s\":"
msgid "%d default key bindings for context \"%s\":"
msgstr ""
msgid "Key:"
@ -786,9 +790,9 @@ msgid ""
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' means current buffer, you "
"should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by '+', '-', "
"'b' (beginning) or 'e' (end), value (for +/-), and optional %% (to scroll by "
"%% of width/height, otherwise value is number of chars)\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), followed by '+', "
"'-', 'b' (beginning) or 'e' (end), value (for +/-), and optional % (to "
"scroll by % of width/height, otherwise value is number of chars)\n"
"\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
@ -895,12 +899,40 @@ msgid ""
"beginning of command)"
msgstr ""
msgid ""
"free movement of cursor on screen to execute actions on specific areas of "
"screen"
msgstr ""
msgid ""
"go chat|<bar>|<x>,<y> || move up|down|left|right|area_up|area_down|area_left|"
"area_right || stop"
msgstr ""
msgid ""
" go: move cursor to chat area, a bar (using bar name) or coordinates \"x,y"
"\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n"
"\n"
"Without argument, this command toggles cursor mode.\n"
"\n"
"When mouse is enabled (see /help mouse), by default a middle click will "
"start cursor mode at this point.\n"
"\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"
msgstr ""
msgid "control debug for core/plugins"
msgstr ""
msgid ""
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|infolists|"
"memory|tags|term|windows || hdata [free]"
"list || set <plugin> <level> || dump [<plugin>] || buffer|color|cursor|"
"infolists|memory|mouse|tags|term|windows || hdata [free]"
msgstr ""
msgid ""
@ -912,10 +944,12 @@ msgid ""
"WeeChat crashes)\n"
" buffer: dump buffer content with hexadecimal values in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove all hdata in "
"memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"
@ -1054,8 +1088,10 @@ msgid ""
" jump_previously_visited_buffer: jump to previously visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key_command: grab a key with its associated command\n"
" grab_key: grab a key (optional argument: delay for end of grab, default is "
"500 milliseconds)\n"
" grab_key_command: grab a key with its associated command (optional "
"argument: delay for end of grab, default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for current buffer\n"
@ -1100,6 +1136,15 @@ msgid ""
"then k), and then press the key to bind: this will insert key code in "
"command line.\n"
"\n"
"For context \"mouse\" (possible in context \"cursor\" too), key has format: "
"\"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n"
"\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -1108,7 +1153,10 @@ msgid ""
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
"${nick}"
msgstr ""
msgid "save/apply/reset layout for buffers and windows"
@ -1128,6 +1176,29 @@ msgid ""
"Without argument, this command displays saved layout."
msgstr ""
msgid "mouse control"
msgstr ""
msgid "enable|disable|toggle [<delay>]"
msgstr ""
msgid ""
" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse state is restored "
"(useful to temporarily disable mouse)\n"
"\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n"
"\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"
msgstr ""
msgid "execute a command silently"
msgstr ""
@ -1498,6 +1569,9 @@ msgstr ""
msgid "key codes that can be reset (keys added, redefined or removed)"
msgstr ""
msgid "areas (\"chat\" or bar name) for free cursor movement"
msgstr ""
msgid ""
"Warning: you should now issue /save to write \"save_config_on_exit\" option "
"in configuration file"
@ -1683,6 +1757,9 @@ msgid ""
"jump to buffer number - 1)"
msgstr ""
msgid "enable mouse support at startup (to enable it now, see /help mouse)"
msgstr ""
msgid "display nick mode ((half)op/voice) before each nick"
msgstr ""
@ -2301,6 +2378,12 @@ msgstr ""
msgid "Signal SIGHUP received, reloading configuration files"
msgstr ""
msgid "Mouse is enabled"
msgstr ""
msgid "Mouse is disabled"
msgstr ""
#, c-format
msgid " TERM='%s', size: %dx%d"
msgstr ""
@ -2398,11 +2481,17 @@ msgstr ""
msgid "%sError: it is only possible to merge buffers with formatted content"
msgstr ""
msgid "Debug enabled for cursor mode"
msgstr ""
msgid "Debug disabled for cursor mode"
msgstr ""
msgid "Error: not enough memory to add a buffer to hotlist"
msgstr ""
#, c-format
msgid "New key binding: %s%s => %s%s"
msgid "New key binding (context \"%s\"): %s%s => %s%s"
msgstr ""
#, c-format
@ -2415,6 +2504,12 @@ msgstr ""
msgid "Not enough memory for new line"
msgstr ""
msgid "Debug enabled for mouse"
msgstr ""
msgid "Debug disabled for mouse"
msgstr ""
#, c-format
msgid "%s%s: error, circular reference when calling alias \"%s\""
msgstr ""
@ -5316,6 +5411,9 @@ msgstr ""
msgid "1 if filters are enabled"
msgstr ""
msgid "1 if cursor mode is enabled"
msgstr ""
msgid "list of bars"
msgstr ""
@ -5420,6 +5518,9 @@ msgstr ""
msgid "bar item"
msgstr ""
msgid "bar window"
msgstr ""
msgid "buffer"
msgstr ""

View File

@ -55,6 +55,7 @@
#include "../gui/gui-buffer.h"
#include "../gui/gui-chat.h"
#include "../gui/gui-color.h"
#include "../gui/gui-cursor.h"
#include "../gui/gui-filter.h"
#include "../gui/gui-history.h"
#include "../gui/gui-hotlist.h"
@ -62,6 +63,7 @@
#include "../gui/gui-key.h"
#include "../gui/gui-layout.h"
#include "../gui/gui-main.h"
#include "../gui/gui-mouse.h"
#include "../gui/gui-window.h"
#include "../plugins/plugin.h"
#include "../plugins/plugin-config.h"
@ -499,7 +501,7 @@ COMMAND_CALLBACK(buffer)
{
struct t_gui_buffer *ptr_buffer, *weechat_buffer;
long number, number1, number2;
char *error, *value, *pos, *str_number1, *pos_number2;
char *error, *value, *pos, *str_number1, *pos_number2, *plugin_name;
int i, target_buffer;
/* make C compiler happy */
@ -897,7 +899,19 @@ COMMAND_CALLBACK(buffer)
else
{
ptr_buffer = NULL;
ptr_buffer = gui_buffer_search_by_partial_name (NULL, argv_eol[1]);
pos = strchr (argv_eol[1], '.');
if (pos)
{
plugin_name = string_strndup (argv_eol[1], pos - argv_eol[1]);
if (plugin_name)
{
ptr_buffer = gui_buffer_search_by_partial_name (plugin_name,
pos + 1);
free (plugin_name);
}
}
if (!ptr_buffer)
ptr_buffer = gui_buffer_search_by_partial_name (NULL, argv_eol[1]);
if (ptr_buffer)
{
gui_window_switch_to_buffer (gui_current_window, ptr_buffer, 1);
@ -1098,6 +1112,89 @@ COMMAND_CALLBACK(command)
return WEECHAT_RC_OK;
}
/*
* command_cursor: free movement of cursor on screen
*/
COMMAND_CALLBACK(cursor)
{
char *pos, *str_x, *error;
int x, y;
/* make C compiler happy */
(void) data;
(void) buffer;
(void) argv_eol;
if (argc == 1)
{
gui_cursor_mode_toggle ();
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "go") == 0)
{
if (argc > 2)
{
pos = strchr (argv[2], ',');
if (pos)
{
str_x = string_strndup (argv[2], pos - argv[2]);
pos++;
if (str_x)
{
error = NULL;
x = (int) strtol (str_x, &error, 10);
if (error && !error[0])
{
error = NULL;
y = (int) strtol (pos, &error, 10);
if (error && !error[0])
{
gui_cursor_move_xy (x, y);
}
}
}
}
else
gui_cursor_move_area (argv[2]);
}
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "move") == 0)
{
if (argc > 2)
{
if (string_strcasecmp (argv[2], "up") == 0)
gui_cursor_move_add_xy (0, -1);
else if (string_strcasecmp (argv[2], "down") == 0)
gui_cursor_move_add_xy (0, 1);
else if (string_strcasecmp (argv[2], "left") == 0)
gui_cursor_move_add_xy (-1, 0);
else if (string_strcasecmp (argv[2], "right") == 0)
gui_cursor_move_add_xy (1, 0);
else if (string_strcasecmp (argv[2], "area_up") == 0)
gui_cursor_move_area_add_xy (0, -1);
else if (string_strcasecmp (argv[2], "area_down") == 0)
gui_cursor_move_area_add_xy (0, 1);
else if (string_strcasecmp (argv[2], "area_left") == 0)
gui_cursor_move_area_add_xy (-1, 0);
else if (string_strcasecmp (argv[2], "area_right") == 0)
gui_cursor_move_area_add_xy (1, 0);
}
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "stop") == 0)
{
gui_cursor_mode_toggle ();
return WEECHAT_RC_OK;
}
return WEECHAT_RC_OK;
}
/*
* command_debug: control debug for core/plugins
*/
@ -1153,6 +1250,10 @@ COMMAND_CALLBACK(debug)
{
gui_color_dump (buffer);
}
else if (string_strcasecmp (argv[1], "cursor") == 0)
{
gui_cursor_debug_toggle ();
}
else if (string_strcasecmp (argv[1], "hdata") == 0)
{
if ((argc > 2) && (string_strcasecmp (argv[2], "free") == 0))
@ -1168,6 +1269,10 @@ COMMAND_CALLBACK(debug)
{
debug_memory ();
}
else if (string_strcasecmp (argv[1], "mouse") == 0)
{
gui_mouse_debug_toggle ();
}
else if (string_strcasecmp (argv[1], "tags") == 0)
{
gui_chat_display_tags ^= 1;
@ -2178,9 +2283,9 @@ COMMAND_CALLBACK(input)
else if (string_strcasecmp (argv[1], "hotlist_clear") == 0)
gui_input_hotlist_clear (buffer);
else if (string_strcasecmp (argv[1], "grab_key") == 0)
gui_input_grab_key (buffer);
gui_input_grab_key (buffer, (argc > 2) ? argv[2] : NULL);
else if (string_strcasecmp (argv[1], "grab_key_command") == 0)
gui_input_grab_key_command (buffer);
gui_input_grab_key_command (buffer, (argc > 2) ? argv[2] : NULL);
else if (string_strcasecmp (argv[1], "scroll_unread") == 0)
gui_input_scroll_unread (buffer);
else if (string_strcasecmp (argv[1], "set_unread") == 0)
@ -2213,25 +2318,12 @@ void
command_key_display (struct t_gui_key *key, struct t_gui_key *default_key)
{
char *expanded_name;
char str_spaces[20 + 1];
int length_screen, num_spaces;
expanded_name = gui_key_get_expanded_name (key->key);
str_spaces[0] = '\0';
length_screen = utf8_strlen_screen ((expanded_name) ?
expanded_name : key->key);
num_spaces = 20 - length_screen;
if (num_spaces > 0)
{
memset (str_spaces, ' ', num_spaces);
str_spaces[num_spaces] = '\0';
}
if (default_key)
{
gui_chat_printf (NULL, " %s%s%s => %s%s %s(%s%s %s%s)",
str_spaces,
gui_chat_printf (NULL, " %s%s => %s%s %s(%s%s %s%s)",
(expanded_name) ? expanded_name : key->key,
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
GUI_COLOR(GUI_COLOR_CHAT),
@ -2244,8 +2336,7 @@ command_key_display (struct t_gui_key *key, struct t_gui_key *default_key)
}
else
{
gui_chat_printf (NULL, " %s%s%s => %s%s",
str_spaces,
gui_chat_printf (NULL, " %s%s => %s%s",
(expanded_name) ? expanded_name : key->key,
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
GUI_COLOR(GUI_COLOR_CHAT),
@ -2311,7 +2402,8 @@ command_key_display_listdiff (int context)
{
gui_chat_printf (NULL, "");
gui_chat_printf (NULL,
_("Key bindings added or redefined (%d) for "
/* TRANSLATORS: first "%d" is number of keys */
_("%d key bindings added or redefined for "
"context \"%s\":"),
count_added,
_(gui_key_context_string[context]));
@ -2340,7 +2432,8 @@ command_key_display_listdiff (int context)
{
gui_chat_printf (NULL, "");
gui_chat_printf (NULL,
_("Key bindings deleted (%d) for context \"%s\":"),
/* TRANSLATORS: first "%d" is number of keys */
_("%d key bindings deleted for context \"%s\":"),
count_deleted,
_(gui_key_context_string[context]));
for (ptr_default_key = gui_default_keys[context]; ptr_default_key;
@ -2357,6 +2450,7 @@ command_key_display_listdiff (int context)
/* display a message if all key bindings are default bindings */
if ((count_added == 0) && (count_deleted == 0))
{
gui_chat_printf (NULL, "");
gui_chat_printf (NULL,
_("No key binding added, redefined or removed "
"for context \"%s\""),
@ -2480,8 +2574,9 @@ COMMAND_CALLBACK(key)
{
command_key_display_list (_("No key binding defined for "
"context \"%s\""),
_("Key bindings (%d) for "
"context \"%s\":"),
/* TRANSLATORS: first "%d" is number of keys */
_("%d key bindings for context "
"\"%s\":"),
i, gui_keys[i], gui_keys_count[i]);
}
}
@ -2512,7 +2607,8 @@ COMMAND_CALLBACK(key)
{
command_key_display_list (_("No default key binding for "
"context \"%s\""),
_("Default key bindings (%d) for "
/* TRANSLATORS: first "%d" is number of keys */
_("%d default key bindings for "
"context \"%s\":"),
i,
gui_default_keys[i],
@ -2939,6 +3035,96 @@ COMMAND_CALLBACK(layout)
return WEECHAT_RC_OK;
}
/*
* command_mouse_timer_cb: callback for mouse timer
*/
int
command_mouse_timer_cb (void *data, int remaining_calls)
{
/* make C compiler happy */
(void) data;
(void) remaining_calls;
if (gui_mouse_enabled)
gui_mouse_disable ();
else
gui_mouse_enable ();
return WEECHAT_RC_OK;
}
/*
* command_mouse_timer: timer for toggling mouse
*/
void
command_mouse_timer (const char *delay)
{
long seconds;
char *error;
error = NULL;
seconds = strtol (delay, &error, 10);
if (error && !error[0] && (seconds > 0))
{
hook_timer (NULL, seconds * 1000, 0, 1, &command_mouse_timer_cb, NULL);
}
}
/*
* command_mouse: mouse control
*/
COMMAND_CALLBACK(mouse)
{
/* make C compiler happy */
(void) data;
(void) buffer;
(void) argv_eol;
if (argc == 1)
{
gui_mouse_display_state ();
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "enable") == 0)
{
gui_mouse_enable ();
if (argc > 2)
command_mouse_timer (argv[2]);
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "disable") == 0)
{
gui_mouse_disable ();
if (argc > 2)
command_mouse_timer (argv[2]);
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "toggle") == 0)
{
if (gui_mouse_enabled)
gui_mouse_disable ();
else
gui_mouse_enable ();
if (argc > 2)
command_mouse_timer (argv[2]);
return WEECHAT_RC_OK;
}
if (string_strcasecmp (argv[1], "grab") == 0)
{
gui_mouse_grab_init ();
return WEECHAT_RC_OK;
}
return WEECHAT_RC_OK;
}
/*
* command_mute: execute a command mute
*/
@ -4900,10 +5086,10 @@ command_init ()
" scroll: scroll bar\n"
" buffer: name of buffer to scroll ('*' "
"means current buffer, you should use '*' for root bars)\n"
" scroll_value: value for scroll: 'x' or 'y', followed by "
"'+', '-', 'b' (beginning) or 'e' (end), value (for +/-), "
"and optional %% (to scroll by %% of width/height, "
"otherwise value is number of chars)\n\n"
" scroll_value: value for scroll: 'x' or 'y' (optional), "
"followed by '+', '-', 'b' (beginning) or 'e' (end), "
"value (for +/-), and optional % (to scroll by % of "
"width/height, otherwise value is number of chars)\n\n"
"Examples:\n"
" create a bar with time, buffer number + name, and completion:\n"
" /bar add mybar root bottom 1 0 [time],buffer_number+:+buffer_name,completion\n"
@ -5035,12 +5221,37 @@ command_init ()
"added if not found at beginning of command)"),
"%(plugins_names)|" PLUGIN_CORE " %(plugins_commands)",
&command_command, NULL);
hook_command (NULL, "cursor",
N_("free movement of cursor on screen to execute actions on "
"specific areas of screen"),
N_("go chat|<bar>|<x>,<y>"
" || move up|down|left|right|area_up|area_down|area_left|"
"area_right"
" || stop"),
N_(" go: move cursor to chat area, a bar (using bar name) "
"or coordinates \"x,y\"\n"
"move: move cursor with direction\n"
"stop: stop cursor mode\n\n"
"Without argument, this command toggles cursor mode.\n\n"
"When mouse is enabled (see /help mouse), by default a "
"middle click will start cursor mode at this point.\n\n"
"Examples:\n"
" go to nicklist:\n"
" /cursor go nicklist\n"
" go to coordinates x=10, y=5:\n"
" /cursor go 10,5"),
"go %(cursor_areas)"
" || move up|down|left|right|area_up|area_down|area_left|"
"area_right"
" || stop",
&command_cursor, NULL);
hook_command (NULL, "debug",
N_("control debug for core/plugins"),
N_("list"
" || set <plugin> <level>"
" || dump [<plugin>]"
" || buffer|color|infolists|memory|tags|term|windows"
" || buffer|color|cursor|infolists|memory|mouse|tags|"
"term|windows"
" || hdata [free]"),
N_(" list: list plugins with debug levels\n"
" set: set debug level for plugin\n"
@ -5051,10 +5262,12 @@ command_init ()
" buffer: dump buffer content with hexadecimal values "
"in log file\n"
" color: display infos about current color pairs\n"
" cursor: toggle debug for cursor mode\n"
" hdata: display infos about hdata (with free: remove "
"all hdata in memory)\n"
"infolists: display infos about infolists\n"
" memory: display infos about memory usage\n"
" mouse: toggle debug for mouse\n"
" tags: display tags for lines\n"
" term: display infos about terminal\n"
" windows: display windows tree"),
@ -5063,9 +5276,11 @@ command_init ()
" || dump %(plugins_names)|core"
" || buffer"
" || color"
" || cursor"
" || hdata free"
" || infolists"
" || memory"
" || mouse"
" || tags"
" || term"
" || windows",
@ -5208,9 +5423,11 @@ command_init ()
"visited buffer\n"
" jump_next_visited_buffer: jump to next visited buffer\n"
" hotlist_clear: clear hotlist\n"
" grab_key: grab a key\n"
" grab_key: grab a key (optional argument: delay for end "
"of grab, default is 500 milliseconds)\n"
" grab_key_command: grab a key with its associated "
"command\n"
"command (optional argument: delay for end of grab, "
"default is 500 milliseconds)\n"
" scroll_unread: scroll to unread marker\n"
" set_unread: set unread marker for all buffers\n"
" set_unread_current_buffer: set unread marker for "
@ -5272,6 +5489,14 @@ command_init ()
"When binding a command to a key, it is recommended to "
"use key alt+k (or Esc then k), and then press the key "
"to bind: this will insert key code in command line.\n\n"
"For context \"mouse\" (possible in context \"cursor\" "
"too), key has format: \"@area:key\" where area can be:\n"
" *: any area on screen\n"
" chat: chat area\n"
" bar(*): any bar\n"
" bar(xxx): bar \"xxx\"\n"
" item(*): any bar item\n"
" item(xxx): bar item \"xxx\"\n\n"
"Examples:\n"
" key alt-x to toggle nicklist bar:\n"
" /key bind meta-x /bar toggle nicklist\n"
@ -5280,7 +5505,11 @@ command_init ()
" restore default binding for key alt-r:\n"
" /key reset meta-r\n"
" key \"tab\" to stop search in buffer:\n"
" /key bindctxt search ctrl-I /input search_stop"),
" /key bindctxt search ctrl-I /input search_stop\n"
" middle button of mouse on a nick to retrieve info on "
"nick:\n"
" /key bindctxt mouse @item(buffer_nicklist):button3 "
"/msg nickserv info ${nick}"),
"list %(keys_contexts)"
" || listdefault %(keys_contexts)"
" || listdiff %(keys_contexts)"
@ -5290,7 +5519,7 @@ command_init ()
" || unbindctxt %(keys_contexts) %(keys_codes)"
" || reset %(keys_codes_for_reset)"
" || resetctxt %(keys_contexts) %(keys_codes_for_reset)"
" || resetall"
" || resetall %- %(keys_contexts)"
" || missing %(keys_contexts)",
&command_key, NULL);
hook_command (NULL, "layout",
@ -5307,6 +5536,25 @@ command_init ()
"Without argument, this command displays saved layout."),
"save|apply|reset buffers|windows",
&command_layout, NULL);
hook_command (NULL, "mouse",
N_("mouse control"),
N_("enable|disable|toggle [<delay>]"),
N_(" enable: enable mouse\n"
"disable: disable mouse\n"
" toggle: toggle mouse\n"
" delay: delay (in seconds) after which initial mouse "
"state is restored (useful to temporarily disable mouse)\n\n"
"To enable/disable mouse at startup, use:\n"
" /set weechat.look.mouse on/off\n\n"
"Examples:\n"
" enable mouse:\n"
" /mouse enable\n"
" toggle mouse for 5 seconds:\n"
" /mouse toggle 5"),
"enable"
" || disable"
" || toggle",
&command_mouse, NULL);
hook_command (NULL, "mute",
N_("execute a command silently"),
N_("[-current | -buffer <name> | -all] command"),

View File

@ -45,11 +45,13 @@
#include "../plugins/plugin.h"
#include "../gui/gui-completion.h"
#include "../gui/gui-bar.h"
#include "../gui/gui-bar-window.h"
#include "../gui/gui-buffer.h"
#include "../gui/gui-color.h"
#include "../gui/gui-filter.h"
#include "../gui/gui-key.h"
#include "../gui/gui-nicklist.h"
#include "../gui/gui-window.h"
/*
@ -1225,6 +1227,47 @@ completion_list_add_keys_codes_for_reset_cb (void *data,
return WEECHAT_RC_OK;
}
/*
* completion_list_add_cursor_areas_cb: add areas for free cursor movement
* ("chat" and bar names)
*/
int
completion_list_add_cursor_areas_cb (void *data,
const char *completion_item,
struct t_gui_buffer *buffer,
struct t_gui_completion *completion)
{
struct t_gui_bar_window *ptr_bar_win;
struct t_gui_bar *ptr_bar;
/* make C compiler happy */
(void) data;
(void) completion_item;
(void) buffer;
/* add "chat" for chat area */
gui_completion_list_add (completion, "chat", 0, WEECHAT_LIST_POS_SORT);
/* add bar windows (of current window) */
for (ptr_bar_win = gui_current_window->bar_windows; ptr_bar_win;
ptr_bar_win = ptr_bar_win->next_bar_window)
{
gui_completion_list_add (completion, ptr_bar_win->bar->name,
0, WEECHAT_LIST_POS_SORT);
}
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if (ptr_bar->bar_window)
{
gui_completion_list_add (completion, ptr_bar->name,
0, WEECHAT_LIST_POS_SORT);
}
}
return WEECHAT_RC_OK;
}
/*
* completion_init: add hooks for completions done by WeeChat core
*/
@ -1311,4 +1354,7 @@ completion_init ()
N_("key codes that can be reset (keys added, redefined "
"or removed)"),
&completion_list_add_keys_codes_for_reset_cb, NULL);
hook_completion (NULL, "cursor_areas",
N_("areas (\"chat\" or bar name) for free cursor movement"),
&completion_list_add_cursor_areas_cb, NULL);
}

View File

@ -56,6 +56,7 @@
#include "../gui/gui-layout.h"
#include "../gui/gui-line.h"
#include "../gui/gui-main.h"
#include "../gui/gui-mouse.h"
#include "../gui/gui-nicklist.h"
#include "../gui/gui-window.h"
#include "../plugins/plugin.h"
@ -108,6 +109,7 @@ struct t_config_option *config_look_input_undo_max;
struct t_config_option *config_look_item_time_format;
struct t_config_option *config_look_jump_current_to_previous_buffer;
struct t_config_option *config_look_jump_previous_buffer_when_closing;
struct t_config_option *config_look_mouse;
struct t_config_option *config_look_nickmode;
struct t_config_option *config_look_nickmode_empty;
struct t_config_option *config_look_paste_max_lines;
@ -1794,6 +1796,11 @@ config_weechat_init_options ()
N_("jump to previously visited buffer when closing a buffer (if "
"disabled, then jump to buffer number - 1)"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_mouse = config_file_new_option (
weechat_config_file, ptr_section,
"mouse", "boolean",
N_("enable mouse support at startup (to enable it now, see /help mouse)"),
NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_nickmode = config_file_new_option (
weechat_config_file, ptr_section,
"nickmode", "boolean",

View File

@ -133,6 +133,7 @@ extern struct t_config_option *config_look_input_undo_max;
extern struct t_config_option *config_look_item_time_format;
extern struct t_config_option *config_look_jump_current_to_previous_buffer;
extern struct t_config_option *config_look_jump_previous_buffer_when_closing;
extern struct t_config_option *config_look_mouse;
extern struct t_config_option *config_look_nickmode;
extern struct t_config_option *config_look_nickmode_empty;
extern struct t_config_option *config_look_paste_max_lines;

View File

@ -49,9 +49,13 @@
#include "wee-utf8.h"
#include "wee-util.h"
#include "../gui/gui-chat.h"
#include "../gui/gui-bar.h"
#include "../gui/gui-bar-window.h"
#include "../gui/gui-color.h"
#include "../gui/gui-completion.h"
#include "../gui/gui-cursor.h"
#include "../gui/gui-line.h"
#include "../gui/gui-window.h"
#include "../plugins/plugin.h"
@ -2743,6 +2747,150 @@ hook_hdata_get (struct t_weechat_plugin *plugin, const char *hdata_name)
return NULL;
}
/*
* hook_focus: hook a focus
*/
struct t_hook *
hook_focus (struct t_weechat_plugin *plugin, const char *area,
t_hook_callback_focus *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_focus *new_hook_focus;
int priority;
const char *ptr_area;
if (!area || !area[0] || !callback)
return NULL;
new_hook = malloc (sizeof (*new_hook));
if (!new_hook)
return NULL;
new_hook_focus = malloc (sizeof (*new_hook_focus));
if (!new_hook_focus)
{
free (new_hook);
return NULL;
}
hook_get_priority_and_name (area, &priority, &ptr_area);
hook_init_data (new_hook, plugin, HOOK_TYPE_FOCUS, priority,
callback_data);
new_hook->hook_data = new_hook_focus;
new_hook_focus->callback = callback;
new_hook_focus->area = strdup ((ptr_area) ? ptr_area : area);
hook_add_to_list (new_hook);
return new_hook;
}
/*
* hook_focus_hashtable_map_cb: add keys of a hashtable into another
*/
void
hook_focus_hashtable_map_cb (void *data, struct t_hashtable *hashtable,
const void *key, const void *value)
{
struct t_hashtable *hashtable1;
/* make C compiler happy */
(void) hashtable;
hashtable1 = (struct t_hashtable *)data;
if (hashtable1 && key && value)
hashtable_set (hashtable1, (const char *)key, (const char *)value);
}
/*
* hook_focus_get_data: get data for focus on (x,y) on screen
*/
struct t_hashtable *
hook_focus_get_data (struct t_gui_cursor_info *cursor_info)
{
struct t_hook *ptr_hook, *next_hook;
struct t_hashtable *hash_info, *hash_info2;
char str_value[64];
hook_exec_start ();
hash_info = hashtable_new (8,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL,
NULL);
if (!hash_info)
return NULL;
/* fill hash_info with values from cursor_info */
snprintf (str_value, sizeof (str_value), "%d", cursor_info->x);
hashtable_set (hash_info, "_x", str_value);
snprintf (str_value, sizeof (str_value), "%d", cursor_info->y);
hashtable_set (hash_info, "_y", str_value);
snprintf (str_value, sizeof (str_value),
"0x%lx", (long unsigned int)cursor_info->window);
hashtable_set (hash_info, "_window", str_value);
snprintf (str_value, sizeof (str_value),
"0x%lx",
(cursor_info->window) ?
(long unsigned int)((cursor_info->window)->buffer) : 0);
hashtable_set (hash_info, "_buffer", str_value);
hashtable_set (hash_info, "_bar_name",
(cursor_info->bar_window) ?
((cursor_info->bar_window)->bar)->name : NULL);
hashtable_set (hash_info, "_bar_item_name",
cursor_info->bar_item);
snprintf (str_value, sizeof (str_value),
"%d", cursor_info->item_line);
hashtable_set (hash_info, "_item_line", str_value);
snprintf (str_value, sizeof (str_value),
"%d", cursor_info->item_col);
hashtable_set (hash_info, "_item_col", str_value);
ptr_hook = weechat_hooks[HOOK_TYPE_FOCUS];
while (ptr_hook)
{
next_hook = ptr_hook->next_hook;
if (!ptr_hook->deleted
&& !ptr_hook->running
&& ((cursor_info->chat
&& (strcmp (HOOK_FOCUS(ptr_hook, area), "chat") == 0))
|| (cursor_info->bar_item
&& (strcmp (HOOK_FOCUS(ptr_hook, area), cursor_info->bar_item) == 0))))
{
ptr_hook->running = 1;
hash_info2 = (HOOK_FOCUS(ptr_hook, callback))
(ptr_hook->callback_data, hash_info);
ptr_hook->running = 0;
if (hash_info2)
{
if (hash_info2 != hash_info)
{
/*
* add keys of hashtable2 into hashtable and destroy
* hashtable2
*/
hashtable_map (hash_info2, &hook_focus_hashtable_map_cb,
hash_info);
hashtable_free (hash_info2);
}
}
}
ptr_hook = next_hook;
}
hook_exec_end ();
return hash_info;
}
/*
* unhook: unhook something
*/
@ -2933,6 +3081,10 @@ unhook (struct t_hook *hook)
if (HOOK_HDATA(hook, description))
free (HOOK_HDATA(hook, description));
break;
case HOOK_TYPE_FOCUS:
if (HOOK_FOCUS(hook, area))
free (HOOK_FOCUS(hook, area));
break;
case HOOK_NUM_TYPES:
/*
* this constant is used to count types only,
@ -3372,6 +3524,15 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type,
return 0;
}
break;
case HOOK_TYPE_FOCUS:
if (!ptr_hook->deleted)
{
if (!infolist_new_var_pointer (ptr_item, "callback", HOOK_FOCUS(ptr_hook, callback)))
return 0;
if (!infolist_new_var_string (ptr_item, "area", HOOK_FOCUS(ptr_hook, area)))
return 0;
}
break;
case HOOK_NUM_TYPES:
/*
* this constant is used to count types only,
@ -3671,6 +3832,14 @@ hook_print_log ()
log_printf (" description . . . . . : '%s'", HOOK_HDATA(ptr_hook, description));
}
break;
case HOOK_TYPE_FOCUS:
if (!ptr_hook->deleted)
{
log_printf (" focus data:");
log_printf (" callback. . . . . . . : 0x%lx", HOOK_FOCUS(ptr_hook, callback));
log_printf (" area. . . . . . . . . : '%s'", HOOK_FOCUS(ptr_hook, area));
}
break;
case HOOK_NUM_TYPES:
/*
* this constant is used to count types only,

View File

@ -24,9 +24,12 @@
#include <gnutls/gnutls.h>
#endif
struct t_gui_bar;
struct t_gui_buffer;
struct t_gui_line;
struct t_gui_completion;
struct t_gui_cursor_info;
struct t_gui_window;
struct t_weelist;
struct t_hashtable;
struct t_infolist;
@ -51,6 +54,7 @@ enum t_hook_type
HOOK_TYPE_INFO_HASHTABLE, /* get some info as hashtable */
HOOK_TYPE_INFOLIST, /* get some info as infolist */
HOOK_TYPE_HDATA, /* get hdata pointer */
HOOK_TYPE_FOCUS, /* focus event (mouse/key) */
/* number of hook types */
HOOK_NUM_TYPES,
};
@ -91,6 +95,7 @@ enum t_hook_type
#define HOOK_INFO_HASHTABLE(hook, var) (((struct t_hook_info_hashtable *)hook->hook_data)->var)
#define HOOK_INFOLIST(hook, var) (((struct t_hook_infolist *)hook->hook_data)->var)
#define HOOK_HDATA(hook, var) (((struct t_hook_hdata *)hook->hook_data)->var)
#define HOOK_FOCUS(hook, var) (((struct t_hook_focus *)hook->hook_data)->var)
struct t_hook
{
@ -374,6 +379,17 @@ struct t_hook_hdata
char *description; /* description */
};
/* hook focus */
typedef struct t_hashtable *(t_hook_callback_focus)(void *data,
struct t_hashtable *info);
struct t_hook_focus
{
t_hook_callback_focus *callback; /* focus callback */
char *area; /* "chat" or bar item name */
};
/* hook variables */
extern struct t_hook *weechat_hooks[];
@ -521,43 +537,14 @@ extern struct t_hook *hook_hdata (struct t_weechat_plugin *plugin,
void *callback_data);
extern struct t_hdata *hook_hdata_get (struct t_weechat_plugin *plugin,
const char *hdata_name);
extern struct t_hook *hook_focus (struct t_weechat_plugin *plugin,
const char *area,
t_hook_callback_focus *callback,
void *callback_data);
extern struct t_hashtable *hook_focus_get_data (struct t_gui_cursor_info *cursor_info);
extern void unhook (struct t_hook *hook);
extern void unhook_all_plugin (struct t_weechat_plugin *plugin);
extern void unhook_all ();
extern struct t_hdata *hook_hdata_hook_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_command_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_command_run_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_timer_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_fd_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_process_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_connect_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_print_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_signal_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_hsignal_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_config_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_completion_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_modifier_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_info_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_info_hashtable_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_infolist_cb (void *data,
const char *hdata_name);
extern struct t_hdata *hook_hdata_hook_hdata_cb (void *data,
const char *hdata_name);
extern int hook_add_to_infolist (struct t_infolist *infolist,
const char *arguments);
extern void hook_print_log ();

View File

@ -54,6 +54,7 @@
#include "weechat.h"
#include "wee-string.h"
#include "wee-config.h"
#include "wee-hashtable.h"
#include "wee-utf8.h"
#include "../gui/gui-color.h"
@ -1602,3 +1603,89 @@ string_input_for_buffer (const char *string)
/* string is a command */
return NULL;
}
/*
* string_replace_with_hashtable: replace ${codes} with value from hashtable
* "errors" is set with number of keys not found
* in hashtable
*/
char *
string_replace_with_hashtable (const char *string,
struct t_hashtable *hashtable,
int *errors)
{
int length, length_value, index_string, index_result;
char *result, *key;
const char *pos_end_name, *ptr_value;
*errors = 0;
if (!string)
return NULL;
if (!hashtable)
return strdup (string);
length = strlen (string) + 1;
result = malloc (length);
if (result)
{
index_string = 0;
index_result = 0;
while (string[index_string])
{
if ((string[index_string] == '\\')
&& (string[index_string + 1] == '$'))
{
index_string++;
result[index_result++] = string[index_string++];
}
else if ((string[index_string] == '$')
&& (string[index_string + 1] == '{'))
{
pos_end_name = strchr (string + index_string + 2, '}');
if (pos_end_name)
{
key = string_strndup (string + index_string + 2,
pos_end_name - (string + index_string + 2));
if (key)
{
ptr_value = (const char *)hashtable_get (hashtable, key);
if (ptr_value)
{
length_value = strlen (ptr_value);
length += length_value;
result = realloc (result, length);
if (!result)
{
free (key);
return NULL;
}
strcpy (result + index_result, ptr_value);
index_result += length_value;
index_string += pos_end_name - string -
index_string + 1;
}
else
{
result[index_result++] = string[index_string++];
(*errors)++;
}
free (key);
}
else
result[index_result++] = string[index_string++];
}
else
result[index_result++] = string[index_string++];
}
else
result[index_result++] = string[index_string++];
}
result[index_result] = '\0';
}
return result;
}

View File

@ -22,6 +22,8 @@
#include <regex.h>
struct t_hashtable;
extern char *string_strndup (const char *string, int length);
extern void string_tolower (char *string);
extern void string_toupper (char *string);
@ -66,5 +68,8 @@ extern void string_encode_base64 (const char *from, int length, char *to);
extern int string_decode_base64 (const char *from, char *to);
extern int string_is_command_char (const char *string);
extern const char *string_input_for_buffer (const char *string);
extern char *string_replace_with_hashtable (const char *string,
struct t_hashtable *hashtable,
int *errors);
#endif /* __WEECHAT_STRING_H */

View File

@ -24,6 +24,7 @@ gui-bar-window.c gui-bar-window.h
gui-buffer.c gui-buffer.h
gui-chat.c gui-chat.h
gui-color.c gui-color.h
gui-cursor.c gui-cursor.h
gui-filter.c gui-filter.h
gui-completion.c gui-completion.h
gui-history.c gui-history.h
@ -33,6 +34,7 @@ gui-key.c gui-key.h
gui-layout.c gui-layout.h
gui-line.c gui-line.h
gui-main.h
gui-mouse.c gui-mouse.h
gui-nicklist.c gui-nicklist.h
gui-window.c gui-window.h)

View File

@ -33,6 +33,8 @@ lib_weechat_gui_common_a_SOURCES = gui-bar.c \
gui-chat.h \
gui-color.c \
gui-color.h \
gui-cursor.c \
gui-cursor.h \
gui-completion.c \
gui-completion.h \
gui-filter.c \
@ -50,6 +52,8 @@ lib_weechat_gui_common_a_SOURCES = gui-bar.c \
gui-line.c \
gui-line.h \
gui-main.h \
gui-mouse.c \
gui-mouse.h \
gui-nicklist.c \
gui-nicklist.h \
gui-window.c \

View File

@ -30,6 +30,7 @@ gui-curses-chat.c
gui-curses-color.c
gui-curses-key.c
gui-curses-main.c
gui-curses-mouse.c
gui-curses-term.c
gui-curses-window.c)
@ -68,6 +69,8 @@ IF(LIBINTL_LIBRARY)
LIST(APPEND EXTRA_LIBS ${LIBINTL_LIBRARY})
ENDIF(LIBINTL_LIBRARY)
LIST(APPEND EXTRA_LIBS "m")
ADD_EXECUTABLE(${EXECUTABLE} ${WEECHAT_CURSES_SRC})
INCLUDE_DIRECTORIES(.. ../../core ../../plugins)

View File

@ -30,13 +30,15 @@ weechat_curses_LDADD = ./../../core/lib_weechat_core.a \
$(PLUGINS_LFLAGS) \
$(NCURSES_LFLAGS) \
$(GCRYPT_LFLAGS) \
$(GNUTLS_LFLAGS)
$(GNUTLS_LFLAGS) \
-lm
weechat_curses_SOURCES = gui-curses-bar-window.c \
gui-curses-chat.c \
gui-curses-color.c \
gui-curses-key.c \
gui-curses-main.c \
gui-curses-mouse.c \
gui-curses-term.c \
gui-curses-window.c \
gui-curses.h

View File

@ -39,6 +39,7 @@
#include "../gui-bar-window.h"
#include "../gui-chat.h"
#include "../gui-color.h"
#include "../gui-cursor.h"
#include "../gui-window.h"
#include "gui-curses.h"
@ -89,6 +90,9 @@ gui_bar_window_objects_free (struct t_gui_bar_window *bar_window)
void
gui_bar_window_create_win (struct t_gui_bar_window *bar_window)
{
if (CONFIG_BOOLEAN(bar_window->bar->options[GUI_BAR_OPTION_HIDDEN]))
return;
if (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar)
{
delwin (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar);
@ -152,14 +156,15 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
int *x, int *y,
const char *string,
int reset_color_before_display,
int hide_chars_if_scrolling)
int hide_chars_if_scrolling,
int *index_item, int *index_subitem, int *index_line)
{
int x_with_hidden, size_on_screen, low_char, hidden;
char utf_char[16], *next_char, *output;
if (!string || !string[0])
return 1;
wmove (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, *y, *x);
if (reset_color_before_display)
@ -239,6 +244,40 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
bar_window->cursor_x += bar_window->x;
bar_window->cursor_y += bar_window->y;
break;
case GUI_COLOR_BAR_START_ITEM:
string += 2;
if (*index_item < 0)
{
*index_item = 0;
*index_subitem = 0;
}
else
{
(*index_subitem)++;
if (*index_subitem >= bar_window->items_subcount[*index_item])
{
(*index_item)++;
*index_subitem = 0;
}
}
*index_line = 0;
gui_bar_window_coords_add (bar_window,
(*index_item >= bar_window->items_count) ? -1 : *index_item,
(*index_item >= bar_window->items_count) ? -1 : *index_subitem,
*index_line,
*x + bar_window->x,
*y + bar_window->y);
break;
case GUI_COLOR_BAR_START_LINE_ITEM:
string += 2;
(*index_line)++;
gui_bar_window_coords_add (bar_window,
*index_item,
*index_subitem,
*index_line,
*x + bar_window->x,
*y + bar_window->y);
break;
default:
string++;
break;
@ -353,10 +392,11 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
int length_screen_before_cursor, length_screen_after_cursor;
int diff, max_length, optimal_number_of_lines;
int some_data_not_displayed, separator_horizontal, separator_vertical;
int index_item, index_subitem, index_line;
if (!gui_init_ok)
return;
if (!str_start_input[0])
{
snprintf (str_start_input, sizeof (str_start_input), "%c%c%c",
@ -384,6 +424,12 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
bar_window->cursor_x = -1;
bar_window->cursor_y = -1;
/* remove coords */
gui_bar_window_coords_free (bar_window);
index_item = -1;
index_subitem = -1;
index_line = 0;
filling = gui_bar_get_filling (bar_window->bar);
content = gui_bar_window_content_get_with_filling (bar_window, window);
@ -547,7 +593,10 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
{
if (!gui_bar_window_print_string (bar_window, filling,
&x, &y,
items[line], 1, 1))
items[line], 1, 1,
&index_item,
&index_subitem,
&index_line))
{
some_data_not_displayed = 1;
}
@ -571,7 +620,10 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
while (x < bar_window->width)
{
gui_bar_window_print_string (bar_window, filling,
&x, &y, " ", 0, 0);
&x, &y, " ", 0, 0,
&index_item,
&index_subitem,
&index_line);
}
}
@ -618,7 +670,7 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_FG]),
CONFIG_COLOR(bar_window->bar->options[GUI_BAR_OPTION_COLOR_BG]));
}
/*
* move cursor if it was asked in an item content (input_text does that
* to move cursor in user input text)
@ -632,7 +684,12 @@ gui_bar_window_draw (struct t_gui_bar_window *bar_window,
x = bar_window->width - 2;
wmove (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar, y, x);
wrefresh (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar);
move (bar_window->cursor_y, bar_window->cursor_x);
if (!gui_cursor_mode)
{
gui_window_cursor_x = bar_window->cursor_x;
gui_window_cursor_y = bar_window->cursor_y;
move (bar_window->cursor_y, bar_window->cursor_x);
}
}
else
wnoutrefresh (GUI_BAR_WINDOW_OBJECTS(bar_window)->win_bar);

View File

@ -209,6 +209,8 @@ gui_chat_string_next_char (struct t_gui_window *window,
case GUI_COLOR_BAR_START_INPUT_CHAR:
case GUI_COLOR_BAR_START_INPUT_HIDDEN_CHAR:
case GUI_COLOR_BAR_MOVE_CURSOR_CHAR:
case GUI_COLOR_BAR_START_ITEM:
case GUI_COLOR_BAR_START_LINE_ITEM:
string++;
break;
}

View File

@ -40,8 +40,10 @@
#include "../gui-key.h"
#include "../gui-buffer.h"
#include "../gui-color.h"
#include "../gui-input.h"
#include "../gui-cursor.h"
#include "../gui-completion.h"
#include "../gui-input.h"
#include "../gui-mouse.h"
#include "../gui-window.h"
#include "gui-curses.h"
@ -79,145 +81,193 @@ gui_key_default_bindings (int context)
int i;
char key_str[32], command[32];
switch (context)
if (context == GUI_KEY_CONTEXT_DEFAULT)
{
case GUI_KEY_CONTEXT_DEFAULT:
BIND(/* RC */ "ctrl-M", "/input return");
BIND(/* RC */ "ctrl-J", "/input return");
BIND(/* tab */ "ctrl-I", "/input complete_next");
BIND(/* s-tab */ "meta2-Z", "/input complete_previous");
BIND(/* ^R */ "ctrl-R", "/input search_text");
BIND(/* basckpace */ "ctrl-H", "/input delete_previous_char");
BIND(/* basckpace */ "ctrl-?", "/input delete_previous_char");
BIND(/* ^_ */ "ctrl-_", "/input undo");
BIND(/* m-_ */ "meta-_", "/input redo");
BIND(/* del */ "meta2-3~", "/input delete_next_char");
BIND(/* ^D */ "ctrl-D", "/input delete_next_char");
BIND(/* ^W */ "ctrl-W", "/input delete_previous_word");
BIND(/* ^X */ "ctrl-X", "/input switch_active_buffer");
BIND(/* m-d */ "meta-d", "/input delete_next_word");
BIND(/* ^K */ "ctrl-K", "/input delete_end_of_line");
BIND(/* m-r */ "meta-r", "/input delete_line");
BIND(/* ^T */ "ctrl-T", "/input transpose_chars");
BIND(/* ^U */ "ctrl-U", "/input delete_beginning_of_line");
BIND(/* ^Y */ "ctrl-Y", "/input clipboard_paste");
BIND(/* home */ "meta2-1~", "/input move_beginning_of_line");
BIND(/* home */ "meta2-H", "/input move_beginning_of_line");
BIND(/* home */ "meta2-7~", "/input move_beginning_of_line");
BIND(/* home */ "meta-OH", "/input move_beginning_of_line");
BIND(/* ^A */ "ctrl-A", "/input move_beginning_of_line");
BIND(/* end */ "meta2-4~", "/input move_end_of_line");
BIND(/* end */ "meta2-F", "/input move_end_of_line");
BIND(/* end */ "meta2-8~", "/input move_end_of_line");
BIND(/* end */ "meta-OF", "/input move_end_of_line");
BIND(/* ^E */ "ctrl-E", "/input move_end_of_line");
BIND(/* left */ "meta2-D", "/input move_previous_char");
BIND(/* ^B */ "ctrl-B", "/input move_previous_char");
BIND(/* right */ "meta2-C", "/input move_next_char");
BIND(/* ^F */ "ctrl-F", "/input move_next_char");
BIND(/* m-b */ "meta-b", "/input move_previous_word");
BIND(/* ^left */ "meta-Od", "/input move_previous_word");
BIND(/* ^left */ "meta-OD", "/input move_previous_word");
BIND(/* m-f */ "meta-f", "/input move_next_word");
BIND(/* ^right */ "meta-Oc", "/input move_next_word");
BIND(/* ^right */ "meta-OC", "/input move_next_word");
BIND(/* up */ "meta2-A", "/input history_previous");
BIND(/* down */ "meta2-B", "/input history_next");
BIND(/* ^up */ "meta-Oa", "/input history_global_previous");
BIND(/* ^up */ "meta-OA", "/input history_global_previous");
BIND(/* ^up */ "meta2-1;5A", "/input history_global_previous");
BIND(/* ^down */ "meta-Ob", "/input history_global_next");
BIND(/* ^down */ "meta-OB", "/input history_global_next");
BIND(/* ^down */ "meta2-1;5B", "/input history_global_next");
BIND(/* m-a */ "meta-a", "/input jump_smart");
BIND(/* m-j,m-l */ "meta-jmeta-l", "/input jump_last_buffer");
BIND(/* m-j,m-r */ "meta-jmeta-r", "/server raw");
BIND(/* m-j,m-s */ "meta-jmeta-s", "/server jump");
BIND(/* m-h */ "meta-h", "/input hotlist_clear");
BIND(/* m-k */ "meta-k", "/input grab_key_command");
BIND(/* m-u */ "meta-u", "/input scroll_unread");
BIND(/* ^S^U */ "ctrl-Sctrl-U", "/input set_unread");
BIND(/* ^Cb */ "ctrl-Cb", "/input insert \\x02");
BIND(/* ^Cc */ "ctrl-Cc", "/input insert \\x03");
BIND(/* ^Ci */ "ctrl-Ci", "/input insert \\x1D");
BIND(/* ^Co */ "ctrl-Co", "/input insert \\x0F");
BIND(/* ^Cr */ "ctrl-Cr", "/input insert \\x12");
BIND(/* ^Cu */ "ctrl-Cu", "/input insert \\x15");
BIND(/* m-right */ "meta-meta2-C", "/buffer +1");
BIND(/* m-right */ "meta2-1;3C", "/buffer +1");
BIND(/* m-down */ "meta-meta2-B", "/buffer +1");
BIND(/* m-down */ "meta2-1;3B", "/buffer +1");
BIND(/* F6 */ "meta2-17~", "/buffer +1");
BIND(/* ^N */ "ctrl-N", "/buffer +1");
BIND(/* m-left */ "meta-meta2-D", "/buffer -1");
BIND(/* m-left */ "meta2-1;3D", "/buffer -1");
BIND(/* m-up */ "meta-meta2-A", "/buffer -1");
BIND(/* m-up */ "meta2-1;3A", "/buffer -1");
BIND(/* F5 */ "meta2-15~", "/buffer -1");
BIND(/* ^P */ "ctrl-P", "/buffer -1");
BIND(/* pgup */ "meta2-5~", "/window page_up");
BIND(/* pgup */ "meta2-I", "/window page_up");
BIND(/* pgdn */ "meta2-6~", "/window page_down");
BIND(/* pgdn */ "meta2-G", "/window page_down");
BIND(/* m-pgup */ "meta-meta2-5~", "/window scroll_up");
BIND(/* m-pgup */ "meta2-5;3~", "/window scroll_up");
BIND(/* m-pgdn */ "meta-meta2-6~", "/window scroll_down");
BIND(/* m-pgdn */ "meta2-6;3~", "/window scroll_down");
BIND(/* m-home */ "meta-meta2-1~", "/window scroll_top");
BIND(/* m-home */ "meta-meta2-7~", "/window scroll_top");
BIND(/* m-end */ "meta-meta2-4~", "/window scroll_bottom");
BIND(/* m-end */ "meta-meta2-8~", "/window scroll_bottom");
BIND(/* m-n */ "meta-n", "/window scroll_next_highlight");
BIND(/* m-p */ "meta-p", "/window scroll_previous_highlight");
BIND(/* F9 */ "meta2-20~", "/bar scroll title * x-50%");
BIND(/* F10 */ "meta2-21~", "/bar scroll title * x+50%");
BIND(/* F11 */ "meta2-23~", "/bar scroll nicklist * y-100%");
BIND(/* F12 */ "meta2-24~", "/bar scroll nicklist * y+100%");
BIND(/* m-F11 */ "meta-meta2-23~", "/bar scroll nicklist * yb");
BIND(/* m-F12 */ "meta-meta2-24~", "/bar scroll nicklist * ye");
BIND(/* ^L */ "ctrl-L", "/window refresh");
BIND(/* F7 */ "meta2-18~", "/window -1");
BIND(/* F8 */ "meta2-19~", "/window +1");
BIND(/* m-w,m-up */ "meta-wmeta-meta2-A", "/window up");
BIND(/* m-w,m-up */ "meta-wmeta2-1;3A", "/window up");
BIND(/* m-w,m-down */ "meta-wmeta-meta2-B", "/window down");
BIND(/* m-w,m-down */ "meta-wmeta2-1;3B", "/window down");
BIND(/* m-w,m-right */ "meta-wmeta-meta2-C", "/window right");
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");
BIND(/* m-0 */ "meta-0", "/buffer *10");
BIND(/* m-1 */ "meta-1", "/buffer *1");
BIND(/* m-2 */ "meta-2", "/buffer *2");
BIND(/* m-3 */ "meta-3", "/buffer *3");
BIND(/* m-4 */ "meta-4", "/buffer *4");
BIND(/* m-5 */ "meta-5", "/buffer *5");
BIND(/* m-6 */ "meta-6", "/buffer *6");
BIND(/* m-7 */ "meta-7", "/buffer *7");
BIND(/* m-8 */ "meta-8", "/buffer *8");
BIND(/* m-9 */ "meta-9", "/buffer *9");
BIND(/* m-< */ "meta-<", "/input jump_previously_visited_buffer");
BIND(/* m-> */ "meta->", "/input jump_next_visited_buffer");
/* bind meta-j + {01..99} to switch to buffers # > 10 */
for (i = 1; i < 100; i++)
{
sprintf (key_str, "meta-j%02d", i);
sprintf (command, "/buffer %d", i);
BIND(key_str, command);
}
break;
case GUI_KEY_CONTEXT_SEARCH:
BIND(/* RC */ "ctrl-M", "/input search_stop");
BIND(/* RC */ "ctrl-J", "/input search_stop");
BIND(/* ^R */ "ctrl-R", "/input search_switch_case");
BIND(/* up */ "meta2-A", "/input search_previous");
BIND(/* down */ "meta2-B", "/input search_next");
break;
BIND(/* Enter */ "ctrl-M", "/input return");
BIND(/* Enter */ "ctrl-J", "/input return");
BIND(/* tab */ "ctrl-I", "/input complete_next");
BIND(/* s-tab */ "meta2-Z", "/input complete_previous");
BIND(/* ^R */ "ctrl-R", "/input search_text");
BIND(/* basckpace */ "ctrl-H", "/input delete_previous_char");
BIND(/* basckpace */ "ctrl-?", "/input delete_previous_char");
BIND(/* ^_ */ "ctrl-_", "/input undo");
BIND(/* m-_ */ "meta-_", "/input redo");
BIND(/* del */ "meta2-3~", "/input delete_next_char");
BIND(/* ^D */ "ctrl-D", "/input delete_next_char");
BIND(/* ^W */ "ctrl-W", "/input delete_previous_word");
BIND(/* ^X */ "ctrl-X", "/input switch_active_buffer");
BIND(/* m-d */ "meta-d", "/input delete_next_word");
BIND(/* ^K */ "ctrl-K", "/input delete_end_of_line");
BIND(/* m-r */ "meta-r", "/input delete_line");
BIND(/* ^T */ "ctrl-T", "/input transpose_chars");
BIND(/* ^U */ "ctrl-U", "/input delete_beginning_of_line");
BIND(/* ^Y */ "ctrl-Y", "/input clipboard_paste");
BIND(/* home */ "meta2-1~", "/input move_beginning_of_line");
BIND(/* home */ "meta2-H", "/input move_beginning_of_line");
BIND(/* home */ "meta2-7~", "/input move_beginning_of_line");
BIND(/* home */ "meta-OH", "/input move_beginning_of_line");
BIND(/* ^A */ "ctrl-A", "/input move_beginning_of_line");
BIND(/* end */ "meta2-4~", "/input move_end_of_line");
BIND(/* end */ "meta2-F", "/input move_end_of_line");
BIND(/* end */ "meta2-8~", "/input move_end_of_line");
BIND(/* end */ "meta-OF", "/input move_end_of_line");
BIND(/* ^E */ "ctrl-E", "/input move_end_of_line");
BIND(/* left */ "meta2-D", "/input move_previous_char");
BIND(/* ^B */ "ctrl-B", "/input move_previous_char");
BIND(/* right */ "meta2-C", "/input move_next_char");
BIND(/* ^F */ "ctrl-F", "/input move_next_char");
BIND(/* m-b */ "meta-b", "/input move_previous_word");
BIND(/* ^left */ "meta-Od", "/input move_previous_word");
BIND(/* ^left */ "meta-OD", "/input move_previous_word");
BIND(/* m-f */ "meta-f", "/input move_next_word");
BIND(/* ^right */ "meta-Oc", "/input move_next_word");
BIND(/* ^right */ "meta-OC", "/input move_next_word");
BIND(/* up */ "meta2-A", "/input history_previous");
BIND(/* down */ "meta2-B", "/input history_next");
BIND(/* ^up */ "meta-Oa", "/input history_global_previous");
BIND(/* ^up */ "meta-OA", "/input history_global_previous");
BIND(/* ^up */ "meta2-1;5A", "/input history_global_previous");
BIND(/* ^down */ "meta-Ob", "/input history_global_next");
BIND(/* ^down */ "meta-OB", "/input history_global_next");
BIND(/* ^down */ "meta2-1;5B", "/input history_global_next");
BIND(/* m-a */ "meta-a", "/input jump_smart");
BIND(/* m-j,m-l */ "meta-jmeta-l", "/input jump_last_buffer");
BIND(/* m-j,m-r */ "meta-jmeta-r", "/server raw");
BIND(/* m-j,m-s */ "meta-jmeta-s", "/server jump");
BIND(/* m-h */ "meta-h", "/input hotlist_clear");
BIND(/* m-k */ "meta-k", "/input grab_key_command");
BIND(/* m-u */ "meta-u", "/input scroll_unread");
BIND(/* ^S^U */ "ctrl-Sctrl-U", "/input set_unread");
BIND(/* ^Cb */ "ctrl-Cb", "/input insert \\x02");
BIND(/* ^Cc */ "ctrl-Cc", "/input insert \\x03");
BIND(/* ^Ci */ "ctrl-Ci", "/input insert \\x1D");
BIND(/* ^Co */ "ctrl-Co", "/input insert \\x0F");
BIND(/* ^Cr */ "ctrl-Cr", "/input insert \\x12");
BIND(/* ^Cu */ "ctrl-Cu", "/input insert \\x15");
BIND(/* m-right */ "meta-meta2-C", "/buffer +1");
BIND(/* m-right */ "meta2-1;3C", "/buffer +1");
BIND(/* m-down */ "meta-meta2-B", "/buffer +1");
BIND(/* m-down */ "meta2-1;3B", "/buffer +1");
BIND(/* F6 */ "meta2-17~", "/buffer +1");
BIND(/* ^N */ "ctrl-N", "/buffer +1");
BIND(/* m-left */ "meta-meta2-D", "/buffer -1");
BIND(/* m-left */ "meta2-1;3D", "/buffer -1");
BIND(/* m-up */ "meta-meta2-A", "/buffer -1");
BIND(/* m-up */ "meta2-1;3A", "/buffer -1");
BIND(/* F5 */ "meta2-15~", "/buffer -1");
BIND(/* ^P */ "ctrl-P", "/buffer -1");
BIND(/* pgup */ "meta2-5~", "/window page_up");
BIND(/* pgup */ "meta2-I", "/window page_up");
BIND(/* pgdn */ "meta2-6~", "/window page_down");
BIND(/* pgdn */ "meta2-G", "/window page_down");
BIND(/* m-pgup */ "meta-meta2-5~", "/window scroll_up");
BIND(/* m-pgup */ "meta2-5;3~", "/window scroll_up");
BIND(/* m-pgdn */ "meta-meta2-6~", "/window scroll_down");
BIND(/* m-pgdn */ "meta2-6;3~", "/window scroll_down");
BIND(/* m-home */ "meta-meta2-1~", "/window scroll_top");
BIND(/* m-home */ "meta-meta2-7~", "/window scroll_top");
BIND(/* m-end */ "meta-meta2-4~", "/window scroll_bottom");
BIND(/* m-end */ "meta-meta2-8~", "/window scroll_bottom");
BIND(/* m-n */ "meta-n", "/window scroll_next_highlight");
BIND(/* m-p */ "meta-p", "/window scroll_previous_highlight");
BIND(/* F9 */ "meta2-20~", "/bar scroll title * -30%");
BIND(/* F10 */ "meta2-21~", "/bar scroll title * +30%");
BIND(/* F11 */ "meta2-23~", "/bar scroll nicklist * -100%");
BIND(/* F12 */ "meta2-24~", "/bar scroll nicklist * +100%");
BIND(/* m-F11 */ "meta-meta2-23~", "/bar scroll nicklist * b");
BIND(/* m-F12 */ "meta-meta2-24~", "/bar scroll nicklist * e");
BIND(/* ^L */ "ctrl-L", "/window refresh");
BIND(/* F7 */ "meta2-18~", "/window -1");
BIND(/* F8 */ "meta2-19~", "/window +1");
BIND(/* m-w,m-up */ "meta-wmeta-meta2-A", "/window up");
BIND(/* m-w,m-up */ "meta-wmeta2-1;3A", "/window up");
BIND(/* m-w,m-down */ "meta-wmeta-meta2-B", "/window down");
BIND(/* m-w,m-down */ "meta-wmeta2-1;3B", "/window down");
BIND(/* m-w,m-right */ "meta-wmeta-meta2-C", "/window right");
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");
BIND(/* m-0 */ "meta-0", "/buffer *10");
BIND(/* m-1 */ "meta-1", "/buffer *1");
BIND(/* m-2 */ "meta-2", "/buffer *2");
BIND(/* m-3 */ "meta-3", "/buffer *3");
BIND(/* m-4 */ "meta-4", "/buffer *4");
BIND(/* m-5 */ "meta-5", "/buffer *5");
BIND(/* m-6 */ "meta-6", "/buffer *6");
BIND(/* m-7 */ "meta-7", "/buffer *7");
BIND(/* m-8 */ "meta-8", "/buffer *8");
BIND(/* m-9 */ "meta-9", "/buffer *9");
BIND(/* m-< */ "meta-<", "/input jump_previously_visited_buffer");
BIND(/* m-> */ "meta->", "/input jump_next_visited_buffer");
BIND(/* mouse */ "meta2-M", "/mouse grab");
BIND(/* m-m */ "meta-m", "/mouse toggle");
/* bind meta-j + {01..99} to switch to buffers # > 10 */
for (i = 1; i < 100; i++)
{
sprintf (key_str, "meta-j%02d", i);
sprintf (command, "/buffer %d", i);
BIND(key_str, command);
}
}
else if (context == GUI_KEY_CONTEXT_SEARCH)
{
BIND(/* Enter */ "ctrl-M", "/input search_stop");
BIND(/* Enter */ "ctrl-J", "/input search_stop");
BIND(/* ^R */ "ctrl-R", "/input search_switch_case");
BIND(/* up */ "meta2-A", "/input search_previous");
BIND(/* down */ "meta2-B", "/input search_next");
}
else if (context == GUI_KEY_CONTEXT_CURSOR)
{
BIND(/* Enter */ "ctrl-M", "/cursor stop");
BIND(/* Enter */ "ctrl-J", "/cursor stop");
BIND(/* up */ "meta2-A", "/cursor move up");
BIND(/* down */ "meta2-B", "/cursor move down");
BIND(/* left */ "meta2-D", "/cursor move left");
BIND(/* right */ "meta2-C", "/cursor move right");
BIND(/* m-up */ "meta-meta2-A", "/cursor move area_up");
BIND(/* m-up */ "meta2-1;3A", "/cursor move area_up");
BIND(/* m-down */ "meta-meta2-B", "/cursor move area_down");
BIND(/* m-down */ "meta2-1;3B", "/cursor move area_down");
BIND(/* m-left */ "meta-meta2-D", "/cursor move area_left");
BIND(/* m-left */ "meta2-1;3D", "/cursor move area_left");
BIND(/* m-right */ "meta-meta2-C", "/cursor move area_right");
BIND(/* m-right */ "meta2-1;3C", "/cursor move area_right");
BIND(/* b */ "@item(buffer_nicklist):b", "/ban ${nick}");
BIND(/* k */ "@item(buffer_nicklist):k", "/kick ${nick}");
BIND(/* K */ "@item(buffer_nicklist):K", "/kickban ${nick}");
BIND(/* q */ "@item(buffer_nicklist):q", "/query ${nick};/cursor stop");
BIND(/* w */ "@item(buffer_nicklist):w", "/whois ${nick}");
}
else if (context == GUI_KEY_CONTEXT_MOUSE)
{
/* mouse events on chat area */
BIND("@chat:button1-gesture-left", "/buffer -1");
BIND("@chat:button1-gesture-right", "/buffer +1");
BIND("@chat:button1-gesture-left-long", "/buffer 1");
BIND("@chat:button1-gesture-right-long", "/input jump_last_buffer");
BIND("@chat:wheelup", "/window scroll_up");
BIND("@chat:wheeldown", "/window scroll_down");
/* mouse events on nicklist */
BIND("@bar(nicklist):button1-gesture-up", "/bar scroll nicklist * -100%");
BIND("@bar(nicklist):button1-gesture-down", "/bar scroll nicklist * +100%");
BIND("@bar(nicklist):button1-gesture-up-long", "/bar scroll nicklist * b");
BIND("@bar(nicklist):button1-gesture-down-long", "/bar scroll nicklist * e");
BIND("@item(buffer_nicklist):button1", "/query ${nick}");
BIND("@item(buffer_nicklist):button2", "/whois ${nick}");
BIND("@item(buffer_nicklist):button1-gesture-left", "/kick ${nick}");
BIND("@item(buffer_nicklist):button1-gesture-left-long", "/kickban ${nick}");
BIND("@item(buffer_nicklist):button2-gesture-left", "/ban ${nick}");
/* mouse wheel on any bar */
BIND("@bar(*):wheelup", "/bar scroll ${_bar_name} * -10%");
BIND("@bar(*):wheeldown", "/bar scroll ${_bar_name} * +10%");
/* middle click to enable cursor mode at position */
BIND("@*:button3", "/cursor go ${_x},${_y}");
}
}
@ -246,16 +296,22 @@ gui_key_flush ()
insert_ok = 1;
if (key < 32)
if (gui_mouse_grab)
{
insert_ok = 0;
key_str[0] = '^';
key_str[0] = (char) key;
key_str[1] = '\0';
}
else if (key < 32)
{
insert_ok = 0;
key_str[0] = '\x01';
key_str[1] = (char) key + '@';
key_str[2] = '\0';
}
else if (key == 127)
{
key_str[0] = '^';
key_str[0] = '\x01';
key_str[1] = '?';
key_str[2] = '\0';
}
@ -339,12 +395,6 @@ gui_key_flush ()
}
}
if (strcmp (key_str, "^") == 0)
{
key_str[1] = '^';
key_str[2] = '\0';
}
hook_signal_send ("key_pressed",
WEECHAT_HOOK_SIGNAL_STRING, key_str);
@ -354,11 +404,9 @@ gui_key_flush ()
else
input_old = NULL;
if ((gui_key_pressed (key_str) != 0) && (insert_ok))
if ((gui_key_pressed (key_str) != 0) && (insert_ok)
&& (!gui_cursor_mode))
{
if (strcmp (key_str, "^^") == 0)
key_str[1] = '\0';
gui_buffer_undo_snap (gui_current_window->buffer);
gui_input_insert_string (gui_current_window->buffer,
key_str, -1);
@ -405,9 +453,6 @@ gui_key_flush ()
free (input_old);
}
if (gui_key_grab && (gui_key_grab_count > 0))
gui_key_grab_end ();
gui_key_buffer_reset ();
}
}

View File

@ -48,10 +48,12 @@
#include "../gui-buffer.h"
#include "../gui-chat.h"
#include "../gui-color.h"
#include "../gui-cursor.h"
#include "../gui-filter.h"
#include "../gui-input.h"
#include "../gui-layout.h"
#include "../gui-history.h"
#include "../gui-mouse.h"
#include "../gui-nicklist.h"
#include "../gui-window.h"
#include "gui-curses.h"
@ -149,7 +151,7 @@ gui_main_init ()
/*
* create bar windows for root bars (they were read from config,
* but no window was created (GUI was not initialized)
* but no window was created, GUI was not initialized)
*/
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
@ -166,6 +168,11 @@ gui_main_init ()
gui_bar_window_create_win (ptr_bar_win);
}
}
if (CONFIG_BOOLEAN(config_look_mouse))
gui_mouse_enable ();
else
gui_mouse_disable ();
}
/*
@ -277,7 +284,6 @@ gui_main_refreshs ()
}
/* refresh bars if needed */
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if (ptr_bar->bar_refresh_needed)
@ -285,6 +291,10 @@ gui_main_refreshs ()
gui_bar_draw (ptr_bar);
}
}
/* move cursor (for cursor mode) */
if (gui_cursor_mode)
gui_window_move_cursor ();
}
/*
@ -387,6 +397,9 @@ gui_main_end (int clean_exit)
gui_main_refreshs ();
}
/* disable mouse */
gui_mouse_disable ();
/* remove bar items and bars */
gui_bar_item_end ();
gui_bar_free_all ();

View File

@ -0,0 +1,243 @@
/*
* Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* gui-curses-mouse.c: mouse functions for Curses GUI
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "../../core/weechat.h"
#include "../../core/wee-config.h"
#include "../gui-chat.h"
#include "../gui-mouse.h"
/*
* gui_mouse_enable: enable mouse
*/
void
gui_mouse_enable ()
{
gui_mouse_enabled = 1;
fprintf (stderr, "\033[?1005h\033[?1000h\033[?1002h");
}
/*
* gui_mouse_disable: disable mouse
*/
void
gui_mouse_disable ()
{
gui_mouse_enabled = 0;
fprintf (stderr, "\033[?1002l\033[?1000l\033[?1005l");
}
/*
* gui_mouse_display_state: display state of mouse
*/
void
gui_mouse_display_state ()
{
gui_chat_printf (NULL,
(CONFIG_BOOLEAN(config_look_mouse)) ?
_("Mouse is enabled") : _("Mouse is disabled"));
}
/*
* gui_mouse_grab_init: init "grab mouse" mode
*/
void
gui_mouse_grab_init ()
{
gui_mouse_grab = 1;
}
/*
* gui_mouse_grab_code2key: get key name with a mouse code
*/
const char *
gui_mouse_grab_code2key (const char *code)
{
int x, y;
double diff_x, diff_y, distance, angle, pi4;
static char key[128];
char button[2];
/* mouse code must have at least 3 chars */
if (strlen (code) < 3)
return NULL;
key[0] = '\0';
/* ignore code '#' (button released) if it's received as first event */
if ((gui_mouse_event_index == 0) && (code[0] == '#'))
return key;
/* get coordinates and button */
x = ((unsigned char)code[1]) - 33;
if (x < 0)
x = 0;
y = ((unsigned char)code[2]) - 33;
if (y < 0)
y = 0;
gui_mouse_event_x[gui_mouse_event_index] = x;
gui_mouse_event_y[gui_mouse_event_index] = y;
if (gui_mouse_event_index == 0)
gui_mouse_event_button = code[0];
if (gui_mouse_event_index == 0)
gui_mouse_event_index = 1;
if (code[0] == '`')
{
strcat (key, "wheelup");
return key;
}
if (code[0] == 'a')
{
strcat (key, "wheeldown");
return key;
}
if (code[0] != '#')
return key;
/* add button/wheel */
switch (gui_mouse_event_button)
{
case ' ': /* left button pressed */
strcat (key, "button1");
break;
case '"': /* right button pressed */
strcat (key, "button2");
break;
case '!': /* middle button pressed */
strcat (key, "button3");
break;
default: /* extra buttons: button4..button9 */
if ((gui_mouse_event_button >= 'b')
&& (gui_mouse_event_button <= 'g'))
{
button[0] = gui_mouse_event_button - ('b' - '4');
button[1] = '\0';
strcat (key, "button");
strcat (key, button);
}
break;
}
/*
* Mouse gesture: if (x,y) on release is different from (x,y) on click,
* compute distance and angle between 2 points.
*
* Distance: sqrt((x2-x1)²+(y2-y1)²)
* Angle : atan2(x1-x1, y2-y1)
*
* Angle:
*
* 3.14 pi
* /\
* -2.35 || 2.35 3/4 * pi
* ||
* -1.57 /----++----\ 1.57 1/2 * pi
* \----++----/
* ||
* -0.78 || 0.78 1/4 * pi
* \/
* 0.00 0
*
* Possible returned gestures are:
*
* key name | dist. | angle
* ---------------------------+-------+--------------------------
* buttonX-gesture-up | 3..19 | -2.35..-3.14 + 2.35..3.14
* buttonX-gesture-up-long | >= 20 |
* buttonX-gesture-down | 3..19 | -0.78..0.78
* buttonX-gesture-down-long | >= 20 |
* buttonX-gesture-left | 3..39 | -0.78..-2.35
* buttonX-gesture-left-long | >= 40 |
* buttonX-gesture-right | 3..39 | 0.78..2.35
* buttonX-gesture-right-long | >= 40 |
*/
distance = 0;
if (key[0]
&& ((gui_mouse_event_x[0] != gui_mouse_event_x[1])
|| (gui_mouse_event_y[0] != gui_mouse_event_y[1])))
{
diff_x = gui_mouse_event_x[1] - gui_mouse_event_x[0];
diff_y = gui_mouse_event_y[1] - gui_mouse_event_y[0];
distance = sqrt ((diff_x * diff_x) + (diff_y * diff_y));
if (distance >= 3)
{
angle = atan2 ((double)(gui_mouse_event_x[1] - gui_mouse_event_x[0]),
(double)(gui_mouse_event_y[1] - gui_mouse_event_y[0]));
pi4 = 3.14159265358979 / 4;
if ((angle <= pi4 * (-3)) || (angle >= pi4 * 3))
{
strcat (key, "-gesture-up");
if (distance >= 20)
strcat (key, "-long");
}
else if ((angle >= pi4 * (-1)) && (angle <= pi4))
{
strcat (key, "-gesture-down");
if (distance >= 20)
strcat (key, "-long");
}
else if ((angle >= pi4 * (-3)) && (angle <= pi4 * (-1)))
{
strcat (key, "-gesture-left");
if (distance >= 40)
strcat (key, "-long");
}
else if ((angle >= pi4) && (angle <= pi4 * 3))
{
strcat (key, "-gesture-right");
if (distance >= 40)
strcat (key, "-long");
}
}
}
return key;
}
/*
* gui_mouse_grab_end: end "grab mouse" mode
*/
void
gui_mouse_grab_end ()
{
gui_mouse_grab = 0;
}

View File

@ -46,6 +46,7 @@
#include "../gui-buffer.h"
#include "../gui-chat.h"
#include "../gui-color.h"
#include "../gui-cursor.h"
#include "../gui-hotlist.h"
#include "../gui-input.h"
#include "../gui-key.h"
@ -1514,7 +1515,8 @@ gui_window_refresh_windows ()
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT)
if ((CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT)
&& !CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
gui_bar_window_calculate_pos_size (ptr_bar->bar_window, NULL);
gui_bar_window_create_win (ptr_bar->bar_window);
@ -2196,6 +2198,20 @@ gui_window_set_title (const char *title)
}
}
/*
* gui_window_move_cursor: move cursor on screen (for cursor mode)
*/
void
gui_window_move_cursor ()
{
if (gui_cursor_mode)
{
move (gui_cursor_y, gui_cursor_x);
refresh ();
}
}
/*
* gui_window_term_display_infos: display some infos about terminal and colors
*/

View File

@ -25,6 +25,7 @@ gui-gtk-chat.c
gui-gtk-color.c
gui-gtk-key.c
gui-gtk-main.c
gui-gtk-mouse.c
gui-gtk-term.c
gui-gtk-window.c)

View File

@ -37,6 +37,7 @@ weechat_gtk_SOURCES = gui-gtk-bar-window.c \
gui-gtk-color.c \
gui-gtk-key.c \
gui-gtk-main.c \
gui-gtk-mouse.c \
gui-gtk-term.c \
gui-gtk-window.c \
gui-gtk.h

View File

@ -0,0 +1,94 @@
/*
* Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* gui-gtk-mouse.c: mouse functions for Gtk GUI
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "../../core/weechat.h"
#include "../gui-mouse.h"
/*
* gui_mouse_enable: enable mouse
*/
void
gui_mouse_enable ()
{
/* This function does nothing in Gtk GUI */
}
/*
* gui_mouse_disable: disable mouse
*/
void
gui_mouse_disable ()
{
/* This function does nothing in Gtk GUI */
}
/*
* gui_mouse_display_state: display state of mouse
*/
void
gui_mouse_display_state ()
{
/* This function does nothing in Gtk GUI */
}
/*
* gui_mouse_grab_init: init "grab mouse" mode
*/
void
gui_mouse_grab_init ()
{
/* This function does nothing in Gtk GUI */
}
/*
* gui_mouse_grab_code2key: get key name with a mouse code
*/
const char *
gui_mouse_grab_code2key (const char *code)
{
(void) code;
/* This function does nothing in Gtk GUI */
return NULL;
}
/*
* gui_mouse_grab_end: end "grab mouse" mode
*/
void
gui_mouse_grab_end ()
{
/* This function does nothing in Gtk GUI */
}

View File

@ -848,6 +848,16 @@ gui_window_set_title (const char *title)
/* TODO: write this function for Gtk */
}
/*
* gui_window_move_cursor: move cursor on screen (for cursor mode)
*/
void
gui_window_move_cursor ()
{
/* TODO: write this function for Gtk */
}
/*
* gui_window_term_display_infos: display some infos about terminal and colors
*/

View File

@ -47,6 +47,7 @@
#include "gui-chat.h"
#include "gui-color.h"
#include "gui-completion.h"
#include "gui-cursor.h"
#include "gui-filter.h"
#include "gui-hotlist.h"
#include "gui-key.h"
@ -130,70 +131,6 @@ gui_bar_item_search (const char *item_name)
return NULL;
}
/*
* gui_bar_item_valid_char_name: return 1 if char is valid for item name
* (any letter, digit, "-" or "_")
* return 0 otherwise
*/
int
gui_bar_item_valid_char_name (char c)
{
return (((c >= 'a') && (c <= 'z'))
|| ((c >= 'A') && (c <= 'Z'))
|| ((c >= '0') && (c <= '9'))
|| (c == '-')
|| (c == '_')) ?
1 : 0;
}
/*
* gui_bar_item_string_get_item_start: return pointer to beginning of item name
* (string may contain special delimiters
* at beginning, which are ignored)
*/
const char *
gui_bar_item_string_get_item_start (const char *string)
{
while (string && string[0])
{
if (gui_bar_item_valid_char_name (string[0]))
break;
string++;
}
if (string && string[0])
return string;
return NULL;
}
/*
* gui_bar_item_string_is_item: return 1 if string is item (string may contain
* special delimiters at beginning and end of
* string, which are ignored)
*/
int
gui_bar_item_string_is_item (const char *string, const char *item_name)
{
const char *item_start;
int length;
item_start = gui_bar_item_string_get_item_start (string);
if (!item_start)
return 0;
length = strlen (item_name);
if (strncmp (item_start, item_name, length) == 0)
{
if (!gui_bar_item_valid_char_name (item_start[length]))
return 1;
}
return 0;
}
/*
* gui_bar_item_search_with_plugin: search a bar item for a plugin
* if exact_plugin == 1, then search only for
@ -249,7 +186,6 @@ gui_bar_item_used_in_a_bar (const char *item_name, int partial_name)
{
struct t_gui_bar *ptr_bar;
int i, j, length;
const char *ptr_start;
length = strlen (item_name);
@ -259,13 +195,14 @@ gui_bar_item_used_in_a_bar (const char *item_name, int partial_name)
{
for (j = 0; j < ptr_bar->items_subcount[i]; j++)
{
ptr_start = gui_bar_item_string_get_item_start (ptr_bar->items_array[i][j]);
if (ptr_start)
if (ptr_bar->items_name[i][j])
{
if ((partial_name
&& strncmp (ptr_start, item_name, length) == 0)
&& strncmp (ptr_bar->items_name[i][j],
item_name, length) == 0)
|| (!partial_name
&& strcmp (ptr_start, item_name) == 0))
&& strcmp (ptr_bar->items_name[i][j],
item_name) == 0))
{
return 1;
}
@ -279,40 +216,39 @@ gui_bar_item_used_in_a_bar (const char *item_name, int partial_name)
}
/*
* gui_bar_item_get_value: return value of a bar item
* first look for prefix/suffix in name, then run item
* callback (if found) and concatene strings
* for example: if name == "[time]"
* return: color(delimiter) + "[" +
* (value of item "time") + color(delimiter) +
* "]"
* gui_bar_item_set_prefix_name_suffix: get prefix, name and suffix for an item
* for example, item name "[time]"
* will return:
* prefix: "["
* name : "time"
* suffix: "]"
*/
char *
gui_bar_item_get_value (const char *name, struct t_gui_bar *bar,
struct t_gui_window *window)
void
gui_bar_item_set_prefix_name_suffix (const char *item_name,
char **prefix, char **name, char **suffix)
{
const char *ptr, *start, *end;
char *prefix, *item_name, *suffix;
char *item_value, delimiter_color[32], bar_color[32];
char *result, str_attr[8];
int valid_char, length;
struct t_gui_bar_item *ptr_item;
struct t_weechat_plugin *ptr_plugin;
int valid_char;
if (!name)
return NULL;
*prefix = NULL;
*name = NULL;
*suffix = NULL;
if (!item_name)
return;
start = NULL;
end = NULL;
prefix = NULL;
item_name = NULL;
suffix = NULL;
ptr = name;
ptr = item_name;
while (ptr[0])
{
valid_char = gui_bar_item_valid_char_name (ptr[0]);
valid_char = (((ptr[0] >= 'a') && (ptr[0] <= 'z'))
|| ((ptr[0] >= 'A') && (ptr[0] <= 'Z'))
|| ((ptr[0] >= '0') && (ptr[0] <= '9'))
|| (ptr[0] == '-')
|| (ptr[0] == '_')) ? 1 : 0;
if (!start && valid_char)
start = ptr;
else if (start && !end && !valid_char)
@ -321,56 +257,70 @@ gui_bar_item_get_value (const char *name, struct t_gui_bar *bar,
}
if (start)
{
if (start > name)
prefix = string_strndup (name, start - name);
if (start > item_name)
*prefix = string_strndup (item_name, start - item_name);
}
else
prefix = strdup (name);
*prefix = strdup (item_name);
if (start)
{
item_name = (end) ?
*name = (end) ?
string_strndup (start, end - start + 1) : strdup (start);
}
if (end && end[0] && end[1])
suffix = strdup (end + 1);
*suffix = strdup (end + 1);
}
/*
* gui_bar_item_get_value: return value of a bar item
* run callback if a name exists, then concatenate
* prefix + return of callback + suffix
* for example: if item == "[time]"
* return: color(delimiter) + "[" +
* (value of item "time") + color(delimiter) +
* "]"
*/
char *
gui_bar_item_get_value (struct t_gui_bar *bar, struct t_gui_window *window,
int item, int subitem)
{
char *item_value, delimiter_color[32], bar_color[32];
char *result, str_attr[8];
int length;
struct t_gui_bar_item *ptr_item;
struct t_weechat_plugin *ptr_plugin;
if (!bar->items_array[item][subitem])
return NULL;
item_value = NULL;
if (item_name)
if (bar->items_name[item][subitem])
{
ptr_plugin = NULL;
if (window && window->buffer)
ptr_plugin = window->buffer->plugin;
else if (gui_current_window && gui_current_window->buffer)
ptr_plugin = gui_current_window->buffer->plugin;
ptr_item = gui_bar_item_search_with_plugin (ptr_plugin, 0, item_name);
ptr_item = gui_bar_item_search_with_plugin (ptr_plugin, 0,
bar->items_name[item][subitem]);
if (ptr_item && ptr_item->build_callback)
{
item_value = (ptr_item->build_callback) (ptr_item->build_callback_data,
ptr_item, window);
}
if (!item_value || !item_value[0])
{
if (prefix)
{
free (prefix);
prefix = NULL;
}
if (suffix)
{
free (suffix);
suffix = NULL;
}
}
if (!item_value)
return NULL;
}
length = 0;
if (prefix)
length += 64 + strlen (prefix) + 1; /* color + prefix + color */
if (bar->items_prefix[item][subitem])
length += 64 + strlen (bar->items_prefix[item][subitem]) + 1; /* color + prefix + color */
if (item_value && item_value[0])
length += strlen (item_value) + 16 + 1; /* length + "move cursor" id */
if (suffix)
length += 32 + strlen (suffix) + 1; /* color + suffix */
length += strlen (item_value) + 1;
if (bar->items_suffix[item][subitem])
length += 32 + strlen (bar->items_suffix[item][subitem]) + 1; /* color + suffix */
result = NULL;
if (length > 0)
{
@ -379,7 +329,8 @@ gui_bar_item_get_value (const char *name, struct t_gui_bar *bar,
{
delimiter_color[0] = '\0';
bar_color[0] = '\0';
if (prefix || suffix)
if (bar->items_prefix[item][subitem]
|| bar->items_suffix[item][subitem])
{
/* color for text in bar */
gui_color_attr_build_string (CONFIG_COLOR(bar->options[GUI_BAR_OPTION_COLOR_FG]),
@ -429,27 +380,45 @@ gui_bar_item_get_value (const char *name, struct t_gui_bar *bar,
}
snprintf (result, length,
"%s%s%s%s%s%s",
(prefix) ? delimiter_color : "",
(prefix) ? prefix : "",
(prefix) ? bar_color : "",
(bar->items_prefix[item][subitem]) ? delimiter_color : "",
(bar->items_prefix[item][subitem]) ? bar->items_prefix[item][subitem] : "",
(bar->items_prefix[item][subitem]) ? bar_color : "",
(item_value) ? item_value : "",
(suffix) ? delimiter_color : "",
(suffix) ? suffix : "");
(bar->items_suffix[item][subitem]) ? delimiter_color : "",
(bar->items_suffix[item][subitem]) ? bar->items_suffix[item][subitem] : "");
}
}
if (prefix)
free (prefix);
if (item_name)
free (item_name);
if (suffix)
free (suffix);
if (item_value)
free (item_value);
return result;
}
/*
* gui_bar_item_count_lines: count number of lines in item
*/
int
gui_bar_item_count_lines (char *string)
{
int count, i;
if (!string || !string[0])
return 0;
count = 1;
i = 0;
while (string[i])
{
if ((string[i] == '\n') && string[i + 1])
count++;
i++;
}
return count;
}
/*
* gui_bar_item_new: create a new bar item
*/
@ -505,22 +474,20 @@ gui_bar_item_update (const char *item_name)
struct t_gui_bar *ptr_bar;
struct t_gui_window *ptr_window;
struct t_gui_bar_window *ptr_bar_window;
int index_item, index_subitem;
int i, j;
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
for (index_item = 0; index_item < ptr_bar->items_count; index_item++)
for (i = 0; i < ptr_bar->items_count; i++)
{
for (index_subitem = 0;
index_subitem < ptr_bar->items_subcount[index_item];
index_subitem++)
for (j = 0; j < ptr_bar->items_subcount[i]; j++)
{
if (gui_bar_item_string_is_item (ptr_bar->items_array[index_item][index_subitem],
item_name))
if (ptr_bar->items_name[i][j]
&& (strcmp (ptr_bar->items_name[i][j], item_name) == 0))
{
if (ptr_bar->bar_window)
{
ptr_bar->bar_window->items_refresh_needed[index_item][index_subitem] = 1;
ptr_bar->bar_window->items_refresh_needed[i][j] = 1;
}
else
{
@ -533,7 +500,7 @@ gui_bar_item_update (const char *item_name)
{
if (ptr_bar_window->bar == ptr_bar)
{
ptr_bar_window->items_refresh_needed[index_item][index_subitem] = 1;
ptr_bar_window->items_refresh_needed[i][j] = 1;
}
}
}
@ -744,11 +711,15 @@ gui_bar_item_default_input_text (void *data, struct t_gui_bar_item *item,
"0x%lx", (long unsigned int)(window->buffer));
/* execute modifier with basic string (without cursor tag) */
ptr_input = hook_modifier_exec (NULL,
"input_text_display",
str_buffer,
(window->buffer->input_buffer) ?
window->buffer->input_buffer : "");
ptr_input = NULL;
if (!gui_cursor_mode)
{
ptr_input = hook_modifier_exec (NULL,
"input_text_display",
str_buffer,
(window->buffer->input_buffer) ?
window->buffer->input_buffer : "");
}
if (!ptr_input)
{
ptr_input = (window->buffer->input_buffer) ?
@ -791,13 +762,16 @@ gui_bar_item_default_input_text (void *data, struct t_gui_bar_item *item,
}
/* execute modifier with cursor in string */
ptr_input2 = hook_modifier_exec (NULL,
"input_text_display_with_cursor",
str_buffer,
(ptr_input) ? ptr_input : "");
if (ptr_input)
free (ptr_input);
ptr_input = ptr_input2;
if (!gui_cursor_mode)
{
ptr_input2 = hook_modifier_exec (NULL,
"input_text_display_with_cursor",
str_buffer,
(ptr_input) ? ptr_input : "");
if (ptr_input)
free (ptr_input);
ptr_input = ptr_input2;
}
/* insert "start input" at beginning of string */
if (ptr_input)
@ -1447,6 +1421,74 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item,
return buf;
}
/*
* gui_bar_item_focus_buffer_nicklist: focus on nicklist
*/
struct t_hashtable *
gui_bar_item_focus_buffer_nicklist (void *data,
struct t_hashtable *info)
{
struct t_gui_nick_group *ptr_group;
struct t_gui_nick *ptr_nick;
int i, rc, item_line;
unsigned long int value;
const char *str_window;
struct t_gui_window *window;
char *error;
/* make C compiler happy */
(void) data;
str_window = hashtable_get (info, "_window");
rc = sscanf (str_window, "%lx", &value);
if ((rc == EOF) || (rc == 0))
return NULL;
window = (struct t_gui_window *)value;
if (!window)
window = gui_current_window;
error = NULL;
item_line = (int) strtol (hashtable_get (info, "_item_line"), &error, 10);
if (!error || error[0])
return NULL;
i = 0;
ptr_group = NULL;
ptr_nick = NULL;
gui_nicklist_get_next_item (window->buffer, &ptr_group, &ptr_nick);
while (ptr_group || ptr_nick)
{
if ((ptr_nick && ptr_nick->visible)
|| (ptr_group && !ptr_nick
&& window->buffer->nicklist_display_groups
&& ptr_group->visible))
{
if (i == item_line)
break;
i++;
}
gui_nicklist_get_next_item (window->buffer, &ptr_group, &ptr_nick);
}
if (i != item_line)
return NULL;
if (ptr_nick)
{
hashtable_set (info, "nick", ptr_nick->name);
hashtable_set (info, "prefix", ptr_nick->prefix);
}
else
{
hashtable_set (info,
"group",
gui_nicklist_get_group_start (ptr_group->name));
}
return info;
}
/*
* gui_bar_item_timer_cb: timer callback
*/
@ -1673,6 +1715,8 @@ gui_bar_item_init ()
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_NICKLIST]);
gui_bar_item_hook_signal ("buffer_switch",
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_NICKLIST]);
hook_focus (NULL, gui_bar_item_names[GUI_BAR_ITEM_BUFFER_NICKLIST],
&gui_bar_item_focus_buffer_nicklist, NULL);
}
/*

View File

@ -74,13 +74,15 @@ extern char *gui_bar_items_default_for_bars[][2];
extern int gui_bar_item_valid (struct t_gui_bar_item *bar_item);
extern struct t_gui_bar_item *gui_bar_item_search (const char *name);
extern int gui_bar_item_string_is_item (const char *string,
const char *item_name);
extern int gui_bar_item_used_in_a_bar (const char *item_name,
int partial_name);
extern char *gui_bar_item_get_value (const char *name,
struct t_gui_bar *bar,
struct t_gui_window *window);
extern void gui_bar_item_set_prefix_name_suffix (const char *item_name,
char **prefix, char **name,
char **suffix);
extern char *gui_bar_item_get_value (struct t_gui_bar *bar,
struct t_gui_window *window,
int item, int subitem);
extern int gui_bar_item_count_lines (char *string);
extern struct t_gui_bar_item *gui_bar_item_new (struct t_weechat_plugin *plugin,
const char *name,
char *(*build_callback)(void *data,

View File

@ -26,14 +26,17 @@
#endif
#include <stdlib.h>
#include <stddef.h>
#include <limits.h>
#include <string.h>
#include "../core/weechat.h"
#include "../core/wee-config.h"
#include "../core/wee-hdata.h"
#include "../core/wee-infolist.h"
#include "../core/wee-log.h"
#include "../core/wee-string.h"
#include "../plugins/plugin.h"
#include "gui-bar-window.h"
#include "gui-bar.h"
#include "gui-bar-item.h"
@ -101,6 +104,149 @@ gui_bar_window_search_bar (struct t_gui_window *window, struct t_gui_bar *bar)
return NULL;
}
/*
* gui_bar_window_search_by_xy: get bar_window pointer displayed at (x,y)
* if window is not NULL, search is done in
* bar windows of window
* if window is NULL, search is done in root
* bar windows
*/
void
gui_bar_window_search_by_xy (struct t_gui_window *window, int x, int y,
struct t_gui_bar_window **bar_window,
char **bar_item, int *item_line, int *item_col)
{
struct t_gui_bar *ptr_bar;
struct t_gui_bar_window *ptr_bar_window;
int filling, num_cols, column, lines, lines_old, i, j, coord_x, coord_y;
int item, subitem;
*bar_window = NULL;
*bar_item = NULL;
*item_line = -1;
*item_col = -1;
if (window)
{
for (ptr_bar_window = window->bar_windows; ptr_bar_window;
ptr_bar_window = ptr_bar_window->next_bar_window)
{
if ((x >= ptr_bar_window->x) && (y >= ptr_bar_window->y)
&& (x <= ptr_bar_window->x + ptr_bar_window->width - 1)
&& (y <= ptr_bar_window->y + ptr_bar_window->height - 1))
{
*bar_window = ptr_bar_window;
break;
}
}
}
else
{
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if (ptr_bar->bar_window
&& (x >= ptr_bar->bar_window->x)
&& (y >= ptr_bar->bar_window->y)
&& (x <= ptr_bar->bar_window->x + ptr_bar->bar_window->width - 1)
&& (y <= ptr_bar->bar_window->y + ptr_bar->bar_window->height - 1))
{
*bar_window = ptr_bar->bar_window;
break;
}
}
}
if (*bar_window)
{
filling = gui_bar_get_filling ((*bar_window)->bar);
*item_line = y - (*bar_window)->y + (*bar_window)->scroll_y;
*item_col = x - (*bar_window)->x + (*bar_window)->scroll_x;
if ((filling == GUI_BAR_FILLING_COLUMNS_HORIZONTAL)
&& ((*bar_window)->screen_col_size > 0))
{
num_cols = (*bar_window)->width / (*bar_window)->screen_col_size;
column = *item_col / (*bar_window)->screen_col_size;
*item_line = (*item_line * num_cols) + column;
*item_col = *item_col - (column * ((*bar_window)->screen_col_size));
}
if ((filling == GUI_BAR_FILLING_COLUMNS_VERTICAL)
&& ((*bar_window)->screen_col_size > 0))
{
column = *item_col / (*bar_window)->screen_col_size;
*item_line = (column * ((*bar_window)->height)) + *item_line;
*item_col = *item_col % ((*bar_window)->screen_col_size);
}
if (filling == GUI_BAR_FILLING_HORIZONTAL)
{
i = 0;
while (i < (*bar_window)->coords_count)
{
coord_x = (*bar_window)->coords[i]->x;
coord_y = (*bar_window)->coords[i]->y;
while ((i < (*bar_window)->coords_count - 1)
&& (coord_x == (*bar_window)->coords[i + 1]->x)
&& (coord_y == (*bar_window)->coords[i + 1]->y))
{
i++;
}
if (i == (*bar_window)->coords_count - 1)
{
item = (*bar_window)->coords[i]->item;
subitem = (*bar_window)->coords[i]->subitem;
if ((item >= 0) && (subitem >= 0))
{
*bar_item = (*bar_window)->bar->items_name[item][subitem];
*item_line = (*bar_window)->coords[i]->line;
*item_col = x - (*bar_window)->coords[i]->x;
}
break;
}
coord_x = (*bar_window)->coords[i + 1]->x;
coord_y = (*bar_window)->coords[i + 1]->y;
if ((y < coord_y) || ((y == coord_y) && (x < coord_x)))
{
item = (*bar_window)->coords[i]->item;
subitem = (*bar_window)->coords[i]->subitem;
*bar_item = (*bar_window)->bar->items_name[item][subitem];
*item_line = (*bar_window)->coords[i]->line;
*item_col = x - (*bar_window)->coords[i]->x;
break;
}
i++;
}
}
else
{
i = 0;
j = 0;
lines = 0;
lines_old = 0;
while (i < (*bar_window)->items_count)
{
lines_old = lines;
lines += (*bar_window)->items_num_lines[i][j];
if (*item_line < lines)
{
*bar_item = (*bar_window)->bar->items_name[i][j];
break;
}
j++;
if (j >= (*bar_window)->items_subcount[i])
{
j = 0;
i++;
}
}
*item_line -= lines_old;
}
}
}
/*
* gui_bar_window_get_size: get total bar size (window bars) for a position
* bar is optional, if not NULL, size is computed
@ -159,6 +305,9 @@ gui_bar_window_calculate_pos_size (struct t_gui_bar_window *bar_window,
int x1, y1, x2, y2;
int add_bottom, add_top, add_left, add_right;
if (CONFIG_BOOLEAN(bar_window->bar->options[GUI_BAR_OPTION_HIDDEN]))
return;
if (window)
{
x1 = window->win_x;
@ -247,7 +396,9 @@ gui_bar_window_content_alloc (struct t_gui_bar_window *bar_window)
bar_window->items_count = bar_window->bar->items_count;
bar_window->items_subcount = NULL;
bar_window->items_content = NULL;
bar_window->items_num_lines = NULL;
bar_window->items_refresh_needed = NULL;
bar_window->screen_col_size = 0;
bar_window->items_subcount = malloc (bar_window->items_count *
sizeof (*bar_window->items_subcount));
if (!bar_window->items_subcount)
@ -256,6 +407,10 @@ gui_bar_window_content_alloc (struct t_gui_bar_window *bar_window)
sizeof (*bar_window->items_content));
if (!bar_window->items_content)
goto error;
bar_window->items_num_lines = malloc ((bar_window->items_count) *
sizeof (*bar_window->items_num_lines));
if (!bar_window->items_num_lines)
goto error;
bar_window->items_refresh_needed = malloc (bar_window->items_count *
sizeof (*bar_window->items_refresh_needed));
if (!bar_window->items_refresh_needed)
@ -264,6 +419,7 @@ gui_bar_window_content_alloc (struct t_gui_bar_window *bar_window)
for (i = 0; i < bar_window->items_count; i++)
{
bar_window->items_content[i] = NULL;
bar_window->items_num_lines[i] = NULL;
bar_window->items_refresh_needed[i] = NULL;
}
@ -274,6 +430,10 @@ gui_bar_window_content_alloc (struct t_gui_bar_window *bar_window)
sizeof (**bar_window->items_content));
if (!bar_window->items_content[i])
goto error;
bar_window->items_num_lines[i] = malloc (bar_window->items_subcount[i] *
sizeof (**bar_window->items_num_lines));
if (!bar_window->items_num_lines[i])
goto error;
bar_window->items_refresh_needed[i] = malloc (bar_window->items_subcount[i] *
sizeof (**bar_window->items_refresh_needed));
if (!bar_window->items_refresh_needed[i])
@ -282,6 +442,8 @@ gui_bar_window_content_alloc (struct t_gui_bar_window *bar_window)
{
if (bar_window->items_content[i])
bar_window->items_content[i][j] = NULL;
if (bar_window->items_num_lines[i])
bar_window->items_num_lines[i][j] = 0;
if (bar_window->items_refresh_needed[i])
bar_window->items_refresh_needed[i][j] = 1;
}
@ -304,6 +466,16 @@ error:
free (bar_window->items_content);
bar_window->items_content = NULL;
}
if (bar_window->items_num_lines)
{
for (i = 0; i < bar_window->items_count; i++)
{
if (bar_window->items_num_lines[i])
free (bar_window->items_num_lines[i]);
}
free (bar_window->items_num_lines);
bar_window->items_num_lines = NULL;
}
if (bar_window->items_refresh_needed)
{
for (i = 0; i < bar_window->items_count; i++)
@ -338,12 +510,15 @@ gui_bar_window_content_free (struct t_gui_bar_window *bar_window)
}
}
free (bar_window->items_content[i]);
free (bar_window->items_num_lines[i]);
free (bar_window->items_refresh_needed[i]);
}
free (bar_window->items_subcount);
bar_window->items_subcount = NULL;
free (bar_window->items_content);
bar_window->items_content = NULL;
free (bar_window->items_num_lines);
bar_window->items_num_lines = NULL;
free (bar_window->items_refresh_needed);
bar_window->items_refresh_needed = NULL;
}
@ -368,14 +543,17 @@ gui_bar_window_content_build_item (struct t_gui_bar_window *bar_window,
free (bar_window->items_content[index_item][index_subitem]);
bar_window->items_content[index_item][index_subitem] = NULL;
}
bar_window->items_num_lines[index_item][index_subitem] = 0;
/* build item, but only if there's a buffer in window */
if ((window && window->buffer)
|| (gui_current_window && gui_current_window->buffer))
{
bar_window->items_content[index_item][index_subitem] =
gui_bar_item_get_value (bar_window->bar->items_array[index_item][index_subitem],
bar_window->bar, window);
gui_bar_item_get_value (bar_window->bar, window,
index_item, index_subitem);
bar_window->items_num_lines[index_item][index_subitem] =
gui_bar_item_count_lines (bar_window->items_content[index_item][index_subitem]);
bar_window->items_refresh_needed[index_item][index_subitem] = 0;
}
}
@ -437,28 +615,50 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
struct t_gui_window *window)
{
enum t_gui_bar_filling filling;
char *ptr_content, *content, reinit_color[32], reinit_color_space[32];
char *ptr_content, *content, str_reinit_color[32];
char str_reinit_color_space[32], str_reinit_color_space_start_line[32];
char str_start_item[32];
char *item_value, *item_value2, ****split_items, **linear_items;
int index_content, content_length, i, first_sub_item, sub, j, k, index;
int length_reinit_color_space, length, max_length, max_length_screen;
int index_content, content_length, i, j, k, sub, index;
int at_least_one_item, first_sub_item;
int length_reinit_color_space, length_start_item, length;
int max_length, max_length_screen;
int total_items, columns, lines;
if (!bar_window->items_subcount || !bar_window->items_content
|| !bar_window->items_refresh_needed)
|| !bar_window->items_num_lines || !bar_window->items_refresh_needed)
return NULL;
snprintf (reinit_color, sizeof (reinit_color),
snprintf (str_reinit_color, sizeof (str_reinit_color),
"%c",
GUI_COLOR_RESET_CHAR);
snprintf (reinit_color_space, sizeof (reinit_color_space),
snprintf (str_reinit_color_space, sizeof (str_reinit_color_space),
"%c ",
GUI_COLOR_RESET_CHAR);
length_reinit_color_space = strlen (reinit_color_space);
length_reinit_color_space = strlen (str_reinit_color_space);
snprintf (str_reinit_color_space_start_line,
sizeof (str_reinit_color_space_start_line),
"%c %c%c%c",
GUI_COLOR_RESET_CHAR,
GUI_COLOR_COLOR_CHAR,
GUI_COLOR_BAR_CHAR,
GUI_COLOR_BAR_START_LINE_ITEM);
snprintf (str_start_item, sizeof (str_start_item),
"%c%c%c",
GUI_COLOR_COLOR_CHAR,
GUI_COLOR_BAR_CHAR,
GUI_COLOR_BAR_START_ITEM);
length_start_item = strlen (str_start_item);
content = NULL;
content_length = 1;
content = malloc (content_length);
if (content)
content[0] = '\0';
filling = gui_bar_get_filling (bar_window->bar);
at_least_one_item = 0;
switch (filling)
{
case GUI_BAR_FILLING_HORIZONTAL: /* items separated by space */
@ -472,10 +672,10 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
i, sub);
if (ptr_content && ptr_content[0])
{
if (gui_bar_get_filling (bar_window->bar) == GUI_BAR_FILLING_HORIZONTAL)
if (filling == GUI_BAR_FILLING_HORIZONTAL)
{
item_value = string_replace (ptr_content, "\n",
reinit_color_space);
str_reinit_color_space_start_line);
if (item_value)
{
item_value2 = string_replace (item_value,
@ -489,43 +689,55 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
}
else
item_value = NULL;
if (!content)
content_length += ((filling == GUI_BAR_FILLING_HORIZONTAL) ? length_start_item : 0) +
length_reinit_color_space +
strlen ((item_value) ? item_value : ptr_content);
content = realloc (content, content_length);
if (at_least_one_item && first_sub_item)
{
content_length += strlen ((item_value) ?
item_value : ptr_content);
content = strdup ((item_value) ? item_value : ptr_content);
first_sub_item = 0;
/* first sub item: insert space after last item */
if (filling == GUI_BAR_FILLING_HORIZONTAL)
strcat (content, str_reinit_color_space);
else
strcat (content, "\n");
}
else
{
content_length += length_reinit_color_space +
strlen ((item_value) ? item_value : ptr_content);
content = realloc (content, content_length);
if (first_sub_item)
{
/* first sub item: insert space after last item */
if (gui_bar_get_filling (bar_window->bar) == GUI_BAR_FILLING_HORIZONTAL)
strcat (content, reinit_color_space);
else
strcat (content, "\n");
}
else
{
strcat (content, reinit_color);
}
strcat (content,
(item_value) ? item_value : ptr_content);
first_sub_item = 0;
strcat (content, str_reinit_color);
}
if (filling == GUI_BAR_FILLING_HORIZONTAL)
strcat (content, str_start_item);
strcat (content,
(item_value) ? item_value : ptr_content);
first_sub_item = 0;
if (item_value)
free (item_value);
at_least_one_item = 1;
}
else
{
if (filling == GUI_BAR_FILLING_HORIZONTAL)
{
content_length += length_start_item;
content = realloc (content, content_length);
if (content)
strcat (content, str_start_item);
}
}
}
}
if (filling == GUI_BAR_FILLING_HORIZONTAL)
{
content_length += length_start_item;
content = realloc (content, content_length);
if (content)
strcat (content, str_start_item);
}
break;
case GUI_BAR_FILLING_COLUMNS_HORIZONTAL: /* items in columns, with horizontal filling */
case GUI_BAR_FILLING_COLUMNS_VERTICAL: /* items in columns, with vertical filling */
content = NULL;
total_items = 0;
max_length = 1;
max_length_screen = 1;
@ -580,6 +792,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
columns++;
lines = bar_window->height;
}
bar_window->screen_col_size = max_length_screen + 1;
/* build array with pointers to split items */
@ -605,9 +818,10 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
}
/* build content with lines and columns */
content = malloc (1 + (lines *
((columns *
(max_length + max_length_screen + length_reinit_color_space)) + 1)));
content_length = 1 + (lines *
((columns *
(max_length + max_length_screen + length_reinit_color_space)) + 1));
content = realloc (content, content_length);
if (content)
{
content[0] = '\0';
@ -641,7 +855,8 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
}
if (j < columns - 1)
{
strcpy (content + index_content, reinit_color_space);
strcpy (content + index_content,
str_reinit_color_space);
index_content += length_reinit_color_space;
}
}
@ -671,25 +886,126 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window,
break;
}
if (content_length == 1)
{
free (content);
content = NULL;
}
return content;
}
/*
* gui_bar_window_coords_add: add coordinates (item index/subindex and x,y)
*/
void
gui_bar_window_coords_add (struct t_gui_bar_window *bar_window,
int index_item, int index_subitem, int index_line,
int x, int y)
{
if (!bar_window->coords)
{
bar_window->coords_count = 1;
bar_window->coords = malloc (sizeof (*(bar_window->coords)));
}
else
{
bar_window->coords_count++;
bar_window->coords = realloc (bar_window->coords,
bar_window->coords_count * sizeof (*(bar_window->coords)));
}
bar_window->coords[bar_window->coords_count - 1] = malloc (sizeof (*(bar_window->coords[bar_window->coords_count - 1])));
bar_window->coords[bar_window->coords_count - 1]->item = index_item;
bar_window->coords[bar_window->coords_count - 1]->subitem = index_subitem;
bar_window->coords[bar_window->coords_count - 1]->line = index_line;
bar_window->coords[bar_window->coords_count - 1]->x = x;
bar_window->coords[bar_window->coords_count - 1]->y = y;
}
/*
* gui_bar_window_coords_free: free coords of a bar window
*/
void
gui_bar_window_coords_free (struct t_gui_bar_window *bar_window)
{
int i;
if (bar_window->coords)
{
for (i = 0; i < bar_window->coords_count; i++)
{
free (bar_window->coords[i]);
}
free (bar_window->coords);
bar_window->coords = NULL;
}
bar_window->coords_count = 0;
}
/*
* gui_bar_window_insert: insert bar window in list of bar windows (at good
* position, according to priority)
*/
void
gui_bar_window_insert (struct t_gui_bar_window *bar_window,
struct t_gui_window *window)
{
struct t_gui_bar_window *pos_bar_window;
if (window->bar_windows)
{
pos_bar_window = gui_bar_window_find_pos (bar_window->bar, window);
if (pos_bar_window)
{
/* insert before bar window found */
bar_window->prev_bar_window = pos_bar_window->prev_bar_window;
bar_window->next_bar_window = pos_bar_window;
if (pos_bar_window->prev_bar_window)
(pos_bar_window->prev_bar_window)->next_bar_window = bar_window;
else
window->bar_windows = bar_window;
pos_bar_window->prev_bar_window = bar_window;
}
else
{
/* add to end of list for window */
bar_window->prev_bar_window = window->last_bar_window;
bar_window->next_bar_window = NULL;
(window->last_bar_window)->next_bar_window = bar_window;
window->last_bar_window = bar_window;
}
}
else
{
bar_window->prev_bar_window = NULL;
bar_window->next_bar_window = NULL;
window->bar_windows = bar_window;
window->last_bar_window = bar_window;
}
}
/*
* gui_bar_window_new: create a new "window bar" for a bar, in screen or a window
* if window is not NULL, bar window will be in this window
* return 1 if ok, 0 if error
*/
int
void
gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window)
{
struct t_gui_bar_window *new_bar_window, *pos_bar_window;
struct t_gui_bar_window *new_bar_window;
if (CONFIG_BOOLEAN(bar->options[GUI_BAR_OPTION_HIDDEN]))
return;
if (window)
{
if ((CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_WINDOW)
&& (!gui_bar_check_conditions_for_window (bar, window)))
return 1;
return;
}
new_bar_window = malloc (sizeof (*new_bar_window));
@ -699,36 +1015,7 @@ gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window)
if (window)
{
bar->bar_window = NULL;
if (window->bar_windows)
{
pos_bar_window = gui_bar_window_find_pos (bar, window);
if (pos_bar_window)
{
/* insert before bar window found */
new_bar_window->prev_bar_window = pos_bar_window->prev_bar_window;
new_bar_window->next_bar_window = pos_bar_window;
if (pos_bar_window->prev_bar_window)
(pos_bar_window->prev_bar_window)->next_bar_window = new_bar_window;
else
window->bar_windows = new_bar_window;
pos_bar_window->prev_bar_window = new_bar_window;
}
else
{
/* add to end of list for window */
new_bar_window->prev_bar_window = window->last_bar_window;
new_bar_window->next_bar_window = NULL;
(window->last_bar_window)->next_bar_window = new_bar_window;
window->last_bar_window = new_bar_window;
}
}
else
{
new_bar_window->prev_bar_window = NULL;
new_bar_window->next_bar_window = NULL;
window->bar_windows = new_bar_window;
window->last_bar_window = new_bar_window;
}
gui_bar_window_insert (new_bar_window, window);
}
else
{
@ -750,7 +1037,11 @@ gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window)
new_bar_window->items_count = 0;
new_bar_window->items_subcount = NULL;
new_bar_window->items_content = NULL;
new_bar_window->items_num_lines = NULL;
new_bar_window->items_refresh_needed = NULL;
new_bar_window->screen_col_size = 0;
new_bar_window->coords_count = 0;
new_bar_window->coords = NULL;
gui_bar_window_objects_init (new_bar_window);
gui_bar_window_content_alloc (new_bar_window);
@ -760,12 +1051,7 @@ gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window)
gui_bar_window_create_win (new_bar_window);
gui_window_ask_refresh (1);
}
return 1;
}
/* failed to create bar window */
return 0;
}
/*
@ -916,6 +1202,7 @@ gui_bar_window_free (struct t_gui_bar_window *bar_window,
/* free data */
gui_bar_window_content_free (bar_window);
gui_bar_window_coords_free (bar_window);
gui_bar_window_objects_free (bar_window);
free (bar_window->gui_objects);
@ -1059,6 +1346,46 @@ gui_bar_window_scroll (struct t_gui_bar_window *bar_window,
}
}
/*
* gui_bar_window_hdata_bar_window_cb: return hdata for bar window
*/
struct t_hdata *
gui_bar_window_hdata_bar_window_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) data;
hdata = hdata_new (NULL, hdata_name, "prev_bar_window", "next_bar_window");
if (hdata)
{
HDATA_VAR(struct t_gui_bar_window, bar, POINTER, "bar");
HDATA_VAR(struct t_gui_bar_window, x, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, y, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, width, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, height, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, scroll_x, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, scroll_y, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, cursor_x, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, cursor_y, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, current_size, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, items_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, items_subcount, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_window, items_content, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_window, items_num_lines, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_window, items_refresh_needed, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_window, screen_col_size, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, coords_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar_window, coords, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_window, gui_objects, POINTER, NULL);
HDATA_VAR(struct t_gui_bar_window, prev_bar_window, POINTER, hdata_name);
HDATA_VAR(struct t_gui_bar_window, next_bar_window, POINTER, hdata_name);
}
return hdata;
}
/*
* gui_bar_window_add_to_infolist: add a bar window in an infolist
* return 1 if ok, 0 if error
@ -1110,8 +1437,15 @@ gui_bar_window_add_to_infolist (struct t_infolist *infolist,
if (!infolist_new_var_string (ptr_item, option_name,
bar_window->items_content[i][j]))
return 0;
snprintf (option_name, sizeof (option_name),
"items_num_lines_%05d_%05d", i + 1, j + 1);
if (!infolist_new_var_integer (ptr_item, option_name,
bar_window->items_num_lines[i][j]))
return 0;
}
}
if (!infolist_new_var_integer (ptr_item, "screen_col_size", bar_window->screen_col_size))
return 0;
if (!infolist_new_var_pointer (ptr_item, "gui_objects", bar_window->gui_objects))
return 0;
@ -1151,11 +1485,13 @@ gui_bar_window_print_log (struct t_gui_bar_window *bar_window)
{
for (j = 0; j < bar_window->items_subcount[i]; j++)
{
log_printf (" items_content[%03d][%03d]: '%s' (item: '%s')",
log_printf (" items_content[%03d][%03d]: '%s' "
"(item: '%s', num_lines: %d)",
i, j,
bar_window->items_content[i][j],
(bar_window->items_count >= i + 1) ?
bar_window->bar->items_array[i][j] : "?");
bar_window->bar->items_array[i][j] : "?",
bar_window->items_num_lines[i][j]);
}
}
else
@ -1163,6 +1499,19 @@ gui_bar_window_print_log (struct t_gui_bar_window *bar_window)
log_printf (" items_content. . . . . . : 0x%lx", bar_window->items_content);
}
}
log_printf (" screen_col_size. . . . : %d", bar_window->screen_col_size);
log_printf (" coords_count . . . . . : %d", bar_window->coords_count);
for (i = 0; i < bar_window->coords_count; i++)
{
log_printf (" coords[%03d]. . . . . . : item=%d, subitem=%d, "
"line=%d, x=%d, y=%d",
i,
bar_window->coords[i]->item,
bar_window->coords[i]->subitem,
bar_window->coords[i]->line,
bar_window->coords[i]->x,
bar_window->coords[i]->y);
}
log_printf (" gui_objects. . . . . . : 0x%lx", bar_window->gui_objects);
gui_bar_window_objects_print_log (bar_window);
log_printf (" prev_bar_window. . . . : 0x%lx", bar_window->prev_bar_window);

View File

@ -20,9 +20,19 @@
#ifndef __WEECHAT_GUI_BAR_WINDOW_H
#define __WEECHAT_GUI_BAR_WINDOW_H 1
struct t_infolist;
struct t_gui_window;
enum t_gui_bar_position;
struct t_gui_bar_window_coords
{
int item; /* index of item */
int subitem; /* index of sub item */
int line; /* line */
int x; /* X on screen */
int y; /* Y on screen */
};
struct t_gui_bar_window
{
struct t_gui_bar *bar; /* pointer to bar */
@ -34,8 +44,14 @@ struct t_gui_bar_window
int current_size; /* current size (width or height) */
int items_count; /* number of bar items */
int *items_subcount; /* number of sub items */
char ***items_content; /* content for each item/sub item of bar*/
char ***items_content; /* content for each (sub)item of bar */
int **items_num_lines; /* number of lines for each (sub)item */
int **items_refresh_needed; /* refresh needed for (sub)item? */
int screen_col_size; /* size of columns on screen */
/* (for filling with columns) */
int coords_count; /* number of coords saved */
struct t_gui_bar_window_coords **coords; /* coords for filling horiz. */
/* (size is 5 * coords_count) */
void *gui_objects; /* pointer to a GUI specific struct */
struct t_gui_bar_window *prev_bar_window; /* link to previous bar win */
/* (only for non-root bars) */
@ -46,6 +62,12 @@ struct t_gui_bar_window
/* functions */
extern int gui_bar_window_valid (struct t_gui_bar_window *bar_window);
extern void gui_bar_window_search_by_xy (struct t_gui_window *window,
int x, int y,
struct t_gui_bar_window **bar_window,
char **bar_item,
int *item_line,
int *item_col);
extern void gui_bar_window_calculate_pos_size (struct t_gui_bar_window *bar_window,
struct t_gui_window *window);
extern void gui_bar_window_content_build (struct t_gui_bar_window *bar_window,
@ -61,8 +83,15 @@ extern void gui_bar_window_set_current_size (struct t_gui_bar_window *bar_window
extern int gui_bar_window_get_size (struct t_gui_bar *bar,
struct t_gui_window *window,
enum t_gui_bar_position position);
extern int gui_bar_window_new (struct t_gui_bar *bar,
struct t_gui_window *window);
extern void gui_bar_window_coords_add (struct t_gui_bar_window *bar_window,
int index_item, int index_subitem,
int index_line,
int x, int y);
extern void gui_bar_window_coords_free (struct t_gui_bar_window *bar_window);
extern void gui_bar_window_insert (struct t_gui_bar_window *bar_window,
struct t_gui_window *window);
extern void gui_bar_window_new (struct t_gui_bar *bar,
struct t_gui_window *window);
extern void gui_bar_window_free (struct t_gui_bar_window *bar_window,
struct t_gui_window *window);
extern int gui_bar_window_remove_unused_bars (struct t_gui_window *window);
@ -72,6 +101,8 @@ extern void gui_bar_window_scroll (struct t_gui_bar_window *bar_window,
int add_x, int scroll_beginning,
int scroll_end, int add, int percent,
int value);
extern struct t_hdata *gui_bar_window_hdata_bar_window_cb (void *data,
const char *hdata_name);
extern int gui_bar_window_add_to_infolist (struct t_infolist *infolist,
struct t_gui_bar_window *bar_window);
extern void gui_bar_window_print_log (struct t_gui_bar_window *bar_window);

View File

@ -637,24 +637,54 @@ gui_bar_apply_current_size (struct t_gui_bar *bar)
}
/*
* gui_bar_free_items_array: free array with items for a bar
* gui_bar_free_items_arrays: free arrays with items for a bar
*/
void
gui_bar_free_items_array (struct t_gui_bar *bar)
gui_bar_free_items_arrays (struct t_gui_bar *bar)
{
int i;
int i, j;
for (i = 0; i < bar->items_count; i++)
{
if (bar->items_array[i])
string_free_split (bar->items_array[i]);
for (j = 0; j < bar->items_subcount[i]; j++)
{
if (bar->items_prefix[i][j])
free (bar->items_prefix[i][j]);
if (bar->items_name[i][j])
free (bar->items_name[i][j]);
if (bar->items_suffix[i][j])
free (bar->items_suffix[i][j]);
}
if (bar->items_prefix[i])
free (bar->items_prefix[i]);
if (bar->items_name[i])
free (bar->items_name[i]);
if (bar->items_suffix[i])
free (bar->items_suffix[i]);
}
if (bar->items_array)
{
free (bar->items_array);
bar->items_array = NULL;
}
if (bar->items_prefix)
{
free (bar->items_prefix);
bar->items_prefix = NULL;
}
if (bar->items_name)
{
free (bar->items_name);
bar->items_name = NULL;
}
if (bar->items_suffix)
{
free (bar->items_suffix);
bar->items_suffix = NULL;
}
if (bar->items_subcount)
{
free (bar->items_subcount);
@ -670,10 +700,10 @@ gui_bar_free_items_array (struct t_gui_bar *bar)
void
gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
{
int i, count;
int i, j, count;
char **tmp_array;
gui_bar_free_items_array (bar);
gui_bar_free_items_arrays (bar);
if (items && items[0])
{
@ -683,10 +713,29 @@ gui_bar_set_items_array (struct t_gui_bar *bar, const char *items)
bar->items_count = count;
bar->items_subcount = malloc (count * sizeof (*bar->items_subcount));
bar->items_array = malloc (count * sizeof (*bar->items_array));
bar->items_prefix = malloc (count * sizeof (*bar->items_prefix));
bar->items_name = malloc (count * sizeof (*bar->items_name));
bar->items_suffix = malloc (count * sizeof (*bar->items_suffix));
for (i = 0; i < count; i++)
{
bar->items_array[i] = string_split (tmp_array[i], "+", 0, 0,
&(bar->items_subcount[i]));
if (bar->items_subcount[i] > 0)
{
bar->items_prefix[i] = malloc (bar->items_subcount[i] *
sizeof (*(bar->items_prefix[i])));
bar->items_name[i] = malloc (bar->items_subcount[i] *
sizeof (*(bar->items_name[i])));
bar->items_suffix[i] = malloc (bar->items_subcount[i] *
sizeof (*(bar->items_suffix[i])));
for (j = 0; j < bar->items_subcount[i]; j++)
{
gui_bar_item_set_prefix_name_suffix (bar->items_array[i][j],
&bar->items_prefix[i][j],
&bar->items_name[i][j],
&bar->items_suffix[i][j]);
}
}
}
}
string_free_split (tmp_array);
@ -722,6 +771,8 @@ gui_bar_config_change_hidden (void *data, struct t_config_option *option)
{
struct t_gui_bar *ptr_bar;
struct t_gui_window *ptr_win;
struct t_gui_bar_window *ptr_bar_win;
int bar_window_exists;
/* make C compiler happy */
(void) data;
@ -729,26 +780,43 @@ gui_bar_config_change_hidden (void *data, struct t_config_option *option)
ptr_bar = gui_bar_search_with_option_name (option->name);
if (ptr_bar)
{
/* free bar windows */
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
if (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT)
{
gui_bar_free_bar_windows (ptr_bar);
}
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
{
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
if (CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
if (!CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN])
&& (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) != GUI_BAR_TYPE_ROOT))
gui_bar_window_free (ptr_bar->bar_window, NULL);
ptr_bar->bar_window = NULL;
}
else
{
gui_bar_window_new (ptr_bar, NULL);
}
}
else
{
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
{
bar_window_exists = 0;
for (ptr_bar_win = ptr_win->bar_windows; ptr_bar_win;
ptr_bar_win = ptr_bar_win->next_bar_window)
{
if (ptr_bar_win->bar == ptr_bar)
{
if (CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
gui_bar_window_free (ptr_bar_win, ptr_win);
else
bar_window_exists = 1;
}
}
if (!bar_window_exists
&& !CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]))
{
gui_bar_window_new (ptr_bar, ptr_win);
}
}
}
gui_window_ask_refresh (1);
}
gui_window_ask_refresh (1);
}
/*
@ -760,6 +828,7 @@ gui_bar_config_change_priority (void *data, struct t_config_option *option)
{
struct t_gui_bar *ptr_bar;
struct t_gui_window *ptr_win;
struct t_gui_bar_window *bar_windows, *ptr_bar_win, *next_bar_win;
/* make C compiler happy */
(void) data;
@ -785,26 +854,24 @@ gui_bar_config_change_priority (void *data, struct t_config_option *option)
gui_bar_insert (ptr_bar);
/* free bar windows */
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
gui_bar_free_bar_windows (ptr_bar);
}
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
{
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
bar_windows = ptr_win->bar_windows;
ptr_win->bar_windows = NULL;
ptr_win->last_bar_window = NULL;
ptr_bar_win = bar_windows;
while (ptr_bar_win)
{
if (!CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN])
&& (CONFIG_INTEGER(ptr_bar->options[GUI_BAR_OPTION_TYPE]) != GUI_BAR_TYPE_ROOT))
{
gui_bar_window_new (ptr_bar, ptr_win);
}
next_bar_win = ptr_bar_win->next_bar_window;
gui_bar_window_insert (ptr_bar_win, ptr_win);
ptr_bar_win = next_bar_win;
}
}
gui_window_ask_refresh (1);
}
gui_window_ask_refresh (1);
}
/*
@ -1468,6 +1535,9 @@ gui_bar_alloc (const char *name)
new_bar->conditions_array = NULL;
new_bar->items_count = 0;
new_bar->items_array = NULL;
new_bar->items_prefix = NULL;
new_bar->items_name = NULL;
new_bar->items_suffix = NULL;
new_bar->bar_window = NULL;
new_bar->bar_refresh_needed = 0;
new_bar->prev_bar = NULL;
@ -1533,6 +1603,9 @@ gui_bar_new_with_options (const char *name,
new_bar->items_count = 0;
new_bar->items_subcount = NULL;
new_bar->items_array = NULL;
new_bar->items_prefix = NULL;
new_bar->items_name = NULL;
new_bar->items_suffix = NULL;
gui_bar_set_items_array (new_bar, CONFIG_STRING(items));
new_bar->bar_window = NULL;
new_bar->bar_refresh_needed = 1;
@ -1983,7 +2056,11 @@ gui_bar_scroll (struct t_gui_bar *bar, struct t_gui_buffer *buffer,
scroll++;
}
else
return 0;
{
/* auto-detect if we scroll X/Y, according to filling */
if (gui_bar_get_filling (bar) == GUI_BAR_FILLING_HORIZONTAL)
add_x = 1;
}
if ((scroll[0] == 'b') || (scroll[0] == 'B'))
{
@ -2032,9 +2109,11 @@ gui_bar_scroll (struct t_gui_bar *bar, struct t_gui_buffer *buffer,
}
if (CONFIG_INTEGER(bar->options[GUI_BAR_OPTION_TYPE]) == GUI_BAR_TYPE_ROOT)
{
gui_bar_window_scroll (bar->bar_window, NULL,
add_x, scroll_beginning, scroll_end,
add, percent, number);
}
else
{
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
@ -2055,7 +2134,8 @@ gui_bar_scroll (struct t_gui_bar *bar, struct t_gui_buffer *buffer,
}
}
free (str);
if (str)
free (str);
return 1;
}
@ -2101,7 +2181,7 @@ gui_bar_free (struct t_gui_bar *bar)
}
if (bar->conditions_array)
string_free_split (bar->conditions_array);
gui_bar_free_items_array (bar);
gui_bar_free_items_arrays (bar);
free (bar);
}
@ -2129,17 +2209,25 @@ gui_bar_free_bar_windows (struct t_gui_bar *bar)
struct t_gui_window *ptr_win;
struct t_gui_bar_window *ptr_bar_win, *next_bar_win;
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
if (bar->bar_window)
{
ptr_bar_win = ptr_win->bar_windows;
while (ptr_bar_win)
gui_bar_window_free (bar->bar_window, NULL);
bar->bar_window = NULL;
}
else
{
for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window)
{
next_bar_win = ptr_bar_win->next_bar_window;
if (ptr_bar_win->bar == bar)
gui_bar_window_free (ptr_bar_win, ptr_win);
ptr_bar_win = next_bar_win;
ptr_bar_win = ptr_win->bar_windows;
while (ptr_bar_win)
{
next_bar_win = ptr_bar_win->next_bar_window;
if (ptr_bar_win->bar == bar)
gui_bar_window_free (ptr_bar_win, ptr_win);
ptr_bar_win = next_bar_win;
}
}
}
}
@ -2166,7 +2254,10 @@ gui_bar_hdata_bar_cb (void *data, const char *hdata_name)
HDATA_VAR(struct t_gui_bar, items_count, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar, items_subcount, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, items_array, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, bar_window, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, items_prefix, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, items_name, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, items_suffix, POINTER, NULL);
HDATA_VAR(struct t_gui_bar, bar_window, POINTER, "bar_window");
HDATA_VAR(struct t_gui_bar, bar_refresh_needed, INTEGER, NULL);
HDATA_VAR(struct t_gui_bar, prev_bar, POINTER, hdata_name);
HDATA_VAR(struct t_gui_bar, next_bar, POINTER, hdata_name);
@ -2247,6 +2338,16 @@ gui_bar_add_to_infolist (struct t_infolist *infolist,
if (!infolist_new_var_string (ptr_item, option_name,
bar->items_array[i][j]))
return 0;
snprintf (option_name, sizeof (option_name),
"items_prefix_%05d_%05d", i + 1, j + 1);
if (!infolist_new_var_string (ptr_item, option_name,
bar->items_prefix[i][j]))
return 0;
snprintf (option_name, sizeof (option_name),
"items_suffix_%05d_%05d", i + 1, j + 1);
if (!infolist_new_var_string (ptr_item, option_name,
bar->items_suffix[i][j]))
return 0;
}
}
if (!infolist_new_var_pointer (ptr_item, "bar_window", bar->bar_window))
@ -2307,8 +2408,13 @@ gui_bar_print_log ()
i, ptr_bar->items_subcount[i]);
for (j = 0; j < ptr_bar->items_subcount[i]; j++)
{
log_printf (" items_array[%03d][%03d]: '%s'",
i, j, ptr_bar->items_array[i][j]);
log_printf (" items_array[%03d][%03d]: '%s' "
"(prefix: '%s', name: '%s', suffix: '%s')",
i, j,
ptr_bar->items_array[i][j],
ptr_bar->items_prefix[i][j],
ptr_bar->items_name[i][j],
ptr_bar->items_suffix[i][j]);
}
}
log_printf (" bar_window . . . . . . : 0x%lx", ptr_bar->bar_window);

View File

@ -20,6 +20,7 @@
#ifndef __WEECHAT_GUI_BAR_H
#define __WEECHAT_GUI_BAR_H 1
struct t_infolist;
struct t_weechat_plugin;
struct t_gui_window;
struct t_gui_buffer;
@ -89,6 +90,9 @@ struct t_gui_bar
int items_count; /* number of bar items */
int *items_subcount; /* number of sub items */
char ***items_array; /* bar items (after split) */
char ***items_prefix; /* prefix for each (sub)item */
char ***items_name; /* name for each (sub)item */
char ***items_suffix; /* suffix for each (sub)item */
struct t_gui_bar_window *bar_window; /* pointer to bar window */
/* (for type root only) */
int bar_refresh_needed; /* refresh for bar is needed? */

View File

@ -515,6 +515,8 @@ gui_color_decode (const char *string, const char *replacement)
case GUI_COLOR_BAR_START_INPUT_CHAR:
case GUI_COLOR_BAR_START_INPUT_HIDDEN_CHAR:
case GUI_COLOR_BAR_MOVE_CURSOR_CHAR:
case GUI_COLOR_BAR_START_ITEM:
case GUI_COLOR_BAR_START_LINE_ITEM:
ptr_string++;
break;
}

View File

@ -104,6 +104,8 @@ enum t_gui_color_enum
#define GUI_COLOR_BAR_START_INPUT_CHAR '_'
#define GUI_COLOR_BAR_START_INPUT_HIDDEN_CHAR '-'
#define GUI_COLOR_BAR_MOVE_CURSOR_CHAR '#'
#define GUI_COLOR_BAR_START_ITEM 'i'
#define GUI_COLOR_BAR_START_LINE_ITEM 'l'
#define GUI_COLOR_EXTENDED_FLAG 0x0100000
#define GUI_COLOR_EXTENDED_BOLD_FLAG 0x0200000

View File

@ -1027,7 +1027,7 @@ gui_completion_complete (struct t_gui_completion *completion)
other_completion++;
}
if (completion->word_found &&
(string_strcasecmp (ptr_item->data, completion->word_found) == 0))
(strcmp (ptr_item->data, completion->word_found) == 0))
word_found_seen = 1;
if (completion->direction < 0)

337
src/gui/gui-cursor.c Normal file
View File

@ -0,0 +1,337 @@
/*
* Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* gui-cursor.c: functions for free movement of cursor (used by all GUI)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "../core/weechat.h"
#include "gui-cursor.h"
#include "gui-bar.h"
#include "gui-bar-window.h"
#include "gui-buffer.h"
#include "gui-chat.h"
#include "gui-color.h"
#include "gui-input.h"
#include "gui-window.h"
int gui_cursor_mode = 0; /* cursor mode? (free movement) */
int gui_cursor_debug = 0; /* debug mode (show info in input) */
int gui_cursor_x = 0; /* position of cursor in cursor mode */
int gui_cursor_y = 0; /* position of cursor in cursor mode */
/*
* gui_cursor_mode_toggle: toggle cursor mode
*/
void
gui_cursor_mode_toggle ()
{
gui_cursor_mode ^= 1;
if (gui_cursor_mode)
{
if (gui_cursor_debug)
gui_input_delete_line (gui_current_window->buffer);
gui_cursor_x = gui_window_cursor_x;
gui_cursor_y = gui_window_cursor_y;
gui_cursor_move_xy (0, 0);
}
else
{
/* restore input (and move cursor in input) */
if (gui_cursor_debug)
gui_input_delete_line (gui_current_window->buffer);
gui_input_text_changed_modifier_and_signal (gui_current_window->buffer, 0);
gui_buffer_ask_chat_refresh (gui_current_window->buffer, 2);
}
}
/*
* gui_cursor_debug_toggle: toggle debug for cursor mode
*/
void
gui_cursor_debug_toggle ()
{
gui_cursor_debug ^= 1;
if (gui_cursor_debug)
gui_chat_printf (NULL, _("Debug enabled for cursor mode"));
else
gui_chat_printf (NULL, _("Debug disabled for cursor mode"));
}
/*
* gui_cursor_get_info: get info about what is pointed by cursor at (x,y)
*/
void
gui_cursor_get_info (int x, int y, struct t_gui_cursor_info *cursor_info)
{
cursor_info->x = x;
cursor_info->y = y;
/* search window */
cursor_info->window = gui_window_search_by_xy (x, y);
/* chat area in this window? */
if (cursor_info->window
&& (x >= (cursor_info->window)->win_chat_x)
&& (y >= (cursor_info->window)->win_chat_y)
&& (x <= (cursor_info->window)->win_chat_x + (cursor_info->window)->win_chat_width - 1)
&& (y <= (cursor_info->window)->win_chat_y + (cursor_info->window)->win_chat_height - 1))
{
cursor_info->chat = 1;
}
else
cursor_info->chat = 0;
/* search bar window, item, and line/col in item */
gui_bar_window_search_by_xy (cursor_info->window, x, y,
&cursor_info->bar_window,
&cursor_info->bar_item,
&cursor_info->item_line,
&cursor_info->item_col);
}
/*
* gui_cursor_display_debug_info: display debug info about (x,y) in input
*/
void
gui_cursor_display_debug_info ()
{
struct t_gui_cursor_info cursor_info;
char str_info[1024];
if (!gui_cursor_debug)
return;
gui_cursor_get_info (gui_cursor_x, gui_cursor_y, &cursor_info);
snprintf (str_info, sizeof (str_info),
"%s(%d,%d) window:0x%lx (buffer: %s), chat: %d, "
"bar_window:0x%lx (bar: %s, item: %s, line: %d, col: %d)",
gui_color_get_custom ("yellow,red"),
cursor_info.x, cursor_info.y,
(long unsigned int)cursor_info.window,
(cursor_info.window) ? (cursor_info.window)->buffer->name : "-",
cursor_info.chat,
(long unsigned int)cursor_info.bar_window,
(cursor_info.bar_window) ? (cursor_info.bar_window)->bar->name : "-",
(cursor_info.bar_item) ? cursor_info.bar_item : "-",
cursor_info.item_line,
cursor_info.item_col);
gui_input_delete_line (gui_current_window->buffer);
gui_input_insert_string (gui_current_window->buffer, str_info, -1);
}
/*
* gui_cursor_move_xy: set cursor at position (x,y)
*/
void
gui_cursor_move_xy (int x, int y)
{
if (!gui_cursor_mode)
gui_cursor_mode_toggle ();
gui_cursor_x = x;
gui_cursor_y = y;
if (gui_cursor_x < 0)
gui_cursor_x = 0;
else if (gui_cursor_x > gui_window_get_width () - 1)
gui_cursor_x = gui_window_get_width () - 1;
if (gui_cursor_y < 0)
gui_cursor_y = 0;
else if (gui_cursor_y > gui_window_get_height () - 1)
gui_cursor_y = gui_window_get_height () - 1;
gui_cursor_display_debug_info ();
gui_window_move_cursor ();
}
/*
* gui_cursor_move_add_xy: move cursor by adding values to (x,y)
*/
void
gui_cursor_move_add_xy (int add_x, int add_y)
{
if (!gui_cursor_mode)
gui_cursor_mode_toggle ();
gui_cursor_x += add_x;
gui_cursor_y += add_y;
if (gui_cursor_x < 0)
gui_cursor_x = gui_window_get_width () - 1;
else if (gui_cursor_x > gui_window_get_width () - 1)
gui_cursor_x = 0;
if (gui_cursor_y < 0)
gui_cursor_y = gui_window_get_height () - 1;
else if (gui_cursor_y > gui_window_get_height () - 1)
gui_cursor_y = 0;
gui_cursor_display_debug_info ();
gui_window_move_cursor ();
}
/*
* gui_cursor_move_area_add_xy: move cursor to another area by adding values to
* (x,y)
*/
void
gui_cursor_move_area_add_xy (int add_x, int add_y)
{
int x, y, width, height, area_found;
struct t_gui_cursor_info cursor_info_old, cursor_info_new;
if (!gui_cursor_mode)
gui_cursor_mode_toggle ();
area_found = 0;
x = gui_cursor_x;
y = gui_cursor_y;
width = gui_window_get_width ();
height = gui_window_get_height ();
gui_cursor_get_info (x, y, &cursor_info_old);
if (add_x != 0)
x += add_x;
else
y += add_y;
while ((x >= 0) && (x < width) && (y >= 0) && (y < height))
{
gui_cursor_get_info (x, y, &cursor_info_new);
if (((cursor_info_new.window && cursor_info_new.chat)
|| cursor_info_new.bar_window)
&& ((cursor_info_old.window != cursor_info_new.window)
|| (cursor_info_old.bar_window != cursor_info_new.bar_window)))
{
area_found = 1;
break;
}
if (add_x != 0)
x += add_x;
else
y += add_y;
}
if (area_found)
{
if (cursor_info_new.window && cursor_info_new.chat)
{
x = (cursor_info_new.window)->win_chat_x;
y = (cursor_info_new.window)->win_chat_y;
}
else if (cursor_info_new.bar_window)
{
x = (cursor_info_new.bar_window)->x;
y = (cursor_info_new.bar_window)->y;
}
else
area_found = 0;
}
if (area_found)
{
gui_cursor_x = x;
gui_cursor_y = y;
gui_cursor_display_debug_info ();
gui_window_move_cursor ();
}
}
/*
* gui_cursor_move_area: move cursor to another area by name
*/
void
gui_cursor_move_area (const char *area)
{
int area_found, x, y;
struct t_gui_bar_window *ptr_bar_win;
struct t_gui_bar *ptr_bar;
area_found = 0;
x = 0;
y = 0;
if (strcmp (area, "chat") == 0)
{
area_found = 1;
x = gui_current_window->win_chat_x;
y = gui_current_window->win_chat_y;
}
else
{
for (ptr_bar_win = gui_current_window->bar_windows; ptr_bar_win;
ptr_bar_win = ptr_bar_win->next_bar_window)
{
if (strcmp (ptr_bar_win->bar->name, area) == 0)
{
area_found = 1;
x = ptr_bar_win->x;
y = ptr_bar_win->y;
break;
}
}
if (!area_found)
{
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if (ptr_bar->bar_window && (strcmp (ptr_bar->name, area) == 0))
{
area_found = 1;
x = ptr_bar->bar_window->x;
y = ptr_bar->bar_window->y;
}
}
}
}
if (area_found)
{
if (!gui_cursor_mode)
gui_cursor_mode_toggle ();
gui_cursor_x = x;
gui_cursor_y = y;
gui_cursor_display_debug_info ();
gui_window_move_cursor ();
}
}

54
src/gui/gui-cursor.h Normal file
View File

@ -0,0 +1,54 @@
/*
* Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_GUI_CURSOR_H
#define __WEECHAT_GUI_CURSOR_H 1
/* cursor structures */
struct t_gui_cursor_info
{
int x, y; /* (x,y) on screen */
struct t_gui_window *window; /* window found */
int chat; /* 1 for chat area, otherwise 0 */
struct t_gui_bar_window *bar_window; /* bar window found */
char *bar_item; /* bar item found */
int item_line; /* line in bar item */
int item_col; /* column in bar item */
};
/* cursor variables */
extern int gui_cursor_mode;
extern int gui_cursor_debug;
extern int gui_cursor_x;
extern int gui_cursor_y;
/* cursor functions */
extern void gui_cursor_mode_toggle ();
extern void gui_cursor_debug_toggle ();
extern void gui_cursor_get_info (int x, int y,
struct t_gui_cursor_info *cursor_info);
extern void gui_cursor_move_xy (int x, int y);
extern void gui_cursor_move_add_xy (int add_x, int add_y);
extern void gui_cursor_move_area_add_xy (int add_x, int add_y);
extern void gui_cursor_move_area (const char *area);
#endif /* __WEECHAT_GUI_CURSOR_H */

View File

@ -38,6 +38,7 @@
#include "gui-input.h"
#include "gui-buffer.h"
#include "gui-completion.h"
#include "gui-cursor.h"
#include "gui-history.h"
#include "gui-hotlist.h"
#include "gui-key.h"
@ -117,26 +118,29 @@ gui_input_text_changed_modifier_and_signal (struct t_gui_buffer *buffer,
{
char str_buffer[128], *new_input;
if (save_undo)
gui_buffer_undo_add (buffer);
/* send modifier, and change input if needed */
snprintf (str_buffer, sizeof (str_buffer),
"0x%lx", (long unsigned int)buffer);
new_input = hook_modifier_exec (NULL,
"input_text_content",
str_buffer,
(buffer->input_buffer) ?
buffer->input_buffer : "");
if (new_input)
if (!gui_cursor_mode)
{
if (!buffer->input_buffer
|| strcmp (new_input, buffer->input_buffer) != 0)
if (save_undo)
gui_buffer_undo_add (buffer);
/* send modifier, and change input if needed */
snprintf (str_buffer, sizeof (str_buffer),
"0x%lx", (long unsigned int)buffer);
new_input = hook_modifier_exec (NULL,
"input_text_content",
str_buffer,
(buffer->input_buffer) ?
buffer->input_buffer : "");
if (new_input)
{
/* input has been changed by modifier, use it */
gui_input_replace_input (buffer, new_input);
if (!buffer->input_buffer
|| strcmp (new_input, buffer->input_buffer) != 0)
{
/* input has been changed by modifier, use it */
gui_input_replace_input (buffer, new_input);
}
free (new_input);
}
free (new_input);
}
/* send signal */
@ -1339,10 +1343,10 @@ gui_input_hotlist_clear (struct t_gui_buffer *buffer)
*/
void
gui_input_grab_key (struct t_gui_buffer *buffer)
gui_input_grab_key (struct t_gui_buffer *buffer, const char *delay)
{
if (buffer->input)
gui_key_grab_init (0);
gui_key_grab_init (0, delay);
}
/*
@ -1351,10 +1355,10 @@ gui_input_grab_key (struct t_gui_buffer *buffer)
*/
void
gui_input_grab_key_command (struct t_gui_buffer *buffer)
gui_input_grab_key_command (struct t_gui_buffer *buffer, const char *delay)
{
if (buffer->input)
gui_key_grab_init (1);
gui_key_grab_init (1, delay);
}
/*

View File

@ -70,8 +70,10 @@ extern void gui_input_jump_last_buffer (struct t_gui_buffer *buffer);
extern void gui_input_jump_previously_visited_buffer (struct t_gui_buffer *buffer);
extern void gui_input_jump_next_visited_buffer (struct t_gui_buffer *buffer);
extern void gui_input_hotlist_clear (struct t_gui_buffer *buffer);
extern void gui_input_grab_key (struct t_gui_buffer *buffer);
extern void gui_input_grab_key_command (struct t_gui_buffer *buffer);
extern void gui_input_grab_key (struct t_gui_buffer *buffer,
const char *delay);
extern void gui_input_grab_key_command (struct t_gui_buffer *buffer,
const char *delay);
extern void gui_input_scroll_unread (struct t_gui_buffer *buffer);
extern void gui_input_set_unread ();
extern void gui_input_set_unread_current (struct t_gui_buffer *buffer);

View File

@ -32,6 +32,7 @@
#include <time.h>
#include "../core/weechat.h"
#include "../core/wee-hashtable.h"
#include "../core/wee-hdata.h"
#include "../core/wee-hook.h"
#include "../core/wee-infolist.h"
@ -41,11 +42,15 @@
#include "../core/wee-utf8.h"
#include "../plugins/plugin.h"
#include "gui-key.h"
#include "gui-bar.h"
#include "gui-bar-window.h"
#include "gui-buffer.h"
#include "gui-chat.h"
#include "gui-color.h"
#include "gui-completion.h"
#include "gui-cursor.h"
#include "gui-input.h"
#include "gui-mouse.h"
#include "gui-window.h"
@ -57,14 +62,15 @@ int gui_keys_count[GUI_KEY_NUM_CONTEXTS]; /* keys number */
int gui_default_keys_count[GUI_KEY_NUM_CONTEXTS]; /* default keys number */
char *gui_key_context_string[GUI_KEY_NUM_CONTEXTS] =
{ "default", "search" };
{ "default", "search", "cursor", "mouse" };
int gui_key_verbose = 0; /* 1 to see some messages */
char gui_key_combo_buffer[128]; /* buffer used for combos */
char gui_key_combo_buffer[256]; /* buffer used for combos */
int gui_key_grab = 0; /* 1 if grab mode enabled (alt-k) */
int gui_key_grab_count = 0; /* number of keys pressed in grab mode */
int gui_key_grab_command = 0; /* grab command bound to key? */
int gui_key_grab_delay = 0; /* delay for grab (default is 500) */
int *gui_key_buffer = NULL; /* input buffer (for paste detection) */
int gui_key_buffer_alloc = 0; /* input buffer allocated size */
@ -136,6 +142,9 @@ gui_key_search_context (const char *context)
int
gui_key_get_current_context ()
{
if (gui_cursor_mode)
return GUI_KEY_CONTEXT_CURSOR;
if (gui_current_window
&& (gui_current_window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED))
return GUI_KEY_CONTEXT_SEARCH;
@ -148,24 +157,44 @@ gui_key_get_current_context ()
*/
void
gui_key_grab_init (int grab_command)
gui_key_grab_init (int grab_command, const char *delay)
{
long milliseconds;
char *error;
gui_key_grab = 1;
gui_key_grab_count = 0;
gui_key_grab_command = grab_command;
gui_key_grab_delay = GUI_KEY_GRAB_DELAY_DEFAULT;
if (delay != NULL)
{
error = NULL;
milliseconds = strtol (delay, &error, 10);
if (error && !error[0] && (milliseconds >= 0))
{
gui_key_grab_delay = milliseconds;
if (gui_key_grab_delay == 0)
gui_key_grab_delay = 1;
}
}
}
/*
* gui_key_grab_end: insert grabbed key in input buffer
* gui_key_grab_end_timer_cb: insert grabbed key in input buffer
*/
void
gui_key_grab_end ()
int
gui_key_grab_end_timer_cb (void *data, int remaining_calls)
{
char *expanded_key;
struct t_gui_key *ptr_key;
/* get expanded name (for example: ^U => ctrl-u) */
/* make C compiler happy */
(void) data;
(void) remaining_calls;
/* get expanded name (for example: \x01+U => ctrl-u) */
expanded_key = gui_key_get_expanded_name (gui_key_combo_buffer);
if (expanded_key)
@ -195,11 +224,13 @@ gui_key_grab_end ()
gui_key_grab_count = 0;
gui_key_grab_command = 0;
gui_key_combo_buffer[0] = '\0';
return WEECHAT_RC_OK;
}
/*
* gui_key_get_internal_code: get internal code from user key name
* for example: return "^R" for "ctrl-R"
* for example: return "\x01+R" for "ctrl-R"
*/
char *
@ -214,17 +245,17 @@ gui_key_get_internal_code (const char *key)
{
if (strncmp (key, "meta2-", 6) == 0)
{
strcat (result, "^[[");
strcat (result, "\x01[[");
key += 6;
}
if (strncmp (key, "meta-", 5) == 0)
{
strcat (result, "^[");
strcat (result, "\x01[");
key += 5;
}
else if (strncmp (key, "ctrl-", 5) == 0)
{
strcat (result, "^");
strcat (result, "\x01");
key += 5;
}
else
@ -242,7 +273,7 @@ gui_key_get_internal_code (const char *key)
/*
* gui_key_get_expanded_name: get expanded name from internal key code
* for example: return "ctrl-R" for "^R"
* for example: return "ctrl-R" for "\x01+R"
*/
char *
@ -259,17 +290,17 @@ gui_key_get_expanded_name (const char *key)
result[0] = '\0';
while (key[0])
{
if (strncmp (key, "^[[", 3) == 0)
if (strncmp (key, "\x01[[", 3) == 0)
{
strcat (result, "meta2-");
key += 3;
}
if (strncmp (key, "^[", 2) == 0)
if (strncmp (key, "\x01[", 2) == 0)
{
strcat (result, "meta-");
key += 2;
}
else if ((key[0] == '^') && (key[1]))
else if ((key[0] == '\x01') && (key[1]))
{
strcat (result, "ctrl-");
key++;
@ -403,8 +434,10 @@ gui_key_new (struct t_gui_buffer *buffer, int context, const char *key,
if (gui_key_verbose)
{
gui_chat_printf (NULL,
_("New key binding: %s%s => %s%s"),
gui_chat_printf (gui_current_window->buffer,
_("New key binding (context \"%s\"): "
"%s%s => %s%s"),
gui_key_context_string[context],
(expanded_name) ? expanded_name : new_key->key,
GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
GUI_COLOR(GUI_COLOR_CHAT),
@ -443,10 +476,13 @@ gui_key_search (struct t_gui_key *keys, const char *key)
*/
int
gui_key_cmp (const char *key, const char *search)
gui_key_cmp (const char *key, const char *search, int context)
{
int diff;
if (context == GUI_KEY_CONTEXT_MOUSE)
return strcmp (key, search);
while (search[0])
{
diff = utf8_charcmp (key, search);
@ -472,8 +508,14 @@ gui_key_search_part (struct t_gui_buffer *buffer, int context,
for (ptr_key = (buffer) ? buffer->keys : gui_keys[context]; ptr_key;
ptr_key = ptr_key->next_key)
{
if (ptr_key->key && (gui_key_cmp (ptr_key->key, key) == 0))
return ptr_key;
if (ptr_key->key
&& (((context != GUI_KEY_CONTEXT_CURSOR)
&& (context != GUI_KEY_CONTEXT_MOUSE))
|| (ptr_key->key[0] != '@')))
{
if (gui_key_cmp (ptr_key->key, key, context) == 0)
return ptr_key;
}
}
/* key not found */
@ -551,6 +593,173 @@ gui_key_unbind (struct t_gui_buffer *buffer, int context, const char *key,
return (ptr_key != NULL);
}
/*
* gui_key_focus_matching: return 1 if area in key is matching focus area on
* screen (cursor/mouse)
*/
int
gui_key_focus_matching (const char *key,
struct t_gui_cursor_info *cursor_info)
{
int match, area_chat;
char *area_bar, *area_item, *pos;
if (key[1] == '*')
return 1;
match = 0;
pos = strchr (key, ':');
if (pos)
{
area_chat = 0;
area_bar = NULL;
area_item = NULL;
if (strncmp (key + 1, "chat:", 5) == 0)
area_chat = 1;
else if (strncmp (key + 1, "bar(", 4) == 0)
{
area_bar = string_strndup (key + 5, pos - key - 6);
}
else if (strncmp (key + 1, "item(", 5) == 0)
{
area_item = string_strndup (key + 6, pos - key - 7);
}
if (area_chat || area_bar || area_item)
{
if (area_chat && cursor_info->chat)
{
match = 1;
}
else if (area_bar && cursor_info->bar_window
&& ((strcmp (area_bar, "*") == 0)
|| (strcmp (area_bar, (cursor_info->bar_window)->bar->name) == 0)))
{
match = 1;
}
else if (area_item && cursor_info->bar_item
&& ((strcmp (area_item, "*") == 0)
|| (strcmp (area_item, cursor_info->bar_item) == 0)))
{
match = 1;
}
}
if (area_bar)
free (area_bar);
if (area_item)
free (area_item);
}
return match;
}
/*
* gui_key_focus_command: run command according to focus
* return 1 if a command was executed, otherwise 0
*/
int
gui_key_focus_command (const char *key, int context,
int focus_specific, int focus_any,
struct t_gui_cursor_info *cursor_info)
{
struct t_gui_key *ptr_key;
int i, errors;
char *pos, *pos_joker, *command, **commands;
struct t_hashtable *hashtable;
for (ptr_key = gui_keys[context]; ptr_key;
ptr_key = ptr_key->next_key)
{
if (ptr_key->key && (ptr_key->key[0] == '@'))
{
pos = strchr (ptr_key->key, ':');
if (pos)
{
pos_joker = strchr (ptr_key->key, '*');
if (!focus_specific && (!pos_joker || (pos_joker > pos)))
continue;
if (!focus_any && pos_joker && (pos_joker < pos))
continue;
pos++;
if (gui_key_cmp (pos, key, context) == 0)
{
if (gui_key_focus_matching (ptr_key->key, cursor_info))
{
hashtable = hook_focus_get_data (cursor_info);
if (gui_mouse_debug)
{
gui_chat_printf (NULL, "Hashtable focus: %s",
hashtable_get_string (hashtable,
"keys_values"));
}
command = string_replace_with_hashtable (ptr_key->command,
hashtable,
&errors);
if (command)
{
if (errors == 0)
{
if ((context == GUI_KEY_CONTEXT_CURSOR)
&& gui_cursor_debug)
{
gui_input_delete_line (gui_current_window->buffer);
}
commands = string_split_command (command,
';');
if (commands)
{
for (i = 0; commands[i]; i++)
{
input_data (gui_current_window->buffer, commands[i]);
}
string_free_split_command (commands);
}
}
free (command);
}
if (hashtable)
hashtable_free (hashtable);
return 1;
}
}
}
}
}
return 0;
}
/*
* gui_key_focus: treat key pressed in cursor or mouse mode,
* looking for keys: "{area}key" in context "cursor" or "mouse"
* return 1 if a command was executed, otherwise 0
*/
int
gui_key_focus (const char *key, int context)
{
struct t_gui_cursor_info cursor_info;
if (context == GUI_KEY_CONTEXT_MOUSE)
{
gui_cursor_get_info (gui_mouse_event_x[0], gui_mouse_event_y[0],
&cursor_info);
}
else
{
gui_cursor_get_info (gui_cursor_x, gui_cursor_y, &cursor_info);
}
if (gui_key_focus_command (key, context, 1, 0, &cursor_info))
return 1;
return gui_key_focus_command (key, context, 0, 1, &cursor_info);
}
/*
* gui_key_pressed: treat new key pressed
* return: 1 if key should be added to input buffer
@ -560,22 +769,52 @@ gui_key_unbind (struct t_gui_buffer *buffer, int context, const char *key,
int
gui_key_pressed (const char *key_str)
{
int first_key, context;
int i, first_key, context, length, length_key;
struct t_gui_key *ptr_key;
char *buffer_before_key;
char **commands, **ptr_cmd;
char **commands;
const char *mouse_key;
/* add key to buffer */
first_key = (gui_key_combo_buffer[0] == '\0');
strcat (gui_key_combo_buffer, key_str);
length = strlen (gui_key_combo_buffer);
length_key = strlen (key_str);
if (length + length_key + 1 <= (int)sizeof (gui_key_combo_buffer))
strcat (gui_key_combo_buffer, key_str);
/* if we are in "show mode", increase counter and return */
if (gui_key_grab)
{
if (gui_key_grab_count == 0)
{
hook_timer (NULL, gui_key_grab_delay, 0, 1,
&gui_key_grab_end_timer_cb, NULL);
}
gui_key_grab_count++;
return 0;
}
/* mode "mouse grab" (mouse event pending) */
if (gui_mouse_grab)
{
mouse_key = gui_mouse_grab_code2key (gui_key_combo_buffer);
if (mouse_key)
{
gui_key_combo_buffer[0] = '\0';
strcat (gui_key_combo_buffer, mouse_key);
gui_mouse_grab_end ();
if (gui_key_combo_buffer[0])
{
(void) gui_key_focus (gui_key_combo_buffer,
GUI_KEY_CONTEXT_MOUSE);
gui_key_combo_buffer[0] = '\0';
gui_mouse_reset_event ();
}
}
return 0;
}
ptr_key = NULL;
context = gui_key_get_current_context ();
switch (context)
{
@ -601,6 +840,11 @@ gui_key_pressed (const char *key_str)
gui_key_combo_buffer);
}
break;
case GUI_KEY_CONTEXT_CURSOR:
ptr_key = gui_key_search_part (NULL,
GUI_KEY_CONTEXT_CURSOR,
gui_key_combo_buffer);
break;
}
/* if key is found, then execute action */
@ -609,29 +853,30 @@ gui_key_pressed (const char *key_str)
if (strcmp (ptr_key->key, gui_key_combo_buffer) == 0)
{
/* exact combo found => execute function or command */
buffer_before_key =
(gui_current_window->buffer->input_buffer) ?
strdup (gui_current_window->buffer->input_buffer) : strdup ("");
gui_key_combo_buffer[0] = '\0';
if (ptr_key->command)
{
commands = string_split_command (ptr_key->command, ';');
if (commands)
{
for (ptr_cmd = commands; *ptr_cmd; ptr_cmd++)
for (i = 0; commands[i]; i++)
{
input_data (gui_current_window->buffer,
*ptr_cmd);
input_data (gui_current_window->buffer, commands[i]);
}
string_free_split_command (commands);
}
}
if (buffer_before_key)
free (buffer_before_key);
}
return 0;
}
else if (context == GUI_KEY_CONTEXT_CURSOR)
{
if (gui_key_focus (gui_key_combo_buffer, GUI_KEY_CONTEXT_CURSOR))
{
gui_key_combo_buffer[0] = '\0';
return 0;
}
}
gui_key_combo_buffer[0] = '\0';
@ -829,6 +1074,8 @@ struct t_hdata *
gui_key_hdata_key_cb (void *data, const char *hdata_name)
{
struct t_hdata *hdata;
int i;
char str_list[128];
/* make C compiler happy */
(void) data;
@ -840,10 +1087,29 @@ gui_key_hdata_key_cb (void *data, const char *hdata_name)
HDATA_VAR(struct t_gui_key, command, STRING, NULL);
HDATA_VAR(struct t_gui_key, prev_key, POINTER, hdata_name);
HDATA_VAR(struct t_gui_key, next_key, POINTER, hdata_name);
HDATA_LIST(gui_keys);
HDATA_LIST(last_gui_key);
HDATA_LIST(gui_default_keys);
HDATA_LIST(last_gui_default_key);
for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++)
{
snprintf (str_list, sizeof (str_list),
"gui_keys%s%s",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]);
hdata_new_list(hdata, str_list, &gui_keys[i]);
snprintf (str_list, sizeof (str_list),
"last_gui_key%s%s",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]);
hdata_new_list(hdata, str_list, &last_gui_key[i]);
snprintf (str_list, sizeof (str_list),
"gui_default_keys%s%s",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]);
hdata_new_list(hdata, str_list, &gui_default_keys[i]);
snprintf (str_list, sizeof (str_list),
"last_gui_default_key%s%s",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_",
(i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]);
hdata_new_list(hdata, str_list, &last_gui_default_key[i]);
}
}
return hdata;
}

View File

@ -22,10 +22,14 @@
#define GUI_KEY_BUFFER_BLOCK_SIZE 256
#define GUI_KEY_GRAB_DELAY_DEFAULT 500
enum t_gui_key_context
{
GUI_KEY_CONTEXT_DEFAULT = 0,
GUI_KEY_CONTEXT_SEARCH,
GUI_KEY_CONTEXT_CURSOR,
GUI_KEY_CONTEXT_MOUSE,
/* number of key contexts */
GUI_KEY_NUM_CONTEXTS,
};
@ -62,8 +66,7 @@ extern time_t gui_key_last_activity_time;
extern void gui_key_init ();
extern int gui_key_search_context (const char *context);
extern void gui_key_grab_init (int grab_command);
extern void gui_key_grab_end ();
extern void gui_key_grab_init (int grab_command, const char *delay);
extern char *gui_key_get_internal_code (const char *key);
extern char *gui_key_get_expanded_name (const char *key);
extern struct t_gui_key *gui_key_new (struct t_gui_buffer *buffer,

74
src/gui/gui-mouse.c Normal file
View File

@ -0,0 +1,74 @@
/*
* Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* gui-mouse.c: functions for mouse (used by all GUI)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "../core/weechat.h"
#include "gui-chat.h"
int gui_mouse_enabled = 0; /* 1 if mouse support is enabled */
int gui_mouse_debug = 0; /* debug mode for mouse */
int gui_mouse_grab = 0; /* 1 if grab mouse code enabled */
int gui_mouse_event_index = 0; /* index for x/y in array (0 or 1) */
int gui_mouse_event_x[2] = { 0, 0 }; /* position of latest mouse event: */
/* (on click, on release) */
int gui_mouse_event_y[2] = { 0, 0 }; /* position of latest mouse event */
/* (on click, on release) */
char gui_mouse_event_button = '#'; /* button pressed (or wheel) */
/*
* gui_mouse_debug_toggle: toggle debug for mouse events
*/
void
gui_mouse_debug_toggle ()
{
gui_mouse_debug ^= 1;
if (gui_mouse_debug)
gui_chat_printf (NULL, _("Debug enabled for mouse"));
else
gui_chat_printf (NULL, _("Debug disabled for mouse"));
}
/*
* gui_mouse_reset_event: reset event values
*/
void
gui_mouse_reset_event ()
{
gui_mouse_event_index = 0;
gui_mouse_event_x[0] = 0;
gui_mouse_event_y[0] = 0;
gui_mouse_event_x[1] = 0;
gui_mouse_event_y[1] = 0;
gui_mouse_event_button = '#';
}

47
src/gui/gui-mouse.h Normal file
View File

@ -0,0 +1,47 @@
/*
* Copyright (C) 2011 Sebastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_GUI_MOUSE_H
#define __WEECHAT_GUI_MOUSE_H 1
/* mouse variables */
extern int gui_mouse_enabled;
extern int gui_mouse_debug;
extern int gui_mouse_grab;
extern int gui_mouse_event_index;
extern int gui_mouse_event_x[2];
extern int gui_mouse_event_y[2];
extern char gui_mouse_event_button;
/* mouse functions */
extern void gui_mouse_debug_toggle ();
extern void gui_mouse_reset_event ();
/* mouse functions (GUI dependent) */
extern void gui_mouse_enable ();
extern void gui_mouse_disable ();
extern void gui_mouse_display_state ();
extern void gui_mouse_grab_init ();
extern const char *gui_mouse_grab_code2key (const char *code);
extern void gui_mouse_grab_end ();
#endif /* __WEECHAT_GUI_MOUSE_H */

View File

@ -70,8 +70,35 @@ struct t_gui_layout_window *gui_window_layout_before_zoom = NULL;
/* layout before zooming on a window */
int gui_window_layout_id_current_window = -1;
/* current window id before zoom */
int gui_window_cursor_x = 0; /* cursor pos on screen */
int gui_window_cursor_y = 0; /* cursor pos on screen */
/*
* gui_window_search_by_xy: get pointer of window displayed at (x,y)
* return NULL if no window is found
*/
struct t_gui_window *
gui_window_search_by_xy (int x, int y)
{
struct t_gui_window *ptr_window;
for (ptr_window = gui_windows; ptr_window;
ptr_window = ptr_window->next_window)
{
if ((x >= ptr_window->win_x) && (y >= ptr_window->win_y)
&& (x <= ptr_window->win_x + ptr_window->win_width - 1)
&& (y <= ptr_window->win_y + ptr_window->win_height - 1))
{
return ptr_window;
}
}
/* no window at this location */
return NULL;
}
/*
* gui_window_ask_refresh: set "gui_window_refresh_needed" flag
*/
@ -1293,8 +1320,8 @@ gui_window_hdata_window_cb (void *data, const char *hdata_name)
HDATA_VAR(struct t_gui_window, win_chat_height, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_cursor_x, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, win_chat_cursor_y, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, bar_windows, POINTER, NULL);
HDATA_VAR(struct t_gui_window, last_bar_window, POINTER, NULL);
HDATA_VAR(struct t_gui_window, bar_windows, POINTER, "bar_window");
HDATA_VAR(struct t_gui_window, last_bar_window, POINTER, "bar_window");
HDATA_VAR(struct t_gui_window, refresh_needed, INTEGER, NULL);
HDATA_VAR(struct t_gui_window, gui_objects, POINTER, NULL);
HDATA_VAR(struct t_gui_window, buffer, POINTER, "buffer");

View File

@ -27,10 +27,12 @@
#define GUI_WINDOW_CHAT_MIN_HEIGHT 2
struct t_infolist;
struct t_gui_bar_window;
extern int gui_init_ok;
extern int gui_ok;
extern int gui_window_refresh_needed;
extern int gui_window_cursor_x, gui_window_cursor_y;
/* window structures */
@ -116,6 +118,8 @@ extern struct t_gui_window *gui_current_window;
extern struct t_gui_window_tree *gui_windows_tree;
/* window functions */
extern struct t_gui_window *gui_window_search_by_xy (int x, int y);
extern void gui_window_ask_refresh (int refresh);
extern int gui_window_tree_init (struct t_gui_window *window);
extern void gui_window_tree_node_to_leaf (struct t_gui_window_tree *node,
@ -200,6 +204,7 @@ 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);
extern void gui_window_move_cursor ();
extern void gui_window_term_display_infos ();
extern void gui_window_objects_print_log (struct t_gui_window *window);

View File

@ -492,6 +492,49 @@ irc_bar_item_input_prompt (void *data, struct t_gui_bar_item *item,
return NULL;
}
/*
* irc_bar_item_focus_buffer_nicklist: focus on nicklist
*/
struct t_hashtable *
irc_bar_item_focus_buffer_nicklist (void *data,
struct t_hashtable *info)
{
long unsigned int value;
int rc;
struct t_gui_buffer *buffer;
struct t_irc_nick *ptr_nick;
const char *str_buffer, *nick;
str_buffer = weechat_hashtable_get (info, "_buffer");
rc = sscanf (str_buffer, "%lx", &value);
if ((rc == EOF) || (rc == 0))
return NULL;
buffer = (struct t_gui_buffer *)value;
IRC_BUFFER_GET_SERVER_CHANNEL(buffer);
/* make C compiler happy */
(void) data;
if (ptr_channel)
{
nick = weechat_hashtable_get (info, "nick");
if (nick)
{
ptr_nick = irc_nick_search (ptr_channel, nick);
if (ptr_nick && ptr_nick->host)
{
weechat_hashtable_set (info, "host", ptr_nick->host);
return info;
}
}
}
return NULL;
}
/*
* irc_bar_item_init: initialize IRC bar items
*/
@ -506,4 +549,6 @@ irc_bar_item_init ()
weechat_bar_item_new ("irc_channel", &irc_bar_item_channel, NULL);
weechat_bar_item_new ("lag", &irc_bar_item_lag, NULL);
weechat_bar_item_new ("input_prompt", &irc_bar_item_input_prompt, NULL);
weechat_hook_focus ("500|buffer_nicklist",
&irc_bar_item_focus_buffer_nicklist, NULL);
}

View File

@ -50,6 +50,7 @@
#include "../gui/gui-chat.h"
#include "../gui/gui-completion.h"
#include "../gui/gui-color.h"
#include "../gui/gui-cursor.h"
#include "../gui/gui-filter.h"
#include "../gui/gui-history.h"
#include "../gui/gui-hotlist.h"
@ -365,6 +366,11 @@ plugin_api_info_get_internal (void *data, const char *info_name,
snprintf (value, sizeof (value), "%d", gui_filters_enabled);
return value;
}
else if (string_strcasecmp (info_name, "cursor_mode") == 0)
{
snprintf (value, sizeof (value), "%d", gui_cursor_mode);
return value;
}
/* info not found */
return NULL;
@ -997,6 +1003,8 @@ plugin_api_init ()
&plugin_api_info_get_internal, NULL);
hook_info (NULL, "filters_enabled", N_("1 if filters are enabled"), NULL,
&plugin_api_info_get_internal, NULL);
hook_info (NULL, "cursor_mode", N_("1 if cursor mode is enabled"), NULL,
&plugin_api_info_get_internal, NULL);
/* WeeChat core infolist hooks */
hook_infolist (NULL, "bar", N_("list of bars"),
@ -1064,6 +1072,8 @@ plugin_api_init ()
&gui_bar_hdata_bar_cb, NULL);
hook_hdata (NULL, "bar_item", N_("bar item"),
&gui_bar_item_hdata_bar_item_cb, NULL);
hook_hdata (NULL, "bar_window", N_("bar window"),
&gui_bar_window_hdata_bar_window_cb, NULL);
hook_hdata (NULL, "buffer", N_("buffer"),
&gui_buffer_hdata_buffer_cb, NULL);
hook_hdata (NULL, "completion", N_("structure with completion"),

View File

@ -607,6 +607,7 @@ plugin_load (const char *filename)
new_plugin->hook_info_hashtable = &hook_info_hashtable;
new_plugin->hook_infolist = &hook_infolist;
new_plugin->hook_hdata = &hook_hdata;
new_plugin->hook_focus = &hook_focus;
new_plugin->unhook = &unhook;
new_plugin->unhook_all = &unhook_all_plugin;

View File

@ -4692,6 +4692,76 @@ weechat_lua_api_hook_infolist (lua_State *L)
LUA_RETURN_STRING_FREE(result);
}
/*
* weechat_lua_api_hook_focus_cb: callback for focus hooked
*/
struct t_hashtable *
weechat_lua_api_hook_focus_cb (void *data,
struct t_hashtable *info)
{
struct t_script_callback *script_callback;
void *lua_argv[2];
char empty_arg[1] = { '\0' };
script_callback = (struct t_script_callback *)data;
if (script_callback && script_callback->function && script_callback->function[0])
{
lua_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
lua_argv[1] = info;
return (struct t_hashtable *)weechat_lua_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_HASHTABLE,
script_callback->function,
"sh", lua_argv);
}
return NULL;
}
/*
* weechat_lua_api_hook_focus: hook a focus
*/
static int
weechat_lua_api_hook_focus (lua_State *L)
{
const char *area, *function, *data;
char *result;
int n;
/* make C compiler happy */
(void) L;
if (!lua_current_script || !lua_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(LUA_CURRENT_SCRIPT_NAME, "hook_focus");
LUA_RETURN_EMPTY;
}
n = lua_gettop (lua_current_interpreter);
if (n < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(LUA_CURRENT_SCRIPT_NAME, "hook_focus");
LUA_RETURN_EMPTY;
}
area = lua_tostring (lua_current_interpreter, -3);
function = lua_tostring (lua_current_interpreter, -2);
data = lua_tostring (lua_current_interpreter, -1);
result = script_ptr2str (script_api_hook_focus (weechat_lua_plugin,
lua_current_script,
area,
&weechat_lua_api_hook_focus_cb,
function,
data));
LUA_RETURN_STRING_FREE(result);
}
/*
* weechat_lua_api_unhook: unhook something
*/
@ -8322,6 +8392,7 @@ const struct luaL_reg weechat_lua_api_funcs[] = {
{ "hook_info", &weechat_lua_api_hook_info },
{ "hook_info_hashtable", &weechat_lua_api_hook_info_hashtable },
{ "hook_infolist", &weechat_lua_api_hook_infolist },
{ "hook_focus", &weechat_lua_api_hook_focus },
{ "unhook", &weechat_lua_api_unhook },
{ "unhook_all", &weechat_lua_api_unhook_all },
{ "buffer_new", &weechat_lua_api_buffer_new },

View File

@ -4266,6 +4266,72 @@ XS (XS_weechat_api_hook_infolist)
PERL_RETURN_STRING_FREE(result);
}
/*
* weechat_perl_api_hook_focus_cb: callback for focus hooked
*/
struct t_hashtable *
weechat_perl_api_hook_focus_cb (void *data,
struct t_hashtable *info)
{
struct t_script_callback *script_callback;
void *perl_argv[2];
char empty_arg[1] = { '\0' };
script_callback = (struct t_script_callback *)data;
if (script_callback && script_callback->function && script_callback->function[0])
{
perl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
perl_argv[1] = info;
return (struct t_hashtable *)weechat_perl_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_HASHTABLE,
script_callback->function,
"sh", perl_argv);
}
return NULL;
}
/*
* weechat::hook_focus: hook a focus
*/
XS (XS_weechat_api_hook_focus)
{
char *result, *area, *function, *data;
dXSARGS;
/* make C compiler happy */
(void) cv;
if (!perl_current_script || !perl_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PERL_CURRENT_SCRIPT_NAME, "hook_focus");
PERL_RETURN_EMPTY;
}
if (items < 3)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PERL_CURRENT_SCRIPT_NAME, "hook_focus");
PERL_RETURN_EMPTY;
}
area = SvPV (ST (0), PL_na);
function = SvPV (ST (1), PL_na);
data = SvPV (ST (2), PL_na);
result = script_ptr2str (script_api_hook_focus (weechat_perl_plugin,
perl_current_script,
area,
&weechat_perl_api_hook_focus_cb,
function,
data));
PERL_RETURN_STRING_FREE(result);
}
/*
* weechat::unhook: unhook something
*/
@ -7213,6 +7279,7 @@ weechat_perl_api_init (pTHX)
newXS ("weechat::hook_info", XS_weechat_api_hook_info, "weechat");
newXS ("weechat::hook_info_hashtable", XS_weechat_api_hook_info_hashtable, "weechat");
newXS ("weechat::hook_infolist", XS_weechat_api_hook_infolist, "weechat");
newXS ("weechat::hook_focus", XS_weechat_api_hook_focus, "weechat");
newXS ("weechat::unhook", XS_weechat_api_unhook, "weechat");
newXS ("weechat::unhook_all", XS_weechat_api_unhook_all, "weechat");
newXS ("weechat::buffer_new", XS_weechat_api_buffer_new, "weechat");

View File

@ -3656,15 +3656,15 @@ weechat_python_api_hook_print (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_print (weechat_python_plugin,
python_current_script,
script_str2ptr (buffer),
tags,
message,
strip_colors,
&weechat_python_api_hook_print_cb,
function,
data));
result = script_ptr2str (script_api_hook_print (weechat_python_plugin,
python_current_script,
script_str2ptr (buffer),
tags,
message,
strip_colors,
&weechat_python_api_hook_print_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -4012,12 +4012,12 @@ weechat_python_api_hook_config (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_config (weechat_python_plugin,
python_current_script,
option,
&weechat_python_api_hook_config_cb,
function,
data));
result = script_ptr2str (script_api_hook_config (weechat_python_plugin,
python_current_script,
option,
&weechat_python_api_hook_config_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -4099,13 +4099,13 @@ weechat_python_api_hook_completion (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_completion (weechat_python_plugin,
python_current_script,
completion,
description,
&weechat_python_api_hook_completion_cb,
function,
data));
result = script_ptr2str (script_api_hook_completion (weechat_python_plugin,
python_current_script,
completion,
description,
&weechat_python_api_hook_completion_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -4208,12 +4208,12 @@ weechat_python_api_hook_modifier (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_modifier (weechat_python_plugin,
python_current_script,
modifier,
&weechat_python_api_hook_modifier_cb,
function,
data));
result = script_ptr2str (script_api_hook_modifier (weechat_python_plugin,
python_current_script,
modifier,
&weechat_python_api_hook_modifier_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -4313,14 +4313,14 @@ weechat_python_api_hook_info (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_info (weechat_python_plugin,
python_current_script,
info_name,
description,
args_description,
&weechat_python_api_hook_info_cb,
function,
data));
result = script_ptr2str (script_api_hook_info (weechat_python_plugin,
python_current_script,
info_name,
description,
args_description,
&weechat_python_api_hook_info_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -4397,15 +4397,15 @@ weechat_python_api_hook_info_hashtable (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_info_hashtable (weechat_python_plugin,
python_current_script,
info_name,
description,
args_description,
output_description,
&weechat_python_api_hook_info_hashtable_cb,
function,
data));
result = script_ptr2str (script_api_hook_info_hashtable (weechat_python_plugin,
python_current_script,
info_name,
description,
args_description,
output_description,
&weechat_python_api_hook_info_hashtable_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -4481,15 +4481,82 @@ weechat_python_api_hook_infolist (PyObject *self, PyObject *args)
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str(script_api_hook_infolist (weechat_python_plugin,
python_current_script,
infolist_name,
description,
pointer_description,
args_description,
&weechat_python_api_hook_infolist_cb,
function,
data));
result = script_ptr2str (script_api_hook_infolist (weechat_python_plugin,
python_current_script,
infolist_name,
description,
pointer_description,
args_description,
&weechat_python_api_hook_infolist_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
/*
* weechat_python_api_hook_focus_cb: callback for focus hooked
*/
struct t_hashtable *
weechat_python_api_hook_focus_cb (void *data,
struct t_hashtable *info)
{
struct t_script_callback *script_callback;
void *python_argv[2];
char empty_arg[1] = { '\0' };
script_callback = (struct t_script_callback *)data;
if (script_callback && script_callback->function && script_callback->function[0])
{
python_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
python_argv[1] = info;
return (struct t_hashtable *)weechat_python_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_HASHTABLE,
script_callback->function,
"sh", python_argv);
}
return NULL;
}
/*
* weechat_python_api_hook_focus: hook a focus
*/
static PyObject *
weechat_python_api_hook_focus (PyObject *self, PyObject *args)
{
char *area, *function, *data, *result;
PyObject *object;
/* make C compiler happy */
(void) self;
if (!python_current_script || !python_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(PYTHON_CURRENT_SCRIPT_NAME, "hook_focus");
PYTHON_RETURN_EMPTY;
}
area = NULL;
function = NULL;
data = NULL;
if (!PyArg_ParseTuple (args, "sss", &area, &function, &data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(PYTHON_CURRENT_SCRIPT_NAME, "hook_focus");
PYTHON_RETURN_EMPTY;
}
result = script_ptr2str (script_api_hook_focus (weechat_python_plugin,
python_current_script,
area,
&weechat_python_api_hook_focus_cb,
function,
data));
PYTHON_RETURN_STRING_FREE(result);
}
@ -7555,6 +7622,7 @@ PyMethodDef weechat_python_funcs[] =
{ "hook_info", &weechat_python_api_hook_info, METH_VARARGS, "" },
{ "hook_info_hashtable", &weechat_python_api_hook_info_hashtable, METH_VARARGS, "" },
{ "hook_infolist", &weechat_python_api_hook_infolist, METH_VARARGS, "" },
{ "hook_focus", &weechat_python_api_hook_focus, METH_VARARGS, "" },
{ "unhook", &weechat_python_api_unhook, METH_VARARGS, "" },
{ "unhook_all", &weechat_python_api_unhook_all, METH_VARARGS, "" },
{ "buffer_new", &weechat_python_api_buffer_new, METH_VARARGS, "" },

View File

@ -4873,6 +4873,78 @@ weechat_ruby_api_hook_infolist (VALUE class, VALUE infolist_name,
RUBY_RETURN_STRING_FREE(result);
}
/*
* weechat_ruby_api_hook_focus_cb: callback for focus hooked
*/
struct t_hashtable *
weechat_ruby_api_hook_focus_cb (void *data,
struct t_hashtable *info)
{
struct t_script_callback *script_callback;
void *ruby_argv[2];
char empty_arg[1] = { '\0' };
script_callback = (struct t_script_callback *)data;
if (script_callback && script_callback->function && script_callback->function[0])
{
ruby_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
ruby_argv[1] = info;
return (struct t_hashtable *)weechat_ruby_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_HASHTABLE,
script_callback->function,
"sh", ruby_argv);
}
return NULL;
}
/*
* weechat_ruby_api_hook_focus: hook a focus
*/
static VALUE
weechat_ruby_api_hook_focus (VALUE class, VALUE area, VALUE function,
VALUE data)
{
char *c_area, *c_function, *c_data, *result;
VALUE return_value;
/* make C compiler happy */
(void) class;
if (!ruby_current_script || !ruby_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(RUBY_CURRENT_SCRIPT_NAME, "hook_focus");
RUBY_RETURN_EMPTY;
}
if (NIL_P (area) || NIL_P (function) || NIL_P (data))
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(RUBY_CURRENT_SCRIPT_NAME, "hook_focus");
RUBY_RETURN_EMPTY;
}
Check_Type (area, T_STRING);
Check_Type (function, T_STRING);
Check_Type (data, T_STRING);
c_area = StringValuePtr (area);
c_function = StringValuePtr (function);
c_data = StringValuePtr (data);
result = script_ptr2str (script_api_hook_focus (weechat_ruby_plugin,
ruby_current_script,
c_area,
&weechat_ruby_api_hook_focus_cb,
c_function,
c_data));
RUBY_RETURN_STRING_FREE(result);
}
/*
* weechat_ruby_api_unhook: unhook something
*/
@ -8279,6 +8351,7 @@ weechat_ruby_api_init (VALUE ruby_mWeechat)
rb_define_module_function (ruby_mWeechat, "hook_info", &weechat_ruby_api_hook_info, 5);
rb_define_module_function (ruby_mWeechat, "hook_info_hashtable", &weechat_ruby_api_hook_info_hashtable, 6);
rb_define_module_function (ruby_mWeechat, "hook_infolist", &weechat_ruby_api_hook_infolist, 6);
rb_define_module_function (ruby_mWeechat, "hook_focus", &weechat_ruby_api_hook_focus, 3);
rb_define_module_function (ruby_mWeechat, "unhook", &weechat_ruby_api_unhook, 1);
rb_define_module_function (ruby_mWeechat, "unhook_all", &weechat_ruby_api_unhook_all, 0);
rb_define_module_function (ruby_mWeechat, "buffer_new", &weechat_ruby_api_buffer_new, 5);

View File

@ -1328,6 +1328,43 @@ script_api_hook_infolist (struct t_weechat_plugin *weechat_plugin,
return new_hook;
}
/*
* script_api_hook_focus: hook a focus
* return new hook, NULL if error
*/
struct t_hook *
script_api_hook_focus (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *area,
struct t_hashtable *(*callback)(void *data,
struct t_hashtable *info),
const char *function,
const char *data)
{
struct t_script_callback *new_script_callback;
struct t_hook *new_hook;
new_script_callback = script_callback_alloc ();
if (!new_script_callback)
return NULL;
new_hook = weechat_hook_focus (area, callback, new_script_callback);
if (!new_hook)
{
script_callback_free_data (new_script_callback);
free (new_script_callback);
return NULL;
}
script_callback_init (new_script_callback, script, function, data);
new_script_callback->hook = new_hook;
script_callback_add (script, new_script_callback);
return new_hook;
}
/*
* script_api_unhook: unhook something
*/

View File

@ -276,6 +276,13 @@ extern struct t_hook *script_api_hook_infolist (struct t_weechat_plugin *weechat
const char *arguments),
const char *function,
const char *data);
extern struct t_hook *script_api_hook_focus (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
const char *area,
struct t_hashtable *(*callback)(void *data,
struct t_hashtable *info),
const char *function,
const char *data);
extern void script_api_unhook (struct t_weechat_plugin *weechat_plugin,
struct t_plugin_script *script,
struct t_hook *hook);

View File

@ -4791,6 +4791,75 @@ weechat_tcl_api_hook_infolist (ClientData clientData, Tcl_Interp *interp,
TCL_RETURN_STRING_FREE(result);
}
/*
* weechat_tcl_api_hook_focus_cb: callback for focus hooked
*/
struct t_hashtable *
weechat_tcl_api_hook_focus_cb (void *data,
struct t_hashtable *info)
{
struct t_script_callback *script_callback;
void *tcl_argv[2];
char empty_arg[1] = { '\0' };
script_callback = (struct t_script_callback *)data;
if (script_callback && script_callback->function && script_callback->function[0])
{
tcl_argv[0] = (script_callback->data) ? script_callback->data : empty_arg;
tcl_argv[1] = info;
return (struct t_hashtable *)weechat_tcl_exec (script_callback->script,
WEECHAT_SCRIPT_EXEC_HASHTABLE,
script_callback->function,
"sh", tcl_argv);
}
return NULL;
}
/*
* weechat_tcl_api_hook_focus: hook a focus
*/
static int
weechat_tcl_api_hook_focus (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj *objp;
char *result, *area, *function, *data;
int i;
/* make C compiler happy */
(void) clientData;
if (!tcl_current_script || !tcl_current_script->name)
{
WEECHAT_SCRIPT_MSG_NOT_INIT(TCL_CURRENT_SCRIPT_NAME, "hook_focus");
TCL_RETURN_EMPTY;
}
if (objc < 4)
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "hook_focus");
TCL_RETURN_EMPTY;
}
area = Tcl_GetStringFromObj (objv[1], &i);
function = Tcl_GetStringFromObj (objv[2], &i);
data = Tcl_GetStringFromObj (objv[3], &i);
result = script_ptr2str (script_api_hook_focus (weechat_tcl_plugin,
tcl_current_script,
area,
&weechat_tcl_api_hook_focus_cb,
function,
data));
TCL_RETURN_STRING_FREE(result);
}
/*
* weechat_tcl_api_unhook: unhook something
*/
@ -8205,6 +8274,8 @@ void weechat_tcl_api_init (Tcl_Interp *interp)
weechat_tcl_api_hook_info_hashtable, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hook_infolist",
weechat_tcl_api_hook_infolist, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::hook_focus",
weechat_tcl_api_hook_focus, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::unhook",
weechat_tcl_api_unhook, (ClientData)NULL, (Tcl_CmdDeleteProc*)NULL);
Tcl_CreateObjCommand (interp, "weechat::unhook_all",

View File

@ -46,7 +46,7 @@ struct timeval;
*/
/* API version (used to check that plugin has same API and can be loaded) */
#define WEECHAT_PLUGIN_API_VERSION "20110613-01"
#define WEECHAT_PLUGIN_API_VERSION "20110726-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@ -584,6 +584,11 @@ struct t_weechat_plugin
struct t_hdata *(*callback)(void *data,
const char *hdata_name),
void *callback_data);
struct t_hook *(*hook_focus) (struct t_weechat_plugin *plugin,
const char *area,
struct t_hashtable *(*callback)(void *data,
struct t_hashtable *info),
void *callback_data);
void (*unhook) (struct t_hook *hook);
void (*unhook_all) (struct t_weechat_plugin *plugin);
@ -1281,6 +1286,9 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
__data) \
weechat_plugin->hook_hdata(weechat_plugin, __hdata_name, \
__description, __callback, __data)
#define weechat_hook_focus(__area, __callback, __data) \
weechat_plugin->hook_focus(weechat_plugin, __area, __callback, \
__data)
#define weechat_unhook(__hook) \
weechat_plugin->unhook( __hook)
#define weechat_unhook_all() \