chiark / gitweb /
Merge tag '15.01-RC7' into upstream
[cura.git] / Cura / gui / configWizard.py
index f7800911850f5534faae10a4530af41793c82fd8..a4fb81ca01d3527994ef39a6d8afb31de39bb4ec 100644 (file)
@@ -224,38 +224,6 @@ class InfoPage(wx.wizard.WizardPageSimple):
        def StoreData(self):
                pass
 
-
-class FirstInfoPage(InfoPage):
-       def __init__(self, parent, addNew):
-               if addNew:
-                       super(FirstInfoPage, self).__init__(parent, _("Add new machine wizard"))
-               else:
-                       super(FirstInfoPage, self).__init__(parent, _("First time run wizard"))
-                       self.AddText(_("Welcome, and thanks for trying Cura!"))
-                       self.AddSeperator()
-               self.AddText(_("This wizard will help you in setting up Cura for your machine."))
-               if not addNew:
-                       self.AddSeperator()
-                       self._language_option = self.AddCombo(_("Select your language:"), map(lambda o: o[1], resources.getLanguageOptions()))
-               else:
-                       self._language_option = None
-               # self.AddText(_("This wizard will help you with the following steps:"))
-               # self.AddText(_("* Configure Cura for your machine"))
-               # self.AddText(_("* Optionally upgrade your firmware"))
-               # self.AddText(_("* Optionally check if your machine is working safely"))
-               # self.AddText(_("* Optionally level your printer bed"))
-
-               #self.AddText('* Calibrate your machine')
-               #self.AddText('* Do your first print')
-
-       def AllowBack(self):
-               return False
-
-       def StoreData(self):
-               if self._language_option is not None:
-                       profile.putPreference('language', self._language_option.GetValue())
-                       resources.setupLocalization(self._language_option.GetValue())
-
 class PrintrbotPage(InfoPage):
        def __init__(self, parent):
                self._printer_info = [
@@ -418,8 +386,14 @@ class MachineSelectPage(InfoPage):
                super(MachineSelectPage, self).__init__(parent, _("Select your machine"))
                self.AddText(_("What kind of machine do you have:"))
 
-               self.Ultimaker2Radio = self.AddRadioButton("Ultimaker2", style=wx.RB_GROUP)
-               self.Ultimaker2Radio.SetValue(True)
+               self.LulzbotMiniRadio = self.AddRadioButton("LulzBot Mini", style=wx.RB_GROUP)
+               self.LulzbotMiniRadio.Bind(wx.EVT_RADIOBUTTON, self.OnLulzbotSelect)
+               self.LulzbotMiniRadio.SetValue(True)
+               self.LulzbotTaz5Radio = self.AddRadioButton("LulzBot TAZ 5")
+               self.LulzbotTaz5Radio.Bind(wx.EVT_RADIOBUTTON, self.OnLulzbotSelect)
+               self.LulzbotTaz4Radio = self.AddRadioButton("LulzBot TAZ 4")
+               self.LulzbotTaz4Radio.Bind(wx.EVT_RADIOBUTTON, self.OnLulzbotSelect)
+               self.Ultimaker2Radio = self.AddRadioButton("Ultimaker2")
                self.Ultimaker2Radio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimaker2Select)
                self.Ultimaker2ExtRadio = self.AddRadioButton("Ultimaker2extended")
                self.Ultimaker2ExtRadio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimaker2Select)
@@ -431,18 +405,8 @@ class MachineSelectPage(InfoPage):
                self.UltimakerOPRadio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimakerOPSelect)
                self.PrintrbotRadio = self.AddRadioButton("Printrbot")
                self.PrintrbotRadio.Bind(wx.EVT_RADIOBUTTON, self.OnPrintrbotSelect)
-               self.LulzbotTazRadio = self.AddRadioButton("Lulzbot TAZ")
-               self.LulzbotTazRadio.Bind(wx.EVT_RADIOBUTTON, self.OnLulzbotSelect)
-               self.LulzbotMiniRadio = self.AddRadioButton("Lulzbot Mini")
-               self.LulzbotMiniRadio.Bind(wx.EVT_RADIOBUTTON, self.OnLulzbotSelect)
                self.OtherRadio = self.AddRadioButton(_("Other (Ex: RepRap, MakerBot, Witbox)"))
                self.OtherRadio.Bind(wx.EVT_RADIOBUTTON, self.OnOtherSelect)
