mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Make Marketplace link configurable from the build system
This way you could set it to marketplace-staging if you like. Contributes to issue CURA-7071.
This commit is contained in:
parent
654a28450d
commit
ad2b8f140e
3 changed files with 10 additions and 3 deletions
|
@ -4,7 +4,6 @@
|
|||
import json
|
||||
import os
|
||||
import tempfile
|
||||
import platform
|
||||
from typing import cast, Any, Dict, List, Set, TYPE_CHECKING, Tuple, Optional, Union
|
||||
|
||||
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot
|
||||
|
@ -17,6 +16,7 @@ from UM.i18n import i18nCatalog
|
|||
from UM.Version import Version
|
||||
|
||||
from cura import ApplicationMetadata
|
||||
from cura.CuraVersion import CuraMarketplaceRoot
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.Machines.ContainerTree import ContainerTree
|
||||
from plugins.Toolbox.src.CloudApiModel import CloudApiModel
|
||||
|
@ -33,6 +33,8 @@ if TYPE_CHECKING:
|
|||
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
DEFAULT_MARKETPLACE_ROOT = "https://marketplace.ultimaker.com" # type: str
|
||||
|
||||
# todo Remove license and download dialog, use SyncOrchestrator instead
|
||||
|
||||
## Provides a marketplace for users to download plugins an materials
|
||||
|
@ -767,7 +769,10 @@ class Toolbox(QObject, Extension):
|
|||
|
||||
@pyqtProperty(str, constant=True)
|
||||
def getWebMarketplaceUrl(self) -> str:
|
||||
return ApplicationMetadata.WEB_MARKETPLACE_URL
|
||||
root = CuraMarketplaceRoot
|
||||
if root == "":
|
||||
root = DEFAULT_MARKETPLACE_ROOT
|
||||
return root + "/app/cura/materials"
|
||||
|
||||
# Filter Models:
|
||||
# --------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue