20 Commits

Author SHA1 Message Date
bc33729fdd Issue #436: Remove table tab from main tabs, and old field editor. Both were replaced by the new table editor. Doubleclicking a table opens the data tab now. 2009-05-17 16:02:28 +00:00
909d31fd64 Simplify writing settings to registry:
* Keep only one TRegistry object in memory instead of creating a new one in each routine.
* Move out relevant functions and TRegistry object from main to helpers to make them usable globally.
2009-01-03 17:16:11 +00:00
f1b3f5501f Remove last traces of MDI (issue #513). Merges code, controls and events from childwin into main. 2009-01-01 23:24:36 +00:00
a591edebac Fix bug #714: Impossible to change limit^H^H^H^H^H^H sort order by implementing a fourth button with dropdown menu, enabling the user to save all query elements in one settings. 2008-10-16 23:49:17 +00:00
9a52593dc2 Use Vista's Segeo font for all forms by using the SetVistaFonts() in mainform plus the new routine InheritFont() which simply overtakes fontname and size from the mainform to all other forms. 2008-08-29 18:20:14 +00:00
07d4f1c9d4 Fix (re)storing Unicode table and column names for the ORDER BY clause 2008-08-27 18:01:15 +00:00
6daf4b3f76 Fix most remaining Unicode unsafe GUI controls. 2008-08-25 20:24:00 +00:00
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
aa0bd953c6 Replace TNTDBGrids with VirtualTrees to enhance grid viewing and editing.
Affected issues: rfe #618, rfe #464, bug #324, bug #635 (maybe more)
Breaks: Unicode grid editing (due to yet unsolved bug #620), enum pulldowns, MEMO editing
Major changes:
  - editor tab at bottom completely removed, SQL log is always visible now.
  - memo, blob and enum editors don't have a replacement yet. This is left for later commits.
  - grid cells are colorized to signalize their datatypes
  - UPDATEs, DELETEs and INSERTs are composed by own code, no longer by Zeos internal mechanisms. Should make debugging easier.
  - UPDATEs + DELETEs on tables without unique key are blocked now.
  - editing in the query grid is always blocked. Would need some extensive parser to allow that.
2008-08-03 19:30:07 +00:00
d4e9386682 Work around bug #580 by converting the two TSpeedbuttons above the datagrid to toolbar buttons. This should stop the AV annoyance for these buttons. Not sure if we have the same issue still on other TPNGSpeedButtons as it's long ago I saw one. 2008-07-07 23:22:36 +00:00
efa71f50bb Implement automatic closing of data sorting + column selection dialogs when clicking elsewhere by catching the FormDeactivate event. (rfe #562 and rfe #579) 2008-06-23 19:49:11 +00:00
815eea1481 Rename childwin's "Description" property to "SessionName" which says more exactly what it really is. 2008-03-05 12:21:25 +00:00
4e23728aa2 - Move all hardcoded preferences names (registry) plus their default values to const.inc to fix inconsistencies like the one described here: http://www.heidisql.com/forum/viewtopic.php?p=1739
- Consequently use Mainform.GetRegValue() to read these values, an overloaded method with either Boolean, String or Integer result. These methods keep a global TRegistry object (regMain) open while the application runs, rather than creating a new one for each caller.
- Remove Mainform.SaveRegValue() which was used in one or two callers. Rather use a TRegistry object and do that by hand. There's no significant advantage in using a SaveRegValue method currently.
2008-02-06 00:00:52 +00:00
f6d4e637e3 Replace TSMDBGrid in Data + Query tabs by TTntDBGrid.
- Implement an alternative solution for handling sorted columns without usage of SMDBGrid's sortcolumns. Move relevant structures and functions from data_sorting.pas to childwin.pas and use them in both units.
- Upgrade some code parts to use WideStrings instead of Strings so they don't break with the new grid.
- Use Grid.OnDrawDataCell as an alternative to Grid.OnGetCellParams as the latter one is a feature of SMDBGrid
- Cosmetic: enhance screen real estate in viewdata()
2007-11-26 20:58:08 +00:00
e7bcbdf293 * Bugfix: plug the most obvious memory leaks.
* Clear some unused code and wrong comments.
2007-11-09 09:51:31 +00:00
9409c798ab Remove ActualDatabase and ActualTable variables, plus various minor optimizations that ensued from said change. Fixes a problem where when:
- viewing data in a table
 - switching to query tab
 - pressing master refresh
some of the tabs would disappear.
2007-09-11 15:58:47 +00:00
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
0f00d4a3c8 Enhancement: Disable the OK button in the new sorting dialog if there's no change to the old ORDER clause. Disabling that button should be the signal to the user that he didn't make any effective change yet. Helps forgetful people. 2007-07-14 18:51:27 +00:00
064ed3b4da Decide to refresh data if the OK button in any of the two dialogs (column_selection, data_sorting) was pressed. Don't call viewdata in the dialogs, but in ChildWin itself. Saves some superflous procedures / code. 2007-07-12 22:44:05 +00:00
cc84963b25 Implement a dialog for easier accessing the options for ordered columns.
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.
2007-07-12 22:33:59 +00:00