diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index c8e49b186d..80390c907f 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -153,7 +153,6 @@ class CuraApplication(QtApplication): if not hasattr(sys, "frozen"): resource_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "resources") Resources.addSearchPath(resource_path) - Resources.setBundledResourcesPath(resource_path) self._use_gui = True self._open_file_queue = [] # Files to open when plug-ins are loaded. diff --git a/cura/CuraPackageManager.py b/cura/CuraPackageManager.py index 2b91081e4d..c765587eef 100644 --- a/cura/CuraPackageManager.py +++ b/cura/CuraPackageManager.py @@ -28,15 +28,18 @@ class CuraPackageManager(QObject): self._container_registry = self._application.getContainerRegistry() self._plugin_registry = self._application.getPluginRegistry() - # JSON file that keeps track of all installed packages. - self._bundled_package_management_file_path = os.path.join( - os.path.abspath(Resources.getBundledResourcesPath()), - "packages.json" - ) - self._user_package_management_file_path = os.path.join( - os.path.abspath(Resources.getDataStoragePath()), - "packages.json" - ) + #JSON files that keep track of all installed packages. + self._user_package_management_file_path = None + self._bundled_package_management_file_path = None + for search_path in Resources.getSearchPaths(): + candidate_bundled_path = os.path.join(search_path, "bundled_packages.json") + if os.path.exists(candidate_bundled_path): + self._bundled_package_management_file_path = candidate_bundled_path + candidate_user_path = os.path.join(search_path, "packages.json") + if os.path.exists(candidate_user_path): + self._user_package_management_file_path = candidate_user_path + if self._user_package_management_file_path is None: #Doesn't exist yet. + self._user_package_management_file_path = os.path.join(Resources.getDataStoragePath(), "packages.json") self._bundled_package_dict = {} # A dict of all bundled packages self._installed_package_dict = {} # A dict of all installed packages diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index a59f235741..01d0b43f5b 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -346,7 +346,7 @@ class PrintInformation(QObject): Logger.log("w", "Unsupported Mime Type Database file extension") if data is not None and check_name is not None: - self._base_name = check_name + self._base_name = data else: self._base_name = '' diff --git a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml index 6004832a57..b585a084b3 100644 --- a/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml +++ b/plugins/Toolbox/resources/qml/ToolboxInstalledTile.qml @@ -90,6 +90,16 @@ Item color: model.enabled ? UM.Theme.getColor("text") : UM.Theme.getColor("lining") linkColor: UM.Theme.getColor("text_link") } + + Label + { + text: model.version + width: parent.width + height: UM.Theme.getSize("toolbox_property_label").height + color: UM.Theme.getColor("text") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignLeft + } } ToolboxInstalledTileActions { diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 3ee6787cf4..2ba91dcdba 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -34,7 +34,7 @@ class Toolbox(QObject, Extension): self._plugin_registry = Application.getInstance().getPluginRegistry() self._packages_version = self._getPackagesVersion() self._api_version = 1 - self._api_url = "https://api-staging.ultimaker.com/cura-packages/v{api_version}/cura/v{package_version}".format( api_version = self._api_version, package_version = self._packages_version) + self._api_url = "https://api.ultimaker.com/cura-packages/v{api_version}/cura/v{package_version}".format( api_version = self._api_version, package_version = self._packages_version) # Network: self._get_packages_request = None diff --git a/resources/packages.json b/resources/bundled_packages.json similarity index 100% rename from resources/packages.json rename to resources/bundled_packages.json