mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Define gcode.gz extension in GCodeGzReader
So if you were to disable the GCodeGzReader plug-in, you will now no longer see the extension in the files you can read. Fixes #4151.
This commit is contained in:
parent
80804b232f
commit
88ba2ac345
2 changed files with 10 additions and 1 deletions
|
@ -4,8 +4,16 @@
|
||||||
import gzip
|
import gzip
|
||||||
|
|
||||||
from UM.Mesh.MeshReader import MeshReader #The class we're extending/implementing.
|
from UM.Mesh.MeshReader import MeshReader #The class we're extending/implementing.
|
||||||
|
from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType #To add the .gcode.gz files to the MIME type database.
|
||||||
from UM.PluginRegistry import PluginRegistry
|
from UM.PluginRegistry import PluginRegistry
|
||||||
|
|
||||||
|
MimeTypeDatabase.addMimeType(
|
||||||
|
MimeType(
|
||||||
|
name = "application/x-cura-compressed-gcode-file",
|
||||||
|
comment = "Cura Compressed GCode File",
|
||||||
|
suffixes = ["gcode.gz"]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
## A file reader that reads gzipped g-code.
|
## A file reader that reads gzipped g-code.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# Copyright (c) 2017 Aleph Objects, Inc.
|
# Copyright (c) 2017 Aleph Objects, Inc.
|
||||||
|
# Copyright (c) 2018 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from UM.FileHandler.FileReader import FileReader
|
from UM.FileHandler.FileReader import FileReader
|
||||||
|
@ -15,7 +16,7 @@ MimeTypeDatabase.addMimeType(
|
||||||
MimeType(
|
MimeType(
|
||||||
name = "application/x-cura-gcode-file",
|
name = "application/x-cura-gcode-file",
|
||||||
comment = "Cura GCode File",
|
comment = "Cura GCode File",
|
||||||
suffixes = ["gcode", "gcode.gz"]
|
suffixes = ["gcode"]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue