Guillaume Lelarge a écrit :
> Dave Page a écrit :
>> On Mon, Jun 8, 2009 at 10:23 PM, Guillaume
>> Lelarge<[email protected]> wrote:
>>> Dave Page a écrit :
>>>> On Mon, May 11, 2009 at 3:43 PM, Kevin Field <[email protected]> 
>>>> wrote:
>>>>> About editing, I just tried this in the win32 beta3, and it still
>>>>> ignores the changes you make:  I went to create a new job step,
>>>>> selected batch, typed gibberish in the name and definition, unchecked
>>>>> 'read only', and erased the generated SQL and replaced it with "select
>>>>> 'hello'", and then clicked OK, and it added the gibberish step (rather
>>>>> than doing nothing, which is what select-hello should've done...)  So
>>>>> 'read only' doesn't seem to be useful at this point.
>>>> Oh, I see what you mean. If memory serves, the pgAgent dialogues
>>>> process their SQL in a slightly different way to all the other
>>>> dialogues because they need to run some parts in different steps.
>>>>
>>>> Guillaume; this is your code ( :-p ) - do you see a simple way to fix
>>>> it, or should the checkboxes be disabled on the three pgAgent
>>>> dialogues?
>>>>
>>> Actually, it's not really useful in that context. We should simply
>>> disable the checkbox on these dialogs. Perhaps we don't even need an SQL
>>> tab?
>> I think it's still useful to display the SQL, if only to allow the
>> user to see what pgAdmin is going to do. Disabling (better yet,
>> removing) the checkbox on those dialogues seems like the right answer.
>>
>> Can you do that in the next day or so?
>>
> 
> I'll work on a patch for this tonight.
> 

Here it is.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com
Index: pgadmin/dlg/dlgProperty.cpp
===================================================================
--- pgadmin/dlg/dlgProperty.cpp	(révision 7907)
+++ pgadmin/dlg/dlgProperty.cpp	(copie de travail)
@@ -348,6 +348,10 @@
     chkReadOnly = new wxCheckBox(sqlPane, CTRLID_CHKSQLTEXTFIELD, _("Read only"));
     chkReadOnly->SetValue(true);
     fgsizer->Add(chkReadOnly, 1, wxALL | wxALIGN_LEFT, 5);
+	if (wxString(factory->GetTypeName()).Contains(wxT("pgAgent")) == 1)
+	{
+		chkReadOnly->Enable(false);
+	}
 
     // text entry box
     sqlTextField1 = new ctlSQLBox(sqlPane, CTL_PROPSQL,
-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to