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

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

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

revision 1157 by schoenebeck, Thu Apr 12 11:48:45 2007 UTC revision 1196 by persson, Fri May 18 10:19:36 2007 UTC
# Line 23  Line 23 
23  #define _(String) gettext(String)  #define _(String) gettext(String)
24    
25  DimRegionEdit::DimRegionEdit() :  DimRegionEdit::DimRegionEdit() :
26      eEG1PreAttack("PreAttack", 0, 100, 2),      eEG1PreAttack("Pre-attack", 0, 100, 2),
27      eEG1Attack("Attack", 0, 60, 3),      eEG1Attack("Attack", 0, 60, 3),
28      eEG1Decay1("Decay1", 0.005, 60, 3),      eEG1Decay1("Decay 1", 0.005, 60, 3),
29      eEG1Decay2("Decay2", 0, 60, 3),      eEG1Decay2("Decay 2", 0, 60, 3),
30      eEG1InfiniteSustain("InfiniteSustain"),      eEG1InfiniteSustain("Infinite sustain"),
31      eEG1Sustain("Sustain", 0, 100, 2),      eEG1Sustain("Sustain", 0, 100, 2),
32      eEG1Release("Release", 0, 60, 3),      eEG1Release("Release", 0, 60, 3),
33      eEG1Hold("Hold"),      eEG1Hold("Hold"),
34      eEG1Controller("Controller"),      eEG1Controller("Controller"),
35      eEG1ControllerInvert("ControllerInvert"),      eEG1ControllerInvert("Controller invert"),
36      eEG1ControllerAttackInfluence("ControllerAttackInfluence", 0, 3),      eEG1ControllerAttackInfluence("Controller attack influence", 0, 3),
37      eEG1ControllerDecayInfluence("ControllerDecayInfluence", 0, 3),      eEG1ControllerDecayInfluence("Controller decay influence", 0, 3),
38      eEG1ControllerReleaseInfluence("ControllerReleaseInfluence", 0, 3),      eEG1ControllerReleaseInfluence("Controller release influence", 0, 3),
39      eLFO1Frequency("Frequency", 0.1, 10, 2),      eLFO1Frequency("Frequency", 0.1, 10, 2),
40      eLFO1InternalDepth("InternalDepth", 0, 1200),      eLFO1InternalDepth("Internal depth", 0, 1200),
41      eLFO1ControlDepth("ControlDepth", 0, 1200),      eLFO1ControlDepth("Control depth", 0, 1200),
42      eLFO1Controller("Controller"),      eLFO1Controller("Controller"),
43      eLFO1FlipPhase("FlipPhase"),      eLFO1FlipPhase("Flip phase"),
44      eLFO1Sync("Sync"),      eLFO1Sync("Sync"),
45      eEG2PreAttack("PreAttack", 0, 100, 2),      eEG2PreAttack("Pre-attack", 0, 100, 2),
46      eEG2Attack("Attack", 0, 60, 3),      eEG2Attack("Attack", 0, 60, 3),
47      eEG2Decay1("Decay1", 0.005, 60, 3),      eEG2Decay1("Decay 1", 0.005, 60, 3),
48      eEG2Decay2("Decay2", 0, 60, 3),      eEG2Decay2("Decay 2", 0, 60, 3),
49      eEG2InfiniteSustain("InfiniteSustain"),      eEG2InfiniteSustain("Infinite sustain"),
50      eEG2Sustain("Sustain", 0, 100, 2),      eEG2Sustain("Sustain", 0, 100, 2),
51      eEG2Release("Release", 0, 60, 3),      eEG2Release("Release", 0, 60, 3),
52      eEG2Controller("Controller"),      eEG2Controller("Controller"),
53      eEG2ControllerInvert("ControllerInvert"),      eEG2ControllerInvert("Controller invert"),
54      eEG2ControllerAttackInfluence("ControllerAttackInfluence", 0, 3),      eEG2ControllerAttackInfluence("Controller attack influence", 0, 3),
55      eEG2ControllerDecayInfluence("ControllerDecayInfluence", 0, 3),      eEG2ControllerDecayInfluence("Controller decay influence", 0, 3),
56      eEG2ControllerReleaseInfluence("ControllerReleaseInfluence", 0, 3),      eEG2ControllerReleaseInfluence("Controller release influence", 0, 3),
57      eLFO2Frequency("Frequency", 0.1, 10, 2),      eLFO2Frequency("Frequency", 0.1, 10, 2),
58      eLFO2InternalDepth("InternalDepth", 0, 1200),      eLFO2InternalDepth("Internal depth", 0, 1200),
59      eLFO2ControlDepth("ControlDepth", 0, 1200),      eLFO2ControlDepth("Control depth", 0, 1200),
60      eLFO2Controller("Controller"),      eLFO2Controller("Controller"),
61      eLFO2FlipPhase("FlipPhase"),      eLFO2FlipPhase("Flip phase"),
62      eLFO2Sync("Sync"),      eLFO2Sync("Sync"),
63      eEG3Attack("Attack", 0, 10, 3),      eEG3Attack("Attack", 0, 10, 3),
64      eEG3Depth("Depth", -1200, 1200),      eEG3Depth("Depth", -1200, 1200),
65      eLFO3Frequency("Frequency", 0.1, 10, 2),      eLFO3Frequency("Frequency", 0.1, 10, 2),
66      eLFO3InternalDepth("InternalDepth", 0, 1200),      eLFO3InternalDepth("Internal depth", 0, 1200),
67      eLFO3ControlDepth("ControlDepth", 0, 1200),      eLFO3ControlDepth("Control depth", 0, 1200),
68      eLFO3Controller("Controller"),      eLFO3Controller("Controller"),
69      eLFO3Sync("Sync"),      eLFO3Sync("Sync"),
70      eVCFEnabled("Enabled"),      eVCFEnabled("Enabled"),
71      eVCFType("Type"),      eVCFType("Type"),
72      eVCFCutoffController("CutoffController"),      eVCFCutoffController("Cutoff controller"),
73      eVCFCutoffControllerInvert("CutoffControllerInvert"),      eVCFCutoffControllerInvert("Cutoff controller invert"),
74      eVCFCutoff("Cutoff"),      eVCFCutoff("Cutoff"),
75      eVCFVelocityCurve("VelocityCurve"),      eVCFVelocityCurve("Velocity curve"),
76      eVCFVelocityScale("VelocityScale"),      eVCFVelocityScale("Velocity scale"),
77      eVCFVelocityDynamicRange("VelocityDynamicRange", 0, 4),      eVCFVelocityDynamicRange("Velocity dynamic range", 0, 4),
78      eVCFResonance("Resonance"),      eVCFResonance("Resonance"),
79      eVCFResonanceDynamic("ResonanceDynamic"),      eVCFResonanceDynamic("Resonance dynamic"),
80      eVCFResonanceController("ResonanceController"),      eVCFResonanceController("Resonance controller"),
81      eVCFKeyboardTracking("KeyboardTracking"),      eVCFKeyboardTracking("Keyboard tracking"),
82      eVCFKeyboardTrackingBreakpoint("KeyboardTrackingBreakpoint"),      eVCFKeyboardTrackingBreakpoint("Keyboard tracking breakpoint"),
83      eVelocityResponseCurve("VelocityResponseCurve"),      eVelocityResponseCurve("Velocity response curve"),
84      eVelocityResponseDepth("VelocityResponseDepth", 0, 4),      eVelocityResponseDepth("Velocity response depth", 0, 4),
85      eVelocityResponseCurveScaling("VelocityResponseCurveScaling"),      eVelocityResponseCurveScaling("Velocity response curve scaling"),
86      eReleaseVelocityResponseCurve("ReleaseVelocityResponseCurve"),      eReleaseVelocityResponseCurve("Release velocity response curve"),
87      eReleaseVelocityResponseDepth("ReleaseVelocityResponseDepth", 0, 4),      eReleaseVelocityResponseDepth("Release velocity response depth", 0, 4),
88      eReleaseTriggerDecay("ReleaseTriggerDecay", 0, 8),      eReleaseTriggerDecay("Release trigger decay", 0, 8),
89      eCrossfade_in_start("Crossfade.in_start"),      eCrossfade_in_start("Crossfade-in start"),
90      eCrossfade_in_end("Crossfade.in_end"),      eCrossfade_in_end("Crossfade-in end"),
91      eCrossfade_out_start("Crossfade.out_start"),      eCrossfade_out_start("Crossfade-out start"),
92      eCrossfade_out_end("Crossfade.out_end"),      eCrossfade_out_end("Crossfade-out end"),
93      ePitchTrack("PitchTrack"),      ePitchTrack("Pitch track"),
94      eDimensionBypass("DimensionBypass"),      eDimensionBypass("Dimension bypass"),
95      ePan("Pan", -64, 63),      ePan("Pan", -64, 63),
96      eSelfMask("SelfMask"),      eSelfMask("Self mask"),
97      eAttenuationController("AttenuationController"),      eAttenuationController("Attenuation controller"),
98      eInvertAttenuationController("InvertAttenuationController"),      eInvertAttenuationController("Invert attenuation controller"),
99      eAttenuationControllerThreshold("AttenuationControllerThreshold"),      eAttenuationControllerThreshold("Attenuation controller threshold"),
100      eChannelOffset("ChannelOffset", 0, 9),      eChannelOffset("Channel offset", 0, 9),
101      eSustainDefeat("SustainDefeat"),      eSustainDefeat("Sustain defeat"),
102      eMSDecode("MSDecode"),      eMSDecode("MS decode"),
103      eSampleStartOffset("SampleStartOffset", 0, 2000),      eSampleStartOffset("Sample start offset", 0, 2000),
104      eUnityNote("UnityNote"),      eUnityNote("Unity note"),
105      eFineTune("FineTune", -49, 50),      eFineTune("Fine tune", -49, 50),
106      eGain("Gain", -96, 0, 2, -655360),      eGain("Gain", -96, 0, 2, -655360),
107      eGainPlus6("Gain +6dB", eGain, 6 * -655360),      eGainPlus6("Gain +6dB", eGain, 6 * -655360),
108      eSampleLoopEnabled("Enabled"),      eSampleLoopEnabled("Enabled"),
109      eSampleLoopStart("Loop Start Positon"),      eSampleLoopStart("Loop start positon"),
110      eSampleLoopLength("Loop Size"),      eSampleLoopLength("Loop size"),
111      eSampleLoopType("Loop Type"),      eSampleLoopType("Loop type"),
112      eSampleLoopInfinite("Infinite Loop"),      eSampleLoopInfinite("Infinite loop"),
113      eSampleLoopPlayCount("Playback Count")      eSampleLoopPlayCount("Playback count")
114  {  {
115      for (int i = 0 ; i < 7 ; i++) {      for (int i = 0 ; i < 7 ; i++) {
116          table[i] = new Gtk::Table(3, 1);          table[i] = new Gtk::Table(3, 1);
# Line 119  DimRegionEdit::DimRegionEdit() : Line 119  DimRegionEdit::DimRegionEdit() :
119    
120      // set tooltips      // set tooltips
121      eUnityNote.set_tip(      eUnityNote.set_tip(
122          _("note this sample is associated with (a.k.a. 'root note')")          _("Note this sample is associated with (a.k.a. 'root note')")
123      );      );
124      eSampleStartOffset.set_tip(_("sample position at which playback should be started"));      eSampleStartOffset.set_tip(_("Sample position at which playback should be started"));
125      ePan.set_tip(_("stereo balance (left/right)"));      ePan.set_tip(_("Stereo balance (left/right)"));
126      eChannelOffset.set_tip(      eChannelOffset.set_tip(
127          _("output channel where the audio signal should be routed to (0 - 9)")          _("Output channel where the audio signal should be routed to (0 - 9)")
128      );      );
129      ePitchTrack.set_tip(      ePitchTrack.set_tip(
130          _("if true: sample will be pitched according to the key position "          _("If true: sample will be pitched according to the key position "
131            "(this would be disabled for drums for example)")            "(this would be disabled for drums for example)")
132      );      );
133      eSampleLoopEnabled.set_tip(_("if enabled: repeats to playback the sample"));      eSampleLoopEnabled.set_tip(_("If enabled: repeats to playback the sample"));
134      eSampleLoopStart.set_tip(      eSampleLoopStart.set_tip(
135          _("start position within the sample (in sample points) of the area to "          _("Start position within the sample (in sample points) of the area to "
136            "be looped")            "be looped")
137      );      );
138      eSampleLoopLength.set_tip(      eSampleLoopLength.set_tip(
139          _("duration (in sample points) of the area to be looped")          _("Duration (in sample points) of the area to be looped")
140      );      );
141      eSampleLoopType.set_tip(      eSampleLoopType.set_tip(
142          _("direction in which the loop area in the sample should be played back")          _("Direction in which the loop area in the sample should be played back")
143      );      );
144      eSampleLoopInfinite.set_tip(      eSampleLoopInfinite.set_tip(
145          _("whether the loop area should be played back forever\n"          _("Whether the loop area should be played back forever\n"
146            "Caution: this setting is stored on Sample side, thus is shared "            "Caution: this setting is stored on Sample side, thus is shared "
147            "among all dimension regions that use this sample!")            "among all dimension regions that use this sample!")
148      );      );
149      eSampleLoopPlayCount.set_tip(      eSampleLoopPlayCount.set_tip(
150          _("how many times the loop area should be played back\n"          _("How many times the loop area should be played back\n"
151            "Caution: this setting is stored on Sample side, thus is shared "            "Caution: this setting is stored on Sample side, thus is shared "
152            "among all dimension regions that use this sample!")            "among all dimension regions that use this sample!")
153      );      );
# Line 156  DimRegionEdit::DimRegionEdit() : Line 156  DimRegionEdit::DimRegionEdit() :
156      rowno = 0;      rowno = 0;
157      firstRowInBlock = 0;      firstRowInBlock = 0;
158    
159      addHeader(_("Mandatory Settings:"));      addHeader(_("Mandatory Settings"));
160      addString("Sample", lSample, wSample);      addString("Sample", lSample, wSample);
161      //TODO: the following would break drag&drop:   wSample->property_editable().set_value(false);  or this:    wSample->set_editable(false);      //TODO: the following would break drag&drop:   wSample->property_editable().set_value(false);  or this:    wSample->set_editable(false);
162      tooltips.set_tip(*wSample, _("drop a sample here"));      tooltips.set_tip(*wSample, _("Drop a sample here"));
163      addProp(eUnityNote);      addProp(eUnityNote);
164      addHeader(_("Optional Settings:"));      // prop_table.addProp(eUnityNote);
165        addHeader(_("Optional Settings"));
166      addProp(eSampleStartOffset);      addProp(eSampleStartOffset);
     addProp(ePan);  
167      addProp(eChannelOffset);      addProp(eChannelOffset);
168      addHeader("Loops:");      addHeader("Loops");
169      addProp(eSampleLoopEnabled);      addProp(eSampleLoopEnabled);
170      addProp(eSampleLoopStart);      addProp(eSampleLoopStart);
171      addProp(eSampleLoopLength);      addProp(eSampleLoopLength);
# Line 181  DimRegionEdit::DimRegionEdit() : Line 181  DimRegionEdit::DimRegionEdit() :
181      addProp(eSampleLoopType);      addProp(eSampleLoopType);
182      addProp(eSampleLoopInfinite);      addProp(eSampleLoopInfinite);
183      addProp(eSampleLoopPlayCount);      addProp(eSampleLoopPlayCount);
184      addHeader("Crossfade:");  
185      addProp(eCrossfade_in_start);      Gtk::Requisition req = table[0]->size_request();
186      addProp(eCrossfade_in_end);      printf("w=%d h=%d\n", req.width, req.height);
187      addProp(eCrossfade_out_start);      req = eCrossfade_out_end.widget.size_request();
188      addProp(eCrossfade_out_end);      printf("widget: w=%d h=%d\n", req.width, req.height);
189    
190        Gtk::Allocation all = table[0]->get_allocation();
191        printf("allocation: w=%d h=%d\n", all.get_width(), all.get_height());
192    
193      nextPage();      nextPage();
194    
195      addHeader(_("General Amplitude Settings:"));      addHeader(_("General Amplitude Settings"));
196      addProp(eGain);      addProp(eGain);
197      addProp(eGainPlus6);      addProp(eGainPlus6);
198      addProp(eAttenuationController);      addProp(ePan);
199      addProp(eInvertAttenuationController);      addHeader(_("Amplitude Envelope (EG1)"));
     addProp(eAttenuationControllerThreshold);  
     addHeader(_("Amplitude Envelope (EG1):"));  
200      addProp(eEG1PreAttack);      addProp(eEG1PreAttack);
201      addProp(eEG1Attack);      addProp(eEG1Attack);
202      addProp(eEG1Decay1);      addProp(eEG1Decay1);
# Line 212  DimRegionEdit::DimRegionEdit() : Line 213  DimRegionEdit::DimRegionEdit() :
213    
214      nextPage();      nextPage();
215    
216      addHeader(_("Amplitude Oscillator (LFO1):"));      addHeader(_("Amplitude Oscillator (LFO1)"));
217      addProp(eLFO1Frequency);      addProp(eLFO1Frequency);
218      addProp(eLFO1InternalDepth);      addProp(eLFO1InternalDepth);
219      addProp(eLFO1ControlDepth);      addProp(eLFO1ControlDepth);
# Line 231  DimRegionEdit::DimRegionEdit() : Line 232  DimRegionEdit::DimRegionEdit() :
232      addProp(eLFO1Controller);      addProp(eLFO1Controller);
233      addProp(eLFO1FlipPhase);      addProp(eLFO1FlipPhase);
234      addProp(eLFO1Sync);      addProp(eLFO1Sync);
235        addHeader("Crossfade");
236        addProp(eAttenuationController);
237        addProp(eInvertAttenuationController);
238        addProp(eAttenuationControllerThreshold);
239        addProp(eCrossfade_in_start);
240        addProp(eCrossfade_in_end);
241        addProp(eCrossfade_out_start);
242        addProp(eCrossfade_out_end);
243    
244      nextPage();      nextPage();
245    
246      addHeader(_("General Filter Settings:"));      addHeader(_("General Filter Settings"));
247      addProp(eVCFEnabled);      addProp(eVCFEnabled);
248      {      {
249          char* choices[] = { "lowpass", "lowpassturbo", "bandpass",          char* choices[] = { "lowpass", "lowpassturbo", "bandpass",
# Line 302  DimRegionEdit::DimRegionEdit() : Line 311  DimRegionEdit::DimRegionEdit() :
311    
312      nextPage();      nextPage();
313    
314      addHeader(_("Filter Cutoff Envelope (EG2):"));      addHeader(_("Filter Cutoff Envelope (EG2)"));
315      addProp(eEG2PreAttack);      addProp(eEG2PreAttack);
316      addProp(eEG2Attack);      addProp(eEG2Attack);
317      addProp(eEG2Decay1);      addProp(eEG2Decay1);
# Line 315  DimRegionEdit::DimRegionEdit() : Line 324  DimRegionEdit::DimRegionEdit() :
324      addProp(eEG2ControllerAttackInfluence);      addProp(eEG2ControllerAttackInfluence);
325      addProp(eEG2ControllerDecayInfluence);      addProp(eEG2ControllerDecayInfluence);
326      addProp(eEG2ControllerReleaseInfluence);      addProp(eEG2ControllerReleaseInfluence);
327      addHeader(_("Filter Cutoff Oscillator (LFO2):"));      addHeader(_("Filter Cutoff Oscillator (LFO2)"));
328      addProp(eLFO2Frequency);      addProp(eLFO2Frequency);
329      addProp(eLFO2InternalDepth);      addProp(eLFO2InternalDepth);
330      addProp(eLFO2ControlDepth);      addProp(eLFO2ControlDepth);
# Line 337  DimRegionEdit::DimRegionEdit() : Line 346  DimRegionEdit::DimRegionEdit() :
346    
347      nextPage();      nextPage();
348    
349      addHeader(_("General Pitch Settings:"));      addHeader(_("General Pitch Settings"));
350      addProp(eFineTune);      addProp(eFineTune);
351      addProp(ePitchTrack);      addProp(ePitchTrack);
352      addHeader(_("Pitch Envelope (EG3):"));      addHeader(_("Pitch Envelope (EG3)"));
353      addProp(eEG3Attack);      addProp(eEG3Attack);
354      addProp(eEG3Depth);      addProp(eEG3Depth);
355      addHeader(_("Pitch Oscillator (LFO3):"));      addHeader(_("Pitch Oscillator (LFO3)"));
356      addProp(eLFO3Frequency);      addProp(eLFO3Frequency);
357      addProp(eLFO3InternalDepth);      addProp(eLFO3InternalDepth);
358      addProp(eLFO3ControlDepth);      addProp(eLFO3ControlDepth);
# Line 494  void DimRegionEdit::nextPage() Line 503  void DimRegionEdit::nextPage()
503      firstRowInBlock = 0;      firstRowInBlock = 0;
504  }  }
505    
506    void DimRegionEdit::addProp(BoolEntry& boolentry)
507    {
508        table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1,
509                              Gtk::FILL, Gtk::SHRINK);
510        rowno++;
511    }
512    
513    void DimRegionEdit::addProp(BoolEntryPlus6& boolentry)
514    {
515        table[pageno]->attach(boolentry.widget, 1, 3, rowno, rowno + 1,
516                              Gtk::FILL, Gtk::SHRINK);
517        rowno++;
518    }
519    
520    PropTable::PropTable()
521    {
522        rowno = 0;
523        firstRowInBlock = 0;
524    
525        table = new Gtk::Table(3, 1);
526        table->set_col_spacings(7);
527        tables.push_back(table);
528    }
529    
530    void PropTable::addProp(LabelWidget& prop)
531    {
532        table->attach(prop.label, 1, 2, rowno, rowno + 1,
533                      Gtk::FILL, Gtk::SHRINK);
534        table->attach(prop.widget, 2, 3, rowno, rowno + 1,
535                      Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK);
536        rowno++;
537    }
538    
539    void PropTable::nextPage()
540    {
541        if (firstRowInBlock < rowno - 1)
542        {
543            Gtk::Label* filler = new Gtk::Label("    ");
544            table->attach(*filler, 0, 1, firstRowInBlock, rowno,
545                          Gtk::FILL, Gtk::SHRINK);
546        }
547        table = new Gtk::Table(3, 1);
548        table->set_col_spacings(7);
549        tables.push_back(table);
550        rowno = 0;
551        firstRowInBlock = 0;
552    }
553    
554  void DimRegionEdit::addProp(LabelWidget& prop)  void DimRegionEdit::addProp(LabelWidget& prop)
555  {  {
556      table[pageno]->attach(prop.label, 1, 2, rowno, rowno + 1,      table[pageno]->attach(prop.label, 1, 2, rowno, rowno + 1,
# Line 658  void DimRegionEdit::VCFCutoffController_ Line 715  void DimRegionEdit::VCFCutoffController_
715      eVCFCutoffControllerInvert.set_sensitive(hasController);      eVCFCutoffControllerInvert.set_sensitive(hasController);
716      eVCFCutoff.set_sensitive(!hasController);      eVCFCutoff.set_sensitive(!hasController);
717      eVCFResonanceDynamic.set_sensitive(!hasController);      eVCFResonanceDynamic.set_sensitive(!hasController);
718      eVCFVelocityScale.label.set_text(hasController ? "MinimumCutoff:" :      eVCFVelocityScale.label.set_text(hasController ? "Minimum cutoff:" :
719                                       "VelocityScale:");                                       "Velocity scale:");
720  }  }
721    
722  void DimRegionEdit::VCFResonanceController_changed()  void DimRegionEdit::VCFResonanceController_changed()
# Line 696  void DimRegionEdit::AttenuationControlle Line 753  void DimRegionEdit::AttenuationControlle
753  {  {
754      bool hasController = eAttenuationController.get_active_row_number() != 0;      bool hasController = eAttenuationController.get_active_row_number() != 0;
755      eInvertAttenuationController.set_sensitive(hasController);      eInvertAttenuationController.set_sensitive(hasController);
756        eAttenuationControllerThreshold.set_sensitive(hasController);
757        eCrossfade_in_start.set_sensitive(hasController);
758        eCrossfade_in_end.set_sensitive(hasController);
759        eCrossfade_out_start.set_sensitive(hasController);
760        eCrossfade_out_end.set_sensitive(hasController);
761  }  }
762    
763  void DimRegionEdit::LFO1Controller_changed()  void DimRegionEdit::LFO1Controller_changed()
# Line 812  void DimRegionEdit::updateLoopElements() Line 874  void DimRegionEdit::updateLoopElements()
874          eSampleLoopType.set_ptr(NULL);          eSampleLoopType.set_ptr(NULL);
875          eSampleLoopPlayCount.set_ptr(NULL);          eSampleLoopPlayCount.set_ptr(NULL);
876      }      }
877        // updated enabled state of loop play count widget
878        loop_infinite_toggled();
879  }  }
880    
881  void DimRegionEdit::loop_infinite_toggled() {  void DimRegionEdit::loop_infinite_toggled() {
882      eSampleLoopPlayCount.set_sensitive(!eSampleLoopInfinite.get_active());      eSampleLoopPlayCount.set_sensitive(
883      if (eSampleLoopInfinite.get_active()) eSampleLoopPlayCount.set_value(0);          !eSampleLoopInfinite.get_active() &&
884      else                                  eSampleLoopPlayCount.set_value(1);           eSampleLoopEnabled.get_active()
885        );
886        if (eSampleLoopInfinite.get_active())
887            eSampleLoopPlayCount.set_value(0);
888        else if (!eSampleLoopPlayCount.get_value())
889            eSampleLoopPlayCount.set_value(1);
890  }  }

Legend:
Removed from v.1157  
changed lines
  Added in v.1196

  ViewVC Help
Powered by ViewVC