28 # Edit Step Name Dialog |
28 # Edit Step Name Dialog |
29 #------------------------------------------------------------------------------- |
29 #------------------------------------------------------------------------------- |
30 |
30 |
31 class SFCStepNameDialog(wx.TextEntryDialog): |
31 class SFCStepNameDialog(wx.TextEntryDialog): |
32 |
32 |
33 def __init__(self, parent, message, caption = "Please enter text", defaultValue = "", |
33 def __init__(self, parent, message, caption = "Please enter text", defaultValue = "", |
34 style = wx.OK|wx.CANCEL|wx.CENTRE, pos = wx.DefaultPosition): |
34 style = wx.OK|wx.CANCEL|wx.CENTRE, pos = wx.DefaultPosition): |
35 wx.TextEntryDialog.__init__(self, parent, message, caption, defaultValue, style, pos) |
35 wx.TextEntryDialog.__init__(self, parent, message, caption, defaultValue, style, pos) |
36 |
36 |
37 self.PouNames = [] |
37 self.PouNames = [] |
38 self.Variables = [] |
38 self.Variables = [] |
39 self.StepNames = [] |
39 self.StepNames = [] |
40 |
40 |
41 self.Bind(wx.EVT_BUTTON, self.OnOK, |
41 self.Bind(wx.EVT_BUTTON, self.OnOK, |
42 self.GetSizer().GetItem(2).GetSizer().GetItem(1).GetSizer().GetAffirmativeButton()) |
42 self.GetSizer().GetItem(2).GetSizer().GetItem(1).GetSizer().GetAffirmativeButton()) |
43 |
43 |
44 def OnOK(self, event): |
44 def OnOK(self, event): |
45 message = None |
45 message = None |
46 step_name = self.GetSizer().GetItem(1).GetWindow().GetValue() |
46 step_name = self.GetSizer().GetItem(1).GetWindow().GetValue() |
47 if step_name == "": |
47 if step_name == "": |
48 message = _("You must type a name!") |
48 message = _("You must type a name!") |