Commits

Rodrigo Bistolfi committed 54bda36

Add last callbacks after enabling buttons (#14)

Comments (0)

Files changed (1)

vinstall/core/wizard.py

         """Present the current controller to the user and setup callbacks for
         running next. If optional render method is not present, call next()
         ourselves.
-        
+
         """
         if hasattr(self.current_controller, "render"):
             self.current_render = render = self.current_controller.render()
             self.current_render.main_window.set_next_button_label("Reboot")
             self.current_render.main_window.set_previous_button_label("Quit")
             self.current_render.main_window.enable_buttons()
+            self.current_render.main_window.clear_callbacks()
+            self.current_render.main_window.add_next_callback(self.reboot)
+            self.current_render.main_window.add_previous_callback(self.stop)
             #self.current_render.main_window.alert("Installation finished")
 
         processing.add_command(tasks_finished_callback, args=tuple(),
 
         controller = self.factory.make_controller_instance(ProcessingController)
         self.process_state(controller)
-        self.current_render.main_window.clear_callbacks()
-        self.current_render.main_window.add_next_callback(self.reboot)
-        self.current_render.main_window.add_previous_callback(self.stop)
         processing.execute_all()
 
     def start(self, first_controller):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.