24 |
#include <gtkmm/messagedialog.h> |
#include <gtkmm/messagedialog.h> |
25 |
#include <gtkmm/stock.h> |
#include <gtkmm/stock.h> |
26 |
#include <gtkmm/targetentry.h> |
#include <gtkmm/targetentry.h> |
27 |
|
#include <gtkmm/main.h> |
28 |
|
|
29 |
#if GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION >= 6 |
#if GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION >= 6 |
30 |
#define ABOUT_DIALOG |
#define ABOUT_DIALOG |
409 |
loader->launch(); |
loader->launch(); |
410 |
} |
} |
411 |
|
|
412 |
|
void MainWindow::load_instrument(gig::Instrument* instr) { |
413 |
|
if (!instr) { |
414 |
|
Glib::ustring txt = "Provided instrument is NULL!\n"; |
415 |
|
Gtk::MessageDialog msg(*this, txt, false, Gtk::MESSAGE_ERROR); |
416 |
|
msg.run(); |
417 |
|
Gtk::Main::quit(); |
418 |
|
} |
419 |
|
gig::File* pFile = (gig::File*) instr->GetParent(); |
420 |
|
load_gig(pFile, NULL /*file name*/); |
421 |
|
//TODO: automatically select the given instrument |
422 |
|
} |
423 |
|
|
424 |
void MainWindow::on_loader_progress() |
void MainWindow::on_loader_progress() |
425 |
{ |
{ |
426 |
load_dialog->set_fraction(loader->get_progress()); |
load_dialog->set_fraction(loader->get_progress()); |