def save_settings(self, setting1):
children = self.ids.devices.children[:]
index = 0
while children:
child = children.pop()
if index == 0:
self.app.config.update_setting("AudioSettings", "mic", child.text)
if index == 1:
self.app.config.update_setting("AudioSettings", "speakers", child.text)
if index == 2 and child.text == "Default":
self.app.config.update_setting("LQRecordingSettings", "codec", "Default")
if index == 2 and child.text != "Codec":
codec = child.text
newcodec = [codec[0:codec.find(',')]]
newcodec += [codec[(codec.find(',')+ 1): codec.find("bps")]]
newcodec += [codec[(codec.find("bps") + 3): codec.find("channels")]]
self.app.config.update_setting("LQRecordingSettings", "codec", codec)
index += 1
if setting1 != '':
self.app.config.update_setting("ChatSettings", "username", setting1)
self.parent.current = 'main'
print self.app.config.get_section("AudioSettings")
print self.app.config.get_section("LQRecordingSettings")
评论列表
文章目录