def add_file(self, event): file_open_dialog = wx.FileDialog(self, style=wx.FD_OPEN, message='Choose the file to add') resp = file_open_dialog.ShowModal() if resp == wx.ID_OK: backup.add_path_to_data_file(self.path.GetValue(), file_open_dialog.GetPath()) file_open_dialog.Destroy() else: file_open_dialog.Destroy()
def add_folder(self, event): pass dir_dialog = wx.DirDialog(self, style=wx.DD_DEFAULT_STYLE, message='Choose folder to add') resp = dir_dialog.ShowModal() if resp == wx.ID_OK: backup.add_path_to_data_file(self.path.GetValue(), dir_dialog.GetPath()) dir_dialog.Destroy() else: dir_dialog.Destroy()