43 |
|
|
44 |
#include "mainwindow.h" |
#include "mainwindow.h" |
45 |
#include "Settings.h" |
#include "Settings.h" |
46 |
|
#include "CombineInstrumentsDialog.h" |
47 |
#include "../../gfx/status_attached.xpm" |
#include "../../gfx/status_attached.xpm" |
48 |
#include "../../gfx/status_detached.xpm" |
#include "../../gfx/status_detached.xpm" |
49 |
|
|
195 |
); |
); |
196 |
|
|
197 |
|
|
198 |
|
actionGroup->add(Gtk::Action::create("MenuTools", _("_Tools"))); |
199 |
|
|
200 |
|
actionGroup->add( |
201 |
|
Gtk::Action::create("CombineInstruments", _("_Combine Instruments...")), |
202 |
|
sigc::mem_fun(*this, &MainWindow::on_action_combine_instruments) |
203 |
|
); |
204 |
|
|
205 |
|
|
206 |
// sample right-click popup actions |
// sample right-click popup actions |
207 |
actionGroup->add( |
actionGroup->add( |
208 |
Gtk::Action::create("SampleProperties", Gtk::Stock::PROPERTIES), |
Gtk::Action::create("SampleProperties", Gtk::Stock::PROPERTIES), |
254 |
" <menu action='MenuView'>" |
" <menu action='MenuView'>" |
255 |
" <menuitem action='Statusbar'/>" |
" <menuitem action='Statusbar'/>" |
256 |
" </menu>" |
" </menu>" |
257 |
|
" <menu action='MenuTools'>" |
258 |
|
" <menuitem action='CombineInstruments'/>" |
259 |
|
" </menu>" |
260 |
" <menu action='MenuSettings'>" |
" <menu action='MenuSettings'>" |
261 |
" <menuitem action='WarnUserOnExtensions'/>" |
" <menuitem action='WarnUserOnExtensions'/>" |
262 |
" </menu>" |
" </menu>" |
2112 |
} |
} |
2113 |
} |
} |
2114 |
|
|
2115 |
|
void MainWindow::on_action_combine_instruments() { |
2116 |
|
CombineInstrumentsDialog* d = new CombineInstrumentsDialog(*this, file); |
2117 |
|
d->show_all(); |
2118 |
|
d->resize(500, 400); |
2119 |
|
d->run(); |
2120 |
|
if (d->fileWasChanged()) { |
2121 |
|
// update GUI with new instrument just created |
2122 |
|
add_instrument(d->newCombinedInstrument()); |
2123 |
|
} |
2124 |
|
delete d; |
2125 |
|
} |
2126 |
|
|
2127 |
void MainWindow::set_file_is_shared(bool b) { |
void MainWindow::set_file_is_shared(bool b) { |
2128 |
this->file_is_shared = b; |
this->file_is_shared = b; |
2129 |
|
|