mirror of
https://github.com/irssi/irssi.git
synced 2026-08-22 18:12:12 +02:00
Merge c89d58835e into c890ecafa0
This commit is contained in:
commit
b5d65315ef
3 changed files with 13 additions and 6 deletions
|
|
@ -31,6 +31,7 @@
|
|||
#include "themes.h"
|
||||
#include "fe-windows.h"
|
||||
#include "printtext.h"
|
||||
#include "window-activity.h"
|
||||
|
||||
static int beep_msg_level, beep_when_away, beep_when_window_active;
|
||||
|
||||
|
|
@ -427,7 +428,8 @@ void printtext_gui_internal(const char *str)
|
|||
|
||||
static void msg_beep_check(TEXT_DEST_REC *dest)
|
||||
{
|
||||
if (dest->level != 0 && (dest->level & MSGLEVEL_NO_ACT) == 0 &&
|
||||
if (dest->level != 0 && !window_activity_target_is_hidden(dest) &&
|
||||
(dest->level & MSGLEVEL_NO_ACT) == 0 &&
|
||||
(beep_msg_level & dest->level) &&
|
||||
(beep_when_away || (dest->server != NULL &&
|
||||
!dest->server->usermode_away)) &&
|
||||
|
|
|
|||
|
|
@ -70,6 +70,13 @@ void window_item_activity(WI_ITEM_REC *item, int data_level,
|
|||
GINT_TO_POINTER(old_data_level));
|
||||
}
|
||||
|
||||
int window_activity_target_is_hidden(TEXT_DEST_REC *dest)
|
||||
{
|
||||
/* check for both target and tag/target */
|
||||
return hide_targets != NULL && (dest->level & MSGLEVEL_HILIGHT) == 0 && dest->target != NULL &&
|
||||
strarray_find_dest(hide_targets, dest);
|
||||
}
|
||||
|
||||
static void sig_hilight_text(TEXT_DEST_REC *dest, const char *msg)
|
||||
{
|
||||
WI_ITEM_REC *item;
|
||||
|
|
@ -85,11 +92,8 @@ static void sig_hilight_text(TEXT_DEST_REC *dest, const char *msg)
|
|||
DATA_LEVEL_MSG : DATA_LEVEL_TEXT;
|
||||
}
|
||||
|
||||
if (hide_targets != NULL && (dest->level & MSGLEVEL_HILIGHT) == 0 && dest->target != NULL) {
|
||||
/* check for both target and tag/target */
|
||||
if (strarray_find_dest(hide_targets, dest))
|
||||
if (window_activity_target_is_hidden(dest))
|
||||
return;
|
||||
}
|
||||
|
||||
if (dest->target != NULL) {
|
||||
item = window_item_find(dest->server, dest->target);
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ void window_item_activity(WI_ITEM_REC *item, int data_level,
|
|||
|
||||
void window_activity_init(void);
|
||||
void window_activity_deinit(void);
|
||||
int window_activity_target_is_hidden(TEXT_DEST_REC *dest);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue