diff --git a/gtk2_ardour/mixer_snapshot_dialog.cc b/gtk2_ardour/mixer_snapshot_dialog.cc index 21b5cd8f7b..f4aa04b81d 100644 --- a/gtk2_ardour/mixer_snapshot_dialog.cc +++ b/gtk2_ardour/mixer_snapshot_dialog.cc @@ -42,7 +42,7 @@ struct ColumnInfo { }; MixerSnapshotDialog::MixerSnapshotDialog(Session* s) - : ArdourDialog(_("Mixer Snapshot Manager:"), true, false) + : ArdourWindow(_("Mixer Snapshot Manager:")) { global_model = Gtk::ListStore::create(_columns); local_model = Gtk::ListStore::create(_columns); @@ -50,6 +50,8 @@ MixerSnapshotDialog::MixerSnapshotDialog(Session* s) bootstrap_display_and_model(global_display, global_model, true); bootstrap_display_and_model(local_display, local_model, false); + add(top_level_view_box); + global_display.signal_button_press_event().connect(sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::button_press), true), false); local_display.signal_button_press_event().connect(sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::button_press), false), false); @@ -59,7 +61,7 @@ MixerSnapshotDialog::MixerSnapshotDialog(Session* s) void MixerSnapshotDialog::set_session(Session* s) { if(s) - ArdourDialog::set_session(s); + ArdourWindow::set_session(s); refill(); } @@ -204,7 +206,7 @@ bool MixerSnapshotDialog::bootstrap_display_and_model(Gtkmm2ext::DnDTreeViewset_size_request(-1, 400); table->attach(global_scroller, 0, 3, 0, 5 ); table->attach(*vbox, 2, 3, 6, 8, FILL|EXPAND, FILL, 5, 5); - get_vbox()->pack_start(*table); + top_level_view_box.pack_start(*table); } else { btn_add->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::new_snapshot), false)); btn_new->signal_clicked().connect(sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::new_snap_from_session), false)); @@ -217,7 +219,7 @@ bool MixerSnapshotDialog::bootstrap_display_and_model(Gtkmm2ext::DnDTreeViewset_size_request(-1, 400); table->attach(local_scroller, 0, 3, 0, 5 ); table->attach(*vbox, 2, 3, 6, 8, FILL|EXPAND, FILL, 5, 5); - get_vbox()->pack_start(*table); + top_level_view_box.pack_start(*table); } ColumnInfo ci[] = { @@ -441,9 +443,4 @@ void MixerSnapshotDialog::fav_cell_action(const string& path, bool global) (*iter)[_columns.favorite] = snap->favorite; snap->write((*iter)[_columns.full_path]); } -} - -int MixerSnapshotDialog::run() { - show_all(); - return 0; } \ No newline at end of file diff --git a/gtk2_ardour/mixer_snapshot_dialog.h b/gtk2_ardour/mixer_snapshot_dialog.h index 4cc238d174..ab47f33637 100644 --- a/gtk2_ardour/mixer_snapshot_dialog.h +++ b/gtk2_ardour/mixer_snapshot_dialog.h @@ -34,21 +34,18 @@ #include "ardour/mixer_snapshot.h" -#include "ardour_dialog.h" +#include "ardour_window.h" #include "widgets/ardour_button.h" #include "widgets/ardour_dropdown.h" -class MixerSnapshotDialog : public ArdourDialog +class MixerSnapshotDialog : public ArdourWindow { public: MixerSnapshotDialog(ARDOUR::Session*); ~MixerSnapshotDialog() {}; void set_session(ARDOUR::Session*); - - int run(); - void refill(); private: @@ -102,6 +99,6 @@ class MixerSnapshotDialog : public ArdourDialog Glib::RefPtr global_model; Glib::RefPtr local_model; Gtk::Menu menu; - + Gtk::VBox top_level_view_box; }; -#endif +#endif /* __ardour_mixer_snapshot_dialog_h__ */