-               self.AddSeperator()
-               self.AddText(_("The collection of anonymous usage information helps with the continued improvement of Cura."))
-               self.AddText(_("This does NOT submit your models online nor gathers any privacy related information."))
-               self.SubmitUserStats = self.AddCheckbox(_("Submit anonymous usage information:"))
-               self.AddText(_("For full details see: http://wiki.ultimaker.com/Cura:stats"))
-               self.SubmitUserStats.SetValue(True)
 
        def OnUltimaker2Select(self, e):
                wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimaker2ReadyPage)
@@ -463,7 +427,7 @@ class MachineSelectPage(InfoPage):
                wx.wizard.WizardPageSimple.Chain(self, self.GetParent().otherMachineSelectPage)
 
        def AllowNext(self):
-               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimaker2ReadyPage)
+               wx.wizard.WizardPageSimple.Chain(self, self.GetParent().lulzbotReadyPage)
                return True
 
        def StoreData(self):
@@ -532,20 +496,31 @@ class MachineSelectPage(InfoPage):
                        profile.putMachineSetting('has_heated_bed', 'True')
                        profile.putMachineSetting('extruder_amount', '1')
                        profile.putProfileSetting('retraction_enable', 'True')
-               elif self.LulzbotTazRadio.GetValue() or self.LulzbotMiniRadio.GetValue():
-                       if self.LulzbotTazRadio.GetValue():
+               elif self.LulzbotTaz4Radio.GetValue() or self.LulzbotTaz5Radio.GetValue() or self.LulzbotMiniRadio.GetValue():
+                       if self.LulzbotTaz4Radio.GetValue():
                                profile.putMachineSetting('machine_width', '298')
                                profile.putMachineSetting('machine_depth', '275')
                                profile.putMachineSetting('machine_height', '250')
                                profile.putProfileSetting('nozzle_size', '0.35')
-                               profile.putMachineSetting('machine_name', 'Lulzbot TAZ')
+                               profile.putMachineSetting('machine_name', 'LulzBot TAZ 4')
+                               profile.putMachineSetting('machine_type', 'lulzbot_TAZ_4')
+                               profile.putMachineSetting('serial_baud', '115200')
+                       elif self.LulzbotTaz5Radio.GetValue():
+                               profile.putMachineSetting('machine_width', '298')
+                               profile.putMachineSetting('machine_depth', '275')
+                               profile.putMachineSetting('machine_height', '250')
+                               profile.putProfileSetting('nozzle_size', '0.35')
+                               profile.putMachineSetting('machine_name', 'LulzBot TAZ 5')
+                               profile.putMachineSetting('machine_type', 'lulzbot_TAZ_5')
+                               profile.putMachineSetting('serial_baud', '115200')
                        else:
-                               profile.putMachineSetting('machine_width', '160')
-                               profile.putMachineSetting('machine_depth', '160')
-                               profile.putMachineSetting('machine_height', '160')
+                               profile.putMachineSetting('machine_width', '155')
+                               profile.putMachineSetting('machine_depth', '155')
+                               profile.putMachineSetting('machine_height', '163')
                                profile.putProfileSetting('nozzle_size', '0.5')
-                               profile.putMachineSetting('machine_name', 'Lulzbot Mini')
-                       profile.putMachineSetting('machine_type', 'Aleph Objects')
+                               profile.putMachineSetting('machine_name', 'LulzBot Mini')
+                               profile.putMachineSetting('machine_type', 'lulzbot_mini')
+                               profile.putMachineSetting('serial_baud', '115200')
                        profile.putMachineSetting('machine_center_is_zero', 'False')
                        profile.putMachineSetting('gcode_flavor', 'RepRap (Marlin/Sprinter)')
                        profile.putMachineSetting('has_heated_bed', 'True')
@@ -554,6 +529,7 @@ class MachineSelectPage(InfoPage):
                        profile.putMachineSetting('extruder_head_size_max_x', '0.0')
                        profile.putMachineSetting('extruder_head_size_max_y', '0.0')
                        profile.putMachineSetting('extruder_head_size_height', '0.0')
+                       profile.putPreference('startMode', 'Simple')
                else:
                        profile.putMachineSetting('machine_width', '80')
                        profile.putMachineSetting('machine_depth', '80')
@@ -565,11 +541,6 @@ class MachineSelectPage(InfoPage):
                        profile.putProfileSetting('nozzle_size', '0.5')
                profile.checkAndUpdateMachineName()
                profile.putProfileSetting('wall_thickness', float(profile.getProfileSetting('nozzle_size')) * 2)
