mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Using UM.Platform and correcting something minor
Since we already have UM.Platform, I think it is worth to get constancy into our code and use UM.Platform for our detection. Additionally, I corrected the head of the file, because I think I shall mention Cura and not Uranium. I guess the plugin was moved to Cura, so this was missed.
This commit is contained in:
parent
47be957f38
commit
5891709800
1 changed files with 6 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2015 Ultimaker B.V.
|
# Copyright (c) 2015 Ultimaker B.V.
|
||||||
# Uranium is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import platform
|
from UM.Platform import Platform
|
||||||
|
|
||||||
from UM.i18n import i18nCatalog
|
from UM.i18n import i18nCatalog
|
||||||
catalog = i18nCatalog("cura")
|
catalog = i18nCatalog("cura")
|
||||||
|
@ -18,15 +18,15 @@ def getMetaData():
|
||||||
}
|
}
|
||||||
|
|
||||||
def register(app):
|
def register(app):
|
||||||
if platform.system() == "Windows":
|
if Platform.isWindows():
|
||||||
from . import WindowsRemovableDrivePlugin
|
from . import WindowsRemovableDrivePlugin
|
||||||
return { "output_device": WindowsRemovableDrivePlugin.WindowsRemovableDrivePlugin() }
|
return { "output_device": WindowsRemovableDrivePlugin.WindowsRemovableDrivePlugin() }
|
||||||
elif platform.system() == "Darwin":
|
elif Platform.isOSX():
|
||||||
from . import OSXRemovableDrivePlugin
|
from . import OSXRemovableDrivePlugin
|
||||||
return { "output_device": OSXRemovableDrivePlugin.OSXRemovableDrivePlugin() }
|
return { "output_device": OSXRemovableDrivePlugin.OSXRemovableDrivePlugin() }
|
||||||
elif platform.system() == "Linux":
|
elif Platform.isLinux():
|
||||||
from . import LinuxRemovableDrivePlugin
|
from . import LinuxRemovableDrivePlugin
|
||||||
return { "output_device": LinuxRemovableDrivePlugin.LinuxRemovableDrivePlugin() }
|
return { "output_device": LinuxRemovableDrivePlugin.LinuxRemovableDrivePlugin() }
|
||||||
else:
|
else:
|
||||||
Logger.log("e", "Unsupported system %s, no removable device hotplugging support available.", platform.system())
|
Logger.log("e", "Unsupported system, thus no removable device hotplugging support available.")
|
||||||
return { }
|
return { }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue