add plural forms for pt to gtk2_ardour/po/pt.po
[ardour.git] / gtk2_ardour / tempo_dialog.cc
index 7f79cf3354b509c5fd46a6ee71ed465fde7e0c31..436acfaa679a5b2301a65e422412772b5ae96c42 100644 (file)
@@ -26,7 +26,7 @@
 #include "tempo_dialog.h"
 #include "ui_config.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace Gtk;
@@ -45,9 +45,8 @@ TempoDialog::TempoDialog (TempoMap& map, framepos_t frame, const string&)
        , pulse_selector_label (_("Pulse note"), ALIGN_LEFT, ALIGN_CENTER)
        , tap_tempo_button (_("Tap tempo"))
 {
-       Timecode::BBT_Time when;
-       Tempo tempo (map.tempo_at (frame));
-       map.bbt_time (frame, when);
+       Tempo tempo (map.tempo_at_frame (frame));
+       Timecode::BBT_Time when (map.bbt_at_frame (frame));
 
        init (when, tempo.beats_per_minute(), tempo.note_type(), TempoSection::Constant, true, MusicTime);
 }
@@ -63,8 +62,7 @@ TempoDialog::TempoDialog (TempoMap& map, TempoSection& section, const string&)
        , pulse_selector_label (_("Pulse note"), ALIGN_LEFT, ALIGN_CENTER)
        , tap_tempo_button (_("Tap tempo"))
 {
-       Timecode::BBT_Time when;
-       map.bbt_time (section.frame(), when);
+       Timecode::BBT_Time when (map.bbt_at_frame (section.frame()));
        init (when, section.beats_per_minute(), section.note_type(), section.type(), section.movable(), section.position_lock_style());
 }
 
@@ -197,18 +195,23 @@ TempoDialog::init (const Timecode::BBT_Time& when, double bpm, double note_type,
                Label* when_label = manage (new Label(_("Tempo begins at"), ALIGN_LEFT, ALIGN_CENTER));
                table->attach (*when_label, 0, 1, row, row+1);
 
+               ++row;
                ++row;
 
                Label* lock_style_label = manage (new Label(_("Lock Style:"), ALIGN_LEFT, ALIGN_CENTER));
                table->attach (*lock_style_label, 0, 1, row, row + 1);
-               table->attach (lock_style, 1, 2, row, row + 1);
+               table->attach (lock_style, 1, 5, row, row + 1);
 
-               ++row;
+               --row;
        }
 
+
        Label* tempo_type_label = manage (new Label(_("Tempo Type:"), ALIGN_LEFT, ALIGN_CENTER));
        table->attach (*tempo_type_label, 0, 1, row, row + 1);
-       table->attach (tempo_type, 1, 2, row, row + 2);
+       table->attach (tempo_type, 1, 5, row, row + 1);
+
+       ++row;
+
        get_vbox()->set_border_width (12);
        get_vbox()->pack_end (*table);
 
@@ -415,19 +418,18 @@ TempoDialog::tap_tempo_focus_out (GdkEventFocus* )
 MeterDialog::MeterDialog (TempoMap& map, framepos_t frame, const string&)
        : ArdourDialog (_("New Meter"))
 {
-       Timecode::BBT_Time when;
        frame = map.round_to_bar(frame, RoundNearest);
-       Meter meter (map.meter_at(frame));
+       Timecode::BBT_Time when (map.bbt_at_frame (frame));
+       Meter meter (map.meter_at_frame (frame));
 
-       map.bbt_time (frame, when);
        init (when, meter.divisions_per_bar(), meter.note_divisor(), true, MusicTime);
 }
 
 MeterDialog::MeterDialog (TempoMap& map, MeterSection& section, const string&)
        : ArdourDialog (_("Edit Meter"))
 {
-       Timecode::BBT_Time when;
-       map.bbt_time (section.frame(), when);
+       Timecode::BBT_Time when (map.bbt_at_frame (section.frame()));
+
        init (when, section.divisions_per_bar(), section.note_divisor(), section.movable(), section.position_lock_style());
 }