13
0

add ArdourDialog::set_ui_sensitive() to provide a way to mark an arbitrary ArdourDialog as "should not respond to user input"

This commit is contained in:
Paul Davis 2020-01-24 15:54:51 -07:00
parent 9ee8b3f176
commit f2ee30c0ec
2 changed files with 12 additions and 0 deletions

View File

@ -39,6 +39,7 @@ using namespace ARDOUR_UI_UTILS;
ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
: Dialog (title, modal, use_seperator)
, _sensitive (true)
, proxy (0)
, _splash_pushed (false)
{
@ -48,6 +49,7 @@ ArdourDialog::ArdourDialog (string title, bool modal, bool use_seperator)
ArdourDialog::ArdourDialog (Gtk::Window& parent, string title, bool modal, bool use_seperator)
: Dialog (title, parent, modal, use_seperator)
, _sensitive (true)
, proxy (0)
, _splash_pushed (false)
{
@ -134,6 +136,8 @@ ArdourDialog::on_show ()
_splash_pushed = true;
}
}
_sensitive = true;
}
bool
@ -161,3 +165,9 @@ ArdourDialog::init ()
proxy = new WM::ProxyTemporary (get_title(), this);
WM::Manager::instance().register_window (proxy);
}
void
ArdourDialog::set_ui_sensitive (bool yn)
{
_sensitive = yn;
}

View File

@ -50,11 +50,13 @@ public:
void on_unmap ();
void on_show ();
virtual void on_response (int);
void set_ui_sensitive (bool);
protected:
void pop_splash ();
void close_self ();
bool _sensitive;
private:
WM::ProxyTemporary* proxy;
bool _splash_pushed;