etherlab/ConfigEditor.py
branchwxPython4
changeset 3572 b46af5b80c7d
parent 3303 0ffb41625592
child 3660 0e41dbe6ddcd
equal deleted inserted replaced
3571:fdd4b171ac6c 3572:b46af5b80c7d
  1238     def OnImportButton(self, event):
  1238     def OnImportButton(self, event):
  1239         dialog = wx.FileDialog(self.ParentWindow,
  1239         dialog = wx.FileDialog(self.ParentWindow,
  1240                                _("Choose an XML file"),
  1240                                _("Choose an XML file"),
  1241                                os.getcwd(), "",
  1241                                os.getcwd(), "",
  1242                                _("XML files (*.xml)|*.xml|All files|*.*"),
  1242                                _("XML files (*.xml)|*.xml|All files|*.*"),
  1243                                wx.OPEN)
  1243                                wx.FD_OPEN)
  1244 
  1244 
  1245         if dialog.ShowModal() == wx.ID_OK:
  1245         if dialog.ShowModal() == wx.ID_OK:
  1246             filepath = dialog.GetPath()
  1246             filepath = dialog.GetPath()
  1247             if self.ModuleLibrary.ImportModuleLibrary(filepath):
  1247             if self.ModuleLibrary.ImportModuleLibrary(filepath):
  1248                 wx.CallAfter(self.RefreshView)
  1248                 wx.CallAfter(self.RefreshView)