mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 00:17:49 +01:00
MixerSnapshotDialog is now an ArdourWindow
This commit is contained in:
parent
796f2fa263
commit
78d283cc5d
2 changed files with 10 additions and 16 deletions
|
|
@ -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::DnDTreeView<str
|
|||
table->set_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::DnDTreeView<str
|
|||
table->set_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;
|
||||
}
|
||||
|
|
@ -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<Gtk::ListStore> global_model;
|
||||
Glib::RefPtr<Gtk::ListStore> local_model;
|
||||
Gtk::Menu menu;
|
||||
|
||||
Gtk::VBox top_level_view_box;
|
||||
};
|
||||
#endif
|
||||
#endif /* __ardour_mixer_snapshot_dialog_h__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue