mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 07:05:43 +01:00
second half of forward-port of recent a2/mb control protocol changes, this time enabling the GUI to track protocol-active changes
git-svn-id: svn://localhost/ardour2/branches/3.0@13303 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
fbc5571133
commit
bb9f8aabc4
2 changed files with 19 additions and 3 deletions
|
|
@ -670,7 +670,11 @@ public:
|
|||
_box->pack_start (*label, false, false);
|
||||
label->show ();
|
||||
|
||||
_store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::model_changed));
|
||||
ControlProtocolManager& m = ControlProtocolManager::instance ();
|
||||
m.ProtocolStatusChange.connect (protocol_status_connection, MISSING_INVALIDATOR,
|
||||
boost::bind (&ControlSurfacesOptions::protocol_status_changed, this, _1), gui_context());
|
||||
|
||||
_store->signal_row_changed().connect (sigc::mem_fun (*this, &ControlSurfacesOptions::view_changed));
|
||||
_view.signal_button_press_event().connect_notify (sigc::mem_fun(*this, &ControlSurfacesOptions::edit_clicked));
|
||||
}
|
||||
|
||||
|
|
@ -698,7 +702,18 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
void model_changed (TreeModel::Path const &, TreeModel::iterator const & i)
|
||||
void protocol_status_changed (ControlProtocolInfo* cpi) {
|
||||
/* find the row */
|
||||
TreeModel::Children rows = _store->children();
|
||||
for (TreeModel::Children::iterator x = rows.begin(); x != rows.end(); ++x) {
|
||||
if ((*x)[_model.protocol_info] == cpi) {
|
||||
(*x)[_model.enabled] = (cpi->protocol || cpi->requested);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void view_changed (TreeModel::Path const &, TreeModel::iterator const & i)
|
||||
{
|
||||
TreeModel::Row r = *i;
|
||||
|
||||
|
|
@ -794,6 +809,7 @@ private:
|
|||
ControlSurfacesModelColumns _model;
|
||||
TreeView _view;
|
||||
Gtk::Window& _parent;
|
||||
PBD::ScopedConnection protocol_status_connection;
|
||||
};
|
||||
|
||||
/** A class which allows control of visibility of some editor components usign
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ class ControlProtocolManager : public PBD::Stateful, public ARDOUR::SessionHandl
|
|||
int set_state (const XMLNode&, int version);
|
||||
XMLNode& get_state (void);
|
||||
|
||||
sigc::signal<void,ControlProtocolInfo*> ProtocolStatusChange;
|
||||
PBD::Signal1<void,ControlProtocolInfo*> ProtocolStatusChange;
|
||||
|
||||
private:
|
||||
ControlProtocolManager ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue