Commit Graph

130 Commits

Author SHA1 Message Date
Ansgar Becker
e40df52ead Don't call sorting procedure on right clicking header columns. Some list-headers have a contextmenu which should popup then. 2007-08-28 19:32:01 +00:00
Ansgar Becker
7b6e142c60 Get printing function to work with VirtualTrees. 2007-08-27 21:20:39 +00:00
Ansgar Becker
c4f7ada3cb Paint background of sorted columns light grey. Imitates behaviour of the Windows XP Explorer and adds a clear signal to the user that the list is somehow sorted currently. 2007-08-27 20:58:33 +00:00
Ansgar Becker
5d718e5152 Iterate through data arrays of VirtualTrees rather than through the nodes to get their captions. Fixes sorting in ColumnSelection-dialog and other places where GetVTCaptions is called to get all captions (not the selection). 2007-08-27 18:46:21 +00:00
Ansgar Becker
cc470b33fe Fix previous revision: The compiler complains about declaring properties after functions and procedures. 2007-08-27 18:36:26 +00:00
Ansgar Becker
2977bcb735 Encapsulate detection of data array for a VirtualTree in a new function "GetVTreeDataArray". Should make it easier to read data from these arrays instead of the nodes. 2007-08-27 18:32:08 +00:00
Ansgar Becker
46cad8f9eb The right place to call ValidateControls is in ListTables.OnChange rather than in ListTables.OnClick + popupDbGrid.OnPopup. 2007-08-27 18:10:24 +00:00
Ansgar Becker
20ce6fc803 Adjust the withs of columns in ListColumns so they're more usable. Autosizing rightmost column only. 2007-08-27 18:02:22 +00:00
Ansgar Becker
ad14e12595 Don't call VT.SortTree manually. Let AutoSort do the work for us. 2007-08-27 17:55:43 +00:00
Ansgar Becker
bc6c65d28b Call VT.Clear before filling it rather than manually calling ReInitNode after filling data. Seems more consistent and less hackish. 2007-08-27 17:51:02 +00:00
Ansgar Becker
4f2246d598 Fix a minor compiler warning, introduced in previous revision. 2007-08-27 00:04:24 +00:00
Ansgar Becker
3f0b70c409 Switch ListColumns from TSortListView to TVirtualStringTree
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.
2007-08-27 00:01:53 +00:00
Ansgar Becker
1fa1837ec8 Revert revision 841 as discussed on the devels list:
"The example SQL is not proper SQL, so SingleLine mode might [is] be intentional."
2007-08-26 18:10:28 +00:00
Ansgar Becker
f67200157b Fix a focus-issue for rightclicking in ListTables. ValidateControls is called by OnClick, but rightclicking doesn't seem to call OnClick. So, add ValidateControls to popupDbGrid.OnPopup.
Also checking the focused node doesn't say if some nodes are selected. A focused node can even be unselected in the way that its background is not highlighted. So, rather check the selection in ValidateControls.
2007-08-26 06:19:34 +00:00
Ansgar Becker
f814439f03 Nuke an ugly workaround for setting the correct width and height of ListTables and ListColumns after the form has been resized. Somehow this workaround was not functioning as expected any longer with the new VirtualTree on the Database-tab.
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.
2007-08-25 11:53:53 +00:00
Ansgar Becker
f710f29706 Configure the preview SynMemo not to use SingleLine-mode, which could probably cause incorrect highlighting here. 2007-08-25 11:20:58 +00:00
Ansgar Becker
51e212ae6d Add shortcuts to processlist's popup menuitems in "Auto-refresh":
"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.
2007-08-25 11:18:14 +00:00
Ansgar Becker
cc11515859 Add Header.hoHotTrack property to VirtualTrees where that was missing. This enables the mouse-over effect when XP-theming is active.
Also adjust the height of the header to be the same in all VTs.
2007-08-25 00:13:11 +00:00
Ansgar Becker
9068f08609 Convert ListTables from TSortListview to TVirtualStringTree
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
2007-08-25 00:08:31 +00:00
Ansgar Becker
43f6d11cc2 Convert ListProcesses from TSortListView to VirtualTree.
- 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.
2007-08-21 23:19:51 +00:00
rosenfield
75387fb490 Bugfix: export to database needs to know the current character set. 2007-08-21 20:17:32 +00:00
rosenfield
2b8a75b61c Avoid a follow-up AV when seeing unknown data types. 2007-08-21 19:35:14 +00:00
Ansgar Becker
45cc29269e Don't display ugly "bevels" on TSplitters. It's obvious enough that there *are* splitters. 2007-08-21 19:25:29 +00:00
Ansgar Becker
797cf5502f Adjust style of VT-headercolumns to be more standard looking when XP theming is not active (hsThickButtons is default) 2007-08-21 19:18:52 +00:00
rosenfield
cc1063b8dd Implement RFE #1685787: create table button in popup menu. 2007-08-21 18:28:53 +00:00
rosenfield
6461212dcc Bugfix: Correctly handle when a database is taken away behind the scenes. 2007-08-21 17:57:59 +00:00
Ansgar Becker
b54a122fe6 Fix bug #1757524 "Exporting rather slow when processing large BLOBs" by making use of mysql_real_escape_string() . 2007-08-21 16:47:28 +00:00
rosenfield
ceb914a3dd Bugfix: Anchor buttons in connection window to bottom instead of top, so they do not interfer visually with bottom-anchored elements placed vertically above the buttons (specifically "Bevel1"). 2007-08-21 14:40:43 +00:00
rosenfield
8666ac1239 * Fix tab order of the 'optimize tables' form. (Was buggy; discovered while developing, pre-requisite for next change.)
* Add check boxes to GUI allowing user to run extended check and extended repair on tables.
2007-08-21 14:33:53 +00:00
Ansgar Becker
80496695c1 Add some safety to the file-commands in popupQueryHelpers:
- Create the snippets folder if it's not present and user clicks on "Explore .."
- If no snippets exist, disable the menuitems "Insert at cursor", "Load" and "Delete"
2007-08-20 21:28:33 +00:00
Ansgar Becker
e78c25f25b Fix bug #1776163 "Blank/Space in HTML-export"
- Dropping non breaking spaces by adding css attribute border-collapse to table.
- Use the same font and background colors as in the datagrids. Even applies for the colored NULL-fields.
2007-08-18 00:17:08 +00:00
Ansgar Becker
de4182d69d Add menuitem "Explore folder" to query helpers. Just opens the snippets-folder in your windows explorer. 2007-08-17 23:37:40 +00:00
Ansgar Becker
50b5d31e11 Add menuitems to query helpers, "Snippets" tab:
- "Insert at cursor"
 - "Load"
2007-08-17 23:28:29 +00:00
Ansgar Becker
c436f8b905 New feature: Checkbox for sorting fieldlist alphabetically in column selection dialog. State of the checkbox is memorized in registry. 2007-08-17 23:10:11 +00:00
Ansgar Becker
830b879a24 Add missing event OnFreeNode and popupmenu property to ListVariables. OnFreeNode is new in rev 815 and popupHost was accidently not referenced in rev 807. 2007-08-17 22:31:04 +00:00
Ansgar Becker
17cad32f1c Convert ListCommandStats from TSortListView to VirtualTree.
- Make OnInitNode a general procedure by detecting which list was the Sender.
- Add recommended OnFreeNode procedure for all VT's.
2007-08-17 22:25:26 +00:00
Ansgar Becker
3692c53a16 Switch from TListView to TVirtualStringTree (VST) for ListVariables.
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.
2007-08-14 22:33:17 +00:00
Ansgar Becker
b015b87fcb Fix confusion with TYPE/ENGINE in CREATE TABLE statements. On target versions below 4.1.2 we now use "TYPE", "ENGINE" on all other versions.
Was discussed here:
http://www.heidisql.com/forum/viewtopic.php?p=1226#1226
2007-08-13 23:25:20 +00:00
Francisco Ernesto Teixeira
b7cdd2b4cd Foreign Key support on ExportSQL: fixSQL for ANSI SQL compatibility 2007-08-09 17:44:23 +00:00
Francisco Ernesto Teixeira
5d62871cb4 Foreign Key support on ExportSQL, prevents errors on dump import. 2007-08-08 16:31:25 +00:00
Ansgar Becker
edb7fb0da8 Turn the query progress window not to be "always on top". It is already modal as set by the callers so that ensures no internal windows can cover this window.
I see no obvious reason why this status window should cover windows of other applications. And it can be annoying if you have a slow query running and want to work with other applications in the meantime. I asked the original developer for the initial reason for that change, but got no reply yet. Likely I won't get an answer ever.
2007-08-06 20:18:46 +00:00
Ansgar Becker
79c7234f67 Make code for setting icon indexes at key-columns more compact and stable: Do the loop over the ListItems *outside* the IFs, not the IFs first and for each IF a redundant loop.
Fixes a bug in applying the iconindex for a column which is part of a fulltext key (was always shown as normal index).
2007-08-03 18:42:11 +00:00
Ansgar Becker
de5d74f295 Use new image index constants in all relevant places. 2007-08-03 17:44:57 +00:00
Ansgar Becker
618d34ec3d Convert ComboboxKeys on the index-editor from a standard TCombobox to a TComboboxEx. Avoids/removes hackish code for drawing icons on items.
Also create some imageindexes constants to const.inc where they will be useful for other units.
2007-08-02 22:26:02 +00:00
Ansgar Becker
d96cf89849 Remove unused form-variable. 2007-08-02 21:29:14 +00:00
Ansgar Becker
74f056b708 Optimize updating indexes: Do the ALTER TABLE query in one go, not in one per changed or new index. So the server only has to rebuild the index file once. Especially changes on big tables with big fulltext indexes benefit from this optimization.
Also ensure the window stays open if any SQL error occurs on applying changes to the indexes, so the user doesn't has to check all changes again in that case, just fix the incorrect option and click OK again.
2007-08-02 21:22:45 +00:00
Ansgar Becker
e12f65b55b Followup / fix for rev 768: Ensure snippet menu doesn't contain a deleted file any longer. 2007-08-01 21:27:39 +00:00
Ansgar Becker
732114b675 Optimize code for enabling/disabling menuitems in Table tab 2007-08-01 21:21:21 +00:00
Ansgar Becker
b7e16074ab Followup / fix for rev 749: Disable menuitem "Rename column" if no item is selected. 2007-08-01 21:16:35 +00:00
Ansgar Becker
fa11cf2fb6 New feature: Allow the user to select and delete multiple fields in listColumns. Just like in listTables where we allow to drop multiple tables. 2007-08-01 20:43:48 +00:00