mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Mackie control panel: display the profile name when any button action is changed.
This commit is contained in:
parent
471ed5af4e
commit
6f298b1a83
2 changed files with 11 additions and 3 deletions
|
|
@ -94,6 +94,7 @@ MackieControlProtocolGUI::MackieControlProtocolGUI (MackieControlProtocol& p)
|
||||||
, ipmidi_base_port_adjustment (_cp.ipmidi_base(), 0, 32767, 1, 1000)
|
, ipmidi_base_port_adjustment (_cp.ipmidi_base(), 0, 32767, 1, 1000)
|
||||||
, discover_button (_("Discover Mackie Devices"))
|
, discover_button (_("Discover Mackie Devices"))
|
||||||
, _device_dependent_widget (0)
|
, _device_dependent_widget (0)
|
||||||
|
, _ignore_profile_changed (false)
|
||||||
, ignore_active_change (false)
|
, ignore_active_change (false)
|
||||||
{
|
{
|
||||||
Gtk::Label* l;
|
Gtk::Label* l;
|
||||||
|
|
@ -805,6 +806,10 @@ MackieControlProtocolGUI::action_changed (const Glib::ustring &sPath, const Glib
|
||||||
_cp.device_profile().set_button_action ((*row)[function_key_columns.id], modifier, i->second);
|
_cp.device_profile().set_button_action ((*row)[function_key_columns.id], modifier, i->second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ignore_profile_changed = true;
|
||||||
|
_profile_combo.set_active_text ( _cp.device_profile().name() );
|
||||||
|
_ignore_profile_changed = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
std::cerr << "no such action\n";
|
std::cerr << "no such action\n";
|
||||||
}
|
}
|
||||||
|
|
@ -834,11 +839,13 @@ MackieControlProtocolGUI::device_changed ()
|
||||||
void
|
void
|
||||||
MackieControlProtocolGUI::profile_combo_changed ()
|
MackieControlProtocolGUI::profile_combo_changed ()
|
||||||
{
|
{
|
||||||
|
if (!_ignore_profile_changed) {
|
||||||
string profile = _profile_combo.get_active_text();
|
string profile = _profile_combo.get_active_text();
|
||||||
|
|
||||||
_cp.set_profile (profile);
|
_cp.set_profile (profile);
|
||||||
|
|
||||||
refresh_function_key_editor ();
|
refresh_function_key_editor ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ class MackieControlProtocolGUI : public Gtk::Notebook
|
||||||
void connection_handler ();
|
void connection_handler ();
|
||||||
|
|
||||||
Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
|
Glib::RefPtr<Gtk::ListStore> build_midi_port_list (std::vector<std::string> const & ports, bool for_input);
|
||||||
|
bool _ignore_profile_changed;
|
||||||
bool ignore_active_change;
|
bool ignore_active_change;
|
||||||
void active_port_changed (Gtk::ComboBox* combo, boost::weak_ptr<Mackie::Surface> ws, bool for_input);
|
void active_port_changed (Gtk::ComboBox* combo, boost::weak_ptr<Mackie::Surface> ws, bool for_input);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue