Merge branch 'master' of github.com:Ultimaker/Cura

This commit is contained in:
Diego Prado Gesto 2018-05-15 11:44:34 +02:00
commit de36be0546
6 changed files with 24 additions and 12 deletions

View File

@ -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.

View File

@ -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

View File

@ -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 = ''

View File

@ -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
{

View File

@ -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