Skip site navigation (1) Skip section navigation (2)

SVN Commit by andreas: r4476 - in trunk/pgadmin3/src: frm schema

From: svn(at)pgadmin(dot)org
To: pgadmin-hackers(at)postgresql(dot)org
Subject: SVN Commit by andreas: r4476 - in trunk/pgadmin3/src: frm schema
Date: 2005-09-29 17:04:50
Message-ID: 200509291704.j8TH4o2t011191@developer.pgadmin.org (view raw or flat)
Thread:
Lists: pgadmin-hackers
Author: andreas
Date: 2005-09-29 18:04:50 +0100 (Thu, 29 Sep 2005)
New Revision: 4476

Modified:
   trunk/pgadmin3/src/frm/frmStatus.cpp
   trunk/pgadmin3/src/schema/pgDatabase.cpp
Log:
Proper server instrumentation checking

Modified: trunk/pgadmin3/src/frm/frmStatus.cpp
===================================================================
--- trunk/pgadmin3/src/frm/frmStatus.cpp	2005-09-29 16:51:47 UTC (rev 4475)
+++ trunk/pgadmin3/src/frm/frmStatus.cpp	2005-09-29 17:04:50 UTC (rev 4476)
@@ -171,7 +171,7 @@
     }
     else
     {
-        if (!connection->HasFeature(FEATURE_FILEREAD))
+        if (connection->BackendMinimumVersion(8, 0))
             frmHint::ShowHint(this, HINT_INSTRUMENTATION);
 
         nbStatus->DeletePage(logPage);

Modified: trunk/pgadmin3/src/schema/pgDatabase.cpp
===================================================================
--- trunk/pgadmin3/src/schema/pgDatabase.cpp	2005-09-29 16:51:47 UTC (rev 4475)
+++ trunk/pgadmin3/src/schema/pgDatabase.cpp	2005-09-29 17:04:50 UTC (rev 4476)
@@ -141,16 +141,33 @@
         if (ver.Find(wxT("mingw32")) > 0 && ver.Find(wxT("SQL 8.0.") > 0))
             return true;
     }
+
+    if (GetServer()->GetConnection() == GetConnection() && 
+        GetConnection()->BackendMinimumVersion(8,0) && 
+       !GetConnection()->HasFeature(FEATURE_FILEREAD))
+        return true;
+
     return false;
 }
 
 
 void pgDatabase::ShowHint(frmMain *form, bool force)
 {
+    wxArrayString hints;
+
     if (encoding == wxT("SQL_ASCII"))
-        frmHint::ShowHint(form, HINT_ENCODING_ASCII, GetName(), force);
+        hints.Add(HINT_ENCODING_ASCII);
     else if (encoding == wxT("UNICODE"))
-        frmHint::ShowHint(form, HINT_ENCODING_UNICODE, GetName(), force);
+        hints.Add(HINT_ENCODING_UNICODE);
+
+    if (GetServer()->GetConnection() == GetConnection() && 
+        GetConnection()->BackendMinimumVersion(8,0) && 
+       !GetConnection()->HasFeature(FEATURE_FILEREAD))
+        hints.Add(HINT_INSTRUMENTATION);
+    
+    if (force || !hintShown)
+        frmHint::ShowHint(form, hints, GetFullIdentifier());
+    hintShown=true;
 }
 
 


pgadmin-hackers by date

Next:From: Dave PageDate: 2005-09-30 09:22:07
Subject: Re: admin81 package
Previous:From: Andreas PflugDate: 2005-09-29 17:00:46
Subject: admin81 package

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group