mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 07:46:21 +00:00
Only show reminder notifications when notifications are enabled
This commit is contained in:
@@ -189,13 +189,16 @@ wins_set_current_by_num(int i)
|
||||
ProfChatWin *chatwin = (ProfChatWin*) window;
|
||||
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
|
||||
chatwin->unread = 0;
|
||||
chatwin->notify = FALSE;
|
||||
} else if (window->type == WIN_MUC) {
|
||||
ProfMucWin *mucwin = (ProfMucWin*) window;
|
||||
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
|
||||
mucwin->unread = 0;
|
||||
mucwin->notify = FALSE;
|
||||
} else if (window->type == WIN_PRIVATE) {
|
||||
ProfPrivateWin *privatewin = (ProfPrivateWin*) window;
|
||||
privatewin->unread = 0;
|
||||
privatewin->notify = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -382,6 +385,23 @@ wins_new_private(const char *const fulljid)
|
||||
return newwin;
|
||||
}
|
||||
|
||||
gboolean
|
||||
wins_get_notify(void)
|
||||
{
|
||||
GList *values = g_hash_table_get_values(windows);
|
||||
GList *curr = values;
|
||||
|
||||
while (curr) {
|
||||
ProfWin *window = curr->data;
|
||||
if (win_notify(window)) {
|
||||
g_list_free(values);
|
||||
return TRUE;
|
||||
}
|
||||
curr = g_list_next(curr);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int
|
||||
wins_get_total_unread(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user