Ejemplo n.º 1
0
def forwardDeclartions():
	"Force some functions to be dynamic"
	mockRepository = settings.Repository()
	settings.addListsToRepository(None, None, mockRepository)
	settings.cancelRepository(mockRepository)
	settings.getDisplayedDialogFromConstructor(mockRepository)
	settings.getProfileBaseName(mockRepository)
	settings.getReadRepository(mockRepository)
	settings.readSettingsFromText(mockRepository, '')
	settings.saveRepository(mockRepository)
	settings.startMainLoopFromConstructor(mockRepository)
	settings.writeSettings(mockRepository)
	settings.writeSettingsPrintMessage(mockRepository)
	settings.StringSetting().getFromValue('', mockRepository, '')
	settings.StringSetting().getFromValueOnly('', mockRepository, '')
	settings.StringSetting().getFromValueOnlyAddToRepository('', mockRepository, '')
	settings.FileNameInput().getFromFileName([('','')], '', mockRepository, '')
	settings.GridVertical(0, 0).setExecutablesRepository(mockRepository)
	settings.HelpPage().setToNameRepository('', mockRepository)
	settings.HelpPage().getFromNameAfterWWW('', '', mockRepository)
	settings.HelpPage().getFromNameAfterHTTP('', '', mockRepository)
	settings.HelpPage().getFromNameSubName('', mockRepository, '')
	settings.HelpPageRepository.__init__(settings.HelpPageRepository(), mockRepository)
	settings.LabelDisplay().getFromName('', mockRepository)
	settings.LabelSeparator().getFromRepository(mockRepository)
	settings.MenuButtonDisplay().getFromName('', mockRepository)
	settings.Radio().getFromRadio(None, '', mockRepository, False)
	settings.WindowPosition().getFromValue(mockRepository, '')
	settings.RepositoryDialog(mockRepository, None).addButtons(mockRepository, None)
	settings.RepositoryDialog.__init__(RepositoryDialog(), mockRepository, None)
	gcodec.Plugins.add(settings.Plugin())
	Tkinter.Button.__init__(None, {})
Ejemplo n.º 2
0
        def readSettings(self):
                self.output = cStringIO.StringIO()                
                profileDirectory = skeinforge_profile.getProfileDirectory()
                craftRepo = skeinforge_craft.CraftRepository()
                profileBaseName = settings.getProfileBaseName( craftRepo )
                allCraftNames = archive.getPluginFileNamesFromDirectoryPath( skeinforge_craft.getPluginsDirectoryPath() )

                fullProfilePath = os.path.join( archive.getSettingsPath() , 'profiles' )
                fullProfileDirectory = os.path.join( fullProfilePath , profileDirectory )

                for craftName in allCraftNames:
                        pluginModule = archive.getModuleWithPath(os.path.join( skeinforge_craft.getPluginsDirectoryPath(), craftName  ))

                        repo = pluginModule.getNewRepository()
                        self.outputSettings(craftName, settings.getReadRepository(repo).preferences)

                return self.output.getvalue()
Ejemplo n.º 3
0
    def readSettings(self):
        self.output = cStringIO.StringIO()
        profileDirectory = skeinforge_profile.getProfileDirectory()
        craftRepo = skeinforge_craft.CraftRepository()
        profileBaseName = settings.getProfileBaseName(craftRepo)
        allCraftNames = archive.getPluginFileNamesFromDirectoryPath(
            skeinforge_craft.getPluginsDirectoryPath())

        fullProfilePath = os.path.join(archive.getSettingsPath(), 'profiles')
        fullProfileDirectory = os.path.join(fullProfilePath, profileDirectory)

        for craftName in allCraftNames:
            pluginModule = archive.getModuleWithPath(
                os.path.join(skeinforge_craft.getPluginsDirectoryPath(),
                             craftName))

            repo = pluginModule.getNewRepository()
            self.outputSettings(craftName,
                                settings.getReadRepository(repo).preferences)

        return self.output.getvalue()