Index: pgServer.cpp =================================================================== RCS file: /projects/pgadmin3/src/schema/pgServer.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -Lsrc/schema/pgServer.cpp -Lsrc/schema/pgServer.cpp -u -w -r1.62 -r1.63 --- src/schema/pgServer.cpp +++ src/schema/pgServer.cpp @@ -479,10 +479,14 @@ wxString pgServer::GetIdentifier() const { - if (GetName().IsEmpty() || GetName().StartsWith(wxT("/"))) - return wxT("local:") + GetName(); - - return wxString::Format(wxT("%s:%d"), GetName().c_str(), port); + wxString idstr; + if (GetName().IsEmpty()) + idstr.Printf(wxT("local:.s.PGSQL.%d"), port); + else if (GetName().StartsWith(wxT("/"))) + idstr.Printf(wxT("local:%s/.s.PGSQL.%d"), GetName().c_str(), port); + else + idstr.Printf(wxT("%s:%d"), GetName().c_str(), port); + return idstr; } @@ -614,7 +618,10 @@ properties->AppendItem(_("Description"), GetDescription()); if (GetName().IsEmpty() || GetName().StartsWith(wxT("/"))) + { properties->AppendItem(_("Hostname"), wxT("local:") + GetName()); + properties->AppendItem(_("Port"), (long)GetPort()); + } else { properties->AppendItem(_("Hostname"), GetName()); Index: frmQuery.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/frmQuery.cpp,v retrieving revision 1.83 retrieving revision 1.84 diff -Lsrc/ui/frmQuery.cpp -Lsrc/ui/frmQuery.cpp -u -w -r1.83 -r1.84 Index: dlgServer.cpp =================================================================== RCS file: /projects/pgadmin3/src/ui/dlgServer.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -Lsrc/ui/dlgServer.cpp -Lsrc/ui/dlgServer.cpp -u -w -r1.19 -r1.20 --- src/ui/dlgServer.cpp +++ src/ui/dlgServer.cpp @@ -61,7 +61,6 @@ cbDatabase->Append(settings->GetLastDatabase()); cbDatabase->SetSelection(0); - if (settings->GetLastPort()) txtPort->SetValue(NumToStr((long)settings->GetLastPort())); cbSSL->SetSelection(settings->GetLastSSL()); txtUsername->SetValue(settings->GetLastUsername()); @@ -167,7 +166,6 @@ cbDatabase->Append(server->GetDatabaseName()); txtDescription->SetValue(server->GetDescription()); txtService->SetValue(server->GetServiceID()); - if (server->GetPort()) txtPort->SetValue(NumToStr((long)server->GetPort())); cbSSL->SetSelection(server->GetSSL()); cbDatabase->SetValue(server->GetDatabaseName()); @@ -246,14 +244,11 @@ #ifdef __WXMSW__ CheckValid(enable, !name.IsEmpty(), _("Please specify address.")); - CheckValid(enable, StrToLong(txtPort->GetValue()) > 0, _("Please specify port.")); #else bool isPipe = (name.IsEmpty() || name.StartsWith(wxT("/"))); - txtPort->Enable(!isPipe); cbSSL->Enable(!isPipe); - if (!isPipe) - CheckValid(enable, StrToLong(txtPort->GetValue()) > 0, _("Please specify port.")); #endif + CheckValid(enable, StrToLong(txtPort->GetValue()) > 0, _("Please specify port.")); CheckValid(enable, !txtUsername->GetValue().IsEmpty(), _("Please specify user name")); EnableOK(enable);