mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Added win_current_is_console()
This commit is contained in:
parent
62c102860c
commit
1cc5353697
@ -1661,8 +1661,7 @@ _cmd_close(gchar **args, struct cmd_help_t help)
|
||||
jabber_conn_status_t conn_status = jabber_get_connection_status();
|
||||
|
||||
// cannot close console window
|
||||
if (!win_current_is_chat() && !win_current_is_groupchat()
|
||||
&& !win_current_is_private()) {
|
||||
if (win_current_is_console()) {
|
||||
cons_show("Cannot close console window.");
|
||||
return TRUE;
|
||||
}
|
||||
|
1
src/ui.h
1
src/ui.h
@ -97,6 +97,7 @@ void title_bar_draw(void);
|
||||
|
||||
// current window actions
|
||||
void win_current_close(void);
|
||||
int win_current_is_console(void);
|
||||
int win_current_is_chat(void);
|
||||
int win_current_is_groupchat(void);
|
||||
int win_current_is_private(void);
|
||||
|
@ -549,6 +549,12 @@ win_current_close(void)
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
win_current_is_console(void)
|
||||
{
|
||||
return (current->type == WIN_CONSOLE);
|
||||
}
|
||||
|
||||
int
|
||||
win_current_is_chat(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user