Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2018-09-27 14:27:42 +0300
committerGhostkeeper <rubend@tutanota.com>2018-09-27 14:27:42 +0300
commit88ba2ac3451834db5a11169214d410c8aa3f726d (patch)
tree7685d77e1285db13ffcb21f4a1d2f85cf65aedad /plugins/GCodeGzReader
parent80804b232fd4be9f7577261272ff6b5baf10c41e (diff)
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.
Diffstat (limited to 'plugins/GCodeGzReader')
-rw-r--r--plugins/GCodeGzReader/GCodeGzReader.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/GCodeGzReader/GCodeGzReader.py b/plugins/GCodeGzReader/GCodeGzReader.py
index 73a08075d2..4d33f00870 100644
--- a/plugins/GCodeGzReader/GCodeGzReader.py
+++ b/plugins/GCodeGzReader/GCodeGzReader.py
@@ -4,8 +4,16 @@
import gzip
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
+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.
#