diff --git a/gtk2_ardour/waves_ui.cc b/gtk2_ardour/waves_ui.cc index 57776ec7b5..3e8cb1c87d 100644 --- a/gtk2_ardour/waves_ui.cc +++ b/gtk2_ardour/waves_ui.cc @@ -80,6 +80,8 @@ WavesUI::create_widget (const XMLNode& definition, const XMLNodeMap& styles) child = manage (new WavesButton(text)); } else if (widget_type == "ICONBUTTON") { child = manage (new WavesIconButton); + } else if (widget_type == "DROPDOWN") { + child = manage (new WavesDropdown); } else if (widget_type == "ICON") { std::string image_path; Searchpath spath(ARDOUR::ardour_data_search_path()); @@ -676,6 +678,11 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X } } + WavesDropdown* dropdown = dynamic_cast (&widget); + if (dropdown) { + set_attributes (dropdown->get_menu (), definition, styles); + } + Gtk::Table* table = dynamic_cast (&widget); if (table) { table->set_col_spacings (xml_property (definition, "columnspacing", styles, 0)); @@ -810,6 +817,16 @@ WavesUI::get_waves_grid (const char* id) return *child; } +WavesDropdown& +WavesUI::get_waves_dropdown (const char* id) +{ + WavesDropdown* child = dynamic_cast (get_object(id)); + if (child == NULL ) { + dbg_msg (std::string("WavesDropdown ") + id + " not found in " + _scrip_file_name + "!"); + abort (); + } + return *child; +} Gtk::Paned& WavesUI::get_paned (const char* id) { diff --git a/gtk2_ardour/waves_ui.h b/gtk2_ardour/waves_ui.h index 58c5e94fb8..7cf5c66000 100644 --- a/gtk2_ardour/waves_ui.h +++ b/gtk2_ardour/waves_ui.h @@ -36,6 +36,7 @@ #include "waves_grid.h" #include "waves_button.h" #include "waves_icon_button.h" +#include "waves_dropdown.h" using namespace ArdourCanvas::XMLUI; @@ -53,6 +54,7 @@ class WavesUI : public std::map { Gtk::HBox& get_h_box (const char* id); Gtk::Fixed& get_fixed (const char* id); WavesGrid& get_waves_grid (const char* id); + WavesDropdown& get_waves_dropdown (const char* id); Gtk::Paned& get_paned (const char* id); Gtk::HPaned& get_h_paned (const char* id); Gtk::VPaned& get_v_paned (const char* id); diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 196f6f5c4d..e986ecd5ed 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -28,6 +28,7 @@ path_prefix = 'gtk2_ardour/' gtk2_ardour_sources = [ 'mixer_bridge_view.cc', + 'waves_dropdown.cc', 'waves_zoom_control.cc', 'waves_ui.cc', 'waves_grid.cc',