Merge pull request #4690 from Ultimaker/rename_ToolBox_to_Marketplace

Rename user visible entries of ToolBox to Marketplace
This commit is contained in:
Lipu Fei 2018-10-31 10:42:27 +01:00 committed by GitHub
commit d5806d145d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 19 deletions

View File

@ -26,8 +26,11 @@ Fullscreen mode can be toggled using the View menu or with the keyboard shortcut
*Configuration error message *Configuration error message
In previous versions, Ultimaker Cura would display an error dialog explaining when something happened to user configuration files, including the option to reset to factory defaults. This would not warn about losing the current printer and print profile settings, so this information has been added. In previous versions, Ultimaker Cura would display an error dialog explaining when something happened to user configuration files, including the option to reset to factory defaults. This would not warn about losing the current printer and print profile settings, so this information has been added.
*Materials in the Toolbox *Rename Toolbox to Marketplace
A new tab has been added to the Toolbox that includes downloadable material profiles, to quickly and easily prepare models for a range of third-party materials. The entry points to the Toolbox are now renamed to Marketplace.
*Materials in the Marketplace
A new tab has been added to the Marketplace that includes downloadable material profiles, to quickly and easily prepare models for a range of third-party materials.
*New third-party definitions *New third-party definitions
New profiles added for Anycube 4MAx and Tizyx K25. Contributed by jscurtu and ValentinPitre respectively. New profiles added for Anycube 4MAx and Tizyx K25. Contributed by jscurtu and ValentinPitre respectively.

View File

