Beispiel #1
0
def addToProfileMenu( profileSelection, profileType, repository ):
	"Add a profile menu."
	pluginFileNames = profile.getPluginFileNames()
	craftTypeName = profile.getCraftTypeName()
	pluginModule = profile.getCraftTypePluginModule()
	profilePluginSettings = settings.getReadRepository( pluginModule.getNewRepository() )
	for pluginFileName in pluginFileNames:
		profile.ProfileTypeMenuRadio().getFromMenuButtonDisplay( profileType, pluginFileName, repository, craftTypeName == pluginFileName )
	for profileName in profilePluginSettings.profileList.value:
		profile.ProfileSelectionMenuRadio().getFromMenuButtonDisplay( profileSelection, profileName, repository, profileName == profilePluginSettings.profileListbox.value )
Beispiel #2
0
def addToProfileMenu(profileSelection, profileType, repository):
    "Add a profile menu."
    pluginFileNames = profile.getPluginFileNames()
    craftTypeName = profile.getCraftTypeName()
    pluginModule = profile.getCraftTypePluginModule()
    profilePluginSettings = settings.getReadRepository(
        pluginModule.getNewRepository())
    for pluginFileName in pluginFileNames:
        profile.ProfileTypeMenuRadio().getFromMenuButtonDisplay(
            profileType, pluginFileName, repository,
            craftTypeName == pluginFileName)
    for profileName in profilePluginSettings.profileList.value:
        profile.ProfileSelectionMenuRadio().getFromMenuButtonDisplay(
            profileSelection, profileName, repository,
            profileName == profilePluginSettings.profileListbox.value)
Beispiel #3
0
	def setRadioButtons( self ):
		"Profile has been saved and craft radio plugins should be updated."
		craftSequence = profile.getCraftTypePluginModule().getCraftSequence()
		gridPosition = self.gridPosition.getCopy()
		maximumValue = False
		activeRadioPlugins = []
		for radioPlugin in self.radioPlugins:
			if radioPlugin.name in craftSequence:
				activeRadioPlugins.append( radioPlugin )
				radioPlugin.incrementGridPosition( gridPosition )
				maximumValue = max( radioPlugin.value, maximumValue )
			else:
				radioPlugin.radiobutton.grid_remove()
		if not maximumValue:
			selectedRadioPlugin = settings.getSelectedRadioPlugin( self.repository.importantFileNames + [ activeRadioPlugins[ 0 ].name ], activeRadioPlugins ).setSelect()
		self.repository.pluginFrame.update()
Beispiel #4
0
 def setRadioButtons(self):
     "Profile has been saved and craft radio plugins should be updated."
     craftSequence = profile.getCraftTypePluginModule().getCraftSequence()
     gridPosition = self.gridPosition.getCopy()
     maximumValue = False
     activeRadioPlugins = []
     for radioPlugin in self.radioPlugins:
         if radioPlugin.name in craftSequence:
             activeRadioPlugins.append(radioPlugin)
             radioPlugin.incrementGridPosition(gridPosition)
             maximumValue = max(radioPlugin.value, maximumValue)
         else:
             radioPlugin.radiobutton.grid_remove()
     if not maximumValue:
         selectedRadioPlugin = settings.getSelectedRadioPlugin(
             self.repository.importantFileNames +
             [activeRadioPlugins[0].name], activeRadioPlugins).setSelect()
     self.repository.pluginFrame.update()
Beispiel #5
0
def getReadCraftSequence():
	"Get profile sequence."
	return profile.getCraftTypePluginModule().getCraftSequence()
Beispiel #6
0
def getReadCraftSequence():
    "Get profile sequence."
    return profile.getCraftTypePluginModule().getCraftSequence()