diff options
author | Preston Cody <codeman@gentoo.org> | 2007-01-28 19:37:19 +0000 |
---|---|---|
committer | Preston Cody <codeman@gentoo.org> | 2007-01-28 19:37:19 +0000 |
commit | 7544d51a50cf9a302664ae510661decfa8334376 (patch) | |
tree | 54e2a720ecec10351df74dc36b5173e374effb5c /src/fe/dialog | |
parent | add subprogress to install_failed_cleanup() (diff) | |
download | gli-7544d51a50cf9a302664ae510661decfa8334376.tar.gz gli-7544d51a50cf9a302664ae510661decfa8334376.tar.bz2 gli-7544d51a50cf9a302664ae510661decfa8334376.zip |
trying to reorder things so that steps are done
by the frontend.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/branches/overhaul@1668 f8877401-5920-0410-a79b-8e2d7e04ca0d
Diffstat (limited to 'src/fe/dialog')
-rwxr-xr-x | src/fe/dialog/gli-dialog.py | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/src/fe/dialog/gli-dialog.py b/src/fe/dialog/gli-dialog.py index c6831af..d04d52d 100755 --- a/src/fe/dialog/gli-dialog.py +++ b/src/fe/dialog/gli-dialog.py @@ -39,6 +39,7 @@ class GLIDialog(object): self.profile_xml_file = None self.advanced_mode = True self.networkless = False + self.num_steps_completed = 1 ############ ACCESSOR FUNCTIONS ############# @@ -2061,18 +2062,24 @@ Press OK to continue""") #Save the profile self.save_install_profile() - def run_phase5(self): + def run_phase5(self): + #test function for getting steps. + steps = self._install_profile.get_install_steps() + do_steps(steps) + + def do_steps(self, install_steps): #Start the rest of the installation # INSTALLATION TIME - current_item = 0 - self._cc.start_pre_install() - +# current_item = 0 self._cc.set_install_profile(self._install_profile) - self._cc.start_install() - self._d.gauge_start(_(u"Installation Started!"), title=_(u"Installation progress")) - num_steps_completed = 1 - next_step = 0 - num_steps = 0 + install_steps = list(install_steps) +# self._cc.start_install() + if self.num_steps_completed == 1: + self._d.gauge_start(_(u"Installation Started!"), title=_(u"Installation progress")) + + self.next_step = 0 + self.num_steps = index(install_steps) + i = 0 while 1: notification = self._cc.getNotification() @@ -2096,15 +2103,16 @@ Press OK to continue""") self._d.gauge_update(i+diff, _(u"On step %d of %d. Current step: %s\n%s") % (num_steps_completed, num_steps, next_step, data[1]), update_text=1) elif type_r == "int": if data == GLIClientController.NEXT_STEP_READY: - next_step_waiting = False + step_name = install_steps.pop(0) + next_step = self._cc.get_next_step_info() - num_steps = self._cc.get_num_steps() - i = (num_steps_completed*100)/num_steps - self._d.gauge_update(i, _(u"On step %d of %d. Current step: %s") % (num_steps_completed, num_steps, next_step), update_text=1) - num_steps_completed += 1 +# num_steps = self._cc.get_num_steps() +# i = (num_steps_completed*100)/num_steps +# self._d.gauge_update(i, _(u"On step %d of %d. Current step: %s") % (num_steps_completed, num_steps, next_step), update_text=1) + self.num_steps_completed += 1 #print "Next step: " + next_step if self._cc.has_more_steps(): - self._cc.next_step() + self._cc.run_step(step_name) continue if data == GLIClientController.INSTALL_DONE: self._d.gauge_update(100, _(u"Install completed!"), update_text=1) @@ -2133,6 +2141,7 @@ if __name__ == '__main__': gli.run_phase3() #Install stage tarball and portage gli.run_phase4() #Do everything else gli.run_phase5() #Execute the installation + #########################End of main################################# |