X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fregion_layering_order_editor.cc;h=c8690a535127650d9e43cf61115ad952c7c3967f;hb=e133709def199e8a28e34abc56791b05d6079a90;hp=f6bc74a6ffb1760ea708698c2b7a78e977aa7a68;hpb=bdb84342381310f6162418e0603e7eeaabde20bd;p=ardour.git diff --git a/gtk2_ardour/region_layering_order_editor.cc b/gtk2_ardour/region_layering_order_editor.cc index f6bc74a6ff..c8690a5351 100644 --- a/gtk2_ardour/region_layering_order_editor.cc +++ b/gtk2_ardour/region_layering_order_editor.cc @@ -1,21 +1,21 @@ #include #include #include -#include +#include "ardour/region.h" #include "gui_thread.h" -#include "i18n.h" #include "keyboard.h" #include "public_editor.h" #include "region_layering_order_editor.h" #include "utils.h" +#include "i18n.h" using namespace std; using namespace Gtk; using namespace ARDOUR; RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe) - : ArdourDialog (pe, _("RegionLayeringOrderEditor"), false, false) + : ArdourWindow (pe, _("RegionLayeringOrderEditor")) , playlist () , position () , in_row_change (false) @@ -23,7 +23,7 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe) , layering_order_columns () , layering_order_model (Gtk::ListStore::create (layering_order_columns)) , layering_order_display () - , clock ("layer dialog", true, "RegionLayeringOrderEditorClock", false, false, false) + , clock ("layer dialog", true, "clock", false, false, false) , scroller () , editor (pe) { @@ -46,7 +46,7 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe) scroller_table->attach (scroller, 0, 1, 0, 1); scroller_table->set_col_spacings (5); scroller_table->set_row_spacings (5); - + track_label.set_name ("RegionLayeringOrderEditorLabel"); track_label.set_text (_("Track:")); track_label.set_alignment (0, 0.5); @@ -56,7 +56,7 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe) track_name_label.set_name ("RegionLayeringOrderEditorNameLabel"); track_name_label.set_alignment (0, 0.5); clock.set_mode (AudioClock::BBT); - + Gtk::Table* info_table = manage (new Gtk::Table (2, 2)); info_table->set_col_spacings (5); info_table->set_row_spacings (5); @@ -64,11 +64,13 @@ RegionLayeringOrderEditor::RegionLayeringOrderEditor (PublicEditor& pe) info_table->attach (track_name_label, 1, 2, 0, 1, FILL, FILL); info_table->attach (clock_label, 0, 1, 1, 2, FILL, FILL); info_table->attach (clock, 1, 2, 1, 2, FILL, FILL); - - get_vbox()->set_spacing (12); - get_vbox()->pack_start (*info_table, false, false); - get_vbox()->pack_start (*scroller_table, true, true); - + + Gtk::VBox* vbox = Gtk::manage (new Gtk::VBox ()); + vbox->set_spacing (12); + vbox->pack_start (*info_table, false, false); + vbox->pack_start (*scroller_table, true, true); + add (*vbox); + info_table->set_name ("RegionLayeringOrderTable"); scroller_table->set_name ("RegionLayeringOrderTable"); @@ -87,7 +89,7 @@ RegionLayeringOrderEditor::~RegionLayeringOrderEditor () } void -RegionLayeringOrderEditor::row_activated (const TreeModel::Path& path, TreeViewColumn* column) +RegionLayeringOrderEditor::row_activated (const TreeModel::Path& path, TreeViewColumn*) { if (in_row_change) { return; @@ -159,7 +161,7 @@ RegionLayeringOrderEditor::set_context (const string& a_name, Session* s, const track_name_label.set_text (a_name); clock.set_session (s); - clock.set (pos, true, 0, 0); + clock.set (pos, true); playlist_modified_connection.disconnect (); playlist = pl; @@ -185,20 +187,20 @@ RegionLayeringOrderEditor::on_key_press_event (GdkEventKey* ev) */ if (ev->keyval == GDK_Return) { - handled = ArdourDialog::on_key_press_event (ev); + handled = ArdourWindow::on_key_press_event (ev); } - + if (!handled) { handled = key_press_focus_accelerator_handler (editor, ev); } if (!handled) { - handled = ArdourDialog::on_key_press_event (ev); + handled = ArdourWindow::on_key_press_event (ev); } - + return handled; } - + void RegionLayeringOrderEditor::maybe_present () {