Browse Source

Support pd-buddy-python 0.3.0

A few changes had to be made because of the new SinkConfig, but they
were very small changes.
Clara Hobbs 7 years ago
parent
commit
16981a9fcf
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      pd-buddy-gtk.py

+ 4
- 4
pd-buddy-gtk.py View File

284
         rev.set_reveal_child(self.cfg != self.cfg_clean)
284
         rev.set_reveal_child(self.cfg != self.cfg_clean)
285
 
285
 
286
     def on_voltage_combobox_changed(self, combo):
286
     def on_voltage_combobox_changed(self, combo):
287
-        self.cfg.v = int(combo.get_active_text()) * 1000
287
+        self.cfg = self.cfg._replace(v=int(combo.get_active_text()) * 1000)
288
 
288
 
289
         self._set_save_button_visibility()
289
         self._set_save_button_visibility()
290
 
290
 
291
     def on_current_spinbutton_changed(self, spin):
291
     def on_current_spinbutton_changed(self, spin):
292
-        self.cfg.i = int(spin.get_value() * 1000)
292
+        self.cfg = self.cfg._replace(i=int(spin.get_value() * 1000))
293
 
293
 
294
         self._set_save_button_visibility()
294
         self._set_save_button_visibility()
295
 
295
 
296
     def on_giveback_toggle_toggled(self, toggle):
296
     def on_giveback_toggle_toggled(self, toggle):
297
         if toggle.get_active():
297
         if toggle.get_active():
298
-            self.cfg.flags |= pdbuddy.SinkFlags.GIVEBACK
298
+            self.cfg = self.cfg._replace(flags=self.cfg.flags|pdbuddy.SinkFlags.GIVEBACK)
299
         else:
299
         else:
300
-            self.cfg.flags &= ~pdbuddy.SinkFlags.GIVEBACK
300
+            self.cfg = self.cfg._replace(flags=self.cfg.flags&~pdbuddy.SinkFlags.GIVEBACK)
301
 
301
 
302
         self._set_save_button_visibility()
302
         self._set_save_button_visibility()
303
 
303
 

Loading…
Cancel
Save