SVN Commit by andreas: r4481 - in trunk/pgadmin3/src: dlg include schema

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by andreas: r4481 - in trunk/pgadmin3/src: dlg include schema
Date: 2005-10-03 01:00:53
Message-ID: 200510030100.j9310r2Q030749@developer.pgadmin.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Author: andreas
Date: 2005-10-03 02:00:53 +0100 (Mon, 03 Oct 2005)
New Revision: 4481

Modified:
trunk/pgadmin3/src/dlg/dlgTable.cpp
trunk/pgadmin3/src/include/dlgTable.h
trunk/pgadmin3/src/schema/pgServer.cpp
Log:
gcc fixes

Modified: trunk/pgadmin3/src/dlg/dlgTable.cpp
===================================================================
--- trunk/pgadmin3/src/dlg/dlgTable.cpp 2005-10-03 00:55:56 UTC (rev 4480)
+++ trunk/pgadmin3/src/dlg/dlgTable.cpp 2005-10-03 01:00:53 UTC (rev 4481)
@@ -113,8 +113,8 @@
lstColumns->CreateColumns(0, _("Column name"), _("Definition"), 90);
lstColumns->AddColumn(wxT("Inherited from table"), 0);
lstColumns->AddColumn(wxT("Column definition"), 0);
- lstColumns->AddColumn(wxT("Column comment"), 0);
- lstColumns->AddColumn(wxT("Column statistics"), 0);
+ lstColumns->AddColumn(wxT("Column comment"), 0);
+ lstColumns->AddColumn(wxT("Column statistics"), 0);
lstColumns->AddColumn(wxT("Column"), 0);

lstConstraints->CreateColumns(0, _("Constraint name"), _("Definition"), 90);
@@ -354,12 +354,35 @@
tableVacFactor=set.GetDouble(wxT("vac_scale_factor"));
tableAnlFactor=set.GetDouble(wxT("anl_scale_factor"));

- txtBaseVac->SetValue(tableVacBaseThr >= 0 ? NumToStr(tableVacBaseThr) : wxEmptyString);
- txtBaseAn->SetValue(tableAnlBaseThr >= 0 ? NumToStr(tableAnlBaseThr) : wxEmptyString);
- txtFactorVac->SetValue(tableVacFactor >= 0 ? NumToStr(tableVacFactor) : wxEmptyString);
- txtFactorAn->SetValue(tableAnlFactor >= 0 ? NumToStr(tableAnlFactor) : wxEmptyString);
- txtVacDelay->SetValue(tableCostDelay >= 0 ? NumToStr(tableCostDelay) : wxEmptyString);
- txtVacLimit->SetValue(tableCostLimit >= 0 ? NumToStr(tableCostLimit) : wxEmptyString);
+ if (tableVacBaseThr >= 0)
+ txtBaseVac->SetValue(NumToStr(tableVacBaseThr));
+ else
+ txtBaseVac->SetValue(wxEmptyString);
+
+ if (tableAnlBaseThr >= 0)
+ txtBaseAn->SetValue(NumToStr(tableAnlBaseThr));
+ else
+ txtBaseAn->SetValue(wxEmptyString);
+
+ if (tableVacFactor >= 0)
+ txtFactorVac->SetValue(NumToStr(tableVacFactor));
+ else
+ txtFactorVac->SetValue(wxEmptyString);
+
+ if (tableAnlFactor >= 0)
+ txtFactorAn->SetValue(NumToStr(tableAnlFactor));
+ else
+ txtFactorAn->SetValue(wxEmptyString);
+
+ if (tableCostDelay >= 0)
+ txtVacDelay->SetValue(NumToStr(tableCostDelay));
+ else
+ txtVacDelay->SetValue(wxEmptyString);
+
+ if (tableCostLimit >= 0)
+ txtVacLimit->SetValue(NumToStr(tableCostLimit));
+ else
+ txtVacLimit->SetValue(wxEmptyString);
}
else
{
@@ -618,28 +641,28 @@
}
}

- // Extra column info
- int pos;
+ // Extra column info
+ int pos;

- // Statistics
+ // Statistics
for (pos=0 ; pos < lstColumns->GetItemCount() ; pos++)
{
if (!lstColumns->GetText(pos, 4).IsEmpty())
- sql += wxT("ALTER TABLE ") + tabname
- + wxT(" ALTER COLUMN ") + qtIdent(lstColumns->GetText(pos, 0))
- + wxT(" SET STATISTICS ") + lstColumns->GetText(pos, 4)
- + wxT(";\n");
- }
+ sql += wxT("ALTER TABLE ") + tabname
+ + wxT(" ALTER COLUMN ") + qtIdent(lstColumns->GetText(pos, 0))
+ + wxT(" SET STATISTICS ") + lstColumns->GetText(pos, 4)
+ + wxT(";\n");
+ }

