Removed wxpython specific get_file_dialog_wildcard out of atrcopy & added more descriptive class attribute names for segment saver info

This commit is contained in:
Rob McMullen 2016-04-19 16:01:05 -07:00
parent 74bbc5c67f
commit 6a924a5970
2 changed files with 4 additions and 13 deletions

View File

@ -131,8 +131,8 @@ class MydosDirent(AtariDosDirent):
class XexSegmentSaver(SegmentSaver): class XexSegmentSaver(SegmentSaver):
name = "Atari 8-bit Executable" export_data_name = "Atari 8-bit Executable"
extensions = [".xex"] export_extensions = [".xex"]
class XexSegment(ObjSegment): class XexSegment(ObjSegment):

View File

@ -11,22 +11,13 @@ selected_bit_mask = 0x80
class SegmentSaver(object): class SegmentSaver(object):
name = "Raw Data" export_data_name = "Raw Data"
extensions = [".dat"] export_extensions = [".dat"]
@classmethod @classmethod
def encode_data(cls, segment): def encode_data(cls, segment):
return segment.tostring() return segment.tostring()
@classmethod
def get_file_dialog_wildcard(cls):
# Using only the first extension
wildcards = []
if cls.extensions:
ext = cls.extensions[0]
wildcards.append("%s (*%s)|*%s" % (cls.name, ext, ext))
return "|".join(wildcards)
class OrderWrapper(object): class OrderWrapper(object):
"""Wrapper for numpy data so that manipulations can use normal numpy syntax """Wrapper for numpy data so that manipulations can use normal numpy syntax