Example #1
0
 def load_options(self):
     # TODO: move config to MemoryAddress class?
     # (depends on how monitoring of addresses should work)
     lines = self.address.get_lines()
     follow_pc = self.address.get_follow_pc()
     miss_is_error = False  # needed for adding windows
     defaults = {"[General]": {"nLines": lines, "bFollowPC": follow_pc}}
     userconfdir = ".hatari"
     config = ConfigStore(userconfdir, defaults, miss_is_error)
     configpath = config.get_filepath("debugui.cfg")
     config.load(configpath)  # set defaults
     try:
         self.address.set_lines(config.get("[General]", "nLines"))
         self.address.set_follow_pc(config.get("[General]", "bFollowPC"))
     except (KeyError, AttributeError):
         ErrorDialog(None).run(
             "Debug UI configuration mismatch!\nTry again after removing: '%s'."
             % configpath)
     self.config = config
Example #2
0
 def load_options(self):
     # TODO: move config to MemoryAddress class?
     # (depends on how monitoring of addresses should work)
     lines = self.address.get_lines()
     follow_pc = self.address.get_follow_pc()
     miss_is_error = False # needed for adding windows
     defaults = {
         "[General]": {
         	"nLines": lines,
             "bFollowPC": follow_pc
         }
     }
     userconfdir = ".hatari"
     config = ConfigStore(userconfdir, defaults, miss_is_error)
     configpath = config.get_filepath("debugui.cfg")
     config.load(configpath) # set defaults
     try:
         self.address.set_lines(config.get("[General]", "nLines"))
         self.address.set_follow_pc(config.get("[General]", "bFollowPC"))
     except (KeyError, AttributeError):
         ErrorDialog(None).run("Debug UI configuration mismatch!\nTry again after removing: '%s'." % configpath)
     self.config = config
Example #3
0
 def load_options(self):
     # TODO: move config to MemoryAddress class?
     # (depends on how monitoring of addresses should work)
     lines = self.address.get_lines()
     # ConfigStore does checks and type conversions based on names
     # of Hatari config sections and keys, so this needs to use
     # same names to avoid asserts, and it can't e.g. save
     # follow_pc option value, which will keep as run-time one
     defaults = {
         "[Debugger]": {
             "nDisasmLines": lines,
         }
     }
     userconfdir = ".hatari"
     config = ConfigStore(userconfdir, defaults)
     configpath = config.get_filepath(".debugui.cfg")
     config.load(configpath)  # set defaults
     try:
         self.address.set_lines(config.get("[Debugger]", "nDisasmLines"))
     except (KeyError, AttributeError):
         ErrorDialog(None).run(
             "Debug UI configuration mismatch!\nTry again after removing: '%s'."
             % configpath)
     self.config = config