
from . import GCodeWriter

from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "type": "mesh_writer",
        "plugin": {
            "name": "GCode Writer",
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file")
        },

        "mesh_writer": {
            "extension": "gcode",
            "description": catalog.i18nc("GCode Writer File Description", "GCode File")
        }
    }

def register(app):
    return { "mesh_writer": GCodeWriter.GCodeWriter() }


from . import GCodeWriter

from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "type": "mesh_writer",
        "plugin": {
            "name": "GCode Writer",
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file")
        },

        "mesh_writer": {
            "extension": "gcode",
            "description": catalog.i18nc("GCode Writer File Description", "GCode File"),
            "mime_types": [
                "text/x-gcode"
            ]
        }
    }

def register(app):
    return { "mesh_writer": GCodeWriter.GCodeWriter() }

Add mime types to GCodeWriter plugin
Add mime types to GCodeWriter plugin

  
  from . import GCodeWriter
  
  from UM.i18n import i18nCatalog
  catalog = i18nCatalog("cura")
  
  def getMetaData():
      return {
          "type": "mesh_writer",
          "plugin": {
              "name": "GCode Writer",
              "author": "Ultimaker",
              "version": "1.0",
              "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file")
          },
  
          "mesh_writer": {
              "extension": "gcode",
-             "description": catalog.i18nc("GCode Writer File Description", "GCode File")
+             "description": catalog.i18nc("GCode Writer File Description", "GCode File"),
+             "mime_types": [
+                 "text/x-gcode"
+             ]
          }
      }
  
  def register(app):
      return { "mesh_writer": GCodeWriter.GCodeWriter() }
  
Add mime types to GCodeWriter plugin
## Code Before:

from . import GCodeWriter

from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "type": "mesh_writer",
        "plugin": {
            "name": "GCode Writer",
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file")
        },

        "mesh_writer": {
            "extension": "gcode",
            "description": catalog.i18nc("GCode Writer File Description", "GCode File")
        }
    }

def register(app):
    return { "mesh_writer": GCodeWriter.GCodeWriter() }

## Instruction:
Add mime types to GCodeWriter plugin
## Code After:

from . import GCodeWriter

from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")

def getMetaData():
    return {
        "type": "mesh_writer",
        "plugin": {
            "name": "GCode Writer",
            "author": "Ultimaker",
            "version": "1.0",
            "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file")
        },

        "mesh_writer": {
            "extension": "gcode",
            "description": catalog.i18nc("GCode Writer File Description", "GCode File"),
            "mime_types": [
                "text/x-gcode"
            ]
        }
    }

def register(app):
    return { "mesh_writer": GCodeWriter.GCodeWriter() }
