for name, desc in [
("identity", ("What your work identifies as:",
"Is it a game, a story, a poem, or something else?\n(This is used for dialogs and error messages only.)",
False)),
("description", ("A short description of your work:",
"This is inserted in the HTML file's <meta> description tag, used by\nsearch engines and other automated tools.",
True))
]:
textlabel = wx.StaticText(panel, label = desc[0])
if desc[2]:
textctrl = wx.TextCtrl(panel, size=(200,60), style=wx.TE_MULTILINE)
else:
textctrl = wx.TextCtrl(panel, size=(200,-1))
textctrl.SetValue(parent.metadata.get(name, ''))
textctrl.Bind(wx.EVT_TEXT, lambda e, name=name, textctrl=textctrl:
self.saveSetting(name,textctrl.GetValue()))