#include "ardour_ui.h"
#include "ardour_dialog.h"
-#include "ardour_message.h"
#include "mixer_strip.h"
#include "mixer_ui.h"
#include "keyboard.h"
ARDOUR_UI::instance()->tooltips().set_tip (speed_spinner, _("varispeed"));
- speed_spinner.show ();
- speed_frame.show ();
-
button_table.attach (speed_frame, 0, 2, 6, 7);
button_table.attach (*rec_enable_button, 0, 2, 7, 8);
}
-
+
name_button.add (name_label);
name_button.set_name ("MixerNameButton");
Gtkmm2ext::set_size_request_to_display_given_text (name_button, "longest label", 2, 2);
_route.comment());
comment_button.signal_clicked().connect (mem_fun(*this, &MixerStrip::comment_button_clicked));
- global_vpacker.set_border_width (4);
- global_vpacker.set_spacing (4);
+ global_vpacker.set_border_width (0);
+ global_vpacker.set_spacing (0);
Gtk::VBox *whvbox = manage (new Gtk::VBox);
whvbox->pack_start (width_hide_box, true, true);
- global_vpacker.pack_start (*whvbox, false, false);
- global_vpacker.pack_start (button_table, false, false);
+ global_vpacker.pack_start (*whvbox, Gtk::PACK_SHRINK);
+ global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK);
global_vpacker.pack_start (pre_redirect_box, true, true);
- global_vpacker.pack_start (gpm, false, false);
+ global_vpacker.pack_start (gpm, Gtk::PACK_SHRINK);
global_vpacker.pack_start (post_redirect_box, true, true);
- global_vpacker.pack_start (panners, false, false);
- global_vpacker.pack_start (output_button, false, false);
- global_vpacker.pack_start (comment_button, false, false);
+ global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
+ global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
+ global_vpacker.pack_start (comment_button, Gtk::PACK_SHRINK);
global_frame.add (global_vpacker);
global_frame.set_shadow_type (Gtk::SHADOW_IN);
_selected = true;
set_selected (false);
- whvbox->show_all ();
- name_label.show ();
- group_label.show();
- input_label.show ();
- output_label.show ();
- pre_redirect_box.show_all ();
- post_redirect_box.show_all ();
- button_table.show ();
- comment_button.show ();
- name_button.show ();
- input_button.show ();
- group_button.show ();
- output_button.show ();
- rec_enable_button->show ();
- solo_button->show ();
- mute_button->show ();
- gain_automation_style_button.show ();
- gain_automation_state_button.show ();
- pan_automation_style_button.show ();
- pan_automation_state_button.show ();
- polarity_button.show ();
- global_vpacker.show ();
- global_frame.show ();
-
_packed = false;
_embedded = false;
_route.comment_changed.connect (mem_fun(*this, &MixerStrip::comment_changed));
_route.gui_changed.connect (mem_fun(*this, &MixerStrip::route_gui_changed));
- input_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::input_press));
- output_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::output_press));
+ input_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::input_press), false);
+ output_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::output_press), false);
rec_enable_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::rec_enable_press));
solo_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::solo_press));
mute_button->signal_button_press_event().connect (mem_fun(*this, &RouteUI::mute_press));
mute_button->signal_button_release_event().connect (mem_fun(*this, &RouteUI::mute_release));
- gain_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event));
- gain_automation_style_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event));
- pan_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event));
- pan_automation_style_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event));
+ gain_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event), false);
+ gain_automation_style_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::gain_automation_style_button_event), false);
+ pan_automation_style_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event), false);
+ pan_automation_style_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::pan_automation_style_button_event), false);
- gain_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event));
- gain_automation_state_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event));
- pan_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event));
- pan_automation_state_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event));
+ gain_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event), false);
+ gain_automation_state_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::gain_automation_state_button_event), false);
+ pan_automation_state_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event), false);
+ pan_automation_state_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::pan_automation_state_button_event), false);
polarity_button.signal_toggled().connect (mem_fun(*this, &MixerStrip::polarity_toggled));
- name_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::name_button_button_release));
+ name_button.signal_button_release_event().connect (mem_fun(*this, &MixerStrip::name_button_button_release), false);
- group_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::select_mix_group));
+ group_button.signal_button_press_event().connect (mem_fun(*this, &MixerStrip::select_mix_group), false);
_width = (Width) -1;
set_stuff_from_route ();
using namespace Menu_Helpers;
if (!_session.engine().connected()) {
- ArdourMessage msg (NULL, "nojackdialog", _("Not connected to JACK - no I/O changes are possible"));
- return TRUE;
+ MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
+ msg.run ();
+ return true;
}
MenuList& citems = output_menu.items();
citems.clear();
if (!_session.engine().connected()) {
- ArdourMessage msg (NULL, "nojackdialog", _("Not connected to JACK - no I/O changes are possible"));
- return TRUE;
+ MessageDialog msg (_("Not connected to JACK - no I/O changes are possible"));
+ msg.run ();
+ return true;
}
#if ADVANCED_ROUTE_DISKSTREAM_CONNECTIVITY
}
void
-MixerStrip::add_mix_group_to_menu (RouteGroup *rg)
+MixerStrip::add_mix_group_to_menu (RouteGroup *rg, RadioMenuItem::Group* group)
{
using namespace Menu_Helpers;
MenuList& items = group_menu->items();
- items.push_back (MenuElem (rg->name(), bind (mem_fun(*this, &MixerStrip::set_mix_group), rg)));
+ items.push_back (RadioMenuElem (*group, rg->name(), bind (mem_fun(*this, &MixerStrip::set_mix_group), rg)));
}
gint
group_menu = new Menu;
group_menu->set_name ("ArdourContextMenu");
MenuList& items = group_menu->items();
+ RadioMenuItem::Group group;
+
+ items.push_back (RadioMenuElem (group, _("no group"), bind (mem_fun(*this, &MixerStrip::set_mix_group), (RouteGroup *) 0)));
- items.push_back (MenuElem (_("no group"), bind (mem_fun(*this, &MixerStrip::set_mix_group), (RouteGroup *) 0)));
- _session.foreach_mix_group (this, &MixerStrip::add_mix_group_to_menu);
+ _session.foreach_mix_group (bind (mem_fun (*this, &MixerStrip::add_mix_group_to_menu), &group));
group_menu->popup (ev->button, 0);
return stop_signal (group_button, "button_press_event");
{
using namespace Menu_Helpers;
- route_ops_menu = new Menu;
+ route_ops_menu = manage (new Menu);
route_ops_menu->set_name ("ArdourContextMenu");
MenuList& items = route_ops_menu->items();
route_active_menu_item = dynamic_cast<CheckMenuItem *> (&items.back());
route_active_menu_item->set_active (_route.active());
+ build_remote_control_menu ();
+
+ items.push_back (SeparatorElem());
+ items.push_back (MenuElem (_("Remote Control ID"), *remote_control_menu));
+
items.push_back (SeparatorElem());
items.push_back (MenuElem (_("Remove"), mem_fun(*this, &RouteUI::remove_this_route)));
}
if (route_ops_menu == 0) {
build_route_ops_menu ();
}
+
+ refresh_remote_control_menu();
route_ops_menu->popup (1, 0);
}
if (_embedded) {
Hiding(); /* EMIT_SIGNAL */
} else {
- _mixer.unselect_strip_in_display (this);
+ _mixer.hide_strip (this);
}
}
gpm.set_fader_name ("AudioBusFader");
}
}
+
+RouteGroup*
+MixerStrip::mix_group() const
+{
+ return _route.mix_group();
+}