Better fix for schedule and step dialogs.
authorguillaume <guillaume@a7884b65-44f6-0310-8a51-81a127f17b15>
Fri, 24 Jul 2009 13:38:56 +0000 (13:38 +0000)
committerguillaume <guillaume@a7884b65-44f6-0310-8a51-81a127f17b15>
Fri, 24 Jul 2009 13:38:56 +0000 (13:38 +0000)
git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7983 a7884b65-44f6-0310-8a51-81a127f17b15

CHANGELOG
pgadmin/agent/dlgSchedule.cpp
pgadmin/agent/dlgStep.cpp
pgadmin/dlg/dlgProperty.cpp

index 86735ee04bfcc2ff3bb1f939d32cd27f3c797af1..828b8daf1b1f5692cdbbf8f5d792b8fda0eb5700 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -36,6 +36,7 @@ Changes
 \r
 Date       Dev Ver     Change details\r
 ---------- --- ------  --------------\r
+2009-07-24 GL  1.10.1  Better fix for schedule and step dialogs.\r
 2009-07-24 GL  1.12.0  More statistics on various objects, databases, indexes,\r
                        and functions (8.4+ only for the last one).\r
 2009-07-24 GL  1.10.1  Fix the menu entry in frmQuery, per a report from Luiz\r
index 0efcce9c2bc919ddd2808c8ae3ed95b600961e84..223016ce34d00839f362a2260b9a65bdbd0540b6 100644 (file)
@@ -114,6 +114,8 @@ void dlgSchedule::OnChangeSize(wxSizeEvent &ev)
 
 int dlgSchedule::Go(bool modal)
 {
+    int returncode;
+
     if (schedule)
     {
         // edit mode
@@ -196,7 +198,11 @@ int dlgSchedule::Go(bool modal)
         // create mode
     }
 
-       return dlgProperty::Go(modal);
+    returncode = dlgProperty::Go(modal);
+
+    SetSqlReadOnly(true);
+
+    return returncode;
 }
 
 
index 0bb8cef07dee826924deed6cadf908d41404d330..8dbf2a633ea8cbb9b88ef7c03ea5eba75d4b13ce 100644 (file)
@@ -84,6 +84,8 @@ pgObject *dlgStep::GetObject()
 
 int dlgStep::Go(bool modal)
 {
+    int returncode;
+
     hasConnStrSupport = connection->TableHasColumn(wxT("pgagent"), wxT("pga_jobstep"), wxT("jstconnstr"));
     cbDatabase->Append(wxT(" "));
     cbDatabase->SetSelection(0);
@@ -139,7 +141,11 @@ int dlgStep::Go(bool modal)
             rbLocalConn->Enable(false);
     }
 
-       return dlgProperty::Go(modal);
+    returncode = dlgProperty::Go(modal);
+
+    SetSqlReadOnly(true);
+
+    return returncode;
 }
 
 
index 87740b3b3790d61299f2bedba0d36e3c7dd25703..6107d38ad450cf5f404032cd559e305d2ba9076a 100644 (file)
@@ -122,6 +122,7 @@ dlgProperty::dlgProperty(pgaFactory *f, frmMain *frame, const wxString &resName)
     factory=f;
     item = (void *)NULL;
     owneritem = (void *)NULL;
+    chkReadOnly = (wxCheckBox *)NULL;
     wxWindowBase::SetFont(settings->GetSystemFont());
     LoadResource(frame, resName);
 
@@ -234,7 +235,8 @@ void dlgProperty::EnableOK(bool enable)
 
 void dlgProperty::SetSqlReadOnly(bool readonly)
 {
-    chkReadOnly->Enable(!readonly);
+    if (chkReadOnly)
+        chkReadOnly->Enable(!readonly);
 }