Added "read" parameter to /close

Closes all windows where there are no unread messages
This commit is contained in:
James Booth
2013-05-16 22:34:05 +01:00
parent 57e64bebe5
commit 2f92752365
3 changed files with 26 additions and 3 deletions

View File

@@ -1215,6 +1215,16 @@ ui_unread(void)
return result;
}
int
ui_win_unread(int index)
{
if (windows[index] != NULL) {
return windows[index]->unread;
} else {
return 0;
}
}
static void
_ui_draw_win_title(void)
{

View File

@@ -79,6 +79,7 @@ win_type_t ui_win_type(int index);
char * ui_recipient(int index);
void ui_close_win(int index);
gboolean ui_win_exists(int index);
int ui_win_unread(int index);
// ui events
void ui_contact_typing(const char * const from);