diff options
Diffstat (limited to 'src/ui/window.c')
-rw-r--r-- | src/ui/window.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/ui/window.c b/src/ui/window.c index 9317f3b8..d6500a67 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -141,6 +141,7 @@ win_create_chat(const char *const barejid) new_win->pgp_send = FALSE; new_win->history_shown = FALSE; new_win->unread = 0; + new_win->notify = FALSE; new_win->state = chat_state_new(); new_win->memcheck = PROFCHATWIN_MEMCHECK; @@ -180,6 +181,7 @@ win_create_muc(const char *const roomjid) new_win->roomjid = strdup(roomjid); new_win->unread = 0; + new_win->notify = FALSE; if (prefs_get_boolean(PREF_OCCUPANTS_JID)) { new_win->showjid = TRUE; } else { @@ -215,6 +217,7 @@ win_create_private(const char *const fulljid) new_win->fulljid = strdup(fulljid); new_win->unread = 0; + new_win->notify = FALSE; new_win->memcheck = PROFPRIVATEWIN_MEMCHECK; @@ -1245,6 +1248,26 @@ win_has_active_subwin(ProfWin *window) } } +gboolean +win_notify(ProfWin *window) +{ + if (window->type == WIN_CHAT) { + ProfChatWin *chatwin = (ProfChatWin*) window; + assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK); + return chatwin->notify; + } else if (window->type == WIN_MUC) { + ProfMucWin *mucwin = (ProfMucWin*) window; + assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); + return mucwin->notify; + } else if (window->type == WIN_PRIVATE) { + ProfPrivateWin *privatewin = (ProfPrivateWin*) window; + assert(privatewin->memcheck == PROFPRIVATEWIN_MEMCHECK); + return privatewin->notify; + } else { + return FALSE; + } +} + int win_unread(ProfWin *window) { |