diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/common/weeconfig.c | 11 | ||||
-rw-r--r-- | src/common/weeconfig.h | 1 | ||||
-rw-r--r-- | src/gui/curses/gui-display.c | 44 | ||||
-rw-r--r-- | src/gui/gui.h | 39 | ||||
-rw-r--r-- | weechat/ChangeLog | 3 | ||||
-rw-r--r-- | weechat/src/common/weeconfig.c | 11 | ||||
-rw-r--r-- | weechat/src/common/weeconfig.h | 1 | ||||
-rw-r--r-- | weechat/src/gui/curses/gui-display.c | 44 | ||||
-rw-r--r-- | weechat/src/gui/gui.h | 39 |
10 files changed, 136 insertions, 60 deletions
@@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2004-07-04 +ChangeLog - 2004-07-06 Version 0.0.7 (under dev!): + * new "col_status_delimiters" config option * /buffer command added, buffers ordered by number, auto-jump to active buffers (alt-a), jump to buffers by number (alt-number) * /window command added, split terminal horizontally/vertically diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index 92ff21880..18703b4e5 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -172,6 +172,7 @@ int cfg_col_chat_dark; int cfg_col_chat_highlight; int cfg_col_chat_bg; int cfg_col_status; +int cfg_col_status_delimiters; int cfg_col_status_data_msg; int cfg_col_status_data_highlight; int cfg_col_status_data_other; @@ -255,18 +256,22 @@ t_config_option weechat_options_colors[] = N_("color for status bar"), OPTION_TYPE_COLOR, 0, 0, 0, "gray", NULL, &cfg_col_status, NULL, &config_change_color }, + { "col_status_delimiters", N_("color for status bar delimiters"), + N_("color for status bar delimiters"), + OPTION_TYPE_COLOR, 0, 0, 0, + "cyan", NULL, &cfg_col_status_delimiters, NULL, &config_change_color }, { "col_status_data_msg", N_("color for window with new messages"), N_("color for window with new messages (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, - "lightred", NULL, &cfg_col_status_data_msg, NULL, &config_change_color }, + "yellow", NULL, &cfg_col_status_data_msg, NULL, &config_change_color }, { "col_status_highlight", N_("color for window with highlight"), N_("color for window with highlight (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, - "yellow", NULL, &cfg_col_status_data_highlight, NULL, &config_change_color }, + "lightmagenta", NULL, &cfg_col_status_data_highlight, NULL, &config_change_color }, { "col_status_data_other", N_("color for window with new data (not messages)"), N_("color for window with new data (not messages) (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, - "lightmagenta", NULL, &cfg_col_status_data_other, NULL, &config_change_color }, + "gray", NULL, &cfg_col_status_data_other, NULL, &config_change_color }, { "col_status_more", N_("color for \"*MORE*\" text"), N_("color for window with new data (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, diff --git a/src/common/weeconfig.h b/src/common/weeconfig.h index 692b3690a..88403fe0f 100644 --- a/src/common/weeconfig.h +++ b/src/common/weeconfig.h @@ -106,6 +106,7 @@ extern int cfg_col_chat_dark; extern int cfg_col_chat_highlight; extern int cfg_col_chat_bg; extern int cfg_col_status; +extern int cfg_col_status_delimiters; extern int cfg_col_status_data_msg; extern int cfg_col_status_data_highlight; extern int cfg_col_status_data_other; diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c index f331637d4..a1cd8c483 100644 --- a/src/gui/curses/gui-display.c +++ b/src/gui/curses/gui-display.c @@ -808,31 +808,58 @@ gui_draw_buffer_status (t_gui_buffer *buffer, int erase) /* display number of buffers */ gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, "["); + gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); - wprintw (ptr_win->win_status, "[%d] ", + wprintw (ptr_win->win_status, "%d", (last_gui_buffer) ? last_gui_buffer->number : 0); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, "] "); /* display current server */ if (SERVER(ptr_win->buffer) && SERVER(ptr_win->buffer)->name) - wprintw (ptr_win->win_status, "[%s] ", SERVER(ptr_win->buffer)->name); + { + wprintw (ptr_win->win_status, "["); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS); + wprintw (ptr_win->win_status, "%s", SERVER(ptr_win->buffer)->name); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, "] "); + } if (SERVER(ptr_win->buffer) && !CHANNEL(ptr_win->buffer)) { gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); + wprintw (ptr_win->win_status, "%d", + ptr_win->buffer->number); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, ":"); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS); if (SERVER(ptr_win->buffer)->is_connected) - wprintw (ptr_win->win_status, "%d:[%s] ", - ptr_win->buffer->number, SERVER(ptr_win->buffer)->name); + wprintw (ptr_win->win_status, "[%s] ", + SERVER(ptr_win->buffer)->name); else - wprintw (ptr_win->win_status, "%d:(%s) ", + wprintw (ptr_win->win_status, "(%s) ", ptr_win->buffer->number, SERVER(ptr_win->buffer)->name); } if (SERVER(ptr_win->buffer) && CHANNEL(ptr_win->buffer)) { gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); - wprintw (ptr_win->win_status, "%d:%s", - ptr_win->buffer->number, + wprintw (ptr_win->win_status, "%d", + ptr_win->buffer->number); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, ":"); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS); + wprintw (ptr_win->win_status, "%s", CHANNEL(ptr_win->buffer)->name); if (ptr_win->buffer == CHANNEL(ptr_win->buffer)->buffer) { @@ -1482,6 +1509,8 @@ gui_init_colors () cfg_col_chat_highlight & A_CHARTEXT, cfg_col_chat_bg); init_pair (COLOR_WIN_STATUS, cfg_col_status & A_CHARTEXT, cfg_col_status_bg); + init_pair (COLOR_WIN_STATUS_DELIMITERS, + cfg_col_status_delimiters & A_CHARTEXT, cfg_col_status_bg); init_pair (COLOR_WIN_STATUS_DATA_MSG, cfg_col_status_data_msg & A_CHARTEXT, cfg_col_status_bg); init_pair (COLOR_WIN_STATUS_DATA_HIGHLIGHT, @@ -1536,6 +1565,7 @@ gui_init_colors () color_attr[COLOR_WIN_CHAT_DARK - 1] = cfg_col_chat_dark & A_BOLD; color_attr[COLOR_WIN_CHAT_HIGHLIGHT - 1] = cfg_col_chat_highlight & A_BOLD; color_attr[COLOR_WIN_STATUS - 1] = cfg_col_status & A_BOLD; + color_attr[COLOR_WIN_STATUS_DELIMITERS - 1] = cfg_col_status_delimiters & A_BOLD; color_attr[COLOR_WIN_STATUS_DATA_MSG - 1] = cfg_col_status_data_msg & A_BOLD; color_attr[COLOR_WIN_STATUS_DATA_HIGHLIGHT - 1] = cfg_col_status_data_highlight & A_BOLD; color_attr[COLOR_WIN_STATUS_DATA_OTHER - 1] = cfg_col_status_data_other & A_BOLD; diff --git a/src/gui/gui.h b/src/gui/gui.h index a2b6a726b..65b5b9d33 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -26,7 +26,7 @@ #define INPUT_BUFFER_BLOCK_SIZE 256 -#define NUM_COLORS 38 +#define NUM_COLORS 39 #define COLOR_WIN_TITLE 1 #define COLOR_WIN_CHAT 2 #define COLOR_WIN_CHAT_TIME 3 @@ -39,24 +39,25 @@ #define COLOR_WIN_CHAT_DARK 10 #define COLOR_WIN_CHAT_HIGHLIGHT 11 #define COLOR_WIN_STATUS 12 -#define COLOR_WIN_STATUS_DATA_MSG 13 -#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 14 -#define COLOR_WIN_STATUS_DATA_OTHER 15 -#define COLOR_WIN_STATUS_MORE 16 -#define COLOR_WIN_INFOBAR 17 -#define COLOR_WIN_INFOBAR_HIGHLIGHT 18 -#define COLOR_WIN_INPUT 19 -#define COLOR_WIN_INPUT_CHANNEL 20 -#define COLOR_WIN_INPUT_NICK 21 -#define COLOR_WIN_NICK 22 -#define COLOR_WIN_NICK_OP 23 -#define COLOR_WIN_NICK_HALFOP 24 -#define COLOR_WIN_NICK_VOICE 25 -#define COLOR_WIN_NICK_SEP 26 -#define COLOR_WIN_NICK_SELF 27 -#define COLOR_WIN_NICK_PRIVATE 28 -#define COLOR_WIN_NICK_FIRST 29 -#define COLOR_WIN_NICK_LAST 38 +#define COLOR_WIN_STATUS_DELIMITERS 13 +#define COLOR_WIN_STATUS_DATA_MSG 14 +#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 15 +#define COLOR_WIN_STATUS_DATA_OTHER 16 +#define COLOR_WIN_STATUS_MORE 17 +#define COLOR_WIN_INFOBAR 18 +#define COLOR_WIN_INFOBAR_HIGHLIGHT 19 +#define COLOR_WIN_INPUT 20 +#define COLOR_WIN_INPUT_CHANNEL 21 +#define COLOR_WIN_INPUT_NICK 22 +#define COLOR_WIN_NICK 23 +#define COLOR_WIN_NICK_OP 24 +#define COLOR_WIN_NICK_HALFOP 25 +#define COLOR_WIN_NICK_VOICE 26 +#define COLOR_WIN_NICK_SEP 27 +#define COLOR_WIN_NICK_SELF 28 +#define COLOR_WIN_NICK_PRIVATE 29 +#define COLOR_WIN_NICK_FIRST 30 +#define COLOR_WIN_NICK_LAST 39 #define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1) #define SERVER(buffer) ((t_irc_server *)(buffer->server)) diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 42795356e..37dfbec4e 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2004-07-04 +ChangeLog - 2004-07-06 Version 0.0.7 (under dev!): + * new "col_status_delimiters" config option * /buffer command added, buffers ordered by number, auto-jump to active buffers (alt-a), jump to buffers by number (alt-number) * /window command added, split terminal horizontally/vertically diff --git a/weechat/src/common/weeconfig.c b/weechat/src/common/weeconfig.c index 92ff21880..18703b4e5 100644 --- a/weechat/src/common/weeconfig.c +++ b/weechat/src/common/weeconfig.c @@ -172,6 +172,7 @@ int cfg_col_chat_dark; int cfg_col_chat_highlight; int cfg_col_chat_bg; int cfg_col_status; +int cfg_col_status_delimiters; int cfg_col_status_data_msg; int cfg_col_status_data_highlight; int cfg_col_status_data_other; @@ -255,18 +256,22 @@ t_config_option weechat_options_colors[] = N_("color for status bar"), OPTION_TYPE_COLOR, 0, 0, 0, "gray", NULL, &cfg_col_status, NULL, &config_change_color }, + { "col_status_delimiters", N_("color for status bar delimiters"), + N_("color for status bar delimiters"), + OPTION_TYPE_COLOR, 0, 0, 0, + "cyan", NULL, &cfg_col_status_delimiters, NULL, &config_change_color }, { "col_status_data_msg", N_("color for window with new messages"), N_("color for window with new messages (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, - "lightred", NULL, &cfg_col_status_data_msg, NULL, &config_change_color }, + "yellow", NULL, &cfg_col_status_data_msg, NULL, &config_change_color }, { "col_status_highlight", N_("color for window with highlight"), N_("color for window with highlight (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, - "yellow", NULL, &cfg_col_status_data_highlight, NULL, &config_change_color }, + "lightmagenta", NULL, &cfg_col_status_data_highlight, NULL, &config_change_color }, { "col_status_data_other", N_("color for window with new data (not messages)"), N_("color for window with new data (not messages) (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, - "lightmagenta", NULL, &cfg_col_status_data_other, NULL, &config_change_color }, + "gray", NULL, &cfg_col_status_data_other, NULL, &config_change_color }, { "col_status_more", N_("color for \"*MORE*\" text"), N_("color for window with new data (status bar)"), OPTION_TYPE_COLOR, 0, 0, 0, diff --git a/weechat/src/common/weeconfig.h b/weechat/src/common/weeconfig.h index 692b3690a..88403fe0f 100644 --- a/weechat/src/common/weeconfig.h +++ b/weechat/src/common/weeconfig.h @@ -106,6 +106,7 @@ extern int cfg_col_chat_dark; extern int cfg_col_chat_highlight; extern int cfg_col_chat_bg; extern int cfg_col_status; +extern int cfg_col_status_delimiters; extern int cfg_col_status_data_msg; extern int cfg_col_status_data_highlight; extern int cfg_col_status_data_other; diff --git a/weechat/src/gui/curses/gui-display.c b/weechat/src/gui/curses/gui-display.c index f331637d4..a1cd8c483 100644 --- a/weechat/src/gui/curses/gui-display.c +++ b/weechat/src/gui/curses/gui-display.c @@ -808,31 +808,58 @@ gui_draw_buffer_status (t_gui_buffer *buffer, int erase) /* display number of buffers */ gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, "["); + gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); - wprintw (ptr_win->win_status, "[%d] ", + wprintw (ptr_win->win_status, "%d", (last_gui_buffer) ? last_gui_buffer->number : 0); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, "] "); /* display current server */ if (SERVER(ptr_win->buffer) && SERVER(ptr_win->buffer)->name) - wprintw (ptr_win->win_status, "[%s] ", SERVER(ptr_win->buffer)->name); + { + wprintw (ptr_win->win_status, "["); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS); + wprintw (ptr_win->win_status, "%s", SERVER(ptr_win->buffer)->name); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, "] "); + } if (SERVER(ptr_win->buffer) && !CHANNEL(ptr_win->buffer)) { gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); + wprintw (ptr_win->win_status, "%d", + ptr_win->buffer->number); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, ":"); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS); if (SERVER(ptr_win->buffer)->is_connected) - wprintw (ptr_win->win_status, "%d:[%s] ", - ptr_win->buffer->number, SERVER(ptr_win->buffer)->name); + wprintw (ptr_win->win_status, "[%s] ", + SERVER(ptr_win->buffer)->name); else - wprintw (ptr_win->win_status, "%d:(%s) ", + wprintw (ptr_win->win_status, "(%s) ", ptr_win->buffer->number, SERVER(ptr_win->buffer)->name); } if (SERVER(ptr_win->buffer) && CHANNEL(ptr_win->buffer)) { gui_window_set_color (ptr_win->win_status, COLOR_WIN_STATUS); - wprintw (ptr_win->win_status, "%d:%s", - ptr_win->buffer->number, + wprintw (ptr_win->win_status, "%d", + ptr_win->buffer->number); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS_DELIMITERS); + wprintw (ptr_win->win_status, ":"); + gui_window_set_color (ptr_win->win_status, + COLOR_WIN_STATUS); + wprintw (ptr_win->win_status, "%s", CHANNEL(ptr_win->buffer)->name); if (ptr_win->buffer == CHANNEL(ptr_win->buffer)->buffer) { @@ -1482,6 +1509,8 @@ gui_init_colors () cfg_col_chat_highlight & A_CHARTEXT, cfg_col_chat_bg); init_pair (COLOR_WIN_STATUS, cfg_col_status & A_CHARTEXT, cfg_col_status_bg); + init_pair (COLOR_WIN_STATUS_DELIMITERS, + cfg_col_status_delimiters & A_CHARTEXT, cfg_col_status_bg); init_pair (COLOR_WIN_STATUS_DATA_MSG, cfg_col_status_data_msg & A_CHARTEXT, cfg_col_status_bg); init_pair (COLOR_WIN_STATUS_DATA_HIGHLIGHT, @@ -1536,6 +1565,7 @@ gui_init_colors () color_attr[COLOR_WIN_CHAT_DARK - 1] = cfg_col_chat_dark & A_BOLD; color_attr[COLOR_WIN_CHAT_HIGHLIGHT - 1] = cfg_col_chat_highlight & A_BOLD; color_attr[COLOR_WIN_STATUS - 1] = cfg_col_status & A_BOLD; + color_attr[COLOR_WIN_STATUS_DELIMITERS - 1] = cfg_col_status_delimiters & A_BOLD; color_attr[COLOR_WIN_STATUS_DATA_MSG - 1] = cfg_col_status_data_msg & A_BOLD; color_attr[COLOR_WIN_STATUS_DATA_HIGHLIGHT - 1] = cfg_col_status_data_highlight & A_BOLD; color_attr[COLOR_WIN_STATUS_DATA_OTHER - 1] = cfg_col_status_data_other & A_BOLD; diff --git a/weechat/src/gui/gui.h b/weechat/src/gui/gui.h index a2b6a726b..65b5b9d33 100644 --- a/weechat/src/gui/gui.h +++ b/weechat/src/gui/gui.h @@ -26,7 +26,7 @@ #define INPUT_BUFFER_BLOCK_SIZE 256 -#define NUM_COLORS 38 +#define NUM_COLORS 39 #define COLOR_WIN_TITLE 1 #define COLOR_WIN_CHAT 2 #define COLOR_WIN_CHAT_TIME 3 @@ -39,24 +39,25 @@ #define COLOR_WIN_CHAT_DARK 10 #define COLOR_WIN_CHAT_HIGHLIGHT 11 #define COLOR_WIN_STATUS 12 -#define COLOR_WIN_STATUS_DATA_MSG 13 -#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 14 -#define COLOR_WIN_STATUS_DATA_OTHER 15 -#define COLOR_WIN_STATUS_MORE 16 -#define COLOR_WIN_INFOBAR 17 -#define COLOR_WIN_INFOBAR_HIGHLIGHT 18 -#define COLOR_WIN_INPUT 19 -#define COLOR_WIN_INPUT_CHANNEL 20 -#define COLOR_WIN_INPUT_NICK 21 -#define COLOR_WIN_NICK 22 -#define COLOR_WIN_NICK_OP 23 -#define COLOR_WIN_NICK_HALFOP 24 -#define COLOR_WIN_NICK_VOICE 25 -#define COLOR_WIN_NICK_SEP 26 -#define COLOR_WIN_NICK_SELF 27 -#define COLOR_WIN_NICK_PRIVATE 28 -#define COLOR_WIN_NICK_FIRST 29 -#define COLOR_WIN_NICK_LAST 38 +#define COLOR_WIN_STATUS_DELIMITERS 13 +#define COLOR_WIN_STATUS_DATA_MSG 14 +#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 15 +#define COLOR_WIN_STATUS_DATA_OTHER 16 +#define COLOR_WIN_STATUS_MORE 17 +#define COLOR_WIN_INFOBAR 18 +#define COLOR_WIN_INFOBAR_HIGHLIGHT 19 +#define COLOR_WIN_INPUT 20 +#define COLOR_WIN_INPUT_CHANNEL 21 +#define COLOR_WIN_INPUT_NICK 22 +#define COLOR_WIN_NICK 23 +#define COLOR_WIN_NICK_OP 24 +#define COLOR_WIN_NICK_HALFOP 25 +#define COLOR_WIN_NICK_VOICE 26 +#define COLOR_WIN_NICK_SEP 27 +#define COLOR_WIN_NICK_SELF 28 +#define COLOR_WIN_NICK_PRIVATE 29 +#define COLOR_WIN_NICK_FIRST 30 +#define COLOR_WIN_NICK_LAST 39 #define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1) #define SERVER(buffer) ((t_irc_server *)(buffer->server)) |