Revert frame -> sample changes where it's a frame as in Gtk::Frame

This commit is contained in:
Johannes Mueller 2018-06-09 19:08:15 +02:00
parent 6edea6064e
commit e6a6778466
6 changed files with 60 additions and 61 deletions

View file

@ -698,14 +698,14 @@ Editor::Editor ()
VBox* summary_arrows_right = manage (new VBox); VBox* summary_arrows_right = manage (new VBox);
summary_arrows_right->pack_start (*summary_arrow_right); summary_arrows_right->pack_start (*summary_arrow_right);
Frame* summary_sample = manage (new Frame); Frame* summary_frame = manage (new Frame);
summary_sample->set_shadow_type (Gtk::SHADOW_ETCHED_IN); summary_frame->set_shadow_type (Gtk::SHADOW_ETCHED_IN);
summary_sample->add (*_summary); summary_frame->add (*_summary);
summary_sample->show (); summary_frame->show ();
_summary_hbox.pack_start (*summary_arrows_left, false, false); _summary_hbox.pack_start (*summary_arrows_left, false, false);
_summary_hbox.pack_start (*summary_sample, true, true); _summary_hbox.pack_start (*summary_frame, true, true);
_summary_hbox.pack_start (*summary_arrows_right, false, false); _summary_hbox.pack_start (*summary_arrows_right, false, false);
if (!ARDOUR::Profile->get_trx()) { if (!ARDOUR::Profile->get_trx()) {

View file

@ -436,8 +436,8 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
Gtk::Table* button_table = manage (new Gtk::Table (initial_button_rows, initial_button_cols)); Gtk::Table* button_table = manage (new Gtk::Table (initial_button_rows, initial_button_cols));
Gtk::Table* output_table = manage (new Gtk::Table (initial_output_rows, initial_output_cols)); Gtk::Table* output_table = manage (new Gtk::Table (initial_output_rows, initial_output_cols));
Frame* sample; Frame* frame;
Frame* bt_sample; Frame* bt_frame;
VBox* box; VBox* box;
int output_row, output_col; int output_row, output_col;
int button_row, button_col; int button_row, button_col;
@ -467,21 +467,21 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
output_table->set_border_width (5); output_table->set_border_width (5);
bt_sample = manage (new Frame); bt_frame = manage (new Frame);
bt_sample->set_name ("BaseFrame"); bt_frame->set_name ("BaseFrame");
bt_sample->set_label (_("Switches")); bt_frame->set_label (_("Switches"));
bt_sample->add (*button_table); bt_frame->add (*button_table);
hpacker.pack_start(*bt_sample, true, true); hpacker.pack_start(*bt_frame, true, true);
box = manage (new VBox); box = manage (new VBox);
box->set_border_width (5); box->set_border_width (5);
box->set_spacing (1); box->set_spacing (1);
sample = manage (new Frame); frame = manage (new Frame);
sample->set_name ("BaseFrame"); frame->set_name ("BaseFrame");
sample->set_label (_("Controls")); frame->set_label (_("Controls"));
sample->add (*box); frame->add (*box);
hpacker.pack_start(*sample, true, true); hpacker.pack_start(*frame, true, true);
// Add special controls to UI, and build list of normal controls to be layed out later // Add special controls to UI, and build list of normal controls to be layed out later
std::vector<ControlUI *> cui_controls_list; std::vector<ControlUI *> cui_controls_list;
@ -583,14 +583,14 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
if (x > max_controls_per_column || similarity_scores[i] <= similarity_threshold) { if (x > max_controls_per_column || similarity_scores[i] <= similarity_threshold) {
if (x > min_controls_per_column) { if (x > min_controls_per_column) {
sample = manage (new Frame); frame = manage (new Frame);
sample->set_name ("BaseFrame"); frame->set_name ("BaseFrame");
sample->set_label (_("Controls")); frame->set_label (_("Controls"));
box = manage (new VBox); box = manage (new VBox);
box->set_border_width (5); box->set_border_width (5);
box->set_spacing (1); box->set_spacing (1);
sample->add (*box); frame->add (*box);
hpacker.pack_start(*sample, true, true); hpacker.pack_start(*frame, true, true);
x = 0; x = 0;
} else { } else {
HSeparator *split = new HSeparator(); HSeparator *split = new HSeparator();
@ -607,22 +607,22 @@ GenericPluginUI::automatic_layout (const std::vector<ControlUI*>& control_uis)
} }
if (box->children().empty()) { if (box->children().empty()) {
hpacker.remove (*sample); hpacker.remove (*frame);
} }
if (button_table->children().empty()) { if (button_table->children().empty()) {
hpacker.remove (*bt_sample); hpacker.remove (*bt_frame);
delete button_table; delete button_table;
} else { } else {
button_table->show_all (); button_table->show_all ();
} }
if (!output_table->children().empty()) { if (!output_table->children().empty()) {
sample = manage (new Frame); frame = manage (new Frame);
sample->set_name ("BaseFrame"); frame->set_name ("BaseFrame");
sample->set_label(_("Meters")); frame->set_label(_("Meters"));
sample->add (*output_table); frame->add (*output_table);
hpacker.pack_end (*sample, true, true); hpacker.pack_end (*frame, true, true);
output_table->show_all (); output_table->show_all ();
} else { } else {
delete output_table; delete output_table;
@ -667,15 +667,15 @@ GenericPluginUI::build_midi_table ()
pgm_table->set_border_width (5); pgm_table->set_border_width (5);
pgm_table->set_col_spacing (2, 10); pgm_table->set_col_spacing (2, 10);
Frame* sample = manage (new Frame); Frame* frame = manage (new Frame);
sample->set_name ("BaseFrame"); frame->set_name ("BaseFrame");
if (dynamic_cast<MidiTrack*> (insert->owner())) { if (dynamic_cast<MidiTrack*> (insert->owner())) {
sample->set_label (_("MIDI Programs (sent to track)")); frame->set_label (_("MIDI Programs (sent to track)"));
} else { } else {
sample->set_label (_("MIDI Programs (volatile)")); frame->set_label (_("MIDI Programs (volatile)"));
} }
sample->add (*pgm_table); frame->add (*pgm_table);
hpacker.pack_start (*sample, false, false); hpacker.pack_start (*frame, false, false);
for (uint8_t chn = 0; chn < 16; ++chn) { for (uint8_t chn = 0; chn < 16; ++chn) {
int col = 3 * (chn / 8); int col = 3 * (chn / 8);

View file

@ -808,15 +808,15 @@ LocationUI::LocationUI (std::string state_node_name)
newest_location = 0; newest_location = 0;
loc_sample_box.set_spacing (5); loc_frame_box.set_spacing (5);
loc_sample_box.set_border_width (5); loc_frame_box.set_border_width (5);
loc_sample_box.set_name("LocationFrameBox"); loc_frame_box.set_name("LocationFrameBox");
loc_sample_box.pack_start (location_rows_scroller, true, true); loc_frame_box.pack_start (location_rows_scroller, true, true);
add_location_button.set_name ("LocationAddLocationButton"); add_location_button.set_name ("LocationAddLocationButton");
table->attach (loc_sample_box, 0, 2, table_row, table_row + 1); table->attach (loc_frame_box, 0, 2, table_row, table_row + 1);
++table_row; ++table_row;
loc_range_panes.add (*table); loc_range_panes.add (*table);
@ -841,14 +841,14 @@ LocationUI::LocationUI (std::string state_node_name)
range_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC); range_rows_scroller.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
range_rows_scroller.set_size_request (-1, 130); range_rows_scroller.set_size_request (-1, 130);
range_sample_box.set_spacing (5); range_frame_box.set_spacing (5);
range_sample_box.set_name("LocationFrameBox"); range_frame_box.set_name("LocationFrameBox");
range_sample_box.set_border_width (5); range_frame_box.set_border_width (5);
range_sample_box.pack_start (range_rows_scroller, true, true); range_frame_box.pack_start (range_rows_scroller, true, true);
add_range_button.set_name ("LocationAddRangeButton"); add_range_button.set_name ("LocationAddRangeButton");
table->attach (range_sample_box, 0, 2, table_row, table_row + 1); table->attach (range_frame_box, 0, 2, table_row, table_row + 1);
++table_row; ++table_row;
loc_range_panes.add (*table); loc_range_panes.add (*table);

View file

@ -182,12 +182,12 @@ private:
ArdourWidgets::VPane loc_range_panes; ArdourWidgets::VPane loc_range_panes;
Gtk::VBox loc_sample_box; Gtk::VBox loc_frame_box;
Gtk::Button add_location_button; Gtk::Button add_location_button;
Gtk::ScrolledWindow location_rows_scroller; Gtk::ScrolledWindow location_rows_scroller;
Gtk::VBox location_rows; Gtk::VBox location_rows;
Gtk::VBox range_sample_box; Gtk::VBox range_frame_box;
Gtk::Button add_range_button; Gtk::Button add_range_button;
Gtk::ScrolledWindow range_rows_scroller; Gtk::ScrolledWindow range_rows_scroller;
Gtk::VBox range_rows; Gtk::VBox range_rows;

View file

@ -62,16 +62,16 @@ SoundcloudExportSelector::SoundcloudExportSelector () :
soundcloud_username_entry.set_text (ARDOUR::SessionMetadata::Metadata()->user_email()); soundcloud_username_entry.set_text (ARDOUR::SessionMetadata::Metadata()->user_email());
soundcloud_password_entry.set_visibility (false); soundcloud_password_entry.set_visibility (false);
Gtk::Frame *sc_sample = manage (new Gtk::Frame); Gtk::Frame *sc_frame = manage (new Gtk::Frame);
sc_sample->set_border_width (4); sc_frame->set_border_width (4);
sc_sample->set_shadow_type (Gtk::SHADOW_ETCHED_OUT); sc_frame->set_shadow_type (Gtk::SHADOW_ETCHED_OUT);
sc_sample->set_name ("soundcloud_export_box"); sc_frame->set_name ("soundcloud_export_box");
pack_start (*sc_sample, false, false); pack_start (*sc_frame, false, false);
sc_table.set_border_width (4); sc_table.set_border_width (4);
sc_table.set_col_spacings (5); sc_table.set_col_spacings (5);
sc_table.set_row_spacings (5); sc_table.set_row_spacings (5);
sc_sample->add (sc_table); sc_frame->add (sc_table);
sc_table.attach ( *(Gtk::manage (new Gtk::Image (ARDOUR_UI_UTILS::get_icon (X_("soundcloud"))))) , 0, 1, 0, 2); sc_table.attach ( *(Gtk::manage (new Gtk::Image (ARDOUR_UI_UTILS::get_icon (X_("soundcloud"))))) , 0, 1, 0, 2);
@ -84,7 +84,7 @@ SoundcloudExportSelector::SoundcloudExportSelector () :
sc_table.attach (soundcloud_download_checkbox, 2, 3, 5, 6); sc_table.attach (soundcloud_download_checkbox, 2, 3, 5, 6);
pack_end (progress_bar, false, false); pack_end (progress_bar, false, false);
sc_sample->show_all (); sc_frame->show_all ();
} }
@ -112,4 +112,3 @@ SoundcloudExportSelector::do_progress_callback (double ultotal, double ulnow, co
return 0; return 0;
} }

View file

@ -269,7 +269,7 @@ TemplateManager::TemplateManager ()
vb->pack_start (*sw); vb->pack_start (*sw);
vb->pack_start (_progress_bar); vb->pack_start (_progress_bar);
Frame* desc_sample = manage (new Frame (_("Description"))); Frame* desc_frame = manage (new Frame (_("Description")));
_description_editor.set_wrap_mode (Gtk::WRAP_WORD); _description_editor.set_wrap_mode (Gtk::WRAP_WORD);
_description_editor.set_size_request (300,400); _description_editor.set_size_request (300,400);
@ -280,10 +280,10 @@ TemplateManager::TemplateManager ()
_description_editor.get_buffer()->signal_changed().connect (sigc::mem_fun (*this, &TemplateManager::set_desc_dirty)); _description_editor.get_buffer()->signal_changed().connect (sigc::mem_fun (*this, &TemplateManager::set_desc_dirty));
desc_sample->add (_description_editor); desc_frame->add (_description_editor);
pack_start (*vb); pack_start (*vb);
pack_start (*desc_sample); pack_start (*desc_frame);
pack_start (*vb_btns); pack_start (*vb_btns);
show_all_children (); show_all_children ();