cleanup vertical spacing a bit in mixer strip; rename new send options to be more clear on the difference; relabel "sends" button to say "Aux Sends" to be clearer on what it does; code tidy up in processor box and mixer strip

git-svn-id: svn://localhost/ardour2/branches/3.0@10850 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-12-01 19:34:53 +00:00
parent 104a92a128
commit 9a85516623
3 changed files with 16 additions and 29 deletions

View File

@ -278,16 +278,17 @@ MixerStrip::init ()
whvbox.pack_start (width_hide_box, true, true);
global_vpacker.set_spacing (2);
global_vpacker.pack_start (whvbox, Gtk::PACK_SHRINK);
global_vpacker.pack_start (button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (processor_box, true, true);
global_vpacker.pack_start (panners, Gtk::PACK_SHRINK);
global_vpacker.pack_start (top_button_table, Gtk::PACK_SHRINK, 2);
global_vpacker.pack_start (rec_solo_table, Gtk::PACK_SHRINK, 2);
global_vpacker.pack_start (middle_button_table, Gtk::PACK_SHRINK, 2);
global_vpacker.pack_start (top_button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (rec_solo_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (middle_button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (gpm, Gtk::PACK_SHRINK);
global_vpacker.pack_start (bottom_button_table, Gtk::PACK_SHRINK);
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK, 2);
global_vpacker.pack_start (output_button, Gtk::PACK_SHRINK);
global_vpacker.pack_start (_comment_button, Gtk::PACK_SHRINK);
global_frame.add (global_vpacker);
@ -593,7 +594,8 @@ MixerStrip::set_width_enum (Width w, void* owner)
switch (w) {
case Wide:
if (show_sends_button) {
show_sends_button->set_text (_("Sends"));
show_sends_button->set_text (_("Aux\nSends"));
show_sends_button->layout()->set_alignment (Pango::ALIGN_CENTER);
}
((Gtk::Label*)gpm.gain_automation_style_button.get_child())->set_text (
@ -1468,15 +1470,16 @@ MixerStrip::build_route_ops_menu ()
gboolean
MixerStrip::name_button_button_press (GdkEventButton* ev)
{
if (ev->button == 3) {
/* show menu for either button 1 or 3, so as not to confuse people
and also not hide stuff from them.
*/
if (ev->button == 3 || ev->button == 1) {
list_route_operations ();
/* do not allow rename if the track is record-enabled */
rename_menu_item->set_sensitive (!_route->record_enabled());
route_ops_menu->popup (1, ev->time);
} else if (ev->button == 1) {
revert_to_default_display ();
}
return false;
@ -1729,6 +1732,7 @@ MixerStrip::bus_send_display_changed (boost::shared_ptr<Route> send_to)
if (send_to) {
boost::shared_ptr<Send> send = _route->internal_send_for (send_to);
if (send) {
show_send (send);
} else {
@ -1744,7 +1748,7 @@ MixerStrip::drop_send ()
{
boost::shared_ptr<Send> current_send;
if (_current_delivery && (current_send = boost::dynamic_pointer_cast<Send>(_current_delivery))) {
if (_current_delivery && ((current_send = boost::dynamic_pointer_cast<Send>(_current_delivery)) != 0)) {
current_send->set_metering (false);
}

View File

@ -472,7 +472,6 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
_width = Wide;
processor_menu = 0;
send_action_menu = 0;
no_processor_redisplay = false;
processor_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
@ -506,6 +505,7 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
ProcessorBox::~ProcessorBox ()
{
delete processor_menu;
}
void
@ -573,7 +573,6 @@ ProcessorBox::object_drop(DnDVBox<ProcessorEntry>* source, ProcessorEntry* posit
if ((context->get_suggested_action() == Gdk::ACTION_MOVE) && source) {
ProcessorBox* other = reinterpret_cast<ProcessorBox*> (source->get_data ("processorbox"));
if (other) {
cerr << "source was another processor box, delete the selected items\n";
other->delete_dragged_processors (procs);
}
}
@ -602,19 +601,6 @@ ProcessorBox::set_width (Width w)
redisplay_processors ();
}
void
ProcessorBox::build_send_action_menu ()
{
using namespace Menu_Helpers;
send_action_menu = new Menu;
send_action_menu->set_name ("ArdourContextMenu");
MenuList& items = send_action_menu->items();
items.push_back (MenuElem (_("New send"), sigc::mem_fun(*this, &ProcessorBox::new_send)));
items.push_back (MenuElem (_("Show send controls"), sigc::mem_fun(*this, &ProcessorBox::show_send_controls)));
}
Gtk::Menu*
ProcessorBox::build_possible_aux_menu ()
{
@ -1909,7 +1895,7 @@ ProcessorBox::register_actions ()
act = ActionManager::register_action (popup_act_grp, X_("newinsert"), _("New Insert"),
sigc::ptr_fun (ProcessorBox::rb_choose_insert));
ActionManager::jack_sensitive_actions.push_back (act);
act = ActionManager::register_action (popup_act_grp, X_("newsend"), _("New Send ..."),
act = ActionManager::register_action (popup_act_grp, X_("newsend"), _("New External Send ..."),
sigc::ptr_fun (ProcessorBox::rb_choose_send));
ActionManager::jack_sensitive_actions.push_back (act);

View File

@ -264,9 +264,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
Width _width;
Gtk::Menu *send_action_menu;
void build_send_action_menu ();
void new_send ();
void show_send_controls ();