-               if self.SubmitUserStats.GetValue():
-                       profile.putPreference('submit_slice_information', 'True')
-               else:
-                       profile.putPreference('submit_slice_information', 'False')
-
 
 class SelectParts(InfoPage):
        def __init__(self, parent):
@@ -610,7 +581,7 @@ class UltimakerFirmwareUpgradePage(InfoPage):
                self.AddText(_("The firmware shipping with new Ultimakers works, but upgrades\nhave been made to make better prints, and make calibration easier."))
                self.AddHiddenSeperator()
                self.AddText(_("Cura requires these new features and thus\nyour firmware will most likely need to be upgraded.\nYou will get the chance to do so now."))
-               upgradeButton, skipUpgradeButton = self.AddDualButton('Upgrade to Marlin firmware', 'Skip upgrade')
+               upgradeButton, skipUpgradeButton = self.AddDualButton(_('Upgrade to Marlin firmware'), _('Skip upgrade'))
                upgradeButton.Bind(wx.EVT_BUTTON, self.OnUpgradeClick)
                skipUpgradeButton.Bind(wx.EVT_BUTTON, self.OnSkipClick)
                self.AddHiddenSeperator()
@@ -1028,8 +999,11 @@ class Ultimaker2ReadyPage(InfoPage):
 
 class LulzbotReadyPage(InfoPage):
        def __init__(self, parent):
-               super(LulzbotReadyPage, self).__init__(parent, _("Lulzbot TAZ/Mini"))
-               self.AddText(_('Cura is now ready to be used with your Lulzbot.'))
+               super(LulzbotReadyPage, self).__init__(parent, _("LulzBot TAZ/Mini"))
+               self.AddText(_('Cura is now ready to be used with your LulzBot 3D printer.'))
+               self.AddSeperator()
+               self.AddText(_('For more information about using Cura with your LulzBot'))
+               self.AddText(_('3D printer, please visit www.LulzBot.com/cura'))
                self.AddSeperator()
 
 class ConfigWizard(wx.wizard.Wizard):
@@ -1044,7 +1018,6 @@ class ConfigWizard(wx.wizard.Wizard):
                self.Bind(wx.wizard.EVT_WIZARD_PAGE_CHANGING, self.OnPageChanging)
                self.Bind(wx.wizard.EVT_WIZARD_CANCEL, self.OnCancel)
 
-               self.firstInfoPage = FirstInfoPage(self, addNew)
                self.machineSelectPage = MachineSelectPage(self)
                self.ultimakerSelectParts = SelectParts(self)
                self.ultimakerFirmwareUpgradePage = UltimakerFirmwareUpgradePage(self)
@@ -1061,7 +1034,6 @@ class ConfigWizard(wx.wizard.Wizard):
                self.ultimaker2ReadyPage = Ultimaker2ReadyPage(self)
                self.lulzbotReadyPage = LulzbotReadyPage(self)
 
-               wx.wizard.WizardPageSimple.Chain(self.firstInfoPage, self.machineSelectPage)
                #wx.wizard.WizardPageSimple.Chain(self.machineSelectPage, self.ultimaker2ReadyPage)
                wx.wizard.WizardPageSimple.Chain(self.machineSelectPage, self.ultimakerSelectParts)
                wx.wizard.WizardPageSimple.Chain(self.ultimakerSelectParts, self.ultimakerFirmwareUpgradePage)
@@ -1071,10 +1043,10 @@ class ConfigWizard(wx.wizard.Wizard):
                wx.wizard.WizardPageSimple.Chain(self.printrbotSelectType, self.otherMachineInfoPage)
                wx.wizard.WizardPageSimple.Chain(self.otherMachineSelectPage, self.customRepRapInfoPage)
 
-               self.FitToPage(self.firstInfoPage)
-               self.GetPageAreaSizer().Add(self.firstInfoPage)
+               self.FitToPage(self.machineSelectPage)
+               self.GetPageAreaSizer().Add(self.machineSelectPage)
 
-               self.RunWizard(self.firstInfoPage)
+               self.RunWizard(self.machineSelectPage)
                self.Destroy()
 
        def OnPageChanging(self, e):
@@ -1325,7 +1297,7 @@ class bedLevelWizardMain(InfoPage):
 
 class headOffsetCalibrationPage(InfoPage):
        def __init__(self, parent):
-               super(headOffsetCalibrationPage, self).__init__(parent, "Printer head offset calibration")
+               super(headOffsetCalibrationPage, self).__init__(parent, _("Printer head offset calibration"))
 
                self.AddText(_('This wizard will help you in calibrating the printer head offsets of your dual extrusion machine'))
                self.AddSeperator()