equal
deleted
inserted
replaced
280 if pou_type == "program": |
280 if pou_type == "program": |
281 location = values[0] |
281 location = values[0] |
282 if not location.startswith("%"): |
282 if not location.startswith("%"): |
283 dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow, |
283 dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow, |
284 _("Select a variable class:"), _("Variable class"), |
284 _("Select a variable class:"), _("Variable class"), |
285 ["Input", "Output", "Memory"], |
285 [_("Input"), _("Output"), _("Memory")], |
286 wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL) |
286 wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL) |
287 if dialog.ShowModal() == wx.ID_OK: |
287 if dialog.ShowModal() == wx.ID_OK: |
288 selected = dialog.GetSelection() |
288 selected = dialog.GetSelection() |
289 else: |
289 else: |
290 selected = None |
290 selected = None |
299 location = "%M" + location |
299 location = "%M" + location |
300 var_name = values[3] |
300 var_name = values[3] |
301 dlg = wx.TextEntryDialog( |
301 dlg = wx.TextEntryDialog( |
302 self.ParentWindow.ParentWindow, |
302 self.ParentWindow.ParentWindow, |
303 _("Confirm or change variable name"), |
303 _("Confirm or change variable name"), |
304 'Variable Drop', var_name) |
304 _('Variable Drop'), var_name) |
305 dlg.SetValue(var_name) |
305 dlg.SetValue(var_name) |
306 var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None |
306 var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None |
307 dlg.Destroy() |
307 dlg.Destroy() |
308 if var_name is None: |
308 if var_name is None: |
309 return |
309 return |
329 initval = values[0] |
329 initval = values[0] |
330 var_name = values[3] |
330 var_name = values[3] |
331 dlg = wx.TextEntryDialog( |
331 dlg = wx.TextEntryDialog( |
332 self.ParentWindow.ParentWindow, |
332 self.ParentWindow.ParentWindow, |
333 _("Confirm or change variable name"), |
333 _("Confirm or change variable name"), |
334 'Variable Drop', var_name) |
334 _('Variable Drop'), var_name) |
335 dlg.SetValue(var_name) |
335 dlg.SetValue(var_name) |
336 var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None |
336 var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None |
337 dlg.Destroy() |
337 dlg.Destroy() |
338 if var_name is None: |
338 if var_name is None: |
339 return |
339 return |
351 elif values[1] == "Global": |
351 elif values[1] == "Global": |
352 var_name = values[0] |
352 var_name = values[0] |
353 dlg = wx.TextEntryDialog( |
353 dlg = wx.TextEntryDialog( |
354 self.ParentWindow.ParentWindow, |
354 self.ParentWindow.ParentWindow, |
355 _("Confirm or change variable name"), |
355 _("Confirm or change variable name"), |
356 'Variable Drop', var_name) |
356 _('Variable Drop'), var_name) |
357 dlg.SetValue(var_name) |
357 dlg.SetValue(var_name) |
358 var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None |
358 var_name = dlg.GetValue() if dlg.ShowModal() == wx.ID_OK else None |
359 dlg.Destroy() |
359 dlg.Destroy() |
360 if var_name is None: |
360 if var_name is None: |
361 return |
361 return |