Merge branch 'master' into WIP_improve_initialization

This commit is contained in:
Diego Prado Gesto 2018-05-23 11:36:12 +02:00
commit b7fe43e68c
24 changed files with 433 additions and 279 deletions

View file

@ -8,13 +8,14 @@ import shutil
import zipfile
import tempfile
from PyQt5.QtCore import pyqtSlot, QObject, pyqtSignal
from PyQt5.QtCore import pyqtSlot, QObject, pyqtSignal, QUrl
from UM.Application import Application
from UM.Logger import Logger
from UM.Resources import Resources
from UM.Version import Version
class CuraPackageManager(QObject):
Version = 1
@ -184,6 +185,12 @@ class CuraPackageManager(QObject):
def isPackageInstalled(self, package_id: str) -> bool:
return self.getInstalledPackageInfo(package_id) is not None
# This is called by drag-and-dropping curapackage files.
@pyqtSlot(QUrl)
def installPackageViaDragAndDrop(self, file_url: str) -> None:
filename = QUrl(file_url).toLocalFile()
return self.installPackage(filename)
# Schedules the given package file to be installed upon the next start.
@pyqtSlot(str)
def installPackage(self, filename: str) -> None: