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, '* Improved the LayerView rendering speed.'))
30 s.Add(wx.StaticText(p, -1, '* Made the LayerView update during slicing, so you can see the result before it is ready.'))
31 s.Add(wx.StaticText(p, -1, '* New USB printing dialog, smaller, cleaner.'))
32 s.Add(wx.StaticText(p, -1, '* Selectable USB printing dialogs, from plugins.'))
33 s.Add(wx.StaticText(p, -1, '* Selection between new grid or old line based support material.'))
34 s.Add(wx.StaticText(p, -1, '* Profile settings are now stored per machine instead of global for all machines.'))
35 s.Add(wx.StaticText(p, -1, '* Added TweakAtZ 3.1 plugin per default. Thanks to Steve Morlock, Ricardo Gomez and Stefan Heule.'))
36 s.Add(wx.StaticText(p, -1, '* Added separate speeds for outer and inner shells.'))
37 s.Add(wx.StaticText(p, -1, '* Added expert Z-Hop feature.'))
38 s.Add(wx.StaticText(p, -1, '* Removed need for temp files, which speeds up Cura on slower harddisks.'))
39 s.Add(wx.StaticText(p, -1, '* Added expert setting to configure support material angle.'))
40 s.Add(wx.StaticText(p, -1, '* Allow round printer beds for Deltabots.'))
42 self.hasUltimaker = None
43 self.hasUltimaker2 = None
44 for n in xrange(0, profile.getMachineCount()):
45 if profile.getMachineSetting('machine_type', n) == 'ultimaker':
47 if profile.getMachineSetting('machine_type', n) == 'ultimaker2':
48 self.hasUltimaker2 = n
49 if self.hasUltimaker is not None and False:
50 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
51 s.Add(wx.StaticText(p, -1, 'New firmware for your Ultimaker Original:'))
52 s.Add(wx.StaticText(p, -1, '* .'))
53 button = wx.Button(p, -1, 'Install now')
54 self.Bind(wx.EVT_BUTTON, self.OnUltimakerFirmware, button)
55 s.Add(button, flag=wx.TOP, border=5)
56 if self.hasUltimaker2 is not None and False:
57 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
58 s.Add(wx.StaticText(p, -1, 'New firmware for your Ultimaker2:'))
59 s.Add(wx.StaticText(p, -1, '* .'))
60 button = wx.Button(p, -1, 'Install now')
61 self.Bind(wx.EVT_BUTTON, self.OnUltimaker2Firmware, button)
62 s.Add(button, flag=wx.TOP, border=5)
64 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
65 button = wx.Button(p, -1, 'Ok')
66 self.Bind(wx.EVT_BUTTON, self.OnOk, button)
67 s.Add(button, flag=wx.TOP|wx.ALIGN_RIGHT, border=5)
72 def OnUltimakerFirmware(self, e):
73 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker)
75 def OnUltimaker2Firmware(self, e):
76 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker2)