Обсуждение: "Clear window" in the SQL Editor

Поиск
Список
Период
Сортировка

"Clear window" in the SQL Editor

От
Vinicius Santos
Дата:
Hello,

In the SQL editor window, when the focus is outside of any text box, the
button "clear window" does nothing.

I believe that confuse the user. In this case the button should clear
the SQL editor.

Do you agree?

I made this change.

void frmQuery::OnClear(wxCommandEvent& ev)
{
     wxWindow *wnd=currentControl();

     if (wnd == sqlQuery)
         sqlQuery->ClearAll();
     else if (wnd == msgResult)
         msgResult->Clear();
     else if (wnd == msgHistory)
         msgHistory->Clear();
     else if (wnd == scratchPad)
         scratchPad->Clear();
+    else
+       sqlQuery->ClearAll();
}


Sorry my bad English. I am Brazilian.
The Google translator is helping me.

Re: "Clear window" in the SQL Editor

От
Guillaume Lelarge
Дата:
Le 29/11/2010 23:35, Vinicius Santos a écrit :
> [...]
> In the SQL editor window, when the focus is outside of any text box, the
> button "clear window" does nothing.
>
> I believe that confuse the user. In this case the button should clear
> the SQL editor.
>
> Do you agree?
>
> I made this change.
>
> void frmQuery::OnClear(wxCommandEvent& ev)
> {
>     wxWindow *wnd=currentControl();
>
>     if (wnd == sqlQuery)
>         sqlQuery->ClearAll();
>     else if (wnd == msgResult)
>         msgResult->Clear();
>     else if (wnd == msgHistory)
>         msgHistory->Clear();
>     else if (wnd == scratchPad)
>         scratchPad->Clear();
> +    else
> +       sqlQuery->ClearAll();
> }
>
>
> Sorry my bad English. I am Brazilian.
> The Google translator is helping me.
>

Sorry for not answering sooner, it seems a good change to me, I need to
check it first.

Thanks for your patch.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: "Clear window" in the SQL Editor

От
Guillaume Lelarge
Дата:
Le 06/12/2010 12:34, Guillaume Lelarge a écrit :
> Le 29/11/2010 23:35, Vinicius Santos a écrit :
>> [...]
>> In the SQL editor window, when the focus is outside of any text box, the
>> button "clear window" does nothing.
>>
>> I believe that confuse the user. In this case the button should clear
>> the SQL editor.
>>
>> Do you agree?
>>
>> I made this change.
>>
>> void frmQuery::OnClear(wxCommandEvent& ev)
>> {
>>     wxWindow *wnd=currentControl();
>>
>>     if (wnd == sqlQuery)
>>         sqlQuery->ClearAll();
>>     else if (wnd == msgResult)
>>         msgResult->Clear();
>>     else if (wnd == msgHistory)
>>         msgHistory->Clear();
>>     else if (wnd == scratchPad)
>>         scratchPad->Clear();
>> +    else
>> +       sqlQuery->ClearAll();
>> }
>>
>>
>> Sorry my bad English. I am Brazilian.
>> The Google translator is helping me.
>>
>
> Sorry for not answering sooner, it seems a good change to me, I need to
> check it first.
>

OK, after some thinking, it would be best to disable the "Clear window"
items rather than clearing the query. The same needs to be done for Cut,
Copy, Paste items.

Do you want to work on such a patch?


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: "Clear window" in the SQL Editor

От
Vinicius Santos
Дата:
 > OK, after some thinking, it would be best to disable the "Clear window"
 > items rather than clearing the query. The same needs to be done for Cut,
 > Copy, Paste items.
 >
 > Do you want to work on such a patch?

Do you can review my patch, please?

Re: "Clear window" in the SQL Editor

От
Guillaume Lelarge
Дата:
Le 13/12/2010 03:56, Vinicius Santos a écrit :
>> OK, after some thinking, it would be best to disable the "Clear window"
>> items rather than clearing the query. The same needs to be done for Cut,
>> Copy, Paste items.
>>
>> Do you want to work on such a patch?
>
> Do you can review my patch, please?

Yes, of course. Sorry to not react as quick as I would like, being a bit
ill and tired.

Anyways, I still have a few fixes to add to your patch before commiting
it. But I think you found the way to unblock me on this issue.

Thanks.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: "Clear window" in the SQL Editor

От
Guillaume Lelarge
Дата:
Le 15/12/2010 08:13, Guillaume Lelarge a écrit :
> Le 13/12/2010 03:56, Vinicius Santos a écrit :
>>> OK, after some thinking, it would be best to disable the "Clear window"
>>> items rather than clearing the query. The same needs to be done for Cut,
>>> Copy, Paste items.
>>>
>>> Do you want to work on such a patch?
>>
>> Do you can review my patch, please?
>
> Yes, of course. Sorry to not react as quick as I would like, being a bit
> ill and tired.
>
> Anyways, I still have a few fixes to add to your patch before commiting
> it. But I think you found the way to unblock me on this issue.
>

Commited. Thanks for your patch.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com