summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-01-24 15:54:51 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2020-01-24 15:56:37 -0700
commitf2ee30c0ec8b589b1951fe56b71ce05fadcd69b7 (patch)
tree90fa3dfb2973036a6aee4a40dbeb0e8997cd4a5f /gtk2_ardour
parent9ee8b3f176d629b0506252caead24500f04951fb (diff)
add ArdourDialog::set_ui_sensitive() to provide a way to mark an arbitrary ArdourDialog as "should not respond to user input"
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_dialog.cc10
-rw-r--r--gtk2_ardour/ardour_dialog.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_dialog.cc b/gtk2_ardour/ardour_dialog.cc
index 1cf588fbf6..96de0f57f0 100644
--- a/gtk2_ardour/ardour_dialog.cc
+++ b/gtk2_ardour/ardour_dialog.cc
@@ -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;
+}
diff --git a/gtk2_ardour/ardour_dialog.h b/gtk2_ardour/ardour_dialog.h
index 53a359e053..0df8b51c18 100644
--- a/gtk2_ardour/ardour_dialog.h
+++ b/gtk2_ardour/ardour_dialog.h
@@ -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;