/[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 1104 by persson, Sun Mar 18 17:15:00 2007 UTC revision 1117 by persson, Sat Mar 24 13:05:58 2007 UTC
# Line 613  void PropDialog::set_info(DLS::Info* inf Line 613  void PropDialog::set_info(DLS::Info* inf
613      entry[15].set_text(info->Subject);      entry[15].set_text(info->Subject);
614  }  }
615    
616    namespace {
617        uint16_t& access_MIDIBank(gig::Instrument* instr)
618        {
619            // TODO: update MIDIBankCoarse/Fine too?
620            return instr->MIDIBank;
621        }
622        uint32_t& access_MIDIProgram(gig::Instrument* instr)
623        {
624            return instr->MIDIProgram;
625        }
626    }
627    
628  InstrumentProps::InstrumentProps()  InstrumentProps::InstrumentProps()
629      : table(2,1),      : table(2,1),
630        quitButton(Gtk::Stock::CLOSE)        quitButton(Gtk::Stock::CLOSE),
631          eMIDIBank("MIDIBank", &access_MIDIBank, 0, 16383),
632          eMIDIProgram("MIDIProgram", &access_MIDIProgram),
633          eAttenuation("Attenuation", &gig::Instrument::Attenuation),
634          eEffectSend("EffectSend", &gig::Instrument::EffectSend, 0, 65536),
635          eFineTune("FineTune", &gig::Instrument::FineTune, -8400, 8400),
636          ePianoReleaseMode("PianoReleaseMode", &gig::Instrument::PianoReleaseMode)
637  {  {
638      table.set_col_spacings(5);      table.set_col_spacings(5);
639      char* propLabels[] = {      char* propLabels[] = {
# Line 633  InstrumentProps::InstrumentProps() Line 650  InstrumentProps::InstrumentProps()
650      };      };
651      int entryIdx = 0, checkIdx = 0;      int entryIdx = 0, checkIdx = 0;
652      for (int i = 0 ; i < sizeof(propLabels) / sizeof(char*) ; i++) {      for (int i = 0 ; i < sizeof(propLabels) / sizeof(char*) ; i++) {
653    #if 0
654            if (i == 3) {
655                table.attach(eMIDIProgram.label, 0, 1, i, i + 1,
656                             Gtk::FILL, Gtk::SHRINK);
657                table.attach(eMIDIProgram.widget, 1, 2, i, i + 1,
658                             Gtk::FILL | Gtk::EXPAND, Gtk::SHRINK);
659                continue;
660            }
661    #endif
662          label[i].set_text(propLabels[i]);          label[i].set_text(propLabels[i]);
663          label[i].set_alignment(Gtk::ALIGN_LEFT);          label[i].set_alignment(Gtk::ALIGN_LEFT);
664          table.attach(label[i], 0, 1, i, i + 1, Gtk::FILL, Gtk::SHRINK);          table.attach(label[i], 0, 1, i, i + 1, Gtk::FILL, Gtk::SHRINK);

Legend:
Removed from v.1104  
changed lines
  Added in v.1117

  ViewVC Help
Powered by ViewVC