gtkmm: use append() instead of deprecated Gtk::ComboBoxText::append_text()

This commit is contained in:
Mads Kiilerich 2022-01-26 21:11:15 +01:00 committed by Robin Gareus
parent 71ea2cc7b9
commit 09c6e68ae8
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
24 changed files with 96 additions and 96 deletions

View File

@ -174,14 +174,14 @@ AddRouteDialog::AddRouteDialog ()
));
}
insert_at_combo.append_text (_("First"));
insert_at_combo.append_text (_("Before Selection"));
insert_at_combo.append_text (_("After Selection"));
insert_at_combo.append_text (_("Last"));
insert_at_combo.append (_("First"));
insert_at_combo.append (_("Before Selection"));
insert_at_combo.append (_("After Selection"));
insert_at_combo.append (_("Last"));
insert_at_combo.set_active (min(UIConfiguration::instance().get_insert_at_position (), (uint32_t)3));
strict_io_combo.append_text (_("Flexible-I/O"));
strict_io_combo.append_text (_("Strict-I/O"));
strict_io_combo.append (_("Flexible-I/O"));
strict_io_combo.append (_("Strict-I/O"));
strict_io_combo.set_active (Config->get_strict_io () ? 1 : 0);
show_on_cue_chkbox.set_active (UIConfiguration::instance().get_show_on_cue_page ());
@ -1040,11 +1040,11 @@ void
AddRouteDialog::refill_route_groups ()
{
route_group_combo.clear ();
route_group_combo.append_text (_("New Group..."));
route_group_combo.append (_("New Group..."));
route_group_combo.append_text ("separator");
route_group_combo.append ("separator");
route_group_combo.append_text (_("No Group"));
route_group_combo.append (_("No Group"));
if (_session) {
_session->foreach_route_group (sigc::mem_fun (*this, &AddRouteDialog::add_route_group));

View File

@ -215,8 +215,8 @@ BundleEditor::BundleEditor (Session* session, boost::shared_ptr<UserBundle> bund
a = new Gtk::Alignment (0, 0.5, 0, 1);
a->add (_input_or_output);
t->attach (*Gtk::manage (a), 1, 2, 1, 2);
_input_or_output.append_text (_("Destination"));
_input_or_output.append_text (_("Source"));
_input_or_output.append (_("Destination"));
_input_or_output.append (_("Source"));
if (bundle->ports_are_inputs()) {
_input_or_output.set_active_text (_("Destination"));

View File

@ -54,10 +54,10 @@ DuplicateRouteDialog::DuplicateRouteDialog ()
playlist_button_box.pack_start (share_playlists_button, false, false);
playlist_button_box.show_all ();
insert_at_combo.append_text (_("First"));
insert_at_combo.append_text (_("Before Selection"));
insert_at_combo.append_text (_("After Selection"));
insert_at_combo.append_text (_("Last"));
insert_at_combo.append (_("First"));
insert_at_combo.append (_("Before Selection"));
insert_at_combo.append (_("After Selection"));
insert_at_combo.append (_("Last"));
insert_at_combo.set_active (3);
Gtk::Label* l = manage (new Label (_("Insert duplicates at: ")));

View File

@ -46,9 +46,9 @@ ExportFilenameSelector::ExportFilenameSelector ()
{
include_label.set_markup (_("Build filename(s) from these components:"));
session_snap_name.append_text (_("No Name"));
session_snap_name.append_text (_("Session Name"));
session_snap_name.append_text (_("Snapshot Name"));
session_snap_name.append (_("No Name"));
session_snap_name.append (_("Session Name"));
session_snap_name.append (_("Snapshot Name"));
session_snap_name.set_active (0);
pack_start (path_hbox, false, false, 12);

View File

@ -115,8 +115,8 @@ ExportFormatDialog::ExportFormatDialog (FormatPtr format, bool new_dialog)
/* Normalize */
normalize_tp_limiter.append_text (_("limit to"));
normalize_tp_limiter.append_text (_("constrain to"));
normalize_tp_limiter.append (_("limit to"));
normalize_tp_limiter.append (_("constrain to"));
Gtk::RadioButtonGroup normalize_group = normalize_loudness_rb.get_group ();
normalize_peak_rb.set_group (normalize_group);

View File

@ -213,15 +213,15 @@ ExportVideoDialog::apply_state (TimeSelection& tme, bool range)
sampleoffset_t av_offset = ARDOUR_UI::instance ()->video_timeline->get_offset ();
insnd_combo.remove_all ();
insnd_combo.append_text (_("from session start marker to session end marker"));
insnd_combo.append (_("from session start marker to session end marker"));
if (av_offset < 0) {
insnd_combo.append_text (_("from 00:00:00:00 to the video end"));
insnd_combo.append (_("from 00:00:00:00 to the video end"));
} else {
insnd_combo.append_text (_("from video start to video end"));
insnd_combo.append (_("from video start to video end"));
}
if (!_export_range.empty ()) {
insnd_combo.append_text (_("Selected range")); // TODO show _export_range.start() -> _export_range.end_sample()
insnd_combo.append (_("Selected range")); // TODO show _export_range.start() -> _export_range.end_sample()
}
if (range) {
insnd_combo.set_active (2);

View File

@ -88,9 +88,9 @@ InsertRemoveTimeDialog::InsertRemoveTimeDialog (PublicEditor& e, bool remove)
Label* intersected_label = manage (new Label (_("Intersected regions should:")));
intersected_label->set_alignment (1, 0.5);
table->attach (*intersected_label, 0, 1, 2, 3, FILL | EXPAND);
_intersected_combo.append_text (_("stay in position"));
_intersected_combo.append_text (_("move"));
_intersected_combo.append_text (_("be split"));
_intersected_combo.append (_("stay in position"));
_intersected_combo.append (_("move"));
_intersected_combo.append (_("be split"));
_intersected_combo.set_active (0);
table->attach (_intersected_combo, 1, 2, 2, 3);
}

View File

@ -148,7 +148,7 @@ MidiTracer::ports_changed ()
}
for (ARDOUR::PortManager::PortList::const_iterator i = pl.begin(); i != pl.end(); ++i) {
_port_combo.append_text ((*i)->name());
_port_combo.append ((*i)->name());
}
if (c.empty()) {

View File

@ -256,9 +256,9 @@ Mixer_UI::Mixer_UI ()
favorite_plugins_model->signal_row_has_child_toggled().connect (sigc::mem_fun (*this, &Mixer_UI::sync_treeview_favorite_ui_state));
favorite_plugins_model->signal_row_deleted().connect (sigc::mem_fun (*this, &Mixer_UI::favorite_plugins_deleted));
favorite_plugins_mode_combo.append_text (_("Favorite Plugins"));
favorite_plugins_mode_combo.append_text (_("Recent Plugins"));
favorite_plugins_mode_combo.append_text (_("Top-10 Plugins"));
favorite_plugins_mode_combo.append (_("Favorite Plugins"));
favorite_plugins_mode_combo.append (_("Recent Plugins"));
favorite_plugins_mode_combo.append (_("Top-10 Plugins"));
favorite_plugins_mode_combo.set_active_text (_("Favorite Plugins"));
favorite_plugins_mode_combo.signal_changed().connect (sigc::mem_fun (*this, &Mixer_UI::plugin_list_mode_changed));

View File

@ -159,10 +159,10 @@ using the program.</span> \
Label* bazmatic = manage (new Label);
bazmatic->set_markup (_("<small><i>This can later be changed in Preferences &gt; Appearance.</i></small>"));
ui_font_scale.append_text (_("100%"));
ui_font_scale.append_text (_("150%"));
ui_font_scale.append_text (_("200%"));
ui_font_scale.append_text (_("250%"));
ui_font_scale.append (_("100%"));
ui_font_scale.append (_("150%"));
ui_font_scale.append (_("200%"));
ui_font_scale.append (_("250%"));
ui_font_scale.set_active_text (_("100%"));
HBox* hbox = manage (new HBox);

View File

@ -52,8 +52,8 @@ NormalizeDialog::NormalizeDialog (bool more_than_one)
tbl->set_border_width (6);
_dbfs_dbtp = manage (new Gtk::ComboBoxText);
_dbfs_dbtp->append_text (_("dBFS"));
_dbfs_dbtp->append_text (_("dBTP"));
_dbfs_dbtp->append (_("dBFS"));
_dbfs_dbtp->append (_("dBTP"));
_dbfs_dbtp->set_active (_last_normalize_true_peak ? 1 : 0);
_spin_peak = manage (new SpinButton (0.2, 2));

View File

@ -471,7 +471,7 @@ void
ComboStringOption::set_popdown_strings (const std::vector<std::string>& strings) {
_combo->clear_items ();
for (std::vector<std::string>::const_iterator i = strings.begin(); i != strings.end(); ++i) {
_combo->append_text (*i);
_combo->append (*i);
}
}
@ -513,9 +513,9 @@ BoolComboOption::BoolComboOption (
_combo = manage (new ComboBoxText);
/* option 0 is the false option */
_combo->append_text (f);
_combo->append (f);
/* and option 1 is the true */
_combo->append_text (t);
_combo->append (t);
_combo->signal_changed().connect (sigc::mem_fun (*this, &BoolComboOption::changed));
}

View File

@ -347,7 +347,7 @@ public:
void add (T e, std::string const & o)
{
_options.push_back (e);
_combo->append_text (o);
_combo->append (o);
/* Remove excess space.
* gtk_combo_box_size_requet() does the following:
* {

View File

@ -202,7 +202,7 @@ PatchChangeDialog::fill_bank_combo ()
for (MIDI::Name::ChannelNameSet::PatchBanks::const_iterator i = cns->patch_banks().begin(); i != cns->patch_banks().end(); ++i) {
string n = (*i)->name ();
boost::replace_all (n, "_", " ");
_bank_combo.append_text (n);
_bank_combo.append (n);
}
}
@ -294,7 +294,7 @@ PatchChangeDialog::fill_patch_combo ()
for (MIDI::Name::PatchNameList::const_iterator j = patches.begin(); j != patches.end(); ++j) {
string n = (*j)->name ();
boost::replace_all (n, "_", " ");
_patch_combo.append_text (n);
_patch_combo.append (n);
}
}

View File

@ -126,12 +126,12 @@ PluginEqGui::PluginEqGui (boost::shared_ptr<ARDOUR::PluginInsert> pluginInsert)
dBSelectBin->add (*manage(dBScaleCombo));
_live_signal_combo = new Gtk::ComboBoxText ();
_live_signal_combo->append_text (_("Off"));
_live_signal_combo->append_text (_("Output / Input"));
_live_signal_combo->append_text (_("Input"));
_live_signal_combo->append_text (_("Output"));
_live_signal_combo->append_text (_("Input +40dB"));
_live_signal_combo->append_text (_("Output +40dB"));
_live_signal_combo->append (_("Off"));
_live_signal_combo->append (_("Output / Input"));
_live_signal_combo->append (_("Input"));
_live_signal_combo->append (_("Output"));
_live_signal_combo->append (_("Input +40dB"));
_live_signal_combo->append (_("Output +40dB"));
_live_signal_combo->set_active (0);
Gtk::Label *live_signal_label = new Gtk::Label (_("Live signal:"));

View File

@ -1104,8 +1104,8 @@ RecorderUI::new_track_for_port (DataType dt, string const& port_name)
track_name_entry.set_text (port_name);
}
strict_io_combo.append_text (_("Flexible-I/O"));
strict_io_combo.append_text (_("Strict-I/O"));
strict_io_combo.append (_("Flexible-I/O"));
strict_io_combo.append (_("Strict-I/O"));
strict_io_combo.set_active (Config->get_strict_io () ? 1 : 0);
Label* l;

View File

@ -175,7 +175,7 @@ RegionEditor::RegionEditor (Session* s, boost::shared_ptr<Region> r)
set_title (string_compose (_("Region '%1'"), _region->name()));
for (uint32_t i = 0; i < _region->sources().size(); ++i) {
_sources.append_text (_region->source(i)->name());
_sources.append (_region->source(i)->name());
}
_sources.set_headers_visible (false);

View File

@ -107,13 +107,13 @@ ScriptSelector::setup_list ()
_script_combo.set_row_separator_func (sigc::mem_fun (*this, &ScriptSelector::script_separator));
if (_script_type == LuaScriptInfo::EditorAction) {
_script_combo.append_text ("Shortcut");
_script_combo.append_text ("--separator--");
_script_combo.append ("Shortcut");
_script_combo.append ("--separator--");
}
vector<string>::const_iterator i;
for (i = script_names.begin(); i != script_names.end(); ++i) {
_script_combo.append_text (*i);
_script_combo.append (*i);
}
_script_combo.set_active(0);

View File

@ -40,17 +40,17 @@ SessionArchiveDialog::SessionArchiveDialog ()
vbox->set_spacing (6);
format_selector.append_text (ARDOUR::session_archive_suffix);
format_selector.append (ARDOUR::session_archive_suffix);
format_selector.set_active_text (ARDOUR::session_archive_suffix);
encode_selector.append_text (_("None"));
encode_selector.append_text (_("FLAC 16bit"));
encode_selector.append_text (_("FLAC 24bit"));
encode_selector.append (_("None"));
encode_selector.append (_("FLAC 16bit"));
encode_selector.append (_("FLAC 24bit"));
encode_selector.set_active_text (_("FLAC 16bit")); // TODO remember
compression_selector.append_text (_("None"));
compression_selector.append_text (_("Fast"));
compression_selector.append_text (_("Good"));
compression_selector.append (_("None"));
compression_selector.append (_("Fast"));
compression_selector.append (_("Good"));
compression_selector.set_active_text (_("Good")); // TODO remember
Gtk::Table* table = manage (new Gtk::Table ());

View File

@ -758,15 +758,15 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
// Order of the following must correspond with enum sortMethod
// in sfdb_freesound_mootcher.h
freesound_sort.append_text(_("None"));
freesound_sort.append_text(_("Longest"));
freesound_sort.append_text(_("Shortest"));
freesound_sort.append_text(_("Newest"));
freesound_sort.append_text(_("Oldest"));
freesound_sort.append_text(_("Most downloaded"));
freesound_sort.append_text(_("Least downloaded"));
freesound_sort.append_text(_("Highest rated"));
freesound_sort.append_text(_("Lowest rated"));
freesound_sort.append(_("None"));
freesound_sort.append(_("Longest"));
freesound_sort.append(_("Shortest"));
freesound_sort.append(_("Newest"));
freesound_sort.append(_("Oldest"));
freesound_sort.append(_("Most downloaded"));
freesound_sort.append(_("Least downloaded"));
freesound_sort.append(_("Highest rated"));
freesound_sort.append(_("Lowest rated"));
freesound_sort.set_active(0);
passbox->pack_start (freesound_search_btn, false, false);

View File

@ -184,11 +184,11 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
options_box->pack_start (*l, false, true, 4);
if (ffok) {
video_combo.append_text (_("Reference from Current Location (Previously Transcoded Files Only)"));
video_combo.append_text (_("Import/Transcode Video to Session"));
video_combo.append (_("Reference from Current Location (Previously Transcoded Files Only)"));
video_combo.append (_("Import/Transcode Video to Session"));
video_combo.set_active (1);
if (as.size () > 0) {
video_combo.append_text (_("Do Not Import Video (Audio Import Only)"));
video_combo.append (_("Do Not Import Video (Audio Import Only)"));
audio_combo.set_sensitive (true);
} else {
audio_combo.set_sensitive (false);
@ -198,7 +198,7 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
path_entry.set_sensitive (true);
browse_button.set_sensitive (true);
} else if (as.size () > 0) {
video_combo.append_text (_("Do Not Import Video (Audio Import Only)"));
video_combo.append (_("Do Not Import Video (Audio Import Only)"));
video_combo.set_active (0);
path_entry.set_text ("");
@ -208,7 +208,7 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
path_entry.set_sensitive (false);
browse_button.set_sensitive (false);
} else {
video_combo.append_text (_("Do Not Import Video"));
video_combo.append (_("Do Not Import Video"));
video_combo.set_active (0);
path_entry.set_text ("");
video_combo.set_sensitive (false);
@ -230,39 +230,39 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
t->attach (aspect_checkbox, 2, 3, 0, 1);
t->attach (height_spinner, 3, 4, 0, 1);
scale_combo.append_text (_("Original Width"));
scale_combo.append (_("Original Width"));
if (w > 1920) {
scale_combo.append_text ("1920 (hd1080)");
scale_combo.append ("1920 (hd1080)");
}
if (w > 1408) {
scale_combo.append_text ("1408 (16cif)");
scale_combo.append ("1408 (16cif)");
}
if (w > 1280) {
scale_combo.append_text ("1280 (sxga, hd720)");
scale_combo.append ("1280 (sxga, hd720)");
}
if (w > 1024) {
scale_combo.append_text ("1024 (xga)");
scale_combo.append ("1024 (xga)");
}
if (w > 852) {
scale_combo.append_text (" 852 (hd480)");
scale_combo.append (" 852 (hd480)");
}
if (w > 768) {
scale_combo.append_text (" 768 (PAL)");
scale_combo.append (" 768 (PAL)");
}
if (w > 720) {
scale_combo.append_text (" 720 (PAL)");
scale_combo.append (" 720 (PAL)");
}
if (w > 640) {
scale_combo.append_text (" 640 (vga, ega)");
scale_combo.append (" 640 (vga, ega)");
}
if (w > 352) {
scale_combo.append_text (" 352 (cif)");
scale_combo.append (" 352 (cif)");
}
if (w > 320) {
scale_combo.append_text (" 320 (cga, qvga)");
scale_combo.append (" 320 (cga, qvga)");
}
if (w > 176) {
scale_combo.append_text (" 176 (qcif)");
scale_combo.append (" 176 (qcif)");
}
scale_combo.set_active (0);
height_spinner.set_value (h);
@ -278,12 +278,12 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile)
t->attach (ltc_detect, 1, 4, 3, 4);
if (as.size () == 0) {
audio_combo.append_text (_("No Audio Track Present"));
audio_combo.append (_("No Audio Track Present"));
audio_combo.set_sensitive (false);
} else {
audio_combo.append_text (_("Do Not Extract Audio"));
audio_combo.append (_("Do Not Extract Audio"));
for (TranscodeFfmpeg::FFAudioStreams::iterator it = as.begin (); it < as.end (); ++it) {
audio_combo.append_text ((*it).name);
audio_combo.append ((*it).name);
}
}
audio_combo.set_active (0);

View File

@ -87,8 +87,8 @@ VideoServerDialog::VideoServerDialog (Session* s)
docroot_entry.set_width_chars(38);
docroot_entry.set_text(video_get_docroot (Config));
listenaddr_combo.append_text("127.0.0.1");
listenaddr_combo.append_text("0.0.0.0");
listenaddr_combo.append("127.0.0.1");
listenaddr_combo.append("0.0.0.0");
#ifdef __APPLE__
/* Note: on OSX icsd is not able to bind to IPv4 localhost,
* except on bigsur where 0.0.0.0 works

View File

@ -476,7 +476,7 @@ Gtkmm2ext::set_popdown_strings (Gtk::ComboBoxText& cr, const vector<string>& str
cr.clear ();
for (i = strings.begin(); i != strings.end(); ++i) {
cr.append_text (*i);
cr.append (*i);
}
}

View File

@ -57,7 +57,7 @@ PathsDialog::PathsDialog (Gtk::Window& parent, std::string title, std::string cu
std::vector <std::string> a = PBD::parse_path(current_paths);
for(vector<std::string>::const_iterator i = a.begin(); i != a.end(); ++i) {
paths_list_view.append_text(*i);
paths_list_view.append(*i);
}
paths_list_view.get_selection()->signal_changed().connect (mem_fun (*this, &PathsDialog::selection_changed));
@ -167,6 +167,6 @@ PathsDialog::set_default() {
paths_list_view.clear_items();
std::vector <std::string> a = PBD::parse_path(_default_paths);
for(vector<std::string>::const_iterator i = a.begin(); i != a.end(); ++i) {
paths_list_view.append_text(*i);
paths_list_view.append(*i);
}
}