Le 19/01/2011 23:51, Guillaume Lelarge a écrit :
> Le 19/01/2011 23:42, Dave Page a écrit :
>> On Wed, Jan 19, 2011 at 10:38 PM, Guillaume Lelarge
>> <[email protected]> wrote:
>>> Le 16/01/2011 09:32, Dave Page a écrit :
>>>> On Sat, Jan 15, 2011 at 11:17 PM, Guillaume Lelarge
>>>> <[email protected]> wrote:
>>>>> Le 15/01/2011 23:58, Josh Berkus a écrit :
>>>>>> Nothing showstopping, but:
>>>>>>
>>>>>> 1) After you make changes in the Server Properties dialog, it gives you
>>>>>> the fairly useless message that "Some changes will not take effect until
>>>>>> the next time pgAdmin connects to the server". The reason this message
>>>>>> is useless (and annoying) is that pgAdmin prevents you from changing
>>>>>> those fields unless you are disconnected from the server in the first
>>>>>> place.
>>>>>>
>>>>>
>>>>> Yeah, I don't like it either. Need to be fixed.
>>>>
>>>> Actually, it is correct; you can tweak the DB Restriction, but it
>>>> needs a full refresh to take effect. That said, it is inconsistent
>>>> from other settings.
>>>>
>>>>
>>>
>>> I commited a patch that simply displays the message only when the user
>>> is connected to the server.
>>>
>>> Now, what I would like to know is if the other settings should stay
>>> disabled? why only some of them are disabled (or enabled)? shouldn't we
>>> just make them all enabled?
>>
>> I'd be inclined to make them all disabled.
>>
>
> When one is connected, right? (if not, we couldn't do much after
> creating it :) ). Which means we would get rid of the message, as a user
> won't be able to change server's settings once connected to it. Makes
> sense to me. Working on it.
>
Got a patch, but I'm wondering if this is 1.12 material? or is it 1.14
only? actually, Josh's bug is fixed, so this could be 1.14 only. Any
opinions on this matter?
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
diff --git a/pgadmin/dlg/dlgServer.cpp b/pgadmin/dlg/dlgServer.cpp
index 1bd9d98..cbf58f2 100644
--- a/pgadmin/dlg/dlgServer.cpp
+++ b/pgadmin/dlg/dlgServer.cpp
@@ -144,6 +144,7 @@ void dlgServer::OnOK(wxCommandEvent &ev)
if (!btnOK->IsEnabled())
return;
#endif
+
// Display the 'save password' hint if required
if(chkStorePwd->GetValue())
{
@@ -152,10 +153,8 @@ void dlgServer::OnOK(wxCommandEvent &ev)
}
// notice: changes active after reconnect
-
EnableOK(false);
-
if (server)
{
server->iSetName(GetName());
@@ -257,9 +256,6 @@ void dlgServer::OnOK(wxCommandEvent &ev)
}
server->iSetGroup(cbGroup->GetValue());
- if (connection)
- wxMessageBox(_("Note: some changes to server settings may only take effect the next time pgAdmin connects to the server."), _("Server settings"), wxICON_INFORMATION);
-
mainForm->execSelChange(server->GetId(), true);
mainForm->GetBrowser()->SetItemText(item, server->GetFullName());
mainForm->SetItemBackgroundColour(item, wxColour(server->GetColour()));
@@ -364,12 +360,19 @@ int dlgServer::Go(bool modal)
txtPassword->Disable();
if (connection)
{
+ txtDescription->Disable();
+ txtService->Disable();
txtName->Disable();
cbDatabase->Disable();
txtPort->Disable();
cbSSL->Disable();
txtUsername->Disable();
chkStorePwd->Disable();
+ chkRestore->Disable();
+ txtDbRestriction->Disable();
+ colourPicker->Disable();
+ cbGroup->Disable();
+ EnableOK(false);
}
}
else
@@ -414,8 +417,8 @@ pgObject *dlgServer::CreateObject(pgCollection *collection)
void dlgServer::OnChangeTryConnect(wxCommandEvent &ev)
{
- chkStorePwd->Enable(chkTryConnect->GetValue());
- txtPassword->Enable(chkTryConnect->GetValue());
+ chkStorePwd->Enable(chkTryConnect->GetValue() && !connection);
+ txtPassword->Enable(chkTryConnect->GetValue() && !connection);
OnChange(ev);
}
@@ -451,7 +454,6 @@ void dlgServer::CheckChange()
|| cbGroup->GetValue() != server->GetGroup();
}
-
#ifdef __WXMSW__
CheckValid(enable, !name.IsEmpty(), _("Please specify address."));
#else
@@ -463,7 +465,7 @@ void dlgServer::CheckChange()
CheckValid(enable, !txtUsername->GetValue().IsEmpty(), _("Please specify user name"));
CheckValid(enable, dbRestrictionOk, _("Restriction not valid."));
- EnableOK(enable);
+ EnableOK(enable && !connection);
}
--
Sent via pgadmin-support mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support