using namespace PBD;
ExportTimespanSelector::ExportTimespanSelector (ARDOUR::Session * session, ProfileManagerPtr manager) :
- session (session),
- manager (manager),
- time_format_label (_("Show Times as:"), Gtk::ALIGN_LEFT)
+ manager (manager),
+ time_format_label (_("Show Times as:"), Gtk::ALIGN_LEFT)
{
+ set_session (session);
option_hbox.pack_start (time_format_label, false, false, 0);
option_hbox.pack_start (time_format_combo, false, false, 6);
void
ExportTimespanSelector::add_range_to_selection (ARDOUR::Location const * loc)
{
- TimespanPtr span = session->get_export_handler()->add_timespan();
+ TimespanPtr span = _session->get_export_handler()->add_timespan();
Glib::ustring id;
if (loc == state->session_range.get()) {
Glib::ustring
ExportTimespanSelector::bbt_str (nframes_t frames) const
{
- if (!session) {
+ if (!_session) {
return "Error!";
}
std::ostringstream oss;
BBT_Time time;
- session->bbt_time (frames, time);
+ _session->bbt_time (frames, time);
oss << std::setfill('0') << std::right <<
std::setw(3) <<
Glib::ustring
ExportTimespanSelector::timecode_str (nframes_t frames) const
{
- if (!session) {
+ if (!_session) {
return "Error!";
}
std::ostringstream oss;
Timecode::Time time;
- session->timecode_time (frames, time);
+ _session->timecode_time (frames, time);
oss << std::setfill('0') << std::right <<
std::setw(2) <<
Glib::ustring
ExportTimespanSelector::ms_str (nframes_t frames) const
{
- if (!session) {
+ if (!_session) {
return "Error!";
}
int sec_promilles;
left = frames;
- hrs = (int) floor (left / (session->frame_rate() * 60.0f * 60.0f));
- left -= (nframes_t) floor (hrs * session->frame_rate() * 60.0f * 60.0f);
- mins = (int) floor (left / (session->frame_rate() * 60.0f));
- left -= (nframes_t) floor (mins * session->frame_rate() * 60.0f);
- secs = (int) floor (left / (float) session->frame_rate());
- left -= (nframes_t) floor (secs * session->frame_rate());
- sec_promilles = (int) (left * 1000 / (float) session->frame_rate() + 0.5);
+ hrs = (int) floor (left / (_session->frame_rate() * 60.0f * 60.0f));
+ left -= (nframes_t) floor (hrs * _session->frame_rate() * 60.0f * 60.0f);
+ mins = (int) floor (left / (_session->frame_rate() * 60.0f));
+ left -= (nframes_t) floor (mins * _session->frame_rate() * 60.0f);
+ secs = (int) floor (left / (float) _session->frame_rate());
+ left -= (nframes_t) floor (secs * _session->frame_rate());
+ sec_promilles = (int) (left * 1000 / (float) _session->frame_rate() + 0.5);
oss << std::setfill('0') << std::right <<
std::setw(2) <<
/*** ExportTimespanSelectorSingle ***/
ExportTimespanSelectorSingle::ExportTimespanSelectorSingle (ARDOUR::Session * session, ProfileManagerPtr manager, Glib::ustring range_id) :
- ExportTimespanSelector (session, manager),
- range_id (range_id)
+ ExportTimespanSelector (session, manager),
+ range_id (range_id)
{
range_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_NEVER);
range_view.append_column_editable ("", range_cols.name);