From dbead93cd2d06b4660c4734d14d60dc9507ada51 Mon Sep 17 00:00:00 2001 From: guillaume Date: Fri, 24 Jul 2009 13:38:56 +0000 Subject: [PATCH] Better fix for schedule and step dialogs. git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7983 a7884b65-44f6-0310-8a51-81a127f17b15 --- CHANGELOG | 1 + pgadmin/agent/dlgSchedule.cpp | 8 +++++++- pgadmin/agent/dlgStep.cpp | 8 +++++++- pgadmin/dlg/dlgProperty.cpp | 4 +++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 86735ee04..828b8daf1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -36,6 +36,7 @@ Changes Date Dev Ver Change details ---------- --- ------ -------------- +2009-07-24 GL 1.10.1 Better fix for schedule and step dialogs. 2009-07-24 GL 1.12.0 More statistics on various objects, databases, indexes, and functions (8.4+ only for the last one). 2009-07-24 GL 1.10.1 Fix the menu entry in frmQuery, per a report from Luiz diff --git a/pgadmin/agent/dlgSchedule.cpp b/pgadmin/agent/dlgSchedule.cpp index 0efcce9c2..223016ce3 100644 --- a/pgadmin/agent/dlgSchedule.cpp +++ b/pgadmin/agent/dlgSchedule.cpp @@ -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; } diff --git a/pgadmin/agent/dlgStep.cpp b/pgadmin/agent/dlgStep.cpp index 0bb8cef07..8dbf2a633 100644 --- a/pgadmin/agent/dlgStep.cpp +++ b/pgadmin/agent/dlgStep.cpp @@ -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; } diff --git a/pgadmin/dlg/dlgProperty.cpp b/pgadmin/dlg/dlgProperty.cpp index 87740b3b3..6107d38ad 100644 --- a/pgadmin/dlg/dlgProperty.cpp +++ b/pgadmin/dlg/dlgProperty.cpp @@ -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); } -- 2.39.5