mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
Don't add the highlighted window to activity list if it's the current
window.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@447 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
cc8ddca122
commit
885790d08a
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "hilight-text.h"
|
#include "hilight-text.h"
|
||||||
|
|
||||||
#define DEFAULT_HILIGHT_CHECK_LEVEL \
|
#define DEFAULT_HILIGHT_LEVEL \
|
||||||
(MSGLEVEL_PUBLIC | MSGLEVEL_MSGS | MSGLEVEL_NOTICES | MSGLEVEL_ACTIONS)
|
(MSGLEVEL_PUBLIC | MSGLEVEL_MSGS | MSGLEVEL_NOTICES | MSGLEVEL_ACTIONS)
|
||||||
|
|
||||||
static int hilight_next;
|
static int hilight_next;
|
||||||
@ -199,7 +199,7 @@ char *hilight_match(const char *channel, const char *nickmask, int level, const
|
|||||||
for (tmp = hilights; tmp != NULL; tmp = tmp->next) {
|
for (tmp = hilights; tmp != NULL; tmp = tmp->next) {
|
||||||
HILIGHT_REC *rec = tmp->data;
|
HILIGHT_REC *rec = tmp->data;
|
||||||
|
|
||||||
if ((level & (rec->level > 0 ? rec->level : DEFAULT_HILIGHT_CHECK_LEVEL)) == 0)
|
if ((level & (rec->level > 0 ? rec->level : DEFAULT_HILIGHT_LEVEL)) == 0)
|
||||||
continue;
|
continue;
|
||||||
if ((rec->nick && nickmask == NULL) ||
|
if ((rec->nick && nickmask == NULL) ||
|
||||||
(!rec->nick && nickmask != NULL))
|
(!rec->nick && nickmask != NULL))
|
||||||
@ -260,10 +260,12 @@ static void sig_print_text_stripped(WINDOW_REC *window, SERVER_REC *server, cons
|
|||||||
window->last_color = atoi(color+1);
|
window->last_color = atoi(color+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
oldlevel = window->new_data;
|
if (window != active_win) {
|
||||||
window->new_data = NEWDATA_HILIGHT;
|
oldlevel = window->new_data;
|
||||||
signal_emit("window hilight", 2, window, GINT_TO_POINTER(oldlevel));
|
window->new_data = NEWDATA_HILIGHT;
|
||||||
signal_emit("window activity", 2, window, GINT_TO_POINTER(oldlevel));
|
signal_emit("window hilight", 2, window, GINT_TO_POINTER(oldlevel));
|
||||||
|
signal_emit("window activity", 2, window, GINT_TO_POINTER(oldlevel));
|
||||||
|
}
|
||||||
|
|
||||||
hilight_next = FALSE;
|
hilight_next = FALSE;
|
||||||
|
|
||||||
@ -397,22 +399,23 @@ static void cmd_hilight(const char *data)
|
|||||||
hilights = g_slist_remove(hilights, rec);
|
hilights = g_slist_remove(hilights, rec);
|
||||||
}
|
}
|
||||||
|
|
||||||
hilights = g_slist_append(hilights, rec);
|
rec->level = (levelarg == NULL || *levelarg == '\0') ? 0 :
|
||||||
rec->nick = settings_get_bool("hilight_only_nick") ?
|
level2bits(replace_chars(levelarg, ',', ' '));
|
||||||
|
rec->nick = settings_get_bool("hilight_only_nick") &&
|
||||||
|
(rec->level == 0 || (rec->level & DEFAULT_HILIGHT_LEVEL) == rec->level) ?
|
||||||
g_hash_table_lookup(optlist, "nonick") == NULL :
|
g_hash_table_lookup(optlist, "nonick") == NULL :
|
||||||
g_hash_table_lookup(optlist, "nick") != NULL;
|
g_hash_table_lookup(optlist, "nick") != NULL;
|
||||||
rec->nickmask = g_hash_table_lookup(optlist, "mask") != NULL;
|
rec->nickmask = g_hash_table_lookup(optlist, "mask") != NULL;
|
||||||
rec->fullword = g_hash_table_lookup(optlist, "word") != NULL;
|
rec->fullword = g_hash_table_lookup(optlist, "word") != NULL;
|
||||||
rec->regexp = g_hash_table_lookup(optlist, "regexp") != NULL;
|
rec->regexp = g_hash_table_lookup(optlist, "regexp") != NULL;
|
||||||
|
|
||||||
rec->level = (levelarg == NULL || *levelarg == '\0') ? 0 :
|
|
||||||
level2bits(replace_chars(levelarg, ',', ' '));
|
|
||||||
if (colorarg != NULL && *colorarg != '\0')
|
if (colorarg != NULL && *colorarg != '\0')
|
||||||
rec->color = g_strdup(colorarg);
|
rec->color = g_strdup(colorarg);
|
||||||
|
|
||||||
hilight_print(g_slist_index(hilights, rec)+1, rec);
|
hilights = g_slist_append(hilights, rec);
|
||||||
|
|
||||||
hilight_add_config(rec);
|
hilight_add_config(rec);
|
||||||
|
|
||||||
|
hilight_print(g_slist_index(hilights, rec)+1, rec);
|
||||||
cmd_params_free(free_arg);
|
cmd_params_free(free_arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user