chiark / gitweb /
Start the first run wizard when we do not know the machine type. Only show the defaul...
authordaid303 <daid303@gmail.com>
Fri, 5 Oct 2012 09:20:22 +0000 (11:20 +0200)
committerdaid303 <daid303@gmail.com>
Fri, 5 Oct 2012 09:20:22 +0000 (11:20 +0200)
Cura/gui/configWizard.py
Cura/gui/mainWindow.py
Cura/gui/simpleMode.py
Cura/util/profile.py

index 0b42adfa57aeda5d40a40e02e44d4e4b34440b86..c1ddc96f9c6d8f09799d72701ac32f07af089335 100644 (file)
@@ -246,6 +246,7 @@ class MachineSelectPage(InfoPage):
                        profile.putPreference('machine_depth', '80')\r
                        profile.putPreference('machine_height', '60')\r
                        profile.putPreference('machine_type', 'reprap')\r
+                       profile.putPreference('startMode', 'Normal')\r
                        profile.putProfileSetting('nozzle_size', '0.5')\r
                        profile.putProfileSetting('machine_center_x', '40')\r
                        profile.putProfileSetting('machine_center_y', '40')\r
index dc0a6a1a786c57cd01696ea37f4eb07fe68f2248..ec8b53cb5e69bb2b1ecbd6cfaca2d9be189e2002 100644 (file)
@@ -26,9 +26,8 @@ from util import meshLoader
 
 def main():
        #app = wx.App(False)
-       if profile.getPreference('wizardDone') == 'False':
+       if profile.getPreference('machine_type') == 'unknown':
                configWizard.configWizard()
-               profile.putPreference("wizardDone", "True")
        if profile.getPreference('startMode') == 'Simple':
                simpleMode.simpleModeWindow()
        else:
@@ -85,8 +84,9 @@ class mainWindow(configBase.configWindowBase):
                i = expertMenu.Append(-1, 'Open expert settings...')
                self.Bind(wx.EVT_MENU, self.OnExpertOpen, i)
                expertMenu.AppendSeparator()
-               i = expertMenu.Append(-1, 'Install default Marlin firmware')
-               self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i)
+               if firmwareInstall.getDefaultFirmware() != None:
+                       i = expertMenu.Append(-1, 'Install default Marlin firmware')
+                       self.Bind(wx.EVT_MENU, self.OnDefaultMarlinFirmware, i)
                i = expertMenu.Append(-1, 'Install custom firmware')
                self.Bind(wx.EVT_MENU, self.OnCustomFirmware, i)
                expertMenu.AppendSeparator()
index a4aef3b7c531fdc7d5756c1990f5f9e7cef6f615..f8d62e44ab47492da11df4dcf3a4c7849eca57ba 100644 (file)
@@ -131,23 +131,6 @@ class simpleModeWindow(configBase.configWindowBase):
                prefDialog = preferencesDialog.preferencesDialog(self)
                prefDialog.Centre()
                prefDialog.Show(True)
-       
-       def OnDefaultMarlinFirmware(self, e):
-               firmwareInstall.InstallFirmware()
-
-       def OnCustomFirmware(self, e):
-               dlg=wx.FileDialog(self, "Open firmware to upload", os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
-               dlg.SetWildcard("HEX file (*.hex)|*.hex;*.HEX")
-               if dlg.ShowModal() == wx.ID_OK:
-                       filename = dlg.GetPath()
-                       if not(os.path.exists(filename)):
-                               return
-                       #For some reason my Ubuntu 10.10 crashes here.
-                       firmwareInstall.InstallFirmware(filename)
-
-       def OnFirstRunWizard(self, e):
-               configWizard.configWizard()
-               self.updateProfileToControls()
 
        def OnLoadModel(self, e):
                dlg=wx.FileDialog(self, "Open file to print", os.path.split(profile.getPreference('lastFile'))[0], style=wx.FD_OPEN|wx.FD_FILE_MUST_EXIST)
index ea269d785a245b34472e7a1b9f5afeafbcc46ba0..9d17e17d2d30ded014f99cb148654e2374e622fc 100644 (file)
@@ -147,7 +147,6 @@ G92 E0
 """,\r
 }\r
 preferencesDefaultSettings = {\r
-       'wizardDone': 'False',\r
        'startMode': 'Simple',\r
        'lastFile': os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'example', 'UltimakerRobot_support.stl')),\r
        'machine_width': '205',\r