chiark / gitweb /
Added keyboard control for the 3D window to look around with cursor keys.
[cura.git] / Cura / gui / newVersionDialog.py
1 __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
2
3 import wx
4 from Cura.gui import firmwareInstall
5 from Cura.util import version
6 from Cura.util import profile
7
8 class newVersionDialog(wx.Dialog):
9         def __init__(self):
10                 super(newVersionDialog, self).__init__(None, title="Welcome to the new version!")
11
12                 wx.EVT_CLOSE(self, self.OnClose)
13
14                 p = wx.Panel(self)
15                 self.panel = p
16                 s = wx.BoxSizer()
17                 self.SetSizer(s)
18                 s.Add(p, flag=wx.ALL, border=15)
19                 s = wx.BoxSizer(wx.VERTICAL)
20                 p.SetSizer(s)
21
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 an expert parameter for the wipe tower size, and made brim go around the wipe tower'))
30                 s.Add(wx.StaticText(p, -1, '* Added experimental support for printing with the Doodle3D WiFi box'))
31                 s.Add(wx.StaticText(p, -1, '* Updated object boundaries for multi-object prints, allows for tighter fitting of objects on the build platform'))
32                 s.Add(wx.StaticText(p, -1, '* Updated time-estimate to greatly improve accuracy of the estimate.'))
33                 s.Add(wx.StaticText(p, -1, '* Fixed problem with retractions not happening when they should.'))
34                 s.Add(wx.StaticText(p, -1, '* Added keyboard control for the 3D window to look around with cursor keys.'))
35
36                 self.hasUltimaker = None
37                 self.hasUltimaker2 = None
38                 for n in xrange(0, profile.getMachineCount()):
39                         if profile.getMachineSetting('machine_type', n) == 'ultimaker':
40                                 self.hasUltimaker = n
41                         if profile.getMachineSetting('machine_type', n) == 'ultimaker2':
42                                 self.hasUltimaker2 = n
43                 if self.hasUltimaker is not None:
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, '* Fixed bug in acceleration planning causing slow moves on rare occasions.'))
47                         s.Add(wx.StaticText(p, -1, '* Updated to new ErikZalm Marlin base, fixing the long standing slower retraction bug.'))
48                         button = wx.Button(p, -1, 'Install now')
49                         self.Bind(wx.EVT_BUTTON, self.OnUltimakerFirmware, button)
50                         s.Add(button, flag=wx.TOP, border=5)
51                 if self.hasUltimaker2 is not None:
52                         s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
53                         s.Add(wx.StaticText(p, -1, 'New firmware for your Ultimaker2:'))
54                         s.Add(wx.StaticText(p, -1, '* Fixed bug in acceleration planning causing slow moves on rare occasions.'))
55                         s.Add(wx.StaticText(p, -1, '* Fixed the problem where aborting a print did not always home the head.'))
56                         s.Add(wx.StaticText(p, -1, '* Disabled normal LCD menu curing USB printing.'))
57                         s.Add(wx.StaticText(p, -1, '* Disable stepper drivers after print is finished or aborted, so you can manually move the head.'))
58                         button = wx.Button(p, -1, 'Install now')
59                         self.Bind(wx.EVT_BUTTON, self.OnUltimaker2Firmware, button)
60                         s.Add(button, flag=wx.TOP, border=5)
61
62                 s.Add(wx.StaticLine(p), flag=wx.EXPAND|wx.TOP|wx.BOTTOM, border=10)
63                 button = wx.Button(p, -1, 'Ok')
64                 self.Bind(wx.EVT_BUTTON, self.OnOk, button)
65                 s.Add(button, flag=wx.TOP|wx.ALIGN_RIGHT, border=5)
66
67                 self.Fit()
68                 self.Centre()
69
70         def OnUltimakerFirmware(self, e):
71                 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker)
72
73         def OnUltimaker2Firmware(self, e):
74                 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker2)
75
76         def OnOk(self, e):
77                 self.Close()
78
79         def OnClose(self, e):
80                 self.Destroy()