From 3076634f92e3d6b45eeed575e80fe38f6c9dbcae Mon Sep 17 00:00:00 2001 From: Cyrille Pontvieux Date: Sun, 17 Feb 2013 14:35:28 +0100 Subject: [PATCH] Big recap before installation. --- src/salix-live-installer.py | 50 ++++++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/src/salix-live-installer.py b/src/salix-live-installer.py index 24d4377..84cc5bd 100755 --- a/src/salix-live-installer.py +++ b/src/salix-live-installer.py @@ -871,12 +871,12 @@ def get_main_partition_message(self, full_text): if full_text: msg = _("{device} will be mounted as {mountpoint} without formatting.").format(device = part_name, mountpoint = '/') else: - msg = '- {0} => /'.format(part_name) + msg = '- {0} => /'.format(part_name) else: if full_text: msg = _("{device} will be formatted with {fs} and will be mounted as {mountpoint}.").format(device = part_name, fs = self.main_format, mountpoint = '/') else: - msg = '- {0} => / ({1})'.format(part_name, self.main_format) + msg = '- {0} => / ({1})'.format(part_name, self.main_format) return msg def on_main_partition_undo_clicked(self, widget, data=None): self.on_main_partition_cancel() @@ -1055,10 +1055,10 @@ def on_windows_partition_cancel(self): self.win_partitions = None self.partitions_settings() def recap_partition_settings(self): - self.MainPartRecapLabel.set_markup(self.get_main_partition_message(False)) - self.LinPartRecapLabel.set_markup(self.get_linux_partitions_message(False, "" + _("No partition") + "")) - self.WinPartRecapLabel.set_markup(self.get_windows_partitions_message(False, "" + _("No partition") + "")) - self.SwapPartRecapLabel.set_markup(self.get_swap_partitions_message(False, None ,"" + _("No partition") + "")) + self.MainPartRecapLabel.set_markup("{0}".format(self.get_main_partition_message(False))) + self.LinPartRecapLabel.set_markup("{0}".format(self.get_linux_partitions_message(False, "" + _("No partition") + ""))) + self.WinPartRecapLabel.set_markup("{0}".format(self.get_windows_partitions_message(False, "" + _("No partition") + ""))) + self.SwapPartRecapLabel.set_markup("{0}".format(self.get_swap_partitions_message(False, None ,"" + _("No partition") + ""))) self.configurations['partitions'] = True self.PartitionCheck.show() self.PartitionCheckMarker.hide() @@ -1281,10 +1281,13 @@ def packages_settings(self): self.update_install_button() def on_packages_apply_clicked(self, widget, data=None): if self.CoreRadioButton.get_active(): + _("core") # to be catched by the translations generator self.install_mode = 'core' elif self.BasicRadioButton.get_active(): + _("basic") # to be catched by the translations generator self.install_mode = 'basic' elif self.FullRadioButton.get_active(): + _("full") # to be catched by the translations generator self.install_mode = 'full' self.configurations['packages'] = True self.packages_settings() @@ -1314,6 +1317,41 @@ def on_yesno_response(self, dialog, response_id, data=None): ################################################################### def on_install_button_clicked(self, widget, data=None): + full_recap_msg = '' + full_recap_msg += "\n" + _("You are about to install Salix with the following settings:") + "\n" + full_recap_msg += "\n" + _("Date and Time:") + "\n" + full_recap_msg += _("- Time zone: {tz}").format(tz = self.cur_tz_continent + "/" + self.cur_tz_city) + "\n" + if self.cur_use_ntp: + dt = "NTP" + else: + dt = (datetime.now() + self.cur_time_delta).strftime("%Y-%m-%d %H:%M:%S") + full_recap_msg += "- Date and time: {dt}\n".format(dt = dt) + full_recap_msg += "\n" + _("Keyboard:") + "\n" + full_recap_msg += _("- Layout: {layout}").format(layout = self.KeyboardSelection.get_text()) + "\n" + if self.cur_use_numlock: + nl = '{0}'.format(_("activated")) + else: + nl = '{0}'.format(_("deactivated")) + if self.cur_use_ibus: + ibus = '{0}'.format(_("activated")) + else: + ibus = '{0}'.format(_("deactivated")) + full_recap_msg += _("- Numlock: {nl}, Ibus: {ibus}").format(nl = nl, ibus = ibus) + "\n" + full_recap_msg += "\n" + _("System language:") + "\n" + full_recap_msg += "- {lang}".format(lang = self.LocaleSelection.get_text()) + "\n" + full_recap_msg += "\n" + _("Partitions:") + "\n" + full_recap_msg += self.get_main_partition_message(False) + "\n" + full_recap_msg += self.get_linux_partitions_message(False) + "\n" + full_recap_msg += self.get_windows_partitions_message(False) + "\n" + full_recap_msg += self.get_swap_partitions_message(False) + "\n" + if self.keep_live_logins: + full_recap_msg += "" + _("Standard User:") + "\n" + _("Using LiveClone login.") + "\n" + else: + full_recap_msg += "" + _("Standard User:") + "\n" + self.new_login + "\n" + full_recap_msg += "\n" + _("Packages:") + "\n" + full_recap_msg += _("You have chosen the {mode} installation mode.").format(mode = _(self.install_mode)) + self.show_yesno_dialog(full_recap_msg, self.install_salixlive, None) + def install_salixlive(self): info_dialog("installation...") # Info window skeleton: