Pros:
- ShowDBProperties doesn't reset column layout
- Sort direction is remembered automatically
- Reading columnlist from registry is done once in a TMDIChild, not on each ShowDBProperties
- Hiding/unhiding columns doesn't call ShowDBProperties
- No more hassling with what is called a "default column" or not. popupDBGrid is usable like in Windows Explorer.
- Column layout is stored global, not per session.
Cons:
- Column layout from old settings logic needed to be discarded
Side effect:
- Fixes a potential AV in FormatNumber(str) with empty strings.
- Created an overloaded FormatByteNumber() which can take a string as input
Additionally/Sideeffects:
- Fix vstFreeNode to delete the item from the array, not only free the item itself
- Change/Rename GetSelectedNodesFromVT to GetVTCaptions and give it the ability to return all captions, not only the selected. This function is very useful now and saves writing much redundant code.
A table with 500 columns needed 3 seconds to display in the TSortListView, now that takes less than a half second.
Now the lists take all room they can get (alClient), which makes the workaround superflous. However, that made it necessairy to group the toolbars on a TPanel and set the TPanel to alLeft.
"Active" [Ctrl+F5]
"Inactive" [Esc]
Fixes the ability to disable autorefreshing without using the mouse + menu, which is impossible when the interval is set to 1 second.
Additionally/Side effects:
- TVTreeData structure moved to helpers.pas to be able to use it in new function GetSelectedNodesFromVT.
- ListTablesEditing dropped. We don't need to disable any shortcut there because there is none set.
- Avoid potential AVs when accessing not created items in TVTreeData.Captions
- Don't replace "ListProcessesSelectItem" by "ListProcessesClick". Do the menuitem stuff in popupHost.popup()
- Avoid potential AV when exceeding the captions-list of a node in GetNodeText.
This is the first VST and therefore some base procedures are added which can be reused for most other coming VT's:
- vstGetNodeDataSize
- vstGetText
- vstGetImageIndex
- vstHeaderClick
- vstCompareNodes
All these procedures should normally get linked to other VST's. Only the OnInitNode procedure cannot be reused, as it contains references to the data of the VST's nodes.
I hope the billions of options in this VST object make sense.
Left for later:
printlist.pas cannot process this list without changes. I will rewrite that as soon as all 5 lists are switched to VST.
* Bring items in a better, usable order
* Nuke dependency of hardcoded itemcount in code for SQL functions: "popupQuery.Items[i+13].Add(mi);"
* Add useful actions:
+ Insert file at cursor
+ Save selection to file
+ Save as snippet
+ Save selection as snippet
* Assign procedures for menuLoad + menuSave at designtime, not at runtime (which made sense in a MDI mechanism)
* Minor optimization of detecting selected text in SynMemo
Side-effect: Needed to change some editor-related shortcuts so they don't trigger their corresponding menu-commands from popupTableGrid when the user presses them at the time the column name gets edited:
- Call field editor : Now "Alt+Enter", was "Enter"
- Drop field : Now "Ctrl+Del", was "Del"
This has one positive side effect: ViewData no longer re-saves an ORDERCLAUSE to registry after it has been read. At the same time the ORDERCLAUSE is read everytime when grid is filled, not only the first time. Those changes were needed to be able to apply an ORDERCLAUSE which was generated and saved by the new dialog.
Left for later: Moving order-columns up and down. Tested that with a TUpDown which seems to ignore clicks sometimes and then doesn't fire OnClick.
As a benefit, function.txt is read into 3 stringlists at startup now: Names, Declarations and Descriptions. Used in SynCompletionProposal and to fill the above mentioned helpers-list.
Also fixes a minor issue in SynMemoQueryDragOver using an unset "Accept" var.
Wrote a small console app which removes these properties automatically in a given directory. Feel free to download it at http://www.heidisql.com/files/explicit_sucks.exe and use it before committing *.dfm files.