summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-07-13 17:40:20 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-07-13 17:40:20 +0000
commit1d07964d1735cbe0b997444c05670f3858bafd94 (patch)
treeb598642b4b04d1fe7223d4bac39527d199e8d795 /src/gui
parent06bd0f9f0e94e86b5bbc113b2b7dbdeee7a4e052 (diff)
downloadweechat-1d07964d1735cbe0b997444c05670f3858bafd94.zip
Added color for private in hotlist (different than color for highlight)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-display.c24
-rw-r--r--src/gui/gui.h61
2 files changed, 49 insertions, 36 deletions
diff --git a/src/gui/curses/gui-display.c b/src/gui/curses/gui-display.c
index ea9fc91f2..9d8b54bb9 100644
--- a/src/gui/curses/gui-display.c
+++ b/src/gui/curses/gui-display.c
@@ -1254,15 +1254,19 @@ gui_draw_buffer_status (t_gui_buffer *buffer, int erase)
{
switch (ptr_hotlist->priority)
{
- case 0:
+ case HOTLIST_LOW:
gui_window_set_color (ptr_win->win_status,
COLOR_WIN_STATUS_DATA_OTHER);
break;
- case 1:
+ case HOTLIST_MSG:
gui_window_set_color (ptr_win->win_status,
COLOR_WIN_STATUS_DATA_MSG);
break;
- case 2:
+ case HOTLIST_PRIVATE:
+ gui_window_set_color (ptr_win->win_status,
+ COLOR_WIN_STATUS_DATA_PRIVATE);
+ break;
+ case HOTLIST_HIGHLIGHT:
gui_window_set_color (ptr_win->win_status,
COLOR_WIN_STATUS_DATA_HIGHLIGHT);
break;
@@ -2278,6 +2282,8 @@ gui_init_colors ()
cfg_col_status_delimiters, cfg_col_status_bg);
init_pair (COLOR_WIN_STATUS_DATA_MSG,
cfg_col_status_data_msg, cfg_col_status_bg);
+ init_pair (COLOR_WIN_STATUS_DATA_PRIVATE,
+ cfg_col_status_data_private, cfg_col_status_bg);
init_pair (COLOR_WIN_STATUS_DATA_HIGHLIGHT,
cfg_col_status_data_highlight, cfg_col_status_bg);
init_pair (COLOR_WIN_STATUS_DATA_OTHER,
@@ -2356,6 +2362,7 @@ gui_init_colors ()
color_attr[COLOR_WIN_STATUS - 1] = (cfg_col_status >= 0) ? cfg_col_status & A_BOLD : 0;
color_attr[COLOR_WIN_STATUS_DELIMITERS - 1] = (cfg_col_status_delimiters >= 0) ? cfg_col_status_delimiters & A_BOLD : 0;
color_attr[COLOR_WIN_STATUS_DATA_MSG - 1] = (cfg_col_status_data_msg >= 0) ? cfg_col_status_data_msg & A_BOLD : 0;
+ color_attr[COLOR_WIN_STATUS_DATA_PRIVATE - 1] = (cfg_col_status_data_private >= 0) ? cfg_col_status_data_private & A_BOLD : 0;
color_attr[COLOR_WIN_STATUS_DATA_HIGHLIGHT - 1] = (cfg_col_status_data_highlight >= 0) ? cfg_col_status_data_highlight & A_BOLD : 0;
color_attr[COLOR_WIN_STATUS_DATA_OTHER - 1] = (cfg_col_status_data_other >= 0) ? cfg_col_status_data_other & A_BOLD : 0;
color_attr[COLOR_WIN_STATUS_MORE - 1] = (cfg_col_status_more >= 0) ? cfg_col_status_more & A_BOLD : 0;
@@ -2547,9 +2554,14 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message)
buffer->last_line->line_with_highlight <=
buffer->notify_level)
{
- hotlist_add (buffer->last_line->line_with_message +
- buffer->last_line->line_with_highlight,
- buffer);
+ if (buffer->last_line->line_with_highlight)
+ hotlist_add (HOTLIST_HIGHLIGHT, buffer);
+ else if (BUFFER_IS_PRIVATE(buffer))
+ hotlist_add (HOTLIST_PRIVATE, buffer);
+ else if (buffer->last_line->line_with_message)
+ hotlist_add (HOTLIST_MSG, buffer);
+ else
+ hotlist_add (HOTLIST_LOW, buffer);
gui_draw_buffer_status (gui_current_window->buffer, 1);
}
}
diff --git a/src/gui/gui.h b/src/gui/gui.h
index 235842672..5050979f6 100644
--- a/src/gui/gui.h
+++ b/src/gui/gui.h
@@ -26,7 +26,7 @@
#define INPUT_BUFFER_BLOCK_SIZE 256
-#define NUM_COLORS 51
+#define NUM_COLORS 52
#define COLOR_WIN_TITLE 1
#define COLOR_WIN_CHAT 2
#define COLOR_WIN_CHAT_TIME 3
@@ -41,36 +41,37 @@
#define COLOR_WIN_STATUS 12
#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_DELIMITERS 19
-#define COLOR_WIN_INFOBAR_HIGHLIGHT 20
-#define COLOR_WIN_INPUT 21
-#define COLOR_WIN_INPUT_CHANNEL 22
-#define COLOR_WIN_INPUT_NICK 23
-#define COLOR_WIN_NICK 24
-#define COLOR_WIN_NICK_AWAY 25
-#define COLOR_WIN_NICK_CHANOWNER 26
-#define COLOR_WIN_NICK_CHANADMIN 27
-#define COLOR_WIN_NICK_OP 28
-#define COLOR_WIN_NICK_HALFOP 29
-#define COLOR_WIN_NICK_VOICE 30
-#define COLOR_WIN_NICK_MORE 31
-#define COLOR_WIN_NICK_SEP 32
-#define COLOR_WIN_NICK_SELF 33
-#define COLOR_WIN_NICK_PRIVATE 34
-#define COLOR_WIN_NICK_FIRST 35
-#define COLOR_WIN_NICK_LAST 44
+#define COLOR_WIN_STATUS_DATA_PRIVATE 15
+#define COLOR_WIN_STATUS_DATA_HIGHLIGHT 16
+#define COLOR_WIN_STATUS_DATA_OTHER 17
+#define COLOR_WIN_STATUS_MORE 18
+#define COLOR_WIN_INFOBAR 19
+#define COLOR_WIN_INFOBAR_DELIMITERS 20
+#define COLOR_WIN_INFOBAR_HIGHLIGHT 21
+#define COLOR_WIN_INPUT 22
+#define COLOR_WIN_INPUT_CHANNEL 23
+#define COLOR_WIN_INPUT_NICK 24
+#define COLOR_WIN_NICK 25
+#define COLOR_WIN_NICK_AWAY 26
+#define COLOR_WIN_NICK_CHANOWNER 27
+#define COLOR_WIN_NICK_CHANADMIN 28
+#define COLOR_WIN_NICK_OP 29
+#define COLOR_WIN_NICK_HALFOP 30
+#define COLOR_WIN_NICK_VOICE 31
+#define COLOR_WIN_NICK_MORE 32
+#define COLOR_WIN_NICK_SEP 33
+#define COLOR_WIN_NICK_SELF 34
+#define COLOR_WIN_NICK_PRIVATE 35
+#define COLOR_WIN_NICK_FIRST 36
+#define COLOR_WIN_NICK_LAST 45
#define COLOR_WIN_NICK_NUMBER (COLOR_WIN_NICK_LAST - COLOR_WIN_NICK_FIRST + 1)
-#define COLOR_DCC_SELECTED 45
-#define COLOR_DCC_WAITING 46
-#define COLOR_DCC_CONNECTING 47
-#define COLOR_DCC_ACTIVE 48
-#define COLOR_DCC_DONE 49
-#define COLOR_DCC_FAILED 50
-#define COLOR_DCC_ABORTED 51
+#define COLOR_DCC_SELECTED 46
+#define COLOR_DCC_WAITING 47
+#define COLOR_DCC_CONNECTING 48
+#define COLOR_DCC_ACTIVE 49
+#define COLOR_DCC_DONE 50
+#define COLOR_DCC_FAILED 51
+#define COLOR_DCC_ABORTED 52
#define SERVER(buffer) ((t_irc_server *)(buffer->server))
#define CHANNEL(buffer) ((t_irc_channel *)(buffer->channel))