1 __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
4 from Cura.gui import firmwareInstall
5 from Cura.util import version
6 from Cura.util import profile
8 class newVersionDialog(wx.Dialog):
10 super(newVersionDialog, self).__init__(None, title="Welcome to the new version!")
12 wx.EVT_CLOSE(self, self.OnClose)
18 s.Add(p, flag=wx.ALL, border=15)
19 s = wx.BoxSizer(wx.VERTICAL)
22 title = wx.StaticText(p, -1, 'Cura - ' + version.getVersion())
23 title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
24 s.Add(title, flag=wx.ALIGN_CENTRE|wx.EXPAND|wx.BOTTOM, border=5)
25 s.Add(wx.StaticText(p, -1, 'Welcome to the new version of Cura.'))
26 s.Add(wx.StaticText(p, -1, '(This dialog is only shown once)'))
27 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
28 s.Add(wx.StaticText(p, -1, 'New in this version:'))
29 s.Add(wx.StaticText(p, -1, '* Added French and German language options.'))
30 s.Add(wx.StaticText(p, -1, '* When using the Pause at height plugin, the extruder will lose power so you could swap filament in an UM2.'))
31 s.Add(wx.StaticText(p, -1, '* Fixed an issue on both MacOS and Windows where Cura failed to start.'))
32 s.Add(wx.StaticText(p, -1, '* New TweakAtZ plugin from Dim3nsioneer.'))
33 s.Add(wx.StaticText(p, -1, '* Added Ultimaker Original+'))
34 s.Add(wx.StaticText(p, -1, '* Added Ultimaker Original Heated Bed Upgrade Kit'))
36 self.hasUltimaker = None
37 self.hasUltimaker2 = None
38 for n in xrange(0, profile.getMachineCount()):
39 if profile.getMachineSetting('machine_type', n) == 'ultimaker':
41 if profile.getMachineSetting('machine_type', n) == 'ultimaker2':
42 self.hasUltimaker2 = n
43 if self.hasUltimaker is not None and False:
44 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
45 s.Add(wx.StaticText(p, -1, 'New firmware for your Ultimaker Original:'))
46 s.Add(wx.StaticText(p, -1, '* .'))
47 button = wx.Button(p, -1, 'Install now')
48 self.Bind(wx.EVT_BUTTON, self.OnUltimakerFirmware, button)
49 s.Add(button, flag=wx.TOP, border=5)
50 if self.hasUltimaker2 is not None:
51 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
52 s.Add(wx.StaticText(p, -1, 'New firmware for your Ultimaker2: (14.09.0)'))
53 s.Add(wx.StaticText(p, -1, '* Fixed problems caused by canceling a print while the print is paused'))
54 s.Add(wx.StaticText(p, -1, '* Marked the first-run done earlier so you can turn off the machine before selecting a test print'))
55 button = wx.Button(p, -1, 'Install now')
56 self.Bind(wx.EVT_BUTTON, self.OnUltimaker2Firmware, button)
57 s.Add(button, flag=wx.TOP, border=5)
59 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
60 button = wx.Button(p, -1, 'Ok')
61 self.Bind(wx.EVT_BUTTON, self.OnOk, button)
62 s.Add(button, flag=wx.TOP|wx.ALIGN_RIGHT, border=5)
67 def OnUltimakerFirmware(self, e):
68 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker)
70 def OnUltimaker2Firmware(self, e):
71 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker2)