Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Pgadmin Hackers > Re: Statistics ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 11 Topic 4542 of 4873
Post > Topic >>

Re: Statistics tab, "Tables" node

by guillaume@[EMAIL PROTECTED] (Guillaume Lelarge) May 12, 2008 at 11:21 AM

This is a multi-part message in MIME format.
--------------010708060700010204000708
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

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

--------------010708060700010204000708
Content-Type: text/x-patch;
 name="autosizingcolumns.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="autosizingcolumns.patch"

Index: pgadmin/ctl/ctlListView.cpp
===================================================================
--- pgadmin/ctl/ctlListView.cpp	(révision 7285)
+++ pgadmin/ctl/ctlListView.cpp	(copie de travail)
@[EMAIL PROTECTED]
 -45,7 +45,14 @[EMAIL PROTECTED]
 
 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)
@[EMAIL PROTECTED]
 -28,7 +28,7 @[EMAIL PROTECTED]
 
     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)
@[EMAIL PROTECTED]
 -764,25 +764,25 @[EMAIL PROTECTED]
 
     // 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))

--------------010708060700010204000708
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

--------------010708060700010204000708--
 




 11 Posts in Topic:
Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-05 14:44:00 
Re: Statistics tab, "Tables" node
magnus@[EMAIL PROTECTED]   2008-05-05 14:53:44 
Re: Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-05 17:38:50 
Re: Statistics tab, "Tables" node
dpage@[EMAIL PROTECTED]   2008-05-06 14:12:36 
Re: Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-06 15:49:52 
Re: Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-12 11:19:26 
Re: Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-12 11:21:39 
Re: Statistics tab, "Tables" node
dpage@[EMAIL PROTECTED]   2008-05-06 15:07:43 
Re: Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-06 16:17:17 
Re: Statistics tab, "Tables" node
dpage@[EMAIL PROTECTED]   2008-05-12 10:34:03 
Re: Statistics tab, "Tables" node
guillaume@[EMAIL PROTECTE  2008-05-12 11:45:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 23:28:18 CST 2008.