most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet

git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-12-12 14:43:24 +00:00
parent 30daaebaa2
commit bc89fe0147
252 changed files with 28174 additions and 14382 deletions

View file

@ -67,7 +67,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
_base_rect (0),
_view (show_regions ? new AutomationStreamView(*this) : NULL),
_name (nom),
height_button (_("h")),
clear_button (_("clear")),
auto_button (X_("")) /* force addition of a label */
{
@ -90,7 +89,7 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
_base_rect = new SimpleRect(*canvas_display);
_base_rect->property_x1() = 0.0;
_base_rect->property_y1() = 0.0;
_base_rect->property_x2() = editor.frame_to_pixel (max_frames);
_base_rect->property_x2() = LONG_MAX - 2;
_base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_AutomationTrackOutline.get();
/* outline ends and bottom */
@ -106,14 +105,16 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
hide_button.add (*(manage (new Gtk::Image (::get_icon("hide")))));
height_button.set_name ("TrackSizeButton");
auto_button.set_name ("TrackVisualButton");
clear_button.set_name ("TrackVisualButton");
hide_button.set_name ("TrackRemoveButton");
auto_button.unset_flags (Gtk::CAN_FOCUS);
clear_button.unset_flags (Gtk::CAN_FOCUS);
hide_button.unset_flags (Gtk::CAN_FOCUS);
controls_table.set_no_show_all();
ARDOUR_UI::instance()->tooltips().set_tip(height_button, _("track height"));
ARDOUR_UI::instance()->tooltips().set_tip(auto_button, _("automation state"));
ARDOUR_UI::instance()->tooltips().set_tip(clear_button, _("clear track"));
ARDOUR_UI::instance()->tooltips().set_tip(hide_button, _("hide track"));
@ -174,7 +175,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
/* add the buttons */
controls_table.attach (hide_button, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (height_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (auto_button, 5, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (clear_button, 5, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
@ -184,7 +184,6 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
controls_table.show_all ();
height_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::height_clicked));
clear_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::clear_clicked));
hide_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::hide_clicked));
auto_button.signal_clicked().connect (mem_fun(*this, &AutomationTimeAxisView::auto_clicked));
@ -361,12 +360,6 @@ AutomationTimeAxisView::set_interpolation (AutomationList::InterpolationStyle st
_line->set_interpolation(style);
}
void
AutomationTimeAxisView::height_clicked ()
{
popup_size_menu (0);
}
void
AutomationTimeAxisView::clear_clicked ()
{
@ -380,10 +373,9 @@ void
AutomationTimeAxisView::set_height (uint32_t h)
{
bool changed = (height != (uint32_t) h) || first_call_to_set_height;
bool changed_between_small_and_normal = ( (h == hSmall || h == hSmaller) ^ (height == hSmall || height == hSmaller) );
bool changed_between_small_and_normal = ( (height < hNormal && h >= hNormal) || (height >= hNormal || h < hNormal) );
TimeAxisView* state_parent = get_parent_with_state ();
assert(state_parent);
XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter());
@ -427,7 +419,6 @@ AutomationTimeAxisView::set_height (uint32_t h)
name_hbox.show_all ();
auto_button.show();
height_button.show();
clear_button.show();
hide_button.show_all();
@ -446,15 +437,11 @@ AutomationTimeAxisView::set_height (uint32_t h)
name_hbox.show_all ();
auto_button.hide();
height_button.hide();
clear_button.hide();
hide_button.hide();
}
} else if (h >= hNormal){
auto_button.show();
height_button.show();
clear_button.show();
hide_button.show_all();
} else if (h >= hNormal){
cerr << "track grown, but neither changed_between_small_and_normal nor first_call_to_set_height set!" << endl;
}
if (changed) {