chiark / gitweb /
Update new version dialog. Remove ffmpeg.
[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, '* 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.'))
41
42                 self.hasUltimaker = None
43                 self.hasUltimaker2 = None
44                 for n in xrange(0, profile.getMachineCount()):
45                         if profile.getMachineSetting('machine_type', n) == 'ultimaker':
46                                 self.hasUltimaker = n
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)
63
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)
68
69                 self.Fit()
70                 self.Centre()
71
72         def OnUltimakerFirmware(self, e):
73                 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker)
74
75         def OnUltimaker2Firmware(self, e):
76                 firmwareInstall.InstallFirmware(machineIndex=self.hasUltimaker2)
77
78         def OnOk(self, e):
79                 self.Close()
80
81         def OnClose(self, e):
82                 self.Destroy()