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

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

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

revision 3642 by schoenebeck, Wed Oct 2 17:11:30 2019 UTC revision 3643 by schoenebeck, Sat Dec 7 15:04:51 2019 UTC
# Line 263  void NumEntryGain::set_value(int32_t val Line 263  void NumEntryGain::set_value(int32_t val
263          this->value = value;          this->value = value;
264    
265          connected = false;          connected = false;
266          bool plus6 = value < 0;          spinbutton.set_value(value / coeff);
         spinbutton.set_value(plus6 ? 0 : value / coeff);  
         set_sensitive(!plus6);  
267          connected = true;          connected = true;
268    
269          sig_changed();          sig_changed();
# Line 273  void NumEntryGain::set_value(int32_t val Line 271  void NumEntryGain::set_value(int32_t val
271  }  }
272    
273    
 BoolEntryPlus6::BoolEntryPlus6(const char* labelText, NumEntryGain& eGain, int32_t plus6value) :  
     LabelWidget(labelText, checkbutton),  
     checkbutton(labelText),  
     eGain(eGain),  
     plus6value(plus6value)  
 {  
     checkbutton.signal_toggled().connect(  
         sigc::mem_fun(*this, &BoolEntryPlus6::value_changed));  
 }  
   
 void BoolEntryPlus6::on_show_tooltips_changed() {  
     LabelWidget::on_show_tooltips_changed();  
   
     eGain.on_show_tooltips_changed();  
 }  
   
 void BoolEntryPlus6::value_changed()  
 {  
     if (checkbutton.get_active()) eGain.set_value(plus6value);  
     else if (eGain.get_value() < 0) eGain.set_value(0);  
 }  
   
 int32_t BoolEntryPlus6::get_value() const  
 {  
     return eGain.get_value();  
 }  
   
 void BoolEntryPlus6::set_value(int32_t value)  
 {  
     checkbutton.set_active(value < 0);  
 }  
   
274  NumEntryPermille::NumEntryPermille(const char* labelText,  NumEntryPermille::NumEntryPermille(const char* labelText,
275                                     double lower, double upper, int decimals) :                                     double lower, double upper, int decimals) :
276      NumEntry(labelText, lower, upper, decimals),      NumEntry(labelText, lower, upper, decimals),
# Line 720  void Table::add(BoolEntry& boolentry) Line 686  void Table::add(BoolEntry& boolentry)
686  {  {
687  #if USE_GTKMM_GRID  #if USE_GTKMM_GRID
688      attach(boolentry.widget, 0, rowno, 2);      attach(boolentry.widget, 0, rowno, 2);
 #else  
     attach(boolentry.widget, 0, 2, rowno, rowno + 1,  
            Gtk::FILL, Gtk::SHRINK);  
 #endif  
     rowno++;  
 }  
   
 void Table::add(BoolEntryPlus6& boolentry)  
 {  
 #if USE_GTKMM_GRID  
     attach(boolentry.widget, 0, rowno, 2);  
689  #else  #else
690      attach(boolentry.widget, 0, 2, rowno, rowno + 1,      attach(boolentry.widget, 0, 2, rowno, rowno + 1,
691             Gtk::FILL, Gtk::SHRINK);             Gtk::FILL, Gtk::SHRINK);

Legend:
Removed from v.3642  
changed lines
  Added in v.3643

  ViewVC Help
Powered by ViewVC