[Jim++] ask twice password when we create an account
This commit is contained in:
parent
4415d770fc
commit
b71fbf0b9d
|
@ -2649,7 +2649,7 @@ class AccountCreationWizardWindow:
|
|||
helpers.launch_browser_mailer('url', 'http://www.jabber.org/network/')
|
||||
|
||||
def on_save_password_checkbutton_toggled(self, widget):
|
||||
self.xml.get_widget('pass_entry').grab_focus()
|
||||
self.xml.get_widget('pass1_entry').grab_focus()
|
||||
|
||||
def on_cancel_button_clicked(self, widget):
|
||||
self.window.destroy()
|
||||
|
@ -2667,7 +2667,8 @@ class AccountCreationWizardWindow:
|
|||
for widget in (
|
||||
'username_entry',
|
||||
'server_comboboxentry',
|
||||
'pass_entry',
|
||||
'pass1_entry',
|
||||
'pass2_entry',
|
||||
'save_password_checkbutton',
|
||||
'proxyhost_entry',
|
||||
'proxyport_entry',
|
||||
|
@ -2685,9 +2686,13 @@ class AccountCreationWizardWindow:
|
|||
if widget.get_active():
|
||||
self.modify = True
|
||||
self.xml.get_widget('server_features_button').hide()
|
||||
self.xml.get_widget('pass2_entry').hide()
|
||||
self.xml.get_widget('pass2_label').hide()
|
||||
else:
|
||||
self.modify = False
|
||||
self.xml.get_widget('server_features_button').show()
|
||||
self.xml.get_widget('pass2_entry').show()
|
||||
self.xml.get_widget('pass2_label').show()
|
||||
self.notebook.set_current_page(1)
|
||||
self.back_button.set_sensitive(True)
|
||||
return
|
||||
|
@ -2702,13 +2707,19 @@ class AccountCreationWizardWindow:
|
|||
return
|
||||
server = widgets['server_comboboxentry'].child.get_text()
|
||||
savepass = widgets['save_password_checkbutton'].get_active()
|
||||
password = widgets['pass_entry'].get_text()
|
||||
password = widgets['pass1_entry'].get_text()
|
||||
|
||||
if not self.modify and password == '':
|
||||
dialogs.ErrorDialog(_('Invalid password'),
|
||||
_('You must enter a password for the new account.')).get_response()
|
||||
return
|
||||
if not self.modify:
|
||||
if password == '':
|
||||
dialogs.ErrorDialog(_('Invalid password'),
|
||||
_('You must enter a password for the new account.')).get_response()
|
||||
return
|
||||
|
||||
if widgets['pass2_entry'].get_text() != password:
|
||||
dialogs.ErrorDialog(_('Passwords do not match'),
|
||||
_('The passwords typed in both fields must be identical.')).get_response()
|
||||
return
|
||||
|
||||
jid = username + '@' + server
|
||||
# check if jid is conform to RFC and stringprep it
|
||||
try:
|
||||
|
@ -2742,7 +2753,7 @@ _('You can set advanced account options by pressing Advanced button, or later by
|
|||
img.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_DIALOG)
|
||||
self.notebook.set_current_page(3) # show finish page
|
||||
else:
|
||||
self.notebook.set_current_page(2) # show creqting page
|
||||
self.notebook.set_current_page(2) # show creating page
|
||||
self.update_progressbar_timeout_id = gobject.timeout_add(100,
|
||||
self.update_progressbar)
|
||||
|
||||
|
|
|
@ -12532,7 +12532,7 @@ to the Jabber network.</property>
|
|||
<child>
|
||||
<widget class="GtkTable" id="table27">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">5</property>
|
||||
<property name="n_rows">6</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
|
@ -12642,7 +12642,7 @@ to the Jabber network.</property>
|
|||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="mnemonic_widget">pass_entry</property>
|
||||
<property name="mnemonic_widget">pass1_entry</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
|
@ -12683,7 +12683,7 @@ to the Jabber network.</property>
|
|||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="pass_entry">
|
||||
<widget class="GtkEntry" id="pass1_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
|
@ -12693,7 +12693,6 @@ to the Jabber network.</property>
|
|||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
<signal name="changed" handler="on_pass_entry_changed" last_modification_time="Thu, 08 Sep 2005 09:48:57 GMT"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
@ -12754,8 +12753,8 @@ to the Jabber network.</property>
|
|||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
|
@ -12783,8 +12782,8 @@ to the Jabber network.</property>
|
|||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
|
@ -13038,9 +13037,59 @@ to the Jabber network.</property>
|
|||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkEntry" id="pass2_entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="max_length">0</property>
|
||||
<property name="text" translatable="yes"></property>
|
||||
<property name="has_frame">True</property>
|
||||
<property name="invisible_char">*</property>
|
||||
<property name="activates_default">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="pass2_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Enter it again for confirmation:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
<property name="mnemonic_widget">pass2_entry</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
Loading…
Reference in New Issue