/[svn]/gigedit/trunk/src/mainwindow.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/mainwindow.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1212 by persson, Sat Mar 31 09:33:40 2007 UTC revision 1213 by schoenebeck, Wed May 30 00:14:05 2007 UTC
# Line 24  Line 24 
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
# Line 408  void MainWindow::load_file(const char* n Line 409  void MainWindow::load_file(const char* n
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());

Legend:
Removed from v.1212  
changed lines
  Added in v.1213

  ViewVC Help
Powered by ViewVC