Correctly initialise the datadir variable when using wxWidgets 3.0 on Mac.

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
Fix escape handling in pgpass files.

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
Make style.

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
Improve the handling of the dirty flag in the query tool:

Attached patch adds member variable to track last origin of query
modification:
    ORIGIN_MANUAL - edited directly by user
    ORIGIN_FILE - loaded from file
    ORIGIN_INITIAL - passed into constructor
    ORIGIN_HISTORY - picked from "previous queries"
    ORIGIN_GQB - generated by query builder

Such approach allows for some enhancements of user's experience.
I've implemented the following in this patch:

1. Text initialization in constructor isn't considered a change, so it
will not ask for save confirmation if left intact.

2. Allow to "Save As" the initial text immediately, without having to
modify text in order to enable save button. Also the behaviour
shouldn't depend on settings->GetStickySql(), because there are other
use-cases not related to this option (for example, insert-scripts on a
table).

3. Skip confirmation to replace query text by GQB if previously it was
generated by GQB and was left intact.

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
Fix thinko.

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
Fix compiler warning.

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>
Add Save and Exit shortcut keys to the edit grid

Signed-off-by: olshevskiy87 <olshevskiy87@bk.ru>