sense -> relatedEntryList read/edit/view/write
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from message.simple_messages import NoReset, Reset, ModalNotOkClose, ClickMessage, DataChgClickMessage, KeyboardPress
|
||||
from message.translation_edit import EditTranslation, MoveRight, MoveLeft, BinTranslation
|
||||
from message.show_messages import ShowEntryLabelsEdit, ShowEditTranslation, ShowSenseLabelEdit, ShowSenseDefinitionEdit, ShowCommentEdit, ShowAddTranslation, ShowExampleEdit, ShowExampleTranslationEdit, ShowVariantsEdit
|
||||
from message.simple_edits import EditSenseLabel, EditSenseDefinition, EditComment, AddSenseLabel, AddSense, EditExample, AddExampleTranslation, EditExampleTranslation, DoChosenExamples, AddToLabelList, AddToGenericList, EditVariants, EditEntryLabels
|
||||
from message.show_messages import ShowEntryLabelsEdit, ShowEditTranslation, ShowSenseLabelEdit, ShowSenseDefinitionEdit, ShowCommentEdit, ShowAddTranslation, ShowExampleEdit, ShowExampleTranslationEdit, ShowVariantsEdit, ShowRelatedEntriesEdit
|
||||
from message.simple_edits import EditSenseLabel, EditSenseDefinition, EditComment, AddSenseLabel, AddSense, EditExample, AddExampleTranslation, EditExampleTranslation, DoChosenExamples, AddToLabelList, AddToGenericList, EditVariants, EditRelatedEntries, EditEntryLabel
|
||||
from message.show_menu import ShowTranslationMenu, ShowSenseMenu, ShowExampleMenu
|
||||
from message.sense_edit import SenseMoveUp, SenseMoveDown, SenseBin
|
||||
|
||||
|
||||
@@ -31,6 +31,12 @@ class ShowVariantsEdit(ClickMessage):
|
||||
model.modal_set(lambda: modals.edit_variants(model.entry))
|
||||
|
||||
|
||||
class ShowRelatedEntriesEdit(ClickMessage):
|
||||
def update_model(self, model):
|
||||
model.entry.make_copy()
|
||||
model.modal_set(lambda: modals.edit_related_entries(model.entry))
|
||||
|
||||
|
||||
class ShowExampleEdit(KeyPlusClickMessage):
|
||||
def update_model_default(self, model):
|
||||
example = self.get_arg(0, Example)
|
||||
|
||||
@@ -93,6 +93,12 @@ class EditVariants(Message):
|
||||
def update_model(self, model):
|
||||
variants = common_accessors.generic_list_getter()
|
||||
model.entry.variants = variants
|
||||
|
||||
|
||||
class EditRelatedEntries(Message):
|
||||
def update_model(self, model):
|
||||
related_entries = common_accessors.generic_list_getter()
|
||||
model.entry.related_entries = related_entries
|
||||
|
||||
|
||||
class EditEntryLabels(Message):
|
||||
|
||||
Reference in New Issue
Block a user