From: | svn(at)pgadmin(dot)org |
---|---|
To: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | SVN Commit by dpage: r4466 - trunk/pgadmin3/src/agent |
Date: | 2005-09-26 13:29:29 |
Message-ID: | 200509261329.j8QDTTcJ021475@developer.pgadmin.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Author: dpage
Date: 2005-09-26 14:29:28 +0100 (Mon, 26 Sep 2005)
New Revision: 4466
Modified:
trunk/pgadmin3/src/agent/dlgStep.cpp
Log:
Correct job step database name handling per Regina Obe
Modified: trunk/pgadmin3/src/agent/dlgStep.cpp
===================================================================
--- trunk/pgadmin3/src/agent/dlgStep.cpp 2005-09-26 08:00:36 UTC (rev 4465)
+++ trunk/pgadmin3/src/agent/dlgStep.cpp 2005-09-26 13:29:28 UTC (rev 4466)
@@ -144,6 +144,16 @@
CheckValid(enable, !name.IsEmpty(), _("Please specify name."));
CheckValid(enable, sqlBox->GetLength() > 0, _("Please specify code to execute."));
+
+ // Disable/enable the database combo
+ if ((wxT("sb")[rbxKind->GetSelection()]) == 'b')
+ {
+ cbDatabase->SetSelection(0);
+ cbDatabase->Enable(false);
+ }
+ else
+ cbDatabase->Enable(true);
+
EnableOK(enable);
}
@@ -172,7 +182,7 @@
else
jstjobid = wxT("<JobId>");
- db = qtString(cbDatabase->GetValue());
+ db = qtString(cbDatabase->GetValue().Trim());
sql = wxT("INSERT INTO pgagent.pga_jobstep (jstid, jstjobid, jstname, jstdesc, jstenabled, jstkind, jstonerror, jstcode, jstdbname)\n")
wxT("SELECT <StpId>, ") + jstjobid + wxT(", ") + qtString(name) + wxT(", ") + qtString(txtComment->GetValue()) + wxT(", ")
@@ -212,7 +222,7 @@
vars.Append(wxT(", "));
if (!cbDatabase->GetSelection())
- vars.Append(wxT("jstdbname=NULL"));
+ vars.Append(wxT("jstdbname=''"));
else
vars.Append(wxT("jstdbname=") + qtString(cbDatabase->GetValue()));
}
From | Date | Subject | |
---|---|---|---|
Next Message | Andreas Pflug | 2005-09-26 13:38:02 | Re: pgAdmin Translations |
Previous Message | Dave Page | 2005-09-26 13:18:10 | Re: pgAdmin Translations |