- track_selector_button.set_name ("EditorGTKButton");
- track_selector_button.signal_clicked().connect (mem_fun(*this, &ExportDialog::track_selector_button_click));
-
- vpacker.pack_start (button_box, false, false);
- vpacker.pack_start (progress_bar, false, false);
-
- Gtkmm2ext::set_size_request_to_display_given_text (file_entry, X_("Kg/quite/a/reasonable/size/for/files/i/think"), 5, 8);
-
- file_hbox.set_spacing (5);
- file_hbox.set_border_width (5);
- file_hbox.pack_start (file_entry, true, true);
- file_hbox.pack_start (file_browse_button, false, false);
-
- file_frame.add (file_hbox);
- file_frame.set_border_width (5);
- file_frame.set_name (FRAME_NAME);
-
- /* pop_strings needs to be created on the stack because set_popdown_strings()
- * takes a reference. */
- vector<string> pop_strings = internationalize(sample_rates);
- Gtkmm2ext::set_popdown_strings (sample_rate_combo, pop_strings);
- pop_strings = internationalize(sample_rates);
- Gtkmm2ext::set_popdown_strings (src_quality_combo, pop_strings);
- pop_strings = internationalize(dither_types);
- Gtkmm2ext::set_popdown_strings (dither_type_combo, pop_strings);
- pop_strings = internationalize(channel_strings);
- Gtkmm2ext::set_popdown_strings (channel_count_combo, pop_strings);
- pop_strings = internationalize((const char **) sndfile_header_formats_strings);
- Gtkmm2ext::set_popdown_strings (header_format_combo, pop_strings);
- pop_strings = internationalize((const char **) sndfile_bitdepth_formats_strings);
- Gtkmm2ext::set_popdown_strings (bitdepth_format_combo, pop_strings);
- pop_strings = internationalize((const char **) sndfile_endian_formats_strings);
- Gtkmm2ext::set_popdown_strings (endian_format_combo, pop_strings);
- pop_strings = internationalize(cue_file_types);
- Gtkmm2ext::set_popdown_strings (cue_file_combo, pop_strings);
-
- /* this will re-sensitized as soon as a non RIFF/WAV
- header format is chosen.
- */
-
- endian_format_combo.set_sensitive (false);
-
- /* determine longest strings at runtime */
-
- const guint32 FUDGE = 10; // Combo's are stupid - they steal space from the entry for the button
-
- maxlen = 0;
- const char *longest = "gl";
- string longest_str;
-
- for (n = 0; n < SNDFILE_HEADER_FORMATS; ++n) {
- if ((len = strlen (sndfile_header_formats_strings[n])) > maxlen) {
- maxlen = len;
- longest = sndfile_header_formats_strings[n];
- }
- }
-
- for (n = 0; n < SNDFILE_BITDEPTH_FORMATS; ++n) {
- if ((len = strlen (sndfile_bitdepth_formats_strings[n])) > maxlen) {
- maxlen = len;
- longest = sndfile_bitdepth_formats_strings[n];
- }
- }
-
- for (n = 0; n < SNDFILE_ENDIAN_FORMATS; ++n) {
- if ((len = strlen (sndfile_endian_formats_strings[n])) > maxlen) {
- maxlen = len;
- longest = sndfile_endian_formats_strings[n];
- }
- }
-
- longest_str = longest;
-
- /* force ascender + descender */
-
- longest_str[0] = 'g';
- longest_str[1] = 'l';
-
- Gtkmm2ext::set_size_request_to_display_given_text (header_format_combo, longest_str.c_str(), 5+FUDGE, 5);
-
- // TRANSLATORS: "slereg" is "stereo" with ascender and descender substituted
- Gtkmm2ext::set_size_request_to_display_given_text (channel_count_combo, _("slereg"), 5+FUDGE, 5);
-
-/* header_format_combo.set_focus_on_click (true);
- bitdepth_format_combo.set_focus_on_click (true);
- endian_format_combo.set_focus_on_click (true);
- channel_count_combo.set_focus_on_click (true);
- src_quality_combo.set_focus_on_click (true);
- dither_type_combo.set_focus_on_click (true);
- sample_rate_combo.set_focus_on_click (true);
- cue_file_combo.set_focus_on_click (true);
-*/
- dither_type_label.set_name ("ExportFormatLabel");
- sample_rate_label.set_name ("ExportFormatLabel");
- src_quality_label.set_name ("ExportFormatLabel");
- channel_count_label.set_name ("ExportFormatLabel");
- header_format_label.set_name ("ExportFormatLabel");
- bitdepth_format_label.set_name ("ExportFormatLabel");
- endian_format_label.set_name ("ExportFormatLabel");
- cue_file_label.set_name ("ExportFormatLabel");
-
- header_format_combo.set_name ("ExportFormatDisplay");
- bitdepth_format_combo.set_name ("ExportFormatDisplay");
- endian_format_combo.set_name ("ExportFormatDisplay");
- channel_count_combo.set_name ("ExportFormatDisplay");
- dither_type_combo.set_name ("ExportFormatDisplay");
- src_quality_combo.set_name ("ExportFormatDisplay");
- sample_rate_combo.set_name ("ExportFormatDisplay");
- cue_file_combo.set_name ("ExportFormatDisplay");
-
- cuefile_only_checkbox.set_name ("ExportCheckbox");
-
- format_table.set_homogeneous (true);
- format_table.set_border_width (5);
- format_table.set_col_spacings (5);
- format_table.set_row_spacings (5);
-
- if (!audio_region) {
- format_table.attach (channel_count_label, 0, 1, 0, 1);
- format_table.attach (channel_count_combo, 0, 1, 1, 2);
- }
-
- format_table.attach (header_format_label, 1, 2, 0, 1);
- format_table.attach (header_format_combo, 1, 2, 1, 2);
-
- format_table.attach (bitdepth_format_label, 0, 1, 2, 3);
- format_table.attach (bitdepth_format_combo, 0, 1, 3, 4);
-
- format_table.attach (endian_format_label, 1, 2, 2, 3);
- format_table.attach (endian_format_combo, 1, 2, 3, 4);
-
- format_table.attach (sample_rate_label, 0, 1, 4, 5);
- format_table.attach (sample_rate_combo, 0, 1, 5, 6);
-
- format_table.attach (src_quality_label, 1, 2, 4, 5);
- format_table.attach (src_quality_combo, 1, 2, 5, 6);
-
- format_table.attach (dither_type_label, 0, 1, 6, 7);
- format_table.attach (dither_type_combo, 0, 1, 7, 8);
-
- format_table.attach (cue_file_label, 1, 2, 6, 7);
- format_table.attach (cue_file_combo, 1, 2, 7, 8);
- format_table.attach (cuefile_only_checkbox, 1, 2, 8, 9);
-
-
- button_box.set_spacing (10);
- button_box.set_homogeneous (true);
-
- cancel_button.add (cancel_label);
-
- button_box.pack_start (ok_button, false, true);
- button_box.pack_start (cancel_button, false, true);