Guillaume Lelarge a écrit :
[...]
The last one does what we want, but our ctlListView::AddColumn method's
handling of default values was buggy. The attached patch fixes this, and
changes pgTableCollection::ShowStatistics method to handle the new
default value (wxLIST_AUTOSIZE_USEHEADER).
/me wishes he has a mail client that would tell him he forgot the
"attached patch" :-/
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
Index: pgadmin/ctl/ctlListView.cpp
===================================================================
--- pgadmin/ctl/ctlListView.cpp (révision 7285)
+++ pgadmin/ctl/ctlListView.cpp (copie de travail)
@@ -45,7 +45,14 @@
void ctlListView::AddColumn(const wxChar *text, int size, int format)
{
- InsertColumn(GetColumnCount(), text, format, ConvertDialogToPixels(wxPoint(size,0)).x);
+ if (size == wxLIST_AUTOSIZE || size == wxLIST_AUTOSIZE_USEHEADER)
+ {
+ InsertColumn(GetColumnCount(), text, format, size);
+ }
+ else
+ {
+ InsertColumn(GetColumnCount(), text, format, ConvertDialogToPixels(wxPoint(size,0)).x);
+ }
}
Index: pgadmin/include/ctl/ctlListView.h
===================================================================
--- pgadmin/include/ctl/ctlListView.h (révision 7285)
+++ pgadmin/include/ctl/ctlListView.h (copie de travail)
@@ -28,7 +28,7 @@
void CreateColumns(wxImageList *images, const wxString &left, const wxString &right, int leftSize=60);
- void AddColumn(const wxChar *text, int size=-1, int format=wxLIST_FORMAT_LEFT);
+ void AddColumn(const wxChar *text, int size=wxLIST_AUTOSIZE_USEHEADER, int format=wxLIST_FORMAT_LEFT);
long AppendItem(int icon, const wxChar *val, const wxChar *val2=0, const wxChar *val3=0);
long AppendItem(const wxChar *val, const wxChar *val2=0, const wxChar *val3=0)
Index: pgadmin/schema/pgTable.cpp
===================================================================
--- pgadmin/schema/pgTable.cpp (révision 7285)
+++ pgadmin/schema/pgTable.cpp (copie de travail)
@@ -764,25 +764,25 @@
// Add the statistics view columns
statistics->ClearAll();
- statistics->AddColumn(_("Table"), 100);
- statistics->AddColumn(_("Tuples inserted"), 50);
- statistics->AddColumn(_("Tuples updated"), 50);
- statistics->AddColumn(_("Tuples deleted"), 50);
+ statistics->AddColumn(_("Table Name"));
+ statistics->AddColumn(_("Tuples inserted"));
+ statistics->AddColumn(_("Tuples updated"));
+ statistics->AddColumn(_("Tuples deleted"));
if (GetConnection()->BackendMinimumVersion(8, 3))
{
- statistics->AddColumn(_("Tuples HOT updated"), 50);
- statistics->AddColumn(_("Live tuples"), 50);
- statistics->AddColumn(_("Dead tuples"), 50);
+ statistics->AddColumn(_("Tuples HOT updated"));
+ statistics->AddColumn(_("Live tuples"));
+ statistics->AddColumn(_("Dead tuples"));
}
if (GetConnection()->BackendMinimumVersion(8, 2))
{
- statistics->AddColumn(_("Last vacuum"), 50);
- statistics->AddColumn(_("Last autovacuum"), 50);
- statistics->AddColumn(_("Last analyze"), 50);
- statistics->AddColumn(_("Last autoanalyze"), 50);
+ statistics->AddColumn(_("Last vacuum"));
+ statistics->AddColumn(_("Last autovacuum"));
+ statistics->AddColumn(_("Last analyze"));
+ statistics->AddColumn(_("Last autoanalyze"));
}
if (hasSize)
- statistics->AddColumn(_("Size"), 60);
+ statistics->AddColumn(_("Size"));
wxString sql=wxT("SELECT st.relname, n_tup_ins, n_tup_upd, n_tup_del");
if (GetConnection()->BackendMinimumVersion(8, 3))
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers