along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <cstdlib>
#include "i18n.h"
using namespace ARDOUR;
+using namespace PBD;
using namespace sigc;
using namespace Gtk;
hide_button.unset_flags(Gtk::CAN_FOCUS) ;
visual_button.unset_flags(Gtk::CAN_FOCUS) ;
- set_height(Normal) ;
+ set_height (hNormal) ;
}
/**
/**
* Sets the height of this TrackView to one of the defined TrackHeghts
*
- * @param h the TrackHeight value to set
+ * @param h
*/
void
-VisualTimeAxis::set_height(TrackHeight h)
+VisualTimeAxis::set_height(uint32_t h)
{
- TimeAxisView::set_height(h) ;
+ TimeAxisView::set_height(h);
- switch (height)
- {
- case Largest:
- case Large:
- case Larger:
- case Normal:
- {
- hide_name_label ();
- show_name_entry ();
- other_button_hbox.show_all() ;
- break;
- }
- case Smaller:
- {
- hide_name_label ();
- show_name_entry ();
- other_button_hbox.hide_all() ;
- break;
- }
- case Small:
- {
- hide_name_entry ();
- show_name_label ();
- other_button_hbox.hide_all() ;
- }
- break;
+ if (h >= hNormal) {
+ hide_name_label ();
+ show_name_entry ();
+ other_button_hbox.show_all() ;
+ } else if (h >= hSmaller) {
+ hide_name_label ();
+ show_name_entry ();
+ other_button_hbox.hide_all() ;
+ } else if (h >= hSmall) {
+ hide_name_entry ();
+ show_name_label ();
+ other_button_hbox.hide_all() ;
}
}
void
VisualTimeAxis::hide_click()
{
+ // LAME fix for hide_button display refresh
+ hide_button.set_sensitive(false);
+
editor.hide_track_in_display (*this);
+
+ hide_button.set_sensitive(true);
}
}
void
-VisualTimeAxis::set_selected_regionviews (AudioRegionSelection& regions)
+VisualTimeAxis::set_selected_regionviews (RegionSelection& regions)
{
// Not handled by purely visual TimeAxis
}
return;
}
+ strip_whitespace_edges(x);
+
if (x.length() == 0) {
name_entry.set_text (time_axis_name);
return;
}
- strip_whitespace_edges(x);
-
if (!editor.get_named_time_axis(x)) {
set_time_axis_name(x, this);
} else {
- ARDOUR_UI::instance()->popup_error (_("a track already exists with that name"));
+ ARDOUR_UI::instance()->popup_error (_("A track already exists with that name"));
name_entry.set_text(time_axis_name);
}
}
// Super class methods not handled by VisualTimeAxis
void
-VisualTimeAxis::show_timestretch (jack_nframes_t start, jack_nframes_t end)
+VisualTimeAxis::show_timestretch (nframes_t start, nframes_t end)
{
// Not handled by purely visual TimeAxis
}