def create(): EditorManager.search_editor_packages(os.getcwd(), "DOCK") DockManager.create() #--- EditorManager.search_editor_packages(os.getcwd(), "ACTION") EditorManager.import_docks_actions() MenuManager.create()
def search_editor_packages(path, type): it = QDirIterator(path, "", QDir.AllDirs|QDir.NoDotAndDotDot|QDir.NoSymLinks) while True: subpath = it.filePath() if subpath != "": if type == "DOCK" and type in it.fileName().upper(): DockManager.import_docks(subpath) elif type == "ACTION" and type in it.fileName().upper(): MenuManager.import_actions(subpath) EditorManager.search_editor_packages(subpath, type) #--- if it.hasNext(): it.next() else: break
def search_editor_packages(path, type): it = QDirIterator(path, "", QDir.AllDirs | QDir.NoDotAndDotDot | QDir.NoSymLinks) while True: subpath = it.filePath() if subpath != "": if type == "DOCK" and type in it.fileName().upper(): DockManager.import_docks(subpath) elif type == "ACTION" and type in it.fileName().upper(): MenuManager.import_actions(subpath) EditorManager.search_editor_packages(subpath, type) #--- if it.hasNext(): it.next() else: break