mirror of
https://github.com/weechat/weechat.git
synced 2026-06-24 20:06:38 +02:00
Added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
This commit is contained in:
@@ -5,6 +5,7 @@ ChangeLog - 2005-04-30
|
||||
|
||||
|
||||
Version 0.1.2 (under dev!):
|
||||
* added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
|
||||
* added transfer rate for DCC files
|
||||
* added "-all" option for /nick command
|
||||
* buffers timestamp can now be changed (new option in config file)
|
||||
|
||||
@@ -23,6 +23,7 @@ v0.1.2:
|
||||
- customizable CTCP version reply
|
||||
|
||||
* Interface:
|
||||
# nicklist scroll keys
|
||||
+ Gtk GUI
|
||||
+ internationalization (traduce WeeChat in many languages)
|
||||
|
||||
@@ -34,6 +35,7 @@ v0.1.2:
|
||||
|
||||
* Plugins:
|
||||
+ Python plugin
|
||||
+ "/python load" and "/python unload" commands to (un)load Python scripts
|
||||
|
||||
|
||||
Future versions:
|
||||
@@ -72,6 +74,5 @@ Future versions:
|
||||
- IPv6 protocol implementation
|
||||
|
||||
* Plugins:
|
||||
- "/python load" and "/python unload" commands to (un)load Python scripts
|
||||
- Ruby plugin
|
||||
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
|
||||
|
||||
+10
-1
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - User guide
|
||||
@subtitle Fast, light and extensible IRC client
|
||||
@subtitle Documentation for WeeChat v0.1.2-cvs - April, 09 2005
|
||||
@subtitle Documentation for WeeChat v0.1.2-cvs - April, 30 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -417,6 +417,9 @@ Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_voice
|
||||
Color for voice symbol@*
|
||||
Type: color (Curses or Gtk color), default value: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Color for nick separator@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@@ -674,6 +677,9 @@ Switch to previous / next window@*
|
||||
@item F10
|
||||
Remove last infobar message@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redraw whole window@*
|
||||
@*
|
||||
@@ -698,6 +704,9 @@ Switch to first channel of next server (or server buffer if no channel is opened
|
||||
@item Alt + digit (1-9)
|
||||
Switch to buffer by number@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node WeeChat commands, FIFO pipe, Key bindings, Usage
|
||||
|
||||
+10
-1
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Gui@'on de usuario.
|
||||
@subtitle Cliente IRC r@'apido, peque@~no y extensible
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.2 - 9 de abril de 2005
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.2 - 30 de abril de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -416,6 +416,9 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_voice
|
||||
Color para el s@'imbolo de voz@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Color para el separador de alias@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@@ -674,6 +677,9 @@ Ir a la ventana anterior / siguiente@*
|
||||
@item F10
|
||||
Borrar el @'ultimo mensaje en la barra de informaciones@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Refrescar toda la ventana@*
|
||||
@*
|
||||
@@ -698,6 +704,9 @@ Ir al primer canal del servidor siguiente (o a la memoria temporal del servidor
|
||||
@item Alt + (1-9)
|
||||
Saltar a la memoria temporal con ese n@'umero@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node Comandos WeeChat, Canal FIFO, Atajos de teclado, Uso
|
||||
|
||||
+10
-1
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guide utilisateur
|
||||
@subtitle Client IRC rapide, l@'eger et extensible
|
||||
@subtitle Documentation pour WeeChat v0.1.2-cvs - 9 Avril 2005
|
||||
@subtitle Documentation pour WeeChat v0.1.2-cvs - 30 Avril 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -417,6 +417,9 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_nick_voice
|
||||
Couleur pour le symbole voix@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Couleur pour le s@'eparateur de pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@@ -674,6 +677,9 @@ Aller @`a la fen@^etre pr@'ec@'edente / suivante@*
|
||||
@item F10
|
||||
Effacer le dernier message de la barre d'infos@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
R@'eaffiche toute la fen@^etre@*
|
||||
@*
|
||||
@@ -698,6 +704,9 @@ Sauter au premier canal du serveur suivant (ou tampon du serveur si aucun canal
|
||||
@item Alt + chiffre (1-9)
|
||||
Sauter au tampon avec ce num@'ero@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node Commandes WeeChat, Tube FIFO, Raccourcis clavier, Utilisation
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guia do Utilizador
|
||||
@subtitle Cliente de IRC rapido, leve e extencivel
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.2-cvs - 9 de Abril de 2005
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.2-cvs - 30 de Abril de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -284,6 +284,9 @@ Comute ao janela anterior / seguinte@*
|
||||
@item F10
|
||||
Apagar a @'ultima mensagem da barra do info@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redesenhe a janela inteira@*
|
||||
@*
|
||||
@@ -308,6 +311,9 @@ Comute @`a primeira canaleta do servidor seguinte (ou do amortecedor do servidor
|
||||
@item Alt + d@'igito (1-9)
|
||||
Comute ao amortecedor pelo n@'umero@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node Comandos do WeeChat, FIFO pipe, Recursos de teclado, Utilizacao
|
||||
|
||||
+211
-207
File diff suppressed because it is too large
Load Diff
@@ -215,6 +215,7 @@ int cfg_col_nick_chanadmin;
|
||||
int cfg_col_nick_op;
|
||||
int cfg_col_nick_halfop;
|
||||
int cfg_col_nick_voice;
|
||||
int cfg_col_nick_more;
|
||||
int cfg_col_nick_sep;
|
||||
int cfg_col_nick_self;
|
||||
int cfg_col_nick_private;
|
||||
@@ -375,6 +376,10 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for voice symbol"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"yellow", NULL, &cfg_col_nick_voice, NULL, &config_change_color },
|
||||
{ "col_nick_more", N_("color for '+' when scrolling nicks"),
|
||||
N_("color for '+' when scrolling nicks"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightmagenta", NULL, &cfg_col_nick_more, NULL, &config_change_color },
|
||||
{ "col_nick_sep", N_("color for nick separator"),
|
||||
N_("color for nick separator"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
|
||||
@@ -133,6 +133,7 @@ extern int cfg_col_nick_chanadmin;
|
||||
extern int cfg_col_nick_op;
|
||||
extern int cfg_col_nick_halfop;
|
||||
extern int cfg_col_nick_voice;
|
||||
extern int cfg_col_nick_more;
|
||||
extern int cfg_col_nick_sep;
|
||||
extern int cfg_col_nick_self;
|
||||
extern int cfg_col_nick_private;
|
||||
|
||||
+191
-63
@@ -874,7 +874,7 @@ void
|
||||
gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
|
||||
{
|
||||
t_gui_window *ptr_win;
|
||||
int i, x, y, column, max_length;
|
||||
int i, j, x, y, column, max_length, nicks_displayed;
|
||||
char format[32], format_empty[32];
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
@@ -957,71 +957,102 @@ gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
|
||||
x = 0;
|
||||
y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0;
|
||||
column = 0;
|
||||
for (ptr_nick = CHANNEL(buffer)->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
|
||||
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
|
||||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
|
||||
nicks_displayed = (ptr_win->win_width / (max_length + 2)) * (ptr_win->win_height - 1);
|
||||
else
|
||||
nicks_displayed = ptr_win->win_height;
|
||||
|
||||
ptr_nick = CHANNEL(buffer)->nicks;
|
||||
for (i = 0; i < ptr_win->win_nick_start; i++)
|
||||
{
|
||||
switch (cfg_look_nicklist_position)
|
||||
if (!ptr_nick)
|
||||
break;
|
||||
ptr_nick = ptr_nick->next_nick;
|
||||
}
|
||||
if (ptr_nick)
|
||||
{
|
||||
for (i = 0; i < nicks_displayed; i++)
|
||||
{
|
||||
case CFG_LOOK_NICKLIST_LEFT:
|
||||
x = 0;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_RIGHT:
|
||||
x = 1;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_TOP:
|
||||
case CFG_LOOK_NICKLIST_BOTTOM:
|
||||
x = column;
|
||||
break;
|
||||
}
|
||||
if (ptr_nick->is_chanowner)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANOWNER);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "~");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_chanadmin)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANADMIN);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "&");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_op)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_OP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "@");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_halfop)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_HALFOP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "%%");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->has_voice)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_VOICE);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "+");
|
||||
x++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, " ");
|
||||
x++;
|
||||
}
|
||||
gui_window_set_color (ptr_win->win_nick,
|
||||
(ptr_nick->is_away) ?
|
||||
COLOR_WIN_NICK_AWAY : COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, format, ptr_nick->nick);
|
||||
y++;
|
||||
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
|
||||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
|
||||
{
|
||||
if (y - ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0) >= ptr_win->win_nick_height - 1)
|
||||
switch (cfg_look_nicklist_position)
|
||||
{
|
||||
column += max_length + 2;
|
||||
y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ?
|
||||
0 : 1;
|
||||
case CFG_LOOK_NICKLIST_LEFT:
|
||||
x = 0;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_RIGHT:
|
||||
x = 1;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_TOP:
|
||||
case CFG_LOOK_NICKLIST_BOTTOM:
|
||||
x = column;
|
||||
break;
|
||||
}
|
||||
if ((i == 0) && (ptr_win->win_nick_start > 0))
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_MORE);
|
||||
j = (max_length + 1) >= 4 ? 4 : max_length + 1;
|
||||
for (x = 1; x <= j; x++)
|
||||
mvwprintw (ptr_win->win_nick, y, x, "+");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ptr_nick->is_chanowner)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANOWNER);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "~");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_chanadmin)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANADMIN);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "&");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_op)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_OP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "@");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_halfop)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_HALFOP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "%%");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->has_voice)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_VOICE);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "+");
|
||||
x++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, " ");
|
||||
x++;
|
||||
}
|
||||
gui_window_set_color (ptr_win->win_nick,
|
||||
(ptr_nick->is_away) ?
|
||||
COLOR_WIN_NICK_AWAY : COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, format, ptr_nick->nick);
|
||||
|
||||
ptr_nick = ptr_nick->next_nick;
|
||||
|
||||
if (!ptr_nick)
|
||||
break;
|
||||
}
|
||||
y++;
|
||||
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
|
||||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
|
||||
{
|
||||
if (y - ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0) >= ptr_win->win_nick_height - 1)
|
||||
{
|
||||
column += max_length + 2;
|
||||
y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ?
|
||||
0 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1566,6 +1597,7 @@ gui_switch_to_buffer (t_gui_window *window, t_gui_buffer *buffer)
|
||||
gui_current_window->buffer->num_displayed--;
|
||||
|
||||
window->buffer = buffer;
|
||||
window->win_nick_start = 0;
|
||||
gui_calculate_pos_size (window);
|
||||
|
||||
/* destroy Curses windows */
|
||||
@@ -1814,6 +1846,99 @@ gui_move_page_down (t_gui_window *window)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_beginning: go to beginning of nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_beginning (t_gui_window *window)
|
||||
{
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
if (window->win_nick_start > 0)
|
||||
{
|
||||
window->win_nick_start = 0;
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_end: go to the end of nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_end (t_gui_window *window)
|
||||
{
|
||||
int new_start;
|
||||
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
new_start = CHANNEL(window->buffer)->nicks_count - window->win_nick_height;
|
||||
if (new_start < 0)
|
||||
new_start = 0;
|
||||
else if (new_start >= 1)
|
||||
new_start++;
|
||||
|
||||
if (new_start != window->win_nick_start)
|
||||
{
|
||||
window->win_nick_start = new_start;
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_page_up: scroll one page up in nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_page_up (t_gui_window *window)
|
||||
{
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
if (window->win_nick_start > 0)
|
||||
{
|
||||
window->win_nick_start -= (window->win_nick_height - 1);
|
||||
if (window->win_nick_start <= 1)
|
||||
window->win_nick_start = 0;
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_page_down: scroll one page down in nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_page_down (t_gui_window *window)
|
||||
{
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
if (window->win_nick_start + window->win_nick_height < CHANNEL(window->buffer)->nicks_count)
|
||||
{
|
||||
if (window->win_nick_start == 0)
|
||||
window->win_nick_start += window->win_nick_height;
|
||||
else
|
||||
window->win_nick_start += (window->win_nick_height - 1);
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_window_init_subviews: init subviews for a WeeChat window
|
||||
*/
|
||||
@@ -2201,6 +2326,8 @@ gui_init_colors ()
|
||||
cfg_col_nick_halfop & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_VOICE,
|
||||
cfg_col_nick_voice & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_MORE,
|
||||
cfg_col_nick_more & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_SEP,
|
||||
cfg_col_nick_sep & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_SELF,
|
||||
@@ -2260,6 +2387,7 @@ gui_init_colors ()
|
||||
color_attr[COLOR_WIN_NICK_OP - 1] = (cfg_col_nick_op >= 0) ? cfg_col_nick_op & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_HALFOP - 1] = (cfg_col_nick_halfop >= 0) ? cfg_col_nick_halfop & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_VOICE - 1] = (cfg_col_nick_voice >= 0) ? cfg_col_nick_voice & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_MORE - 1] = (cfg_col_nick_more >= 0) ? cfg_col_nick_more & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_SEP - 1] = 0;
|
||||
color_attr[COLOR_WIN_NICK_SELF - 1] = (cfg_col_nick_self >= 0) ? cfg_col_nick_self & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_PRIVATE - 1] = (cfg_col_nick_private >= 0) ? cfg_col_nick_private & A_BOLD : 0;
|
||||
|
||||
+34
-17
@@ -72,8 +72,6 @@ gui_read_keyb ()
|
||||
case KEY_F(3):
|
||||
case KEY_F(4):
|
||||
case KEY_F(9):
|
||||
case KEY_F(11):
|
||||
case KEY_F(12):
|
||||
break;
|
||||
/* previous buffer in window */
|
||||
case KEY_F(5):
|
||||
@@ -96,6 +94,12 @@ gui_read_keyb ()
|
||||
gui_infobar_remove ();
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
break;
|
||||
case KEY_F(11):
|
||||
gui_nick_move_page_up (gui_current_window);
|
||||
break;
|
||||
case KEY_F(12):
|
||||
gui_nick_move_page_down (gui_current_window);
|
||||
break;
|
||||
/* cursor up */
|
||||
case KEY_UP:
|
||||
if (gui_current_window->buffer->dcc)
|
||||
@@ -416,25 +420,38 @@ gui_read_keyb ()
|
||||
case KEY_RIGHT:
|
||||
gui_switch_to_next_buffer (gui_current_window);
|
||||
break;
|
||||
/* Alt + home */
|
||||
case KEY_HOME:
|
||||
gui_nick_move_beginning (gui_current_window);
|
||||
break;
|
||||
/* Alt + end */
|
||||
case KEY_END:
|
||||
gui_nick_move_end (gui_current_window);
|
||||
break;
|
||||
/* Alt + page up */
|
||||
case KEY_PPAGE:
|
||||
gui_nick_move_page_up (gui_current_window);
|
||||
break;
|
||||
/* Alt + page down */
|
||||
case KEY_NPAGE:
|
||||
gui_nick_move_page_down (gui_current_window);
|
||||
break;
|
||||
case 79:
|
||||
/* TODO: replace 79 by constant name! */
|
||||
if (key == 79)
|
||||
if ((key = getch()) != ERR)
|
||||
{
|
||||
if ((key = getch()) != ERR)
|
||||
switch (key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
/* Control + Right */
|
||||
case 99:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_next_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + Left */
|
||||
case 100:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
}
|
||||
/* Control + Right */
|
||||
case 99:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_next_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + Left */
|
||||
case 100:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -87,6 +87,7 @@ gui_window_new (int x, int y, int width, int height)
|
||||
new_window->win_nick_y = 0;
|
||||
new_window->win_nick_width = 0;
|
||||
new_window->win_nick_height = 0;
|
||||
new_window->win_nick_start = 0;
|
||||
|
||||
new_window->win_title = NULL;
|
||||
new_window->win_chat = NULL;
|
||||
@@ -842,6 +843,7 @@ gui_window_print_log (t_gui_window *window)
|
||||
wee_log_printf (" win_nick_y. . . . . : %d\n", window->win_nick_y);
|
||||
wee_log_printf (" win_nick_width. . . : %d\n", window->win_nick_width);
|
||||
wee_log_printf (" win_nick_height . . : %d\n", window->win_nick_height);
|
||||
wee_log_printf (" win_nick_start. . . : %d\n", window->win_nick_start);
|
||||
wee_log_printf (" win_title . . . . . : 0x%X\n", window->win_title);
|
||||
wee_log_printf (" win_chat. . . . . . : 0x%X\n", window->win_chat);
|
||||
wee_log_printf (" win_nick. . . . . . : 0x%X\n", window->win_nick);
|
||||
|
||||
+21
-15
@@ -26,7 +26,7 @@
|
||||
|
||||
#define INPUT_BUFFER_BLOCK_SIZE 256
|
||||
|
||||
#define NUM_COLORS 49
|
||||
#define NUM_COLORS 50
|
||||
#define COLOR_WIN_TITLE 1
|
||||
#define COLOR_WIN_CHAT 2
|
||||
#define COLOR_WIN_CHAT_TIME 3
|
||||
@@ -56,19 +56,20 @@
|
||||
#define COLOR_WIN_NICK_OP 27
|
||||
#define COLOR_WIN_NICK_HALFOP 28
|
||||
#define COLOR_WIN_NICK_VOICE 29
|
||||
#define COLOR_WIN_NICK_SEP 30
|
||||
#define COLOR_WIN_NICK_SELF 31
|
||||
#define COLOR_WIN_NICK_PRIVATE 32
|
||||
#define COLOR_WIN_NICK_FIRST 33
|
||||
#define COLOR_WIN_NICK_LAST 42
|
||||
#define COLOR_WIN_NICK_MORE 30
|
||||
#define COLOR_WIN_NICK_SEP 31
|
||||
#define COLOR_WIN_NICK_SELF 32
|
||||
#define COLOR_WIN_NICK_PRIVATE 33
|
||||
#define COLOR_WIN_NICK_FIRST 34
|
||||
#define COLOR_WIN_NICK_LAST 43
|
||||
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
|
||||
#define COLOR_DCC_SELECTED 43
|
||||
#define COLOR_DCC_WAITING 44
|
||||
#define COLOR_DCC_CONNECTING 45
|
||||
#define COLOR_DCC_ACTIVE 46
|
||||
#define COLOR_DCC_DONE 47
|
||||
#define COLOR_DCC_FAILED 48
|
||||
#define COLOR_DCC_ABORTED 49
|
||||
#define COLOR_DCC_SELECTED 44
|
||||
#define COLOR_DCC_WAITING 45
|
||||
#define COLOR_DCC_CONNECTING 46
|
||||
#define COLOR_DCC_ACTIVE 47
|
||||
#define COLOR_DCC_DONE 48
|
||||
#define COLOR_DCC_FAILED 49
|
||||
#define COLOR_DCC_ABORTED 50
|
||||
|
||||
#define SERVER(buffer) ((t_irc_server *)(buffer->server))
|
||||
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel))
|
||||
@@ -212,6 +213,7 @@ struct t_gui_window
|
||||
int win_nick_x, win_nick_y; /* chat window position */
|
||||
int win_nick_width; /* width of chat window */
|
||||
int win_nick_height; /* height of chat window */
|
||||
int win_nick_start; /* # of 1st nick for display (scroll) */
|
||||
|
||||
/* windows for Curses GUI */
|
||||
void *win_title; /* title window */
|
||||
@@ -302,8 +304,12 @@ extern void gui_switch_to_previous_buffer (t_gui_window *);
|
||||
extern void gui_switch_to_next_buffer (t_gui_window *);
|
||||
extern void gui_switch_to_previous_window (t_gui_window *);
|
||||
extern void gui_switch_to_next_window (t_gui_window *);
|
||||
extern void gui_move_page_up ();
|
||||
extern void gui_move_page_down ();
|
||||
extern void gui_move_page_up (t_gui_window *);
|
||||
extern void gui_move_page_down (t_gui_window *);
|
||||
extern void gui_nick_move_beginning (t_gui_window *);
|
||||
extern void gui_nick_move_end (t_gui_window *);
|
||||
extern void gui_nick_move_page_up (t_gui_window *);
|
||||
extern void gui_nick_move_page_down (t_gui_window *);
|
||||
extern void gui_curses_resize_handler ();
|
||||
extern void gui_window_init_subwindows (t_gui_window *);
|
||||
extern void gui_window_split_horiz (t_gui_window *);
|
||||
|
||||
@@ -5,6 +5,7 @@ ChangeLog - 2005-04-30
|
||||
|
||||
|
||||
Version 0.1.2 (under dev!):
|
||||
* added nicklist scroll keys (Alt+{home/end/pgup/pgdn} or F11/F12)
|
||||
* added transfer rate for DCC files
|
||||
* added "-all" option for /nick command
|
||||
* buffers timestamp can now be changed (new option in config file)
|
||||
|
||||
+2
-1
@@ -23,6 +23,7 @@ v0.1.2:
|
||||
- customizable CTCP version reply
|
||||
|
||||
* Interface:
|
||||
# nicklist scroll keys
|
||||
+ Gtk GUI
|
||||
+ internationalization (traduce WeeChat in many languages)
|
||||
|
||||
@@ -34,6 +35,7 @@ v0.1.2:
|
||||
|
||||
* Plugins:
|
||||
+ Python plugin
|
||||
+ "/python load" and "/python unload" commands to (un)load Python scripts
|
||||
|
||||
|
||||
Future versions:
|
||||
@@ -72,6 +74,5 @@ Future versions:
|
||||
- IPv6 protocol implementation
|
||||
|
||||
* Plugins:
|
||||
- "/python load" and "/python unload" commands to (un)load Python scripts
|
||||
- Ruby plugin
|
||||
- "/ruby load" and "/ruby unload" commands to (un)load Ruby scripts
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - User guide
|
||||
@subtitle Fast, light and extensible IRC client
|
||||
@subtitle Documentation for WeeChat v0.1.2-cvs - April, 09 2005
|
||||
@subtitle Documentation for WeeChat v0.1.2-cvs - April, 30 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -417,6 +417,9 @@ Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_voice
|
||||
Color for voice symbol@*
|
||||
Type: color (Curses or Gtk color), default value: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Type: color (Curses or Gtk color), default value: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Color for nick separator@*
|
||||
Type: color (Curses or Gtk color), default value: 'blue'@*
|
||||
@@ -674,6 +677,9 @@ Switch to previous / next window@*
|
||||
@item F10
|
||||
Remove last infobar message@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redraw whole window@*
|
||||
@*
|
||||
@@ -698,6 +704,9 @@ Switch to first channel of next server (or server buffer if no channel is opened
|
||||
@item Alt + digit (1-9)
|
||||
Switch to buffer by number@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node WeeChat commands, FIFO pipe, Key bindings, Usage
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Gui@'on de usuario.
|
||||
@subtitle Cliente IRC r@'apido, peque@~no y extensible
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.2 - 9 de abril de 2005
|
||||
@subtitle Documentaci@'on para WeeChat v0.1.2 - 30 de abril de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -416,6 +416,9 @@ Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_voice
|
||||
Color para el s@'imbolo de voz@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Color para el separador de alias@*
|
||||
Typo: color (color Curses @'o Gtk), valor por defecto: 'blue'@*
|
||||
@@ -674,6 +677,9 @@ Ir a la ventana anterior / siguiente@*
|
||||
@item F10
|
||||
Borrar el @'ultimo mensaje en la barra de informaciones@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Refrescar toda la ventana@*
|
||||
@*
|
||||
@@ -698,6 +704,9 @@ Ir al primer canal del servidor siguiente (o a la memoria temporal del servidor
|
||||
@item Alt + (1-9)
|
||||
Saltar a la memoria temporal con ese n@'umero@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node Comandos WeeChat, Canal FIFO, Atajos de teclado, Uso
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guide utilisateur
|
||||
@subtitle Client IRC rapide, l@'eger et extensible
|
||||
@subtitle Documentation pour WeeChat v0.1.2-cvs - 9 Avril 2005
|
||||
@subtitle Documentation pour WeeChat v0.1.2-cvs - 30 Avril 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -417,6 +417,9 @@ Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_nick_voice
|
||||
Couleur pour le symbole voix@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'yellow'@*
|
||||
@item col_nick_more
|
||||
Color for '+' when scrolling nicks@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'lightmagenta'@*
|
||||
@item col_nick_sep
|
||||
Couleur pour le s@'eparateur de pseudo@*
|
||||
Type: couleur (couleur Curses ou Gtk), valeur par d@'efaut: 'blue'@*
|
||||
@@ -674,6 +677,9 @@ Aller @`a la fen@^etre pr@'ec@'edente / suivante@*
|
||||
@item F10
|
||||
Effacer le dernier message de la barre d'infos@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
R@'eaffiche toute la fen@^etre@*
|
||||
@*
|
||||
@@ -698,6 +704,9 @@ Sauter au premier canal du serveur suivant (ou tampon du serveur si aucun canal
|
||||
@item Alt + chiffre (1-9)
|
||||
Sauter au tampon avec ce num@'ero@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Faire d@'efiler la liste des pseudos@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node Commandes WeeChat, Tube FIFO, Raccourcis clavier, Utilisation
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
@title WeeChat - Guia do Utilizador
|
||||
@subtitle Cliente de IRC rapido, leve e extencivel
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.2-cvs - 9 de Abril de 2005
|
||||
@subtitle Documenta@,{c}@~ao do WeeChat v0.1.2-cvs - 30 de Abril de 2005
|
||||
|
||||
@image{weechat_image}
|
||||
|
||||
@@ -284,6 +284,9 @@ Comute ao janela anterior / seguinte@*
|
||||
@item F10
|
||||
Apagar a @'ultima mensagem da barra do info@*
|
||||
@*
|
||||
@item F11 / F12
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@item Ctrl + L
|
||||
Redesenhe a janela inteira@*
|
||||
@*
|
||||
@@ -308,6 +311,9 @@ Comute @`a primeira canaleta do servidor seguinte (ou do amortecedor do servidor
|
||||
@item Alt + d@'igito (1-9)
|
||||
Comute ao amortecedor pelo n@'umero@*
|
||||
@*
|
||||
@item Alt + PageUp / Alt + PageDown / Alt + Home / Alt + End
|
||||
Scroll nicklist@*
|
||||
@*
|
||||
@end table
|
||||
|
||||
@node Comandos do WeeChat, FIFO pipe, Recursos de teclado, Utilizacao
|
||||
|
||||
+212
-208
File diff suppressed because it is too large
Load Diff
+212
-208
File diff suppressed because it is too large
Load Diff
+211
-207
File diff suppressed because it is too large
Load Diff
@@ -215,6 +215,7 @@ int cfg_col_nick_chanadmin;
|
||||
int cfg_col_nick_op;
|
||||
int cfg_col_nick_halfop;
|
||||
int cfg_col_nick_voice;
|
||||
int cfg_col_nick_more;
|
||||
int cfg_col_nick_sep;
|
||||
int cfg_col_nick_self;
|
||||
int cfg_col_nick_private;
|
||||
@@ -375,6 +376,10 @@ t_config_option weechat_options_colors[] =
|
||||
N_("color for voice symbol"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"yellow", NULL, &cfg_col_nick_voice, NULL, &config_change_color },
|
||||
{ "col_nick_more", N_("color for '+' when scrolling nicks"),
|
||||
N_("color for '+' when scrolling nicks"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
"lightmagenta", NULL, &cfg_col_nick_more, NULL, &config_change_color },
|
||||
{ "col_nick_sep", N_("color for nick separator"),
|
||||
N_("color for nick separator"),
|
||||
OPTION_TYPE_COLOR, 0, 0, 0,
|
||||
|
||||
@@ -133,6 +133,7 @@ extern int cfg_col_nick_chanadmin;
|
||||
extern int cfg_col_nick_op;
|
||||
extern int cfg_col_nick_halfop;
|
||||
extern int cfg_col_nick_voice;
|
||||
extern int cfg_col_nick_more;
|
||||
extern int cfg_col_nick_sep;
|
||||
extern int cfg_col_nick_self;
|
||||
extern int cfg_col_nick_private;
|
||||
|
||||
@@ -874,7 +874,7 @@ void
|
||||
gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
|
||||
{
|
||||
t_gui_window *ptr_win;
|
||||
int i, x, y, column, max_length;
|
||||
int i, j, x, y, column, max_length, nicks_displayed;
|
||||
char format[32], format_empty[32];
|
||||
t_irc_nick *ptr_nick;
|
||||
|
||||
@@ -957,71 +957,102 @@ gui_draw_buffer_nick (t_gui_buffer *buffer, int erase)
|
||||
x = 0;
|
||||
y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0;
|
||||
column = 0;
|
||||
for (ptr_nick = CHANNEL(buffer)->nicks; ptr_nick;
|
||||
ptr_nick = ptr_nick->next_nick)
|
||||
|
||||
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
|
||||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
|
||||
nicks_displayed = (ptr_win->win_width / (max_length + 2)) * (ptr_win->win_height - 1);
|
||||
else
|
||||
nicks_displayed = ptr_win->win_height;
|
||||
|
||||
ptr_nick = CHANNEL(buffer)->nicks;
|
||||
for (i = 0; i < ptr_win->win_nick_start; i++)
|
||||
{
|
||||
switch (cfg_look_nicklist_position)
|
||||
if (!ptr_nick)
|
||||
break;
|
||||
ptr_nick = ptr_nick->next_nick;
|
||||
}
|
||||
if (ptr_nick)
|
||||
{
|
||||
for (i = 0; i < nicks_displayed; i++)
|
||||
{
|
||||
case CFG_LOOK_NICKLIST_LEFT:
|
||||
x = 0;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_RIGHT:
|
||||
x = 1;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_TOP:
|
||||
case CFG_LOOK_NICKLIST_BOTTOM:
|
||||
x = column;
|
||||
break;
|
||||
}
|
||||
if (ptr_nick->is_chanowner)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANOWNER);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "~");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_chanadmin)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANADMIN);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "&");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_op)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_OP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "@");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_halfop)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_HALFOP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "%%");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->has_voice)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_VOICE);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "+");
|
||||
x++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, " ");
|
||||
x++;
|
||||
}
|
||||
gui_window_set_color (ptr_win->win_nick,
|
||||
(ptr_nick->is_away) ?
|
||||
COLOR_WIN_NICK_AWAY : COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, format, ptr_nick->nick);
|
||||
y++;
|
||||
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
|
||||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
|
||||
{
|
||||
if (y - ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0) >= ptr_win->win_nick_height - 1)
|
||||
switch (cfg_look_nicklist_position)
|
||||
{
|
||||
column += max_length + 2;
|
||||
y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ?
|
||||
0 : 1;
|
||||
case CFG_LOOK_NICKLIST_LEFT:
|
||||
x = 0;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_RIGHT:
|
||||
x = 1;
|
||||
break;
|
||||
case CFG_LOOK_NICKLIST_TOP:
|
||||
case CFG_LOOK_NICKLIST_BOTTOM:
|
||||
x = column;
|
||||
break;
|
||||
}
|
||||
if ((i == 0) && (ptr_win->win_nick_start > 0))
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_MORE);
|
||||
j = (max_length + 1) >= 4 ? 4 : max_length + 1;
|
||||
for (x = 1; x <= j; x++)
|
||||
mvwprintw (ptr_win->win_nick, y, x, "+");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ptr_nick->is_chanowner)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANOWNER);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "~");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_chanadmin)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_CHANADMIN);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "&");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_op)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_OP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "@");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->is_halfop)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_HALFOP);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "%%");
|
||||
x++;
|
||||
}
|
||||
else if (ptr_nick->has_voice)
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK_VOICE);
|
||||
mvwprintw (ptr_win->win_nick, y, x, "+");
|
||||
x++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gui_window_set_color (ptr_win->win_nick, COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, " ");
|
||||
x++;
|
||||
}
|
||||
gui_window_set_color (ptr_win->win_nick,
|
||||
(ptr_nick->is_away) ?
|
||||
COLOR_WIN_NICK_AWAY : COLOR_WIN_NICK);
|
||||
mvwprintw (ptr_win->win_nick, y, x, format, ptr_nick->nick);
|
||||
|
||||
ptr_nick = ptr_nick->next_nick;
|
||||
|
||||
if (!ptr_nick)
|
||||
break;
|
||||
}
|
||||
y++;
|
||||
if ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ||
|
||||
(cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM))
|
||||
{
|
||||
if (y - ((cfg_look_nicklist_position == CFG_LOOK_NICKLIST_BOTTOM) ? 1 : 0) >= ptr_win->win_nick_height - 1)
|
||||
{
|
||||
column += max_length + 2;
|
||||
y = (cfg_look_nicklist_position == CFG_LOOK_NICKLIST_TOP) ?
|
||||
0 : 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1566,6 +1597,7 @@ gui_switch_to_buffer (t_gui_window *window, t_gui_buffer *buffer)
|
||||
gui_current_window->buffer->num_displayed--;
|
||||
|
||||
window->buffer = buffer;
|
||||
window->win_nick_start = 0;
|
||||
gui_calculate_pos_size (window);
|
||||
|
||||
/* destroy Curses windows */
|
||||
@@ -1814,6 +1846,99 @@ gui_move_page_down (t_gui_window *window)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_beginning: go to beginning of nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_beginning (t_gui_window *window)
|
||||
{
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
if (window->win_nick_start > 0)
|
||||
{
|
||||
window->win_nick_start = 0;
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_end: go to the end of nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_end (t_gui_window *window)
|
||||
{
|
||||
int new_start;
|
||||
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
new_start = CHANNEL(window->buffer)->nicks_count - window->win_nick_height;
|
||||
if (new_start < 0)
|
||||
new_start = 0;
|
||||
else if (new_start >= 1)
|
||||
new_start++;
|
||||
|
||||
if (new_start != window->win_nick_start)
|
||||
{
|
||||
window->win_nick_start = new_start;
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_page_up: scroll one page up in nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_page_up (t_gui_window *window)
|
||||
{
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
if (window->win_nick_start > 0)
|
||||
{
|
||||
window->win_nick_start -= (window->win_nick_height - 1);
|
||||
if (window->win_nick_start <= 1)
|
||||
window->win_nick_start = 0;
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_nick_move_page_down: scroll one page down in nicklist
|
||||
*/
|
||||
|
||||
void
|
||||
gui_nick_move_page_down (t_gui_window *window)
|
||||
{
|
||||
if (!gui_ok)
|
||||
return;
|
||||
|
||||
if (gui_buffer_has_nicklist (window->buffer))
|
||||
{
|
||||
if (window->win_nick_start + window->win_nick_height < CHANNEL(window->buffer)->nicks_count)
|
||||
{
|
||||
if (window->win_nick_start == 0)
|
||||
window->win_nick_start += window->win_nick_height;
|
||||
else
|
||||
window->win_nick_start += (window->win_nick_height - 1);
|
||||
gui_draw_buffer_nick (window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* gui_window_init_subviews: init subviews for a WeeChat window
|
||||
*/
|
||||
@@ -2201,6 +2326,8 @@ gui_init_colors ()
|
||||
cfg_col_nick_halfop & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_VOICE,
|
||||
cfg_col_nick_voice & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_MORE,
|
||||
cfg_col_nick_more & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_SEP,
|
||||
cfg_col_nick_sep & A_CHARTEXT, cfg_col_nick_bg);
|
||||
init_pair (COLOR_WIN_NICK_SELF,
|
||||
@@ -2260,6 +2387,7 @@ gui_init_colors ()
|
||||
color_attr[COLOR_WIN_NICK_OP - 1] = (cfg_col_nick_op >= 0) ? cfg_col_nick_op & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_HALFOP - 1] = (cfg_col_nick_halfop >= 0) ? cfg_col_nick_halfop & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_VOICE - 1] = (cfg_col_nick_voice >= 0) ? cfg_col_nick_voice & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_MORE - 1] = (cfg_col_nick_more >= 0) ? cfg_col_nick_more & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_SEP - 1] = 0;
|
||||
color_attr[COLOR_WIN_NICK_SELF - 1] = (cfg_col_nick_self >= 0) ? cfg_col_nick_self & A_BOLD : 0;
|
||||
color_attr[COLOR_WIN_NICK_PRIVATE - 1] = (cfg_col_nick_private >= 0) ? cfg_col_nick_private & A_BOLD : 0;
|
||||
|
||||
@@ -72,8 +72,6 @@ gui_read_keyb ()
|
||||
case KEY_F(3):
|
||||
case KEY_F(4):
|
||||
case KEY_F(9):
|
||||
case KEY_F(11):
|
||||
case KEY_F(12):
|
||||
break;
|
||||
/* previous buffer in window */
|
||||
case KEY_F(5):
|
||||
@@ -96,6 +94,12 @@ gui_read_keyb ()
|
||||
gui_infobar_remove ();
|
||||
gui_draw_buffer_infobar (gui_current_window->buffer, 1);
|
||||
break;
|
||||
case KEY_F(11):
|
||||
gui_nick_move_page_up (gui_current_window);
|
||||
break;
|
||||
case KEY_F(12):
|
||||
gui_nick_move_page_down (gui_current_window);
|
||||
break;
|
||||
/* cursor up */
|
||||
case KEY_UP:
|
||||
if (gui_current_window->buffer->dcc)
|
||||
@@ -416,25 +420,38 @@ gui_read_keyb ()
|
||||
case KEY_RIGHT:
|
||||
gui_switch_to_next_buffer (gui_current_window);
|
||||
break;
|
||||
/* Alt + home */
|
||||
case KEY_HOME:
|
||||
gui_nick_move_beginning (gui_current_window);
|
||||
break;
|
||||
/* Alt + end */
|
||||
case KEY_END:
|
||||
gui_nick_move_end (gui_current_window);
|
||||
break;
|
||||
/* Alt + page up */
|
||||
case KEY_PPAGE:
|
||||
gui_nick_move_page_up (gui_current_window);
|
||||
break;
|
||||
/* Alt + page down */
|
||||
case KEY_NPAGE:
|
||||
gui_nick_move_page_down (gui_current_window);
|
||||
break;
|
||||
case 79:
|
||||
/* TODO: replace 79 by constant name! */
|
||||
if (key == 79)
|
||||
if ((key = getch()) != ERR)
|
||||
{
|
||||
if ((key = getch()) != ERR)
|
||||
switch (key)
|
||||
{
|
||||
switch (key)
|
||||
{
|
||||
/* Control + Right */
|
||||
case 99:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_next_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + Left */
|
||||
case 100:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
}
|
||||
/* Control + Right */
|
||||
case 99:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_next_word (gui_current_window->buffer);
|
||||
break;
|
||||
/* Control + Left */
|
||||
case 100:
|
||||
if (!gui_current_window->buffer->dcc)
|
||||
gui_move_previous_word (gui_current_window->buffer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -87,6 +87,7 @@ gui_window_new (int x, int y, int width, int height)
|
||||
new_window->win_nick_y = 0;
|
||||
new_window->win_nick_width = 0;
|
||||
new_window->win_nick_height = 0;
|
||||
new_window->win_nick_start = 0;
|
||||
|
||||
new_window->win_title = NULL;
|
||||
new_window->win_chat = NULL;
|
||||
@@ -842,6 +843,7 @@ gui_window_print_log (t_gui_window *window)
|
||||
wee_log_printf (" win_nick_y. . . . . : %d\n", window->win_nick_y);
|
||||
wee_log_printf (" win_nick_width. . . : %d\n", window->win_nick_width);
|
||||
wee_log_printf (" win_nick_height . . : %d\n", window->win_nick_height);
|
||||
wee_log_printf (" win_nick_start. . . : %d\n", window->win_nick_start);
|
||||
wee_log_printf (" win_title . . . . . : 0x%X\n", window->win_title);
|
||||
wee_log_printf (" win_chat. . . . . . : 0x%X\n", window->win_chat);
|
||||
wee_log_printf (" win_nick. . . . . . : 0x%X\n", window->win_nick);
|
||||
|
||||
+21
-15
@@ -26,7 +26,7 @@
|
||||
|
||||
#define INPUT_BUFFER_BLOCK_SIZE 256
|
||||
|
||||
#define NUM_COLORS 49
|
||||
#define NUM_COLORS 50
|
||||
#define COLOR_WIN_TITLE 1
|
||||
#define COLOR_WIN_CHAT 2
|
||||
#define COLOR_WIN_CHAT_TIME 3
|
||||
@@ -56,19 +56,20 @@
|
||||
#define COLOR_WIN_NICK_OP 27
|
||||
#define COLOR_WIN_NICK_HALFOP 28
|
||||
#define COLOR_WIN_NICK_VOICE 29
|
||||
#define COLOR_WIN_NICK_SEP 30
|
||||
#define COLOR_WIN_NICK_SELF 31
|
||||
#define COLOR_WIN_NICK_PRIVATE 32
|
||||
#define COLOR_WIN_NICK_FIRST 33
|
||||
#define COLOR_WIN_NICK_LAST 42
|
||||
#define COLOR_WIN_NICK_MORE 30
|
||||
#define COLOR_WIN_NICK_SEP 31
|
||||
#define COLOR_WIN_NICK_SELF 32
|
||||
#define COLOR_WIN_NICK_PRIVATE 33
|
||||
#define COLOR_WIN_NICK_FIRST 34
|
||||
#define COLOR_WIN_NICK_LAST 43
|
||||
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
|
||||
#define COLOR_DCC_SELECTED 43
|
||||
#define COLOR_DCC_WAITING 44
|
||||
#define COLOR_DCC_CONNECTING 45
|
||||
#define COLOR_DCC_ACTIVE 46
|
||||
#define COLOR_DCC_DONE 47
|
||||
#define COLOR_DCC_FAILED 48
|
||||
#define COLOR_DCC_ABORTED 49
|
||||
#define COLOR_DCC_SELECTED 44
|
||||
#define COLOR_DCC_WAITING 45
|
||||
#define COLOR_DCC_CONNECTING 46
|
||||
#define COLOR_DCC_ACTIVE 47
|
||||
#define COLOR_DCC_DONE 48
|
||||
#define COLOR_DCC_FAILED 49
|
||||
#define COLOR_DCC_ABORTED 50
|
||||
|
||||
#define SERVER(buffer) ((t_irc_server *)(buffer->server))
|
||||
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel))
|
||||
@@ -212,6 +213,7 @@ struct t_gui_window
|
||||
int win_nick_x, win_nick_y; /* chat window position */
|
||||
int win_nick_width; /* width of chat window */
|
||||
int win_nick_height; /* height of chat window */
|
||||
int win_nick_start; /* # of 1st nick for display (scroll) */
|
||||
|
||||
/* windows for Curses GUI */
|
||||
void *win_title; /* title window */
|
||||
@@ -302,8 +304,12 @@ extern void gui_switch_to_previous_buffer (t_gui_window *);
|
||||
extern void gui_switch_to_next_buffer (t_gui_window *);
|
||||
extern void gui_switch_to_previous_window (t_gui_window *);
|
||||
extern void gui_switch_to_next_window (t_gui_window *);
|
||||
extern void gui_move_page_up ();
|
||||
extern void gui_move_page_down ();
|
||||
extern void gui_move_page_up (t_gui_window *);
|
||||
extern void gui_move_page_down (t_gui_window *);
|
||||
extern void gui_nick_move_beginning (t_gui_window *);
|
||||
extern void gui_nick_move_end (t_gui_window *);
|
||||
extern void gui_nick_move_page_up (t_gui_window *);
|
||||
extern void gui_nick_move_page_down (t_gui_window *);
|
||||
extern void gui_curses_resize_handler ();
|
||||
extern void gui_window_init_subwindows (t_gui_window *);
|
||||
extern void gui_window_split_horiz (t_gui_window *);
|
||||
|
||||
Reference in New Issue
Block a user