Hi Andreas.
Please check it.
This seems to succeed.
regards,
Hiroshi Saito
--- src/ui/dlgHbaConfig.cpp.orig Fri Dec 10 02:30:09 2004
+++ src/ui/dlgHbaConfig.cpp Wed Dec 15 13:08:35 2004
@@ -308,6 +309,14 @@
line->ipaddress = txtIPaddress->GetValue();
line->method = (pgHbaConfigLine::pgHbaMethod)cbMethod->GetSelection();
line->option = txtOption->GetValue();
+
+ line->text = line->isComment ? wxT("#\t "):wxT("");
+ line->text += line->GetConnectType();
+ line->text += wxT("\t ") + line->database + wxT("\t ");
+ line->text += line->user + wxT("\t ");
+ line->text += line->ipaddress + wxT("\t ");
+ line->text += line->GetMethod();
+ line->text += wxT("\t ") + line->option + wxT("\t ");
EndModal(wxID_OK);
}
--- src/ui/frmHbaConfig.cpp.orig Thu Dec 9 10:04:15 2004
+++ src/ui/frmHbaConfig.cpp Wed Dec 15 13:16:12 2004
@@ -179,7 +179,7 @@
wxString str;
size_t i;
for (i=0 ; i < lines.GetCount()-1 ; i++)
- str.Append(lines.Item(i).GetText() + wxT("\n"));
+ str.Append(lines.Item(i).text + wxT("\n"));
if (DoWriteFile(str, conn))
{
--- src/utils/pgconfig.cpp.orig Fri Dec 10 11:20:06 2004
+++ src/utils/pgconfig.cpp Wed Dec 15 13:06:21 2004
@@ -426,7 +426,7 @@
while (*p2)
{
- if (wxStrchr(wxT("\n "), *p2) && !quoted)
+ if (wxStrchr(wxT("\t "), *p2) && !quoted)
break;
if (*p2 == '"')
quoted ^= quoted;
@@ -442,7 +442,7 @@
quoted=false;
while (*p3)
{
- if (wxStrchr(wxT("\n "), *p3) && !quoted)
+ if (wxStrchr(wxT("\t "), *p3) && !quoted)
break;
if (*p3 == '"')
quoted ^= quoted;
@@ -462,7 +462,7 @@
else
{
bool hasCidr=false;
- while (*p4 && !wxStrchr(wxT("\n "), *p4))
+ while (*p4 && !wxStrchr(wxT("\t "), *p4))
{
if (*p4 == '/')
hasCidr=true;
@@ -516,11 +516,10 @@
wxString pgHbaConfigLine::GetText()
{
- if (!DidChange())
+ if (DidChange())
return text;
- wxString str;
- return str;
+ return wxEmptyString;
}
@@ -528,5 +527,5 @@
{
if (isComment)
return false;
- return false;
+ return true;
}
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html