SVN Commit by dpage: r4466 - trunk/pgadmin3/src/agent - Mailing list pgadmin-hackers

From svn@pgadmin.org
Subject SVN Commit by dpage: r4466 - trunk/pgadmin3/src/agent
Date
Msg-id 200509261329.j8QDTTcJ021475@developer.pgadmin.org
Whole thread Raw
Responses Re: SVN Commit by dpage: r4466 - trunk/pgadmin3/src/agent
List 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()));
         }


pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: pgAdmin Translations
Next
From: Andreas Pflug
Date:
Subject: Re: pgAdmin Translations