@ -10,7 +10,7 @@ Window
{ {
id: base id: base
property var selection: null property var selection: null
title: catalog.i18nc("@title", "Toolbox") title: catalog.i18nc("@title", "Marketplace")
modality: Qt.ApplicationModal modality: Qt.ApplicationModal
flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint

View File

@ -1,5 +1,5 @@
// Copyright (c) 2018 Ultimaker B.V. // Copyright (c) 2018 Ultimaker B.V.
// Toolbox is released under the terms of the LGPLv3 or higher. // Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7 import QtQuick 2.7
import QtQuick.Controls 1.4 import QtQuick.Controls 1.4

View File

@ -52,7 +52,7 @@ class PackagesModel(ListModel):
items = [] items = []
if self._metadata is None: if self._metadata is None:
Logger.logException("w", "Failed to load packages for Toolbox") Logger.logException("w", "Failed to load packages for Marketplace")
self.setItems(items) self.setItems(items)
return return

View File

@ -245,7 +245,7 @@ class Toolbox(QObject, Extension):
self._dialog = self._createDialog("Toolbox.qml") self._dialog = self._createDialog("Toolbox.qml")
if not self._dialog: if not self._dialog:
Logger.log("e", "Unexpected error trying to create the 'Toolbox' dialog.") Logger.log("e", "Unexpected error trying to create the 'Marketplace' dialog.")
return return
self._dialog.show() self._dialog.show()
@ -254,7 +254,7 @@ class Toolbox(QObject, Extension):
self.enabledChanged.emit() self.enabledChanged.emit()
def _createDialog(self, qml_name: str) -> Optional[QObject]: def _createDialog(self, qml_name: str) -> Optional[QObject]:
Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name) Logger.log("d", "Marketplace: Creating dialog [%s].", qml_name)
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId()) plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
if not plugin_path: if not plugin_path:
return None return None
@ -262,7 +262,7 @@ class Toolbox(QObject, Extension):
dialog = self._application.createQmlComponent(path, {"toolbox": self}) dialog = self._application.createQmlComponent(path, {"toolbox": self})
if not dialog: if not dialog:
raise Exception("Failed to create toolbox dialog") raise Exception("Failed to create Marketplace dialog")
return dialog return dialog
def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]: def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]:
@ -578,7 +578,7 @@ class Toolbox(QObject, Extension):
# Make API Calls # Make API Calls
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
def _makeRequestByType(self, type: str) -> None: def _makeRequestByType(self, type: str) -> None:
Logger.log("i", "Toolbox: Requesting %s metadata from server.", type) Logger.log("i", "Marketplace: Requesting %s metadata from server.", type)
request = QNetworkRequest(self._request_urls[type]) request = QNetworkRequest(self._request_urls[type])
request.setRawHeader(*self._request_header) request.setRawHeader(*self._request_header)
if self._network_manager: if self._network_manager:
@ -586,7 +586,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot(str) @pyqtSlot(str)
def startDownload(self, url: str) -> None: def startDownload(self, url: str) -> None:
Logger.log("i", "Toolbox: Attempting to download & install package from %s.", url) Logger.log("i", "Marketplace: Attempting to download & install package from %s.", url)
url = QUrl(url) url = QUrl(url)
self._download_request = QNetworkRequest(url) self._download_request = QNetworkRequest(url)
if hasattr(QNetworkRequest, "FollowRedirectsAttribute"): if hasattr(QNetworkRequest, "FollowRedirectsAttribute"):
@ -603,7 +603,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot() @pyqtSlot()
def cancelDownload(self) -> None: def cancelDownload(self) -> None:
Logger.log("i", "Toolbox: User cancelled the download of a package.") Logger.log("i", "Marketplace: User cancelled the download of a package.")
self.resetDownload() self.resetDownload()
def resetDownload(self) -> None: def resetDownload(self) -> None:
@ -690,7 +690,7 @@ class Toolbox(QObject, Extension):
return return
except json.decoder.JSONDecodeError: except json.decoder.JSONDecodeError:
Logger.log("w", "Toolbox: Received invalid JSON for %s.", type) Logger.log("w", "Marketplace: Received invalid JSON for %s.", type)
break break
else: else:
self.setViewPage("errored") self.setViewPage("errored")
@ -717,10 +717,10 @@ class Toolbox(QObject, Extension):
self._onDownloadComplete(file_path) self._onDownloadComplete(file_path)
def _onDownloadComplete(self, file_path: str) -> None: def _onDownloadComplete(self, file_path: str) -> None:
Logger.log("i", "Toolbox: Download complete.") Logger.log("i", "Marketplace: Download complete.")
package_info = self._package_manager.getPackageInfo(file_path) package_info = self._package_manager.getPackageInfo(file_path)
if not package_info: if not package_info:
Logger.log("w", "Toolbox: Package file [%s] was not a valid CuraPackage.", file_path) Logger.log("w", "Marketplace: Package file [%s] was not a valid CuraPackage.", file_path)
return return
license_content = self._package_manager.getPackageLicense(file_path) license_content = self._package_manager.getPackageLicense(file_path)
@ -819,7 +819,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot(str, str, str) @pyqtSlot(str, str, str)
def filterModelByProp(self, model_type: str, filter_type: str, parameter: str) -> None: def filterModelByProp(self, model_type: str, filter_type: str, parameter: str) -> None:
if not self._models[model_type]: if not self._models[model_type]:
Logger.log("w", "Toolbox: Couldn't filter %s model because it doesn't exist.", model_type) Logger.log("w", "Marketplace: Couldn't filter %s model because it doesn't exist.", model_type)
return return
self._models[model_type].setFilter({filter_type: parameter}) self._models[model_type].setFilter({filter_type: parameter})
self.filterChanged.emit() self.filterChanged.emit()
@ -827,7 +827,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot(str, "QVariantMap") @pyqtSlot(str, "QVariantMap")
def setFilters(self, model_type: str, filter_dict: dict) -> None: def setFilters(self, model_type: str, filter_dict: dict) -> None:
if not self._models[model_type]: if not self._models[model_type]:
Logger.log("w", "Toolbox: Couldn't filter %s model because it doesn't exist.", model_type) Logger.log("w", "Marketplace: Couldn't filter %s model because it doesn't exist.", model_type)
return return
self._models[model_type].setFilter(filter_dict) self._models[model_type].setFilter(filter_dict)
self.filterChanged.emit() self.filterChanged.emit()
@ -835,7 +835,7 @@ class Toolbox(QObject, Extension):
@pyqtSlot(str) @pyqtSlot(str)
def removeFilters(self, model_type: str) -> None: def removeFilters(self, model_type: str) -> None:
if not self._models[model_type]: if not self._models[model_type]:
Logger.log("w", "Toolbox: Couldn't remove filters on %s model because it doesn't exist.", model_type) Logger.log("w", "Marketplace: Couldn't remove filters on %s model because it doesn't exist.", model_type)
return return
self._models[model_type].setFilter({}) self._models[model_type].setFilter({})
self.filterChanged.emit() self.filterChanged.emit()

View File

@ -421,7 +421,7 @@ Item
Action Action
{ {
id: browsePackagesAction id: browsePackagesAction
text: catalog.i18nc("@action:menu", "Browse packages...") text: catalog.i18nc("@action:menu", "Open Marketplace...")
iconName: "plugins_browse" iconName: "plugins_browse"
} }

View File

@ -283,7 +283,7 @@ UM.MainWindow
Menu Menu
{ {
id: plugin_menu id: plugin_menu
title: catalog.i18nc("@title:menu menubar:toplevel", "&Toolbox") title: catalog.i18nc("@title:menu menubar:toplevel", "&Marketplace")
MenuItem { action: Cura.Actions.browsePackages } MenuItem { action: Cura.Actions.browsePackages }
} }