mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 11:50:10 +02:00
Hilighting updates. /HILIGHT -color, /SET hilight_color and /SET
hilight_act_color now use %codes for specifying color. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1402 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
aa4a4d4072
commit
c3da7fa8ab
13 changed files with 97 additions and 152 deletions
|
|
@ -36,15 +36,15 @@ static char **hide_targets;
|
|||
static int hide_level, msg_level, hilight_level;
|
||||
|
||||
static void window_activity(WINDOW_REC *window, int data_level,
|
||||
int hilight_color, int hilight_bg_color)
|
||||
const char *hilight_color)
|
||||
{
|
||||
int old_data_level;
|
||||
|
||||
old_data_level = window->data_level;
|
||||
if (data_level == 0 || window->data_level < data_level) {
|
||||
window->data_level = data_level;
|
||||
window->hilight_color = hilight_color;
|
||||
window->hilight_bg_color = hilight_bg_color;
|
||||
g_free_not_null(window->hilight_color);
|
||||
window->hilight_color = g_strdup(hilight_color);
|
||||
signal_emit("window hilight", 1, window);
|
||||
}
|
||||
|
||||
|
|
@ -53,15 +53,15 @@ static void window_activity(WINDOW_REC *window, int data_level,
|
|||
}
|
||||
|
||||
static void window_item_activity(WI_ITEM_REC *item, int data_level,
|
||||
int hilight_color, int hilight_bg_color)
|
||||
const char *hilight_color)
|
||||
{
|
||||
int old_data_level;
|
||||
|
||||
old_data_level = item->data_level;
|
||||
if (data_level == 0 || item->data_level < data_level) {
|
||||
item->data_level = data_level;
|
||||
item->hilight_color = hilight_color;
|
||||
item->hilight_bg_color = hilight_bg_color;
|
||||
g_free_not_null(item->hilight_color);
|
||||
item->hilight_color = g_strdup(hilight_color);
|
||||
signal_emit("window item hilight", 1, item);
|
||||
}
|
||||
|
||||
|
|
@ -96,12 +96,10 @@ static void sig_hilight_text(TEXT_DEST_REC *dest, const char *msg)
|
|||
item = window_item_find(dest->server, dest->target);
|
||||
if (item != NULL) {
|
||||
window_item_activity(item, data_level,
|
||||
dest->hilight_color,
|
||||
dest->hilight_bg_color);
|
||||
dest->hilight_color);
|
||||
}
|
||||
}
|
||||
window_activity(dest->window, data_level,
|
||||
dest->hilight_color, dest->hilight_bg_color);
|
||||
window_activity(dest->window, data_level, dest->hilight_color);
|
||||
}
|
||||
|
||||
static void sig_dehilight_window(WINDOW_REC *window)
|
||||
|
|
@ -111,9 +109,9 @@ static void sig_dehilight_window(WINDOW_REC *window)
|
|||
g_return_if_fail(window != NULL);
|
||||
|
||||
if (window->data_level != 0) {
|
||||
window_activity(window, 0, 0, 0);
|
||||
window_activity(window, 0, NULL);
|
||||
for (tmp = window->items; tmp != NULL; tmp = tmp->next)
|
||||
window_item_activity(tmp->data, 0, 0, 0);
|
||||
window_item_activity(tmp->data, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue