Hi Dave.
> OK, I'll agree with that - the password is not shown in the SQL pane by
> default these days.
>
> However - we need to improve your patch Hiroshi:
>
> 1) You should add the style to txtPasswd, not stPasswd :-)
Uga.. it is was lost.
> 2) Because it cannot be seen anymore, it should be confirmed - so, can
> you add a 'Confirm Password' textbox with the appropriate code as well
> please?
Is this good?
Thank you.!:-)
regards,
Hiroshi Saito
--- src/include/dlgUser.h.orig Thu Mar 17 02:40:00 2005
+++ src/include/dlgUser.h Thu Mar 17 02:40:26 2005
@@ -47,6 +47,7 @@
void OnVarSelChange(wxListEvent &ev);
void OnVarnameSelChange(wxCommandEvent &ev);
+ void OnChangePasswd(wxCommandEvent &ev);
wxArrayString groupsIn;
--- src/ui/common/dlgUser.xrc.orig Thu Mar 17 01:16:46 2005
+++ src/ui/common/dlgUser.xrc Thu Mar 17 01:17:35 2005
@@ -29,32 +29,42 @@
<object class="wxTextCtrl" name="txtPasswd">
<pos>70,35d</pos>
<size>135,-1d</size>
+ <style>wxTE_PASSWORD</style>
+ </object>
+ <object class="wxStaticText" name="stRePasswd">
+ <label>Password (again)</label>
+ <pos>5,52d</pos>
+ </object>
+ <object class="wxTextCtrl" name="txtRePasswd">
+ <pos>70,50d</pos>
+ <size>135,-1d</size>
+ <style>wxTE_PASSWORD</style>
</object>
<object class="wxStaticText" name="stValidUntil">
<label>Account expires</label>
- <pos>5,52d</pos>
+ <pos>5,72d</pos>
</object>
<object class="wxCalendarBox" name="datValidUntil">
- <pos>70,50d</pos>
+ <pos>70,70d</pos>
<size>65,15d</size>
</object>
<object class="wxTimeSpinCtrl" name="timValidUntil">
- <pos>140,50d</pos>
+ <pos>140,70d</pos>
<size>65,12d</size>
</object>
<object class="wxStaticBox" name="stPriv">
<label>User Privileges</label>
- <pos>5,70d</pos>
+ <pos>5,90d</pos>
<size>193,36d</size>
</object>
<object class="wxCheckBox" name="chkCreateDB">
<label>User can create databases</label>
- <pos>16,79d</pos>
+ <pos>16,99d</pos>
<size>166,12d</size>
</object>
<object class="wxCheckBox" name="chkCreateUser">
<label>Superuser (can create users)</label>
- <pos>16,91d</pos>
+ <pos>16,111d</pos>
<size>166,12d</size>
</object>
</object>
--- src/ui/dlgUser.cpp.orig Thu Mar 17 02:32:23 2005
+++ src/ui/dlgUser.cpp Thu Mar 17 02:38:56 2005
@@ -26,6 +26,7 @@
// pointer to controls
#define txtID CTRL_TEXT("txtID")
#define txtPasswd CTRL_TEXT("txtPasswd")
+#define txtRePasswd CTRL_TEXT("txtRePasswd")
#define datValidUntil CTRL_CALENDAR("datValidUntil")
#define timValidUntil CTRL_TIME("timValidUntil")
#define chkCreateDB CTRL_CHECKBOX("chkCreateDB")
@@ -50,7 +51,8 @@
EVT_LISTBOX_DCLICK(XRCID("lbGroupsNotIn"), dlgUser::OnGroupAdd)
EVT_LISTBOX_DCLICK(XRCID("lbGroupsIn"), dlgUser::OnGroupRemove)
- EVT_TEXT(XRCID("txtPasswd"), dlgUser::OnChange)
+ EVT_TEXT(XRCID("txtPasswd"), dlgUser::OnChangePasswd)
+ EVT_TEXT(XRCID("txtRePasswd"), dlgUser::OnChangePasswd)
EVT_CHECKBOX(XRCID("chkCreateDB"), dlgUser::OnChange)
EVT_CHECKBOX(XRCID("chkCreateUser"), dlgUser::OnChangeSuperuser)
@@ -131,6 +133,7 @@
datValidUntil->Disable();
timValidUntil->Disable();
txtPasswd->Disable();
+ txtRePasswd->Disable();
btnAddGroup->Disable();
btnDelGroup->Disable();
cbVarname->Disable();
@@ -209,6 +212,17 @@
CheckChange();
}
+void dlgUser::OnChangePasswd(wxCommandEvent &ev)
+{
+ wxString passwd=txtPasswd->GetValue();
+ wxString repasswd=txtRePasswd->GetValue();
+ if ((!repasswd.IsEmpty())||(!repasswd.IsEmpty()))
+ {
+ bool enable=true;
+ CheckValid(enable, !passwd.compare(repasswd), _("The passwords
entered do not match!"));
+ EnableOK(enable);
+ }
+}
void dlgUser::CheckChange()
{
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster