diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-16 07:30:28 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:42 -0400 |
commit | e0ff70cf86c01c42f98faf8b0eaf1a8ccf867946 (patch) | |
tree | dcb5ac7037e3b41d850930ea0a1759d79f8ca82a /gtk2_ardour/vca_master_strip.cc | |
parent | bae9474e9f04e324b1a2776b0fa9faefb5e6f0c2 (diff) |
first vaguely working version using PresentationInfo
remote control ID and "order keys" have been removed.
Diffstat (limited to 'gtk2_ardour/vca_master_strip.cc')
-rw-r--r-- | gtk2_ardour/vca_master_strip.cc | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/gtk2_ardour/vca_master_strip.cc b/gtk2_ardour/vca_master_strip.cc index ba1b58d3bc..332ca230ff 100644 --- a/gtk2_ardour/vca_master_strip.cc +++ b/gtk2_ardour/vca_master_strip.cc @@ -16,6 +16,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <gtkmm/stock.h> + #include "pbd/convert.h" #include "ardour/rc_configuration.h" @@ -26,8 +28,9 @@ #include "gtkmm2ext/doi.h" #include "gtkmm2ext/keyboard.h" -#include "gui_thread.h" +#include "ardour_dialog.h" #include "floating_text_entry.h" +#include "gui_thread.h" #include "tooltips.h" #include "vca_master_strip.h" @@ -47,6 +50,7 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v) , _vca (v) , gain_meter (s, 250) , context_menu (0) + , delete_dialog (0) { gain_meter.set_controls (boost::shared_ptr<Route>(), boost::shared_ptr<PeakMeter>(), @@ -150,6 +154,9 @@ VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v) VCAMasterStrip::~VCAMasterStrip () { + delete delete_dialog; + delete context_menu; + CatchDeletion (this); /* EMIT SIGNAL */ } @@ -193,10 +200,31 @@ VCAMasterStrip::name() const void VCAMasterStrip::hide_clicked () { - /* get everything to deassign. This will also delete ourselves (when - * idle) and that in turn will remove us from the Mixer GUI - */ - _session->vca_manager().remove_vca (_vca); + if (!delete_dialog) { + delete_dialog = new MessageDialog (_("Removing a Master will deassign all slaves. Remove it anyway?"), + true, MESSAGE_WARNING, BUTTONS_YES_NO, true); + delete_dialog->signal_response().connect (sigc::mem_fun (*this, &VCAMasterStrip::hide_confirmation)); + } + + delete_dialog->set_position (Gtk::WIN_POS_MOUSE); + delete_dialog->present (); +} + +void +VCAMasterStrip::hide_confirmation (int response) +{ + delete_dialog->hide (); + + switch (response) { + case RESPONSE_OK: + /* get everything to deassign. This will also delete ourselves (when + * idle) and that in turn will remove us from the Mixer GUI + */ + _session->vca_manager().remove_vca (_vca); + break; + default: + break; + } } bool |