Revision b58746c2 py/scenic/gui.py
| b/py/scenic/gui.py | ||
|---|---|---|
| 198 | 198 |
self._inviting_timeout_delayed = None |
| 199 | 199 |
widgets_tree = glade.get_widgets_tree() |
| 200 | 200 |
|
| 201 |
self._widgets_changed_by_user = True |
|
| 201 | 202 |
# connects callbacks to widgets automatically |
| 202 | 203 |
glade_signal_slots = {}
|
| 203 | 204 |
for method in prefixedMethods(self, "on_"): |
| ... | ... | |
| 765 | 766 |
* Sets the value of each widget according to the data stored in the configuration file. |
| 766 | 767 |
It could be called again, once another config file has been read. |
| 767 | 768 |
""" |
| 769 |
self._widgets_changed_by_user = False |
|
| 768 | 770 |
print("Changing widgets value according to configuration.")
|
| 769 | 771 |
print(self.app.config.__dict__) |
| 770 | 772 |
# VIDEO CAPTURE SIZE: |
| ... | ... | |
| 847 | 849 |
_set_combobox_value(self.midi_input_device_widget, self.app.config.midi_input_device) |
| 848 | 850 |
_set_combobox_value(self.midi_output_device_widget, self.app.config.midi_output_device) |
| 849 | 851 |
self.midi_jitterbuffer_widget.set_value(self.app.config.midi_jitterbuffer) |
| 852 |
self._widgets_changed_by_user = True |
|
| 850 | 853 |
|
| 851 | 854 |
def update_streaming_state(self): |
| 852 | 855 |
""" |
| ... | ... | |
| 963 | 966 |
self.midi_jitterbuffer_widget.set_sensitive(True) |
| 964 | 967 |
|
| 965 | 968 |
def on_midi_send_enabled_toggled(self, *args): |
| 966 |
self._gather_configuration() |
|
| 967 |
self.make_midi_widget_sensitive_or_not() |
|
| 969 |
if self._widgets_changed_by_user: |
|
| 970 |
self._gather_configuration() |
|
| 971 |
self.make_midi_widget_sensitive_or_not() |
|
| 968 | 972 |
|
| 969 | 973 |
def on_midi_recv_enabled_toggled(self, *args): |
| 970 |
self._gather_configuration() |
|
| 971 |
self.make_midi_widget_sensitive_or_not() |
|
| 974 |
if self._widgets_changed_by_user: |
|
| 975 |
self._gather_configuration() |
|
| 976 |
self.make_midi_widget_sensitive_or_not() |
|
| 972 | 977 |
|
| 973 | 978 |
def _update_rtcp_stats(self): |
| 974 | 979 |
is_streaming = self.app.has_session() |
| ... | ... | |
| 1135 | 1140 |
""" |
| 1136 | 1141 |
Called once Application.poll_midi_devices has been run |
| 1137 | 1142 |
""" |
| 1143 |
self._widgets_changed_by_user = False |
|
| 1138 | 1144 |
input_devices = [device["name"] for device in self.app.devices["midi_input_devices"]] |
| 1139 | 1145 |
output_devices = [device["name"] for device in self.app.devices["midi_output_devices"]] |
| 1140 | 1146 |
print("Updating MIDI devices with values %s %s" % (input_devices, output_devices))
|
| 1141 | 1147 |
_set_combobox_choices(self.midi_input_device_widget, input_devices) |
| 1142 | 1148 |
_set_combobox_choices(self.midi_output_device_widget, output_devices) |
| 1149 |
self._widgets_changed_by_user = True |
|
| 1143 | 1150 |
|
| 1144 | 1151 |
def update_camera_devices(self): |
| 1145 | 1152 |
""" |
Also available in: Unified diff