[Summary] Sample rate mismatch dialog remade

This commit is contained in:
Nikolay 2014-11-21 10:33:04 +02:00
parent 45191a8449
commit 20ca153a09
3 changed files with 12 additions and 38 deletions

View file

@ -32,24 +32,16 @@ SampleRateMismatchDialog::SampleRateMismatchDialog (ARDOUR::framecnt_t desired,
: WavesDialog (_("sample_rate_mismatch_dialog.xml"), true, false)
, _cancel_button ( get_waves_button ("cancel_button") )
, _accept_button ( get_waves_button ("accept_button") )
, _info_label_1 ( get_label("info_label_1") )
, _info_label_2 ( get_label("info_label_2") )
, _info_label_3 ( get_label("info_label_3") )
, _info_label_4 ( get_label("info_label_4") )
, _info_label_5 ( get_label("info_label_5") )
, _info_label ( get_label("info_label") )
{
set_modal (true);
set_resizable (false);
_cancel_button.signal_clicked.connect (sigc::mem_fun (*this, &SampleRateMismatchDialog::cancel_button_pressed));
_accept_button.signal_clicked.connect (sigc::mem_fun (*this, &SampleRateMismatchDialog::accept_button_pressed));
_info_label.set_text (string_compose ( _("This session was created with a sample rate of %1 Hz, but\n%2 is currently running at %3 Hz. If you load this session,\ndevice will be switched to the session sample rate value.\nIf an attemp to switch the device is unsuccessful\naudio may be played at the wrong sample rate."), desired, program_name, actual) );
_info_label_1.set_text (string_compose ( _("This session was created with a sample rate of %1 Hz, but "), desired) );
_info_label_2.set_text (string_compose ( _("%1 is currently running at %2 Hz. If you load this session, "), program_name, actual) );
_info_label_3.set_text ( _("device will be switched to the session sample rate value.") );
_info_label_4.set_text ( _("If an attemp to switch the device is unsuccessful") );
_info_label_5.set_text ( _("audio may be played at the wrong sample rate.") );
show_all ();
}

View file

@ -41,11 +41,7 @@ private:
WavesButton& _cancel_button;
WavesButton& _accept_button;
Gtk::Label& _info_label_1;
Gtk::Label& _info_label_2;
Gtk::Label& _info_label_3;
Gtk::Label& _info_label_4;
Gtk::Label& _info_label_5;
Gtk::Label& _info_label;
};
#endif /* __sample_rate_mismatch_dialog_h__ */

View file

@ -12,31 +12,17 @@
bghover="#898989"/>
<Layout width="420"
height="125"
height="140"
bgnormal="#EDECE8">
<VBox width="420"
x="0"
y="20">
<Label id="info_label_1"
y="0">
<Label id="info_label"
style="generic_control"
fgnormal="#6D6E72"
horzalignment="center"/>
<Label id="info_label_2"
style="generic_control"
fgnormal="#6D6E72"
horzalignment="center"/>
<Label id="info_label_3"
style="generic_control"
fgnormal="#6D6E72"
horzalignment="center"/>
<Label id="info_label_4"
style="generic_control"
fgnormal="#6D6E72"
horzalignment="center"/>
<Label id="info_label_5"
style="generic_control"
fgnormal="#6D6E72"
horzalignment="center"/>
height="100"
horzalignment="center"
justify="center"/>
</VBox>
<Button id="cancel_button"
@ -51,7 +37,7 @@
width="80"
height="22"
x="240"
y="95"/>
y="110"/>
<Button id="accept_button"
style="generic_control"
@ -65,7 +51,7 @@
width="80"
height="22"
x="330"
y="95"/>
y="110"/>
</Layout>
</Dialog>