def __init__(self, key, parent, title, filters, flags): self.__key = key self.__filters = filters self.__flags = flags last_dir = Config.get("ui.load.%s.last_directory" % key, ".") wxFileDialog.__init__(self, parent, title, last_dir, "", filters, flags) filter_index = Config.get("ui.load.%s.filter_index" % key, 0) if filter_index < len(filters): self.SetFilterIndex(filter_index)
def __init__(self, label, depth, separator=0): wxMenu.__init__(self) self.label = label self.depth = depth self.dirty = 1 self.separator = separator self.items = Config.get("ui.%s.mru" % label, [])[:depth]