diff --git a/include/viswin.cpp b/include/viswin.cpp index 9fc7be1eb..f7f3ffb4e 100755 --- a/include/viswin.cpp +++ b/include/viswin.cpp @@ -1167,6 +1167,12 @@ void TViswin::txt_clear(COLOR color) set_mode(M_COPY); bar ((X_OFFSET-1), Y_OFFSET -1, columns()+1, rows()-BUTTONROW_SIZE); } + +bool TViswin::can_be_closed() const +{ + ((TViswin*)this)->on_button(DLG_QUIT); + return FALSE; +} void TViswin::update () { @@ -1243,7 +1249,8 @@ void TViswin::on_button(short dlg) switch (dlg) { case DLG_QUIT: - if (_isopen) abort_print(); + if (_isopen) + abort_print(); else { xvt_statbar_set("");