diff --git a/src/salix-live-installer.glade b/src/salix-live-installer.glade index 2ccb7f4..bc0c454 100644 --- a/src/salix-live-installer.glade +++ b/src/salix-live-installer.glade @@ -252,6 +252,32 @@ MA 02110-1301, USA. + + + + + + + + ext2 + + + ext3 + + + ext4 + + + reiserfs + + + xfs + + + jfs + + + @@ -289,32 +315,6 @@ MA 02110-1301, USA. - - - - - - - - ext2 - - - ext3 - - - ext4 - - - reiserfs - - - xfs - - - jfs - - - @@ -341,67 +341,6 @@ MA 02110-1301, USA. - - True - True - True - 5 - Salix installation - False - True - center-always - salix-live-installer.png - normal - False - main_window - - - True - False - 2 - - - True - False - end - - - - - - False - True - end - 0 - - - - - True - False - Please be patient, Salix installation is in progress... - - - True - True - 1 - - - - - True - False - True - - - True - True - 2 - - - - - 800 True @@ -3371,8 +3310,9 @@ If you already have all the needed partitions, please click on the button 'Do no - True + False True + 3 1 @@ -3416,6 +3356,8 @@ If you already have all the needed partitions, please click on the button 'Do no 100 True False + + False @@ -3426,8 +3368,9 @@ If you already have all the needed partitions, please click on the button 'Do no - True + False True + 3 2 @@ -3486,8 +3429,9 @@ If you already have all the needed partitions, please click on the button 'Do no - True + False True + 3 3 @@ -3647,6 +3591,8 @@ If you already have all the needed partitions, please click on the button 'Do no 100 True False + + False @@ -3657,8 +3603,9 @@ If you already have all the needed partitions, please click on the button 'Do no - True + False True + 3 7 @@ -3717,8 +3664,9 @@ If you already have all the needed partitions, please click on the button 'Do no - True + False True + 3 8 @@ -4308,6 +4256,67 @@ If you already have all the needed partitions, please click on the button 'Do no + + True + True + True + 5 + Salix installation + False + True + center-always + salix-live-installer.png + normal + False + main_window + + + True + False + 2 + + + True + False + end + + + + + + False + True + end + 0 + + + + + True + False + Please be patient, Salix installation is in progress... + + + True + True + 1 + + + + + True + False + True + + + True + True + 2 + + + + + diff --git a/src/salix-live-installer.py b/src/salix-live-installer.py index 8f80acd..6dcea71 100755 --- a/src/salix-live-installer.py +++ b/src/salix-live-installer.py @@ -335,7 +335,7 @@ def on_user_pass1_entry_enter_notify_event(self, widget, data=None): @, !, and &)")) def on_user_pass2_entry_enter_notify_event(self, widget, data=None): self.ContextLabel.set_text(_("Here you must retype your password as a confirmation \ -of your choice.")) +of your choice.")) def on_user_visible_checkbutton_enter_notify_event(self, widget, data=None): self.ContextLabel.set_text(_("Check this box if you want to be able to see the password you \ are typing.")) @@ -748,7 +748,7 @@ def partitions_settings(self): self.MainPartitionBox.show() def swap_detection(self): """ - Displays the swap partitions that were detected on the system which + Display the swap partitions that were detected on the system which will be automatically used by the installer. Displays a warning message when no (swap) partition is found. """ @@ -855,23 +855,39 @@ def on_clone_login_undo_clicked(self, widget, data=None): self.users_settings_liveclone() def get_password_strength(self, pwd): """ - Returns a number from 0 to 4 indicates the strength of the password. + Return a number from 0 to 4 to indicate the strength of the password. """ if not pwd: score = 0 else: score = 1 + self.ContextLabel.set_markup(_("Password strength:\nLess than 5 characters")) if len(pwd) >= 5: score += 1 + contextLabelText = _("Password strength:\n") + if re.search(r'\ ', pwd): + score += 0.4 + else: + contextLabelText += _("No space...\n") if re.search(r'[A-Z]', pwd): - score += 0.5 + score += 0.4 + else: + contextLabelText += _("No upper case letter...\n") if re.search(r'[1-9]', pwd): - score += 0.5 + score += 0.4 + else: + contextLabelText += _("No number...\n") if re.search(r'[-_.,;:!?"\']', pwd): - score += 0.5 + score += 0.4 + else: + contextLabelText += _("No punctuation...\n") if re.search(r'[][(){}/\<>$%*#@^]', pwd): score += 0.5 + else: + contextLabelText += _("No symbol...\n") score = int(math.floor(score)) + self.ContextLabel.set_markup(_(contextLabelText)) + return score def set_progressbar_strength(self, pwd, draw_widget): strength = self.get_password_strength(pwd) @@ -886,12 +902,14 @@ def set_progressbar_strength(self, pwd, draw_widget): progress_color = draw_widget.get_colormap().alloc_color("#CCCC00") elif strength == 4: progress_color = draw_widget.get_colormap().alloc_color("#00FF00") + self.ContextLabel.set_markup(_("Password strength:\n\nSatisfactory!")) gc.set_foreground(bg_color) - draw_widget.window.draw_rectangle(gc, True, 0, 0, 80, 25) + draw_widget.window.draw_rectangle(gc, True, 0, 1, 80, 20) gc.set_foreground(progress_color) - draw_widget.window.draw_rectangle(gc, True, 0, 0, 20 * strength, 25) + draw_widget.window.draw_rectangle(gc, True, 0, 1, 20 * strength, 20) gc.set_foreground(border_color) - draw_widget.window.draw_rectangle(gc, False, 0, 0, 80, 25) + draw_widget.window.draw_rectangle(gc, False, 0, 1, 80, 20) + def on_user_pass1_entry_changed(self, widget, data=None): self.set_progressbar_strength(widget.get_text().strip(), self.UserPassStrength) def on_user_visible_checkbutton_toggled(self, widget, data=None): @@ -1074,7 +1092,7 @@ def info_dialog(message, parent = None): # Error window skeleton: def error_dialog(message, parent = None): """ - Displays an error message. + Display an error message. """ dialog = gtk.MessageDialog(parent = parent, type = gtk.MESSAGE_ERROR, buttons = gtk.BUTTONS_CLOSE, flags = gtk.DIALOG_MODAL) dialog.set_markup(message)