[Summary] Progressing UI to choose MIDI in and MIDI Out for markers.

This commit is contained in:
VKamyshniy 2014-09-23 11:57:35 +03:00
parent 061ee51bac
commit bd6c96dfe2
3 changed files with 22 additions and 4 deletions

View file

@ -956,7 +956,7 @@ ARDOUR_UI::populate_midi_inout_dropdown (bool playback)
/* add a "none" entry */
dropdown.add_menu_item (_("None"), 0);
dropdown.add_radio_menu_item (_("None"), 0);
std::vector<EngineStateController::PortState>::const_iterator state_iter;
@ -970,7 +970,7 @@ ARDOUR_UI::populate_midi_inout_dropdown (bool playback)
ARDOUR::remove_pattern_from_string(device_name, midi_type_suffix, device_name);
if (state_iter->active) {
dropdown.add_menu_item (device_name, strdup (state_iter->name.c_str()));
dropdown.add_radio_menu_item (device_name, strdup (state_iter->name.c_str()));
if (!have_first) {
dropdown.set_text (device_name);
have_first = true;

View file

@ -386,6 +386,7 @@ Editor::update_ruler_visibility ()
double pos = 0.0;
double old_unit_pos;
Gtk::Container& skip_playback_lane = get_container ("skip_button_home");
if (ruler_marker_action->get_active()) {
old_unit_pos = marker_group->position().y;
@ -405,11 +406,11 @@ Editor::update_ruler_visibility ()
if (pos != old_unit_pos) {
skip_group->move (ArdourCanvas::Duple (0.0, pos - old_unit_pos));
}
skip_button.show ();
skip_playback_lane.show ();
skip_group->show();
pos += Marker::marker_height(); // skip_bar->y1() - skip_bar->y0();
} else {
skip_button.hide ();
skip_playback_lane.hide ();
skip_group->hide();
}

View file

@ -55,6 +55,23 @@ WavesDropdown::add_menu_item (const std::string& item, void* cookie)
return menuitem;
}
Gtk::RadioMenuItem&
WavesDropdown::add_radio_menu_item (const std::string& item, void* cookie)
{
Gtk::Menu_Helpers::MenuList& items = _menu.items ();
items.push_back (Gtk::Menu_Helpers::RadioMenuElem (_radio_menu_items_group, item, sigc::bind (sigc::mem_fun(*this, &WavesDropdown::_on_menu_item), items.size (), cookie)));
Gtk::RadioMenuItem& menuitem = *dynamic_cast <Gtk::RadioMenuItem*> (&_menu.items ().back ());
ensure_style();
Widget* child = menuitem.get_child ();
if (child) {
child->set_style (get_style());
}
return menuitem;
}
void
WavesDropdown::clear_items ()
{