SVN Commit by andreas: r4476 - in trunk/pgadmin3/src: frm schema - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by andreas: r4476 - in trunk/pgadmin3/src: frm schema
Date
Msg-id 200509291704.j8TH4o2t011191@developer.pgadmin.org
Whole thread Raw
List 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:

Previous
From: Andreas Pflug
Date:
Subject: admin81 package
Next
From: "Dave Page"
Date:
Subject: Re: admin81 package