- // Comments
+ // Comments
for (pos=0 ; pos < lstColumns->GetItemCount() ; pos++)
{
if (!lstColumns->GetText(pos, 5).IsEmpty())
- sql += wxT("COMMENT ON COLUMN ") + tabname
- + wxT(".") + qtIdent(lstColumns->GetText(pos, 0))
- + wxT(" IS ") + qtString(lstColumns->GetText(pos, 5))
- + wxT(";\n");
- }
+ sql += wxT("COMMENT ON COLUMN ") + tabname
+ + wxT(".") + qtIdent(lstColumns->GetText(pos, 0))
+ + wxT(" IS ") + qtString(lstColumns->GetText(pos, 5))
+ + wxT(";\n");
+ }


AppendComment(sql, wxT("TABLE"), schema, table);
@@ -675,7 +698,7 @@
}


-wxString dlgTable::GetNumString(wxTextCtrl *ctl, bool enabled, wxString &val)
+wxString dlgTable::GetNumString(wxTextCtrl *ctl, bool enabled, const wxString &val)
{
if (!enabled)
return val;
@@ -811,8 +834,8 @@
{
if (settings->GetConfirmDelete())
{
- if (wxMessageBox(_("Are you sure you wish to remove the selected table?"), _("Remove table?"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxNO)
- return;
+ if (wxMessageBox(_("Are you sure you wish to remove the selected table?"), _("Remove table?"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxNO)
+ return;
}

int sel=lbTables->GetSelection();
@@ -856,8 +879,8 @@
lstColumns->SetItem(pos, 0, col.GetName());
lstColumns->SetItem(pos, 1, col.GetDefinition());
lstColumns->SetItem(pos, 3, col.GetSql());
- lstColumns->SetItem(pos, 4, col.GetStatistics());
- lstColumns->SetItem(pos, 5, col.GetComment());
+ lstColumns->SetItem(pos, 4, col.GetStatistics());
+ lstColumns->SetItem(pos, 5, col.GetComment());
}
CheckChange();
}
@@ -873,8 +896,8 @@
long pos = lstColumns->AppendItem(columnFactory.GetIconId(), col.GetName(), col.GetDefinition());
if (table && !connection->BackendMinimumVersion(8, 0))
lstColumns->SetItem(pos, 3, col.GetSql());
- lstColumns->SetItem(pos, 4, col.GetStatistics());
- lstColumns->SetItem(pos, 5, col.GetComment());
+ lstColumns->SetItem(pos, 4, col.GetStatistics());
+ lstColumns->SetItem(pos, 5, col.GetComment());

}

@@ -886,8 +909,8 @@
{
if (settings->GetConfirmDelete())
{
- if (wxMessageBox(_("Are you sure you wish to remove the selected column?"), _("Remove column?"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxNO)
- return;
+ if (wxMessageBox(_("Are you sure you wish to remove the selected column?"), _("Remove column?"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxNO)
+ return;
}

lstColumns->DeleteCurrentItem();
@@ -969,8 +992,8 @@
{
if (settings->GetConfirmDelete())
{
- if (wxMessageBox(_("Are you sure you wish to remove the selected constraint?"), _("Remove constraint?"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxNO)
- return;
+ if (wxMessageBox(_("Are you sure you wish to remove the selected constraint?"), _("Remove constraint?"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION) == wxNO)
+ return;
}

int pos=lstConstraints->GetSelection();

Modified: trunk/pgadmin3/src/include/dlgTable.h
===================================================================
--- trunk/pgadmin3/src/include/dlgTable.h 2005-10-03 00:55:56 UTC (rev 4480)
+++ trunk/pgadmin3/src/include/dlgTable.h 2005-10-03 01:00:53 UTC (rev 4481)
@@ -60,7 +60,7 @@
wxArrayString tableOids, inheritedTableOids;
wxTreeItemId columnsItem, constraintsItem;

- wxString GetNumString(wxTextCtrl *ctl, bool enabled, wxString &val);
+ wxString GetNumString(wxTextCtrl *ctl, bool enabled, const wxString &val);
wxString AppendNum(bool &changed, wxTextCtrl *ctl, long val);
wxString AppendNum(bool &changed, wxTextCtrl *ctl, double val);

Modified: trunk/pgadmin3/src/schema/pgServer.cpp
===================================================================
--- trunk/pgadmin3/src/schema/pgServer.cpp 2005-10-03 00:55:56 UTC (rev 4480)
+++ trunk/pgadmin3/src/schema/pgServer.cpp 2005-10-03 01:00:53 UTC (rev 4481)
@@ -18,6 +18,7 @@

#include "misc.h"
#include "frmMain.h"
+#include "frmHint.h"
#include "dlgConnect.h"
#include "pgDatabase.h"
#include "pgTablespace.h"
@@ -28,7 +29,6 @@
#include "utffile.h"
#include "pgfeatures.h"

-
#define DEFAULT_PG_DATABASE wxT("postgres")

pgServer::pgServer(const wxString& newName, const wxString& newDescription, const wxString& newDatabase, const wxString& newUsername, int newPort, bool _storePwd, int _ssl)

Browse pgadmin-hackers by date

  From Date Subject
Next Message David Fetter 2005-10-03 05:27:44 Re: [HACKERS] pgAdmin guru hints
Previous Message svn 2005-10-03 00:55:57 SVN Commit by andreas: r4480 - trunk/pgadmin3/src/include