Allow post_show to override a window's retval

This commit is contained in:
Charles Dang 2016-08-18 01:10:36 +11:00
parent 89dd0e7f75
commit 099109a822
2 changed files with 8 additions and 0 deletions

View file

@ -68,6 +68,9 @@ bool tdialog::show(CVideo& video, const unsigned auto_close_time)
post_show(*window);
// post_show may have updated the windoe retval. Update it here.
retval_ = window->get_retval();
return retval_ == twindow::OK;
}

View file

@ -425,6 +425,11 @@ public:
close();
}
int get_retval()
{
return retval_;
}
void set_owner(tdialog* owner)
{
owner_ = owner;