def callback_edit(self, file_name,token,widget):
if type(widget)==QLineEdit:
a=undo_list_class()
a.add([file_name, token, inp_get_token_value(self.file_name, token),widget])
inp_update_token_value(file_name, token, widget.text())
elif type(widget)==gtkswitch:
inp_update_token_value(file_name, token, widget.get_value())
elif type(widget)==leftright:
inp_update_token_value(file_name, token, widget.get_value())
elif type(widget)==gpvdm_select:
inp_update_token_value(file_name, token, widget.text())
elif type(widget)==QComboBox:
inp_update_token_value(file_name, token, widget.itemText(widget.currentIndex()))
elif type(widget)==QComboBoxLang:
inp_update_token_value(file_name, token, widget.currentText_english())
elif type(widget)==QColorPicker:
inp_update_token_array(file_name, token, [str(widget.r),str(widget.g),str(widget.b)])
elif type(widget)==QChangeLog:
a=undo_list_class()
a.add([file_name, token, inp_get_token_value(self.file_name, token),widget])
inp_update_token_array(file_name, token, widget.toPlainText().split("\n"))
help_window().help_set_help(["document-save-as","<big><b>Saved to disk</b></big>\n"])
self.changed.emit()
评论列表
文章目录