예제 #1
0
def addToProfileMenu( menu ):
	"Add a profile menu."
	settings.ToolDialog().addPluginToMenu( menu, __file__[ : __file__.rfind( '.' ) ] )
	menu.add_separator()
	directoryPath = skeinforge_profile.getPluginsDirectoryPath()
	pluginFileNames = skeinforge_profile.getPluginFileNames()
	craftTypeName = skeinforge_profile.getCraftTypeName()
	profileRadioVar = settings.Tkinter.StringVar()
	for pluginFileName in pluginFileNames:
		addSubmenus( craftTypeName, menu, pluginFileName, os.path.join( directoryPath, pluginFileName ), profileRadioVar )
예제 #2
0
def addToProfileMenu( profileSelection, profileType, repository ):
	"Add a profile menu."
	pluginFileNames = skeinforge_profile.getPluginFileNames()
	craftTypeName = skeinforge_profile.getCraftTypeName()
	pluginModule = skeinforge_profile.getCraftTypePluginModule()
	profilePluginSettings = settings.getReadRepository( pluginModule.getNewRepository() )
	for pluginFileName in pluginFileNames:
		skeinforge_profile.ProfileTypeMenuRadio().getFromMenuButtonDisplay( profileType, pluginFileName, repository, craftTypeName == pluginFileName )
	for profileName in profilePluginSettings.profileList.value:
		skeinforge_profile.ProfileSelectionMenuRadio().getFromMenuButtonDisplay( profileSelection, profileName, repository, profileName == profilePluginSettings.profileListbox.value )
예제 #3
0
def addToProfileMenu(menu):
    "Add a profile menu."
    settings.ToolDialog().addPluginToMenu(menu, __file__[:__file__.rfind('.')])
    menu.add_separator()
    directoryPath = skeinforge_profile.getPluginsDirectoryPath()
    pluginFileNames = skeinforge_profile.getPluginFileNames()
    craftTypeName = skeinforge_profile.getCraftTypeName()
    profileRadioVar = settings.Tkinter.StringVar()
    for pluginFileName in pluginFileNames:
        addSubmenus(craftTypeName, menu, pluginFileName,
                    os.path.join(directoryPath, pluginFileName),
                    profileRadioVar)
예제 #4
0
def addToProfileMenu(profileSelection, profileType, repository):
    "Add a profile menu."
    pluginFileNames = skeinforge_profile.getPluginFileNames()
    craftTypeName = skeinforge_profile.getCraftTypeName()
    pluginModule = skeinforge_profile.getCraftTypePluginModule()
    profilePluginSettings = settings.getReadRepository(
        pluginModule.getNewRepository())
    for pluginFileName in pluginFileNames:
        skeinforge_profile.ProfileTypeMenuRadio().getFromMenuButtonDisplay(
            profileType, pluginFileName, repository,
            craftTypeName == pluginFileName)
    for profileName in profilePluginSettings.profileList.value:
        skeinforge_profile.ProfileSelectionMenuRadio(
        ).getFromMenuButtonDisplay(
            profileSelection, profileName, repository,
            profileName == profilePluginSettings.profileListbox.value)