Обсуждение: PATCH: Save settings regardless of Find&Replace dialog's close method
Hello, Make "Find & Replace" dialog in SQL Box remember search settings when it is closed (in any way; in fact it's being hidden). Existing instances of dialog, once invoked again, will keep their own settings. New instance of dialog will gain settings of the last dialog which has been closed before it's invocation. >>> By the way, I was puzzled why search dialog's settings are saved >>> sometimes and sometimes are not. Depending on dialog's close method: >>> 1. Pressing ESC or "Close" form button calls OnCancel() which does not >>> save; >>> 2. Pressing title [x] button or Alt-F4 (or similar OS hotkey) calls >>> OnClose() which does save. >>> >>> Shouldn't the behaviour be the same regardless of dialog's close >>> method? Or at least the difference should be noted in documentation. DP>> Yes, it should. Patches welcome :-) JFO> Ok, after the current patch is applied I'll send in another one to JFO> make it save settings in both cases. -- Best regards, J.F.
Вложения
Dave/J.F.
My thinking for this is little different.
On Thu, Mar 20, 2014 at 9:03 PM, J.F. Oster <jinfroster@mail.ru> wrote:
Hello,
Make "Find & Replace" dialog in SQL Box remember search settings when
it is closed (in any way; in fact it's being hidden).
Existing instances of dialog, once invoked again, will keep their own
settings.
New instance of dialog will gain settings of the last dialog which has
been closed before it's invocation.
>>> By the way, I was puzzled why search dialog's settings are saved
>>> sometimes and sometimes are not. Depending on dialog's close method:
>>> 1. Pressing ESC or "Close" form button calls OnCancel() which does not
>>> save;
>>> 2. Pressing title [x] button or Alt-F4 (or similar OS hotkey) calls
>>> OnClose() which does save.
>>>
>>> Shouldn't the behaviour be the same regardless of dialog's close
>>> method? Or at least the difference should be noted in documentation.
DP>> Yes, it should. Patches welcome :-)
JFO> Ok, after the current patch is applied I'll send in another one to
JFO> make it save settings in both cases.
--
Best regards,
J.F.
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
![](http://s.wisestamp.com/pixel.png?p=mozilla&v=2.0.3&t=1285751372076&u=4060523&e=777)
We don't have a cancel option for Search/Replace. We only have Close - which is what the X button does, so I think we should save in all cases.
On Wed, Apr 2, 2014 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:
So - we should save the settings only on "Find/Replace/ReplaceAll" action, along with Close (but - not definitely with Cancel operation/Cross button).Dave/J.F.In general, if a user cancels any operation, he/she does not want the changes.
My thinking for this is little different.On Thu, Mar 20, 2014 at 9:03 PM, J.F. Oster <jinfroster@mail.ru> wrote:--Hello,
Make "Find & Replace" dialog in SQL Box remember search settings when
it is closed (in any way; in fact it's being hidden).
Existing instances of dialog, once invoked again, will keep their own
settings.
New instance of dialog will gain settings of the last dialog which has
been closed before it's invocation.
>>> By the way, I was puzzled why search dialog's settings are saved
>>> sometimes and sometimes are not. Depending on dialog's close method:
>>> 1. Pressing ESC or "Close" form button calls OnCancel() which does not
>>> save;
>>> 2. Pressing title [x] button or Alt-F4 (or similar OS hotkey) calls
>>> OnClose() which does save.
>>>
>>> Shouldn't the behaviour be the same regardless of dialog's close
>>> method? Or at least the difference should be noted in documentation.
DP>> Yes, it should. Patches welcome :-)
JFO> Ok, after the current patch is applied I'll send in another one to
JFO> make it save settings in both cases.
--
Best regards,
J.F.
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Thu, Apr 3, 2014 at 1:07 AM, Dave Page <dpage@pgadmin.org> wrote:
--
--
![](http://s.wisestamp.com/pixel.png?p=mozilla&v=2.0.3&t=1285751372076&u=4060523&e=777)
We don't have a cancel option for Search/Replace. We only have Close - which is what the X button does, so I think we should save in all cases.
Ok.
In that case - the patch looks good to me.
--On Wed, Apr 2, 2014 at 11:02 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:So - we should save the settings only on "Find/Replace/ReplaceAll" action, along with Close (but - not definitely with Cancel operation/Cross button).Dave/J.F.In general, if a user cancels any operation, he/she does not want the changes.
My thinking for this is little different.On Thu, Mar 20, 2014 at 9:03 PM, J.F. Oster <jinfroster@mail.ru> wrote:--Hello,
Make "Find & Replace" dialog in SQL Box remember search settings when
it is closed (in any way; in fact it's being hidden).
Existing instances of dialog, once invoked again, will keep their own
settings.
New instance of dialog will gain settings of the last dialog which has
been closed before it's invocation.
>>> By the way, I was puzzled why search dialog's settings are saved
>>> sometimes and sometimes are not. Depending on dialog's close method:
>>> 1. Pressing ESC or "Close" form button calls OnCancel() which does not
>>> save;
>>> 2. Pressing title [x] button or Alt-F4 (or similar OS hotkey) calls
>>> OnClose() which does save.
>>>
>>> Shouldn't the behaviour be the same regardless of dialog's close
>>> method? Or at least the difference should be noted in documentation.
DP>> Yes, it should. Patches welcome :-)
JFO> Ok, after the current patch is applied I'll send in another one to
JFO> make it save settings in both cases.
--
Best regards,
J.F.
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
![](http://s.wisestamp.com/pixel.png?p=mozilla&v=2.0.3&t=1285751372076&u=4060523&e=777)
Checked-in the master.
On Thu, Mar 20, 2014 at 9:03 PM, J.F. Oster <jinfroster@mail.ru> wrote:
Hello,
Make "Find & Replace" dialog in SQL Box remember search settings when
it is closed (in any way; in fact it's being hidden).
Existing instances of dialog, once invoked again, will keep their own
settings.
New instance of dialog will gain settings of the last dialog which has
been closed before it's invocation.
>>> By the way, I was puzzled why search dialog's settings are saved
>>> sometimes and sometimes are not. Depending on dialog's close method:
>>> 1. Pressing ESC or "Close" form button calls OnCancel() which does not
>>> save;
>>> 2. Pressing title [x] button or Alt-F4 (or similar OS hotkey) calls
>>> OnClose() which does save.
>>>
>>> Shouldn't the behaviour be the same regardless of dialog's close
>>> method? Or at least the difference should be noted in documentation.
DP>> Yes, it should. Patches welcome :-)
JFO> Ok, after the current patch is applied I'll send in another one to
JFO> make it save settings in both cases.
--
Best regards,
J.F.
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
![](http://s.wisestamp.com/pixel.png?p=mozilla&v=2.0.3&t=1285751372076&u=4060523&e=777)