--- gigedit/trunk/src/gigedit/mainwindow.cpp 2014/04/23 16:49:05 2541 +++ gigedit/trunk/src/gigedit/mainwindow.cpp 2014/05/13 12:17:43 2548 @@ -43,6 +43,7 @@ #include "mainwindow.h" #include "Settings.h" +#include "CombineInstrumentsDialog.h" #include "../../gfx/status_attached.xpm" #include "../../gfx/status_detached.xpm" @@ -194,6 +195,14 @@ ); + actionGroup->add(Gtk::Action::create("MenuTools", _("_Tools"))); + + actionGroup->add( + Gtk::Action::create("CombineInstruments", _("_Combine Instruments...")), + sigc::mem_fun(*this, &MainWindow::on_action_combine_instruments) + ); + + // sample right-click popup actions actionGroup->add( Gtk::Action::create("SampleProperties", Gtk::Stock::PROPERTIES), @@ -245,6 +254,9 @@ " " " " " " + " " + " " + " " " " " " " " @@ -2100,6 +2112,18 @@ } } +void MainWindow::on_action_combine_instruments() { + CombineInstrumentsDialog* d = new CombineInstrumentsDialog(*this, file); + d->show_all(); + d->resize(500, 400); + d->run(); + if (d->fileWasChanged()) { + // update GUI with new instrument just created + add_instrument(d->newCombinedInstrument()); + } + delete d; +} + void MainWindow::set_file_is_shared(bool b) { this->file_is_shared = b;