VCAMasterStrip::VCAMasterStrip (Session* s, boost::shared_ptr<VCA> v)
: SessionHandlePtr (s)
, _vca (v)
- , gain_meter (s, 254)
+ , gain_meter (s, 254) /* magic number, don't adjust blindly */
, context_menu (0)
, delete_dialog (0)
, control_slave_ui (s)
{
+ /* set color for the VCA, if not already done. */
- PresentationInfo::color_t c = _vca->presentation_info().color ();
-
- /* XXX need a (better) test of "has a color" */
-
- if (c == 0) {
+ if (!_vca->presentation_info().color_set()) {
_vca->presentation_info().set_color (gdk_color_to_rgba (unique_random_color()));
}
void
VCAMasterStrip::hide_clicked ()
{
- 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 ();
+ _vca->presentation_info().set_hidden (true);
}
void
if (what_changed.contains (ARDOUR::Properties::color)) {
vertical_button.set_active_color (_vca->presentation_info().color ());
}
+
+ if (what_changed.contains (ARDOUR::Properties::hidden)) {
+
+ }
}
void
delete_when_idle (dialog);
}
+
+bool
+VCAMasterStrip::marked_for_display () const
+{
+ return !_vca->presentation_info().hidden();
+}
+
+bool
+VCAMasterStrip::set_marked_for_display (bool yn)
+{
+ if (yn == _vca->presentation_info().hidden()) {
+ _vca->presentation_info().set_hidden (!yn);
+ return true; // things changed
+ }
+ return false;
+}