Re: [Tails-dev] #5594: tails-greeter: better administration … |
Αυτό το μήνυμα είναι μέρος του ακόλουθου νήματος: | |
---|---|
![]() | το πλήρες δέντρο νημάτων ταξινομημένο κατά ημερομηνία |
![]() | intrigeri στο ![]() |
![]() |
--- glade/optionswindow.glade | 47 ++++++++++++++++++++++++++++++++++++++--- tailsgreeter/optionswindow.py | 18 ++++++++++------ 2 files changed, 55 insertions(+), 10 deletions(-)
diff --git a/glade/optionswindow.glade b/glade/optionswindow.glade index 8725fb8..27f9771 100644 --- a/glade/optionswindow.glade +++ b/glade/optionswindow.glade @@ -219,12 +219,12 @@ Otherwise it will be disabled for better security.</property> </packing> </child> <child> - <object class="GtkHBox" id="warning_area"> + <object class="GtkHBox" id="warning_area_empty"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="spacing">6</property> <child> - <object class="GtkImage" id="warning_image"> + <object class="GtkImage" id="warning_image_empty"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="stock">gtk-dialog-warning</property> @@ -237,7 +237,48 @@ Otherwise it will be disabled for better security.</property> </packing> </child> <child> - <object class="GtkLabel" id="warning_label"> + <object class="GtkLabel" id="warning_label_empty"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="xpad">10</property> + <property name="ypad">10</property> + <property name="label" translatable="yes"><i>Password must not be empty</i></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">3</property> + </packing> + </child> + <child> + <object class="GtkHBox" id="warning_area_match"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkImage" id="warning_image_match"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-dialog-warning</property> + <property name="icon-size">1</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="warning_label_match"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> diff --git a/tailsgreeter/optionswindow.py b/tailsgreeter/optionswindow.py index af60d53..6bb1af5 100644 --- a/tailsgreeter/optionswindow.py +++ b/tailsgreeter/optionswindow.py @@ -38,8 +38,8 @@ class OptionsWindow(TranslatableWindow): builder.connect_signals(self) self.entry_password = builder.get_object("password_entry") self.entry_password2 = builder.get_object("password_entry2") - self.warning_label = builder.get_object("warning_label") - self.warning_area = builder.get_object("warning_area") + self.warning_area_empty = builder.get_object("warning_area_empty") + self.warning_area_match = builder.get_object("warning_area_match") self.camouflage_checkbox = builder.get_object("camouflage_checkbox") self.macspoof_checkbox = builder.get_object("macspoof_checkbox") self.macspoof_checkbox.set_active(True) @@ -54,7 +54,8 @@ class OptionsWindow(TranslatableWindow): self.entry_password2.set_visibility(False)
def cb_pw_changed(*args): - self.warning_area.hide() + self.warning_area_empty.hide() + self.warning_area_match.hide() # compact the window self.window.resize(1, 1)
@@ -115,10 +116,13 @@ class OptionsWindow(TranslatableWindow): """Validate the selected options""" auth_password = self.entry_password.get_text() test_password = self.entry_password2.get_text() - passwords_match = test_password == auth_password - if not passwords_match: - self.warning_area.show() - return passwords_match + if len(auth_password) == 0 or len(test_password) == 0: + self.warning_area_empty.show() + return False + elif not auth_password == test_password: + self.warning_area_match.show() + return False + return True
def set_options_and_login(self): """Activate the selected options if they are valid""" -- 1.7.9.5
Το μήνυμα αυτό δημοσιεύτηκε στις ακόλουθες λίστες: | ||||
---|---|---|---|---|
tails-dev Πληροφορίες για τις Ταχυδρομικές λίστες | Κοντινά μηνύματα | ![]() | Re: [Tails-dev] tails logo contest submission | [Tails-dev] Please clarify the license to be used with your logo proposal | ![]() |
lists.autistici.org διαχειριζόμενη από postmaster | Lurker (έκδοση2.3) |