Exemplo n.º 1
0
def addListsSetCraftProfile(craftSequence, defaultProfile, repository,
                            fileNameHelp):
    "Set the craft profile repository."
    settings.addListsToRepository(fileNameHelp, repository)
    repository.craftSequenceLabel = settings.LabelDisplay().getFromName(
        'Craft Sequence: ', repository)
    craftToolStrings = []
    for craftTool in craftSequence[:-1]:
        craftToolStrings.append(
            settings.getEachWordCapitalized(craftTool) + '->')
    craftToolStrings.append(settings.getEachWordCapitalized(craftSequence[-1]))
    for craftToolStringIndex in xrange(0, len(craftToolStrings), 5):
        craftLine = ' '.join(
            craftToolStrings[craftToolStringIndex:craftToolStringIndex + 5])
        settings.LabelDisplay().getFromName(craftLine, repository)
    settings.LabelDisplay().getFromName('', repository)
    repository.profileList = ProfileList().getFromName('Profile List:',
                                                       repository)
    repository.profileListbox = ProfileListboxSetting().getFromListSetting(
        repository.profileList, 'Profile Selection:', repository,
        defaultProfile)
    repository.addListboxSelection = AddProfile(
    ).getFromProfileListboxSettingRepository(repository.profileListbox,
                                             repository)
    repository.deleteListboxSelection = DeleteProfile(
    ).getFromProfileListboxSettingRepository(repository.profileListbox,
                                             repository)
    directoryName = archive.getProfilesPath()
    archive.makeDirectory(directoryName)
    repository.windowPosition.value = '0+400'
Exemplo n.º 2
0
def addListsSetCraftProfile(craftSequence, defaultProfile, repository, fileNameHelp):
    "Set the craft profile repository."
    settings.addListsToRepository(fileNameHelp, repository)
    repository.craftSequenceLabel = settings.LabelDisplay().getFromName("Craft Sequence: ", repository)
    craftToolStrings = []
    for craftTool in craftSequence[:-1]:
        craftToolStrings.append(settings.getEachWordCapitalized(craftTool) + "->")
    craftToolStrings.append(settings.getEachWordCapitalized(craftSequence[-1]))
    for craftToolStringIndex in xrange(0, len(craftToolStrings), 5):
        craftLine = " ".join(craftToolStrings[craftToolStringIndex : craftToolStringIndex + 5])
        settings.LabelDisplay().getFromName(craftLine, repository)
    settings.LabelDisplay().getFromName("", repository)
    repository.profileList = ProfileList().getFromName("Profile List:", repository)
    repository.profileListbox = ProfileListboxSetting().getFromListSetting(
        repository.profileList, "Profile Selection:", repository, defaultProfile
    )
    repository.addListboxSelection = AddProfile().getFromProfileListboxSettingRepository(
        repository.profileListbox, repository
    )
    repository.deleteListboxSelection = DeleteProfile().getFromProfileListboxSettingRepository(
        repository.profileListbox, repository
    )
    directoryName = archive.getProfilesPath()
    archive.makeDirectory(directoryName)
    repository.windowPosition.value = "0+400"
Exemplo n.º 3
0
 def addPluginToMenu(self, canvas, fileName, menu, name, suffix):
     "Add the display command to the menu."
     self.canvas = canvas
     self.fileName = fileName
     self.name = name
     self.suffix = suffix
     menu.add_command(label=settings.getEachWordCapitalized(self.name), command=self.display)
Exemplo n.º 4
0
	def addPluginToMenu( self, canvas, fileName, menu, name, suffix ):
		'Add the display command to the menu.'
		self.canvas = canvas
		self.fileName = fileName
		self.name = name
		self.suffix = suffix
		menu.add_command( label = settings.getEachWordCapitalized( self.name ), command = self.display )
Exemplo n.º 5
0
def writeContentsLine( hypertextFile, output ):
	"Write a line of the contents file."
	summarizedFileName = hypertextFile[ : hypertextFile.rfind('.') ]
	numberOfDots = summarizedFileName.count('.')
	prefixSpaces = '  ' * numberOfDots
	if numberOfDots > 0:
		summarizedFileName = summarizedFileName[ summarizedFileName.rfind('.') + 1 : ]
	capitalizedSummarizedFileName = settings.getEachWordCapitalized( summarizedFileName )
	output.write('%s<a href="%s">%s</a><br>\n' % ( prefixSpaces, hypertextFile, capitalizedSummarizedFileName ) )
Exemplo n.º 6
0
def writeContentsLine(hypertextFile, output):
	'Write a line of the contents file.'
	summarizedFileName = hypertextFile[: hypertextFile.rfind('.')]
	numberOfDots = summarizedFileName.count('.')
	prefixSpaces = '&nbsp;&nbsp;' * numberOfDots
	if numberOfDots > 0:
		summarizedFileName = summarizedFileName[summarizedFileName.rfind('.') + 1 :]
	capitalizedSummarizedFileName = settings.getEachWordCapitalized(summarizedFileName)
	output.write('%s<a href="%s">%s</a><br>\n' % (prefixSpaces, hypertextFile, capitalizedSummarizedFileName))
Exemplo n.º 7
0
	def getFromMenuButtonDisplay( self, menuButtonDisplay, name, repository, value ):
		"Initialize."
		self.setToMenuButtonDisplay( menuButtonDisplay, name, repository, value )
		self.valueName = settings.getEachWordCapitalized( name )
		return self
Exemplo n.º 8
0
 def getFromMenuButtonDisplay(self, menuButtonDisplay, name, repository,
                              value):
     "Initialize."
     self.setToMenuButtonDisplay(menuButtonDisplay, name, repository, value)
     self.valueName = settings.getEachWordCapitalized(name)
     return self