/[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 1082 by schoenebeck, Thu Mar 8 01:43:18 2007 UTC revision 1094 by schoenebeck, Sun Mar 11 17:47:21 2007 UTC
# Line 27  Line 27 
27  #if GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION >= 6  #if GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION >= 6
28  #define ABOUT_DIALOG  #define ABOUT_DIALOG
29  #include <gtkmm/aboutdialog.h>  #include <gtkmm/aboutdialog.h>
30    #include <gtkmm/messagedialog.h>
31  #endif  #endif
32    
33    #include <stdio.h>
34    #include <sndfile.h>
35    
36  #define _(String) gettext(String)  #define _(String) gettext(String)
37    
38  template<class T> inline std::string ToString(T o) {  template<class T> inline std::string ToString(T o) {
# Line 386  void MainWindow::addProp(LabelWidget& pr Line 390  void MainWindow::addProp(LabelWidget& pr
390    
391  MainWindow::MainWindow() :  MainWindow::MainWindow() :
392  //    eSample("Sample", wSample),  //    eSample("Sample", wSample),
     eVelocityUpperLimit("VelocityUpperLimit",  
                         &gig::DimensionRegion::VelocityUpperLimit),  
393      eEG1PreAttack("PreAttack", &gig::DimensionRegion::EG1PreAttack, 0, 100, 2),      eEG1PreAttack("PreAttack", &gig::DimensionRegion::EG1PreAttack, 0, 100, 2),
394      eEG1Attack("Attack", &gig::DimensionRegion::EG1Attack, 0, 60, 3),      eEG1Attack("Attack", &gig::DimensionRegion::EG1Attack, 0, 60, 3),
395      eEG1Decay1("Decay1", &gig::DimensionRegion::EG1Decay1, 0.005, 60, 3),      eEG1Decay1("Decay1", &gig::DimensionRegion::EG1Decay1, 0.005, 60, 3),
# Line 516  MainWindow::MainWindow() : Line 518  MainWindow::MainWindow() :
518      eSampleLoops("SampleLoops", &access_SampleLoops, 0, 1)      eSampleLoops("SampleLoops", &access_SampleLoops, 0, 1)
519  {  {
520  //    set_border_width(5);  //    set_border_width(5);
521      set_default_size(400, 200);  //    set_default_size(400, 200);
522    
523    
524      add(m_VBox);      add(m_VBox);
# Line 530  MainWindow::MainWindow() : Line 532  MainWindow::MainWindow() :
532          sigc::mem_fun(*this, &MainWindow::on_button_release));          sigc::mem_fun(*this, &MainWindow::on_button_release));
533    
534      // Add the TreeView tab, inside a ScrolledWindow, with the button underneath:      // Add the TreeView tab, inside a ScrolledWindow, with the button underneath:
535      m_ScrolledWindow.add(m_TreeViewNotebook);      m_ScrolledWindow.add(m_TreeView);
536      m_ScrolledWindow.set_size_request(400, 600);  //    m_ScrolledWindow.set_size_request(200, 600);
537      m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);      m_ScrolledWindow.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
538    
539        m_ScrolledWindowSamples.add(m_TreeViewSamples);
540        m_ScrolledWindowSamples.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
541    
542    
543      for (int i = 0 ; i < 5 ; i++) {      for (int i = 0 ; i < 5 ; i++) {
544          table[i] = new Gtk::Table(3, 1);          table[i] = new Gtk::Table(3, 1);
545          table[i]->set_col_spacings(5);          table[i]->set_col_spacings(5);
# Line 544  MainWindow::MainWindow() : Line 550  MainWindow::MainWindow() :
550      firstRowInBlock = 0;      firstRowInBlock = 0;
551    
552      addString("Sample", lSample, wSample);      addString("Sample", lSample, wSample);
     addProp(eVelocityUpperLimit);  
553      addHeader("EG1");      addHeader("EG1");
554      addProp(eEG1PreAttack);      addProp(eEG1PreAttack);
555      addProp(eEG1Attack);      addProp(eEG1Attack);
# Line 783  MainWindow::MainWindow() : Line 788  MainWindow::MainWindow() :
788      m_Notebook.append_page(*table[2], "EG3");      m_Notebook.append_page(*table[2], "EG3");
789      m_Notebook.append_page(*table[3], "Velocity");      m_Notebook.append_page(*table[3], "Velocity");
790      m_Notebook.append_page(*table[4], "Misc");      m_Notebook.append_page(*table[4], "Misc");
791      m_Notebook.set_size_request(400, 500);  //    m_Notebook.set_size_request(400, 500);
792    
793      m_HPaned.add1(m_ScrolledWindow);      m_TreeViewNotebook.set_size_request(300);
794        m_HPaned.add1(m_TreeViewNotebook);
795      m_HPaned.add2(m_Notebook);      m_HPaned.add2(m_Notebook);
796    
797    
798      m_TreeViewNotebook.append_page(m_TreeViewSamples, "Samples");      m_TreeViewNotebook.append_page(m_ScrolledWindowSamples, "Samples");
799      m_TreeViewNotebook.append_page(m_TreeView, "Instruments");      m_TreeViewNotebook.append_page(m_ScrolledWindow, "Instruments");
800    
801    
802      actionGroup = Gtk::ActionGroup::create();      actionGroup = Gtk::ActionGroup::create();
# Line 851  MainWindow::MainWindow() : Line 857  MainWindow::MainWindow() :
857          sigc::mem_fun(*this, &MainWindow::on_action_add_group)          sigc::mem_fun(*this, &MainWindow::on_action_add_group)
858      );      );
859      actionGroup->add(      actionGroup->add(
860          Gtk::Action::create("AddSample", _("Add _Sample")),          Gtk::Action::create("AddSample", _("Add _Sample(s)")),
861          sigc::mem_fun(*this, &MainWindow::on_action_add_sample)          sigc::mem_fun(*this, &MainWindow::on_action_add_sample)
862      );      );
863      actionGroup->add(      actionGroup->add(
# Line 968  void MainWindow::set_dim_region(gig::Dim Line 974  void MainWindow::set_dim_region(gig::Dim
974  {  {
975      update_gui = false;      update_gui = false;
976      wSample->set_text(d->pSample ? d->pSample->pInfo->Name.c_str() : "NULL");      wSample->set_text(d->pSample ? d->pSample->pInfo->Name.c_str() : "NULL");
     eVelocityUpperLimit.set_dimreg(d);  
977      eEG1PreAttack.set_dimreg(d);      eEG1PreAttack.set_dimreg(d);
978      eEG1Attack.set_dimreg(d);      eEG1Attack.set_dimreg(d);
979      eEG1Decay1.set_dimreg(d);      eEG1Decay1.set_dimreg(d);
# Line 1276  LoadDialog::LoadDialog() Line 1281  LoadDialog::LoadDialog()
1281    
1282  void MainWindow::on_action_file_new()  void MainWindow::on_action_file_new()
1283  {  {
1284        m_SampleImportQueue.clear();
1285  }  }
1286    
1287  void MainWindow::on_action_file_open()  void MainWindow::on_action_file_open()
# Line 1298  void MainWindow::on_action_file_open() Line 1304  void MainWindow::on_action_file_open()
1304          }          }
1305          instrument_menu->get_submenu()->items().clear();          instrument_menu->get_submenu()->items().clear();
1306    
1307            m_SampleImportQueue.clear();
1308          m_refTreeModel->clear();          m_refTreeModel->clear();
1309          m_refSamplesTreeModel->clear();          m_refSamplesTreeModel->clear();
1310          if (file) delete file;          if (file) delete file;
# Line 1337  void MainWindow::on_loader_finished() Line 1344  void MainWindow::on_loader_finished()
1344    
1345  void MainWindow::on_action_file_save()  void MainWindow::on_action_file_save()
1346  {  {
1347        if (!file) return;
1348        std::cout << "Saving file\n" << std::flush;
1349        try {
1350            file->Save();
1351        } catch (RIFF::Exception e) {
1352            Glib::ustring txt = "Could not save file: " + e.Message;
1353            Gtk::MessageDialog msg(*this, txt, false, Gtk::MESSAGE_ERROR);
1354            msg.run();
1355            return;
1356        }
1357        std::cout << "Saving file done\n" << std::flush;
1358        __import_queued_samples();
1359  }  }
1360    
1361  void MainWindow::on_action_file_save_as()  void MainWindow::on_action_file_save_as()
1362  {  {
1363        if (!file) return;
1364      Gtk::FileChooserDialog dialog(*this, "Open", Gtk::FILE_CHOOSER_ACTION_SAVE);      Gtk::FileChooserDialog dialog(*this, "Open", Gtk::FILE_CHOOSER_ACTION_SAVE);
1365      dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);      dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
1366      dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);      dialog.add_button(Gtk::Stock::SAVE, Gtk::RESPONSE_OK);
# Line 1349  void MainWindow::on_action_file_save_as( Line 1369  void MainWindow::on_action_file_save_as(
1369      dialog.set_filter(filter);      dialog.set_filter(filter);
1370      if (dialog.run() == Gtk::RESPONSE_OK) {      if (dialog.run() == Gtk::RESPONSE_OK) {
1371          printf("filename=%s\n", dialog.get_filename().c_str());          printf("filename=%s\n", dialog.get_filename().c_str());
1372          file->Save(dialog.get_filename());          try {
1373                file->Save(dialog.get_filename());
1374            } catch (RIFF::Exception e) {
1375                Glib::ustring txt = "Could not save file: " + e.Message;
1376                Gtk::MessageDialog msg(*this, txt, false, Gtk::MESSAGE_ERROR);
1377                msg.run();
1378                return;
1379            }
1380            __import_queued_samples();
1381        }
1382    }
1383    
1384    // actually write the sample(s)' data to the gig file
1385    void MainWindow::__import_queued_samples() {
1386        std::cout << "Starting sample import\n" << std::flush;
1387        Glib::ustring error_files;
1388        printf("Samples to import: %d\n", m_SampleImportQueue.size());
1389        for (std::list<SampleImportItem>::iterator iter = m_SampleImportQueue.begin(); iter != m_SampleImportQueue.end(); ) {
1390            printf("Importing sample %s\n",(*iter).sample_path.c_str());
1391            SF_INFO info;
1392            info.format = 0;
1393            SNDFILE* hFile = sf_open((*iter).sample_path.c_str(), SFM_READ, &info);
1394            try {
1395                if (!hFile) throw std::string("could not open file");
1396                // determine sample's bit depth
1397                int bitdepth;
1398                switch (info.format & 0xff) {
1399                    case SF_FORMAT_PCM_S8:
1400                        bitdepth = 16; // we simply convert to 16 bit for now
1401                        break;
1402                    case SF_FORMAT_PCM_16:
1403                        bitdepth = 16;
1404                        break;
1405                    case SF_FORMAT_PCM_24:
1406                        bitdepth = 32; // we simply convert to 32 bit for now
1407                        break;
1408                    case SF_FORMAT_PCM_32:
1409                        bitdepth = 32;
1410                        break;
1411                    case SF_FORMAT_PCM_U8:
1412                        bitdepth = 16; // we simply convert to 16 bit for now
1413                        break;
1414                    case SF_FORMAT_FLOAT:
1415                        bitdepth = 32;
1416                        break;
1417                    case SF_FORMAT_DOUBLE:
1418                        bitdepth = 32; // I guess we will always truncate this to 32 bit
1419                        break;
1420                    default:
1421                        sf_close(hFile); // close sound file
1422                        throw std::string("format not supported"); // unsupported subformat (yet?)
1423                }
1424                // allocate appropriate copy buffer (TODO: for now we copy it in one piece, might be tough for very long samples)
1425                // and copy sample data into buffer
1426                int8_t* buffer = NULL;
1427                switch (bitdepth) {
1428                    case 16:
1429                        buffer = new int8_t[2 * info.channels * info.frames];
1430                        sf_readf_short(hFile, (short*) buffer, info.frames); // libsndfile does the conversion for us (if needed)
1431                        break;
1432                    case 32:
1433                        buffer = new int8_t[4 * info.channels * info.frames];
1434                        sf_readf_int(hFile, (int*) buffer, info.frames); // libsndfile does the conversion for us (if needed)
1435                        break;
1436                }
1437                // write from buffer directly (physically) into .gig file
1438                (*iter).gig_sample->Write(buffer, info.frames);
1439                // cleanup
1440                sf_close(hFile);
1441                delete buffer;
1442                // on success we remove the sample from the import queue, otherwise keep it, maybe it works the next time ?
1443                std::list<SampleImportItem>::iterator cur = iter;
1444                ++iter;
1445                m_SampleImportQueue.erase(cur);
1446            } catch (std::string what) { // remember the files that made trouble (and their cause)
1447                if (error_files.size()) error_files += "\n";
1448                error_files += (*iter).sample_path += " (" + what + ")";
1449                ++iter;
1450            }
1451        }
1452        // show error message box when some sample(s) could not be imported
1453        if (error_files.size()) {
1454            Glib::ustring txt = "Could not import the following sample(s):\n" + error_files;
1455            Gtk::MessageDialog msg(*this, txt, false, Gtk::MESSAGE_ERROR);
1456            msg.run();
1457      }      }
1458  }  }
1459    
# Line 1557  void MainWindow::load_gig(gig::File* gig Line 1661  void MainWindow::load_gig(gig::File* gig
1661      instrument_menu->get_submenu()->show_all_children();      instrument_menu->get_submenu()->show_all_children();
1662    
1663      for (gig::Group* group = gig->GetFirstGroup(); group; group = gig->GetNextGroup()) {      for (gig::Group* group = gig->GetFirstGroup(); group; group = gig->GetNextGroup()) {
1664          Gtk::TreeModel::iterator iterGroup = m_refSamplesTreeModel->append();          if (group->Name != "") {
1665          Gtk::TreeModel::Row rowGroup = *iterGroup;              Gtk::TreeModel::iterator iterGroup = m_refSamplesTreeModel->append();
1666          rowGroup[m_SamplesModel.m_col_name]   = group->Name.c_str();              Gtk::TreeModel::Row rowGroup = *iterGroup;
1667          rowGroup[m_SamplesModel.m_col_group]  = group;              rowGroup[m_SamplesModel.m_col_name]   = group->Name.c_str();
1668          rowGroup[m_SamplesModel.m_col_sample] = NULL;              rowGroup[m_SamplesModel.m_col_group]  = group;
1669          for (gig::Sample* sample = group->GetFirstSample(); sample; sample = group->GetNextSample()) {              rowGroup[m_SamplesModel.m_col_sample] = NULL;
1670              Gtk::TreeModel::iterator iterSample = m_refSamplesTreeModel->append(rowGroup.children());              for (gig::Sample* sample = group->GetFirstSample(); sample; sample = group->GetNextSample()) {
1671              Gtk::TreeModel::Row rowSample = *iterSample;                  Gtk::TreeModel::iterator iterSample = m_refSamplesTreeModel->append(rowGroup.children());
1672              rowSample[m_SamplesModel.m_col_name]   = sample->pInfo->Name.c_str();                  Gtk::TreeModel::Row rowSample = *iterSample;
1673              rowSample[m_SamplesModel.m_col_sample] = sample;                  rowSample[m_SamplesModel.m_col_name]   = sample->pInfo->Name.c_str();
1674              rowSample[m_SamplesModel.m_col_group]  = NULL;                  rowSample[m_SamplesModel.m_col_sample] = sample;
1675                    rowSample[m_SamplesModel.m_col_group]  = NULL;
1676                }
1677          }          }
1678      }      }
1679  }  }
# Line 1639  void MainWindow::on_action_add_group() { Line 1745  void MainWindow::on_action_add_group() {
1745  }  }
1746    
1747  void MainWindow::on_action_add_sample() {  void MainWindow::on_action_add_sample() {
1748      //TODO: open browse for file dialog for adding new samples      if (!file) return;
1749        // get selected group
1750        Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewSamples.get_selection();
1751        Gtk::TreeModel::iterator it = sel->get_selected();
1752        if (!it) return;
1753        Gtk::TreeModel::Row row = *it;
1754        gig::Group* group = row[m_SamplesModel.m_col_group];
1755        if (!group) { // not a group, but a sample is selected (probably)
1756            gig::Sample* sample = row[m_SamplesModel.m_col_sample];
1757            if (!sample) return;
1758            it = row.parent(); // resolve parent (that is the sample's group)
1759            if (!it) return;
1760            row = *it;
1761            group = row[m_SamplesModel.m_col_group];
1762            if (!group) return;
1763        }
1764        // show 'browse for file' dialog
1765        Gtk::FileChooserDialog dialog(*this, _("Add Sample(s)"));
1766        dialog.add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
1767        dialog.add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK);
1768        dialog.set_select_multiple(true);
1769        Gtk::FileFilter soundfilter; // matches all file types supported by libsndfile
1770        const char* supportedFileTypes[] = {
1771            "*.wav", "*.WAV", "*.aiff", "*.AIFF", "*.aifc", "*.AIFC", "*.snd",
1772            "*.SND", "*.au", "*.AU", "*.paf", "*.PAF", "*.iff", "*.IFF",
1773            "*.svx", "*.SVX", "*.sf", "*.SF", "*.voc", "*.VOC", "*.w64",
1774            "*.W64", "*.pvf", "*.PVF", "*.xi", "*.XI", "*.htk", "*.HTK",
1775            "*.caf", "*.CAF", NULL
1776        };
1777        for (int i = 0; supportedFileTypes[i]; i++)
1778            soundfilter.add_pattern(supportedFileTypes[i]);
1779        soundfilter.set_name("Sound Files");
1780        Gtk::FileFilter allpassfilter; // matches every file
1781        allpassfilter.add_pattern("*.*");
1782        allpassfilter.set_name("All Files");
1783        dialog.add_filter(soundfilter);
1784        dialog.add_filter(allpassfilter);
1785        if (dialog.run() == Gtk::RESPONSE_OK) {
1786            Glib::ustring error_files;
1787            Glib::SListHandle<Glib::ustring> filenames = dialog.get_filenames();
1788            for (Glib::SListHandle<Glib::ustring>::iterator iter = filenames.begin(); iter != filenames.end(); ++iter) {
1789                printf("Adding sample %s\n",(*iter).c_str());
1790                // use libsndfile to retrieve file informations
1791                SF_INFO info;
1792                info.format = 0;
1793                SNDFILE* hFile = sf_open((*iter).c_str(), SFM_READ, &info);
1794                try {
1795                    if (!hFile) throw std::string("could not open file");
1796                    int bitdepth;
1797                    switch (info.format & 0xff) {
1798                        case SF_FORMAT_PCM_S8:
1799                            bitdepth = 16; // we simply convert to 16 bit for now
1800                            break;
1801                        case SF_FORMAT_PCM_16:
1802                            bitdepth = 16;
1803                            break;
1804                        case SF_FORMAT_PCM_24:
1805                            bitdepth = 32; // we simply convert to 32 bit for now
1806                            break;
1807                        case SF_FORMAT_PCM_32:
1808                            bitdepth = 32;
1809                            break;
1810                        case SF_FORMAT_PCM_U8:
1811                            bitdepth = 16; // we simply convert to 16 bit for now
1812                            break;
1813                        case SF_FORMAT_FLOAT:
1814                            bitdepth = 32;
1815                            break;
1816                        case SF_FORMAT_DOUBLE:
1817                            bitdepth = 32; // I guess we will always truncate this to 32 bit
1818                            break;
1819                        default:
1820                            sf_close(hFile); // close sound file
1821                            throw std::string("format not supported"); // unsupported subformat (yet?)
1822                    }
1823                    // add a new sample to the .gig file
1824                    gig::Sample* sample = file->AddSample();
1825                    sample->pInfo->Name = (*iter).substr((*iter).rfind('/') + 1).raw(); // file name without path
1826                    sample->Channels = info.channels;
1827                    sample->BitDepth = bitdepth;
1828                    sample->FrameSize = bitdepth / 8/*1 byte are 8 bits*/ * info.channels;
1829                    sample->SamplesPerSecond = info.samplerate;
1830                    // schedule resizing the sample (which will be done physically when File::Save() is called)
1831                    sample->Resize(info.frames);
1832                    // make sure sample is part of the selected group
1833                    group->AddSample(sample);
1834                    // schedule that physical resize and sample import (data copying), performed when "Save" is requested
1835                    SampleImportItem sched_item;
1836                    sched_item.gig_sample  = sample;
1837                    sched_item.sample_path = *iter;
1838                    m_SampleImportQueue.push_back(sched_item);
1839                    // add sample to the tree view
1840                    Gtk::TreeModel::iterator iterSample = m_refSamplesTreeModel->append(row.children());
1841                    Gtk::TreeModel::Row rowSample = *iterSample;
1842                    rowSample[m_SamplesModel.m_col_name]   = sample->pInfo->Name.c_str();
1843                    rowSample[m_SamplesModel.m_col_sample] = sample;
1844                    rowSample[m_SamplesModel.m_col_group]  = NULL;
1845                    // close sound file
1846                    sf_close(hFile);
1847                } catch (std::string what) { // remember the files that made trouble (and their cause)
1848                    if (error_files.size()) error_files += "\n";
1849                    error_files += *iter += " (" + what + ")";
1850                }
1851            }
1852            // show error message box when some file(s) could not be opened / added
1853            if (error_files.size()) {
1854                Glib::ustring txt = "Could not add the following sample(s):\n" + error_files;
1855                Gtk::MessageDialog msg(*this, txt, false, Gtk::MESSAGE_ERROR);
1856                msg.run();
1857            }
1858        }
1859  }  }
1860    
1861  void MainWindow::on_action_remove_sample() {  void MainWindow::on_action_remove_sample() {
1862      //TODO: remove the selected group or sample      if (!file) return;
1863        Glib::RefPtr<Gtk::TreeSelection> sel = m_TreeViewSamples.get_selection();
1864        Gtk::TreeModel::iterator it = sel->get_selected();
1865        if (it) {
1866            Gtk::TreeModel::Row row = *it;
1867            gig::Group* group   = row[m_SamplesModel.m_col_group];
1868            gig::Sample* sample = row[m_SamplesModel.m_col_sample];
1869            Glib::ustring name  = row[m_SamplesModel.m_col_name];
1870            try {
1871                // remove group or sample from the gig file
1872                if (group) {
1873                    // temporarily remember the samples that bolong to that group (we need that to clean the queue)
1874                    std::list<gig::Sample*> members;
1875                    for (gig::Sample* pSample = group->GetFirstSample(); pSample; pSample = group->GetNextSample()) {
1876                        members.push_back(pSample);
1877                    }
1878                    // delete the group in the .gig file including the samples that belong to the group
1879                    file->DeleteGroup(group);
1880                    // if sample(s) were just previously added, remove them from the import queue
1881                    for (std::list<gig::Sample*>::iterator member = members.begin(); member != members.end(); ++member) {
1882                        for (std::list<SampleImportItem>::iterator iter = m_SampleImportQueue.begin(); iter != m_SampleImportQueue.end(); ++iter) {
1883                            if ((*iter).gig_sample == *member) {
1884                                printf("Removing previously added sample '%s' from group '%s'\n", (*iter).sample_path.c_str(), name.c_str());
1885                                m_SampleImportQueue.erase(iter);
1886                                break;
1887                            }
1888                        }
1889                    }
1890                } else if (sample) {
1891                    // remove sample from the .gig file
1892                    file->DeleteSample(sample);
1893                    // if sample was just previously added, remove it from the import queue
1894                    for (std::list<SampleImportItem>::iterator iter = m_SampleImportQueue.begin(); iter != m_SampleImportQueue.end(); ++iter) {
1895                        if ((*iter).gig_sample == sample) {
1896                            printf("Removing previously added sample '%s'\n", (*iter).sample_path.c_str());
1897                            m_SampleImportQueue.erase(iter);
1898                            break;
1899                        }
1900                    }
1901                }
1902                // remove respective row(s) from samples tree view
1903                m_refSamplesTreeModel->erase(it);
1904            } catch (RIFF::Exception e) {
1905                Gtk::MessageDialog msg(*this, e.Message.c_str(), false, Gtk::MESSAGE_ERROR);
1906                msg.run();
1907            }
1908        }
1909  }  }

Legend:
Removed from v.1082  
changed lines
  Added in v.1094

  ViewVC Help
Powered by ViewVC