55 Commits

Author SHA1 Message Date
17f4cb2949 Refresh sorting controls per timer when user presses the delete button of one sorting. Fixes issue #520 2024-02-03 18:51:48 +01:00
075aa18bc7 Refactor: Move connection reference out of TSortItems.ComposeOrderClause, so the caller must pass it as a parameter 2023-01-22 13:34:01 +01:00
0e6d814e03 Replace two versions of TSortItem.Create with an even simpler TSortItems.AddNew function 2023-01-22 13:23:51 +01:00
7ff9b2e9b7 Refactor internal structures for grid/table sorting, prefer TObjectList over Array 2023-01-22 12:49:53 +01:00
0d9de512cd Remove unit scopes from project settings, prefer fully qualified unit names in uses clauses. Enhance readability and compiler performance. 2022-12-26 17:59:19 +01:00
8d1ed29062 Issue #1503: scale hardcoded dimensions of dynamically created controls on sorting dialog 2022-01-16 11:31:48 +01:00
90739a895b Rename two forms so these comply to my own code convention: TDataSortingForm=>TfrmDataSorting and TColumnSelectionForm=>TfrmColumnSelection 2020-12-27 12:56:37 +01:00
5e30ed14af In the data sorting dialog, make sure we work on a copy of the currently used list with sorted columns, not on the original. Closes #849 2020-11-01 17:07:15 +01:00
fcdf323086 Let TExtForm translate all strings on a form, to reduce the code in any FormCreate event 2019-07-21 20:12:13 +02:00
c31cae2060 Giving up on high DPI readiness - remove tweaks which mostly don't work as expected, and even differently on various computers. Instead, let Windows blur fonts. 2019-07-18 20:53:53 +02:00
92c8f62b85 High DPI:
* remove ParentFont flag from forms again (introduced in 9cdcd631454f6f9e999893ea89fcf502d994474c for #213). This just inherits from default Windows settings.
* instead, scale font size in InheritFont(), and move that to the new TExtForm class
* mark app with PerMonitorV2 support
2019-07-17 21:59:18 +02:00
aa0540921c Issue #448: Apply 192 new icons mainly from Icons8 gallery, with an OpenSource permission (talked to Eugenie from Icons8) 2019-01-26 19:15:25 +01:00
9d61fb53a1 Show icons instead of text on delete + sort buttons of data sorting dialog. Use the same new sort icon on column headers. 2018-12-02 17:50:23 +01:00
382be95869 Issue #416: avoid flicker in data sorting dialog, while adding buttons 2018-12-02 15:51:51 +01:00
7e84a3fb52 Issue #416: fix now hidden buttons at the very bottom 2018-12-02 14:12:59 +01:00
7f555885d0 Support high-dpi setting with programmatically created controls on data sorting dialog. Closes #416. 2018-12-01 18:11:46 +01:00
9cdcd63145 Issue #213: Assign system or custom font once, to the application, and let all forms inherit that font, so there is no need to call InheritFont() for each form. 2018-10-25 19:24:45 +02:00
5a8a4af29a Rename helpers unit to apphelpers, to overcome a naming conflict with the FireMonkey unit FMX.Canvas.GPU.Helpers. Closes #102. 2018-01-22 19:48:17 +01:00
5837689c71 No need to adjust vertical position of OK button on sorting popup. See http://www.heidisql.com/forum.php?t=12980 2013-07-07 04:27:11 +00:00
f96288fce9 Translate string variables and literals in .pas files. TODO: translate constants. 2012-11-26 05:44:01 +00:00
ca1d94c87b Issue #557: Include gnugettext.pas from https://dxgettext.svn.sourceforge.net/svnroot/dxgettext/trunk/dxgettext/sample/ . And add basic code to all FormCreate events to translate their components in the future. 2012-11-10 14:28:44 +00:00
5e8bf8306a Remove unused unit inclusions, detected by CNPack/Uses cleaner 2012-05-01 08:34:12 +00:00
535bcc3470 Fix "abstract error" when clicking "delete" button on data sorting dialog, caused by free'd button in its OnClick event. 2012-02-14 18:30:10 +00:00
be645ac79b Unify code for refreshing Virtual Trees in a new helper method InvalidateVT. Fixes issue #1789 and issue #1790.
* Don't try to access a passed tree if it has been destroyed by some earlier event.
* Don't try to access registry in DoDisconnect after key has been closed.
* Now that DoDisconnect lives in FormDestroy it is save to call it slightly earlier, before registry has been closed. There should be no later paint events which will trigger random database queries.
2010-03-21 10:43:16 +00:00
458b4c3acf Introduce a more simple strategy in data tab grid for loading data:
* Load in OnBeforePaint, if the tree's tag is set to NOTLOADED
* Load 1,000 rows in one step, up to a maximum of 100,000 rows. Both values are customizable.
* Load next chunk when user presses PageDown on the last node, or, more explicitly, when user clicks "Next rows" button
* Should fix all AVs which seem to be a timing issue with loading data on demand.
* Fixes issue #1675, fixes issue #1580, fixes issue #1721, fixes issue #1734, fixes issue #972
2010-03-01 16:44:36 +00:00
b43b44ee5a Columns of selected datagrid object can also come from a view, so ParseTableStructure is not sufficient in both data sorting and column selection forms. Instead, just use mainform's lists which are exactly what we need. Fixes issue #1611. 2010-01-19 22:49:18 +00:00
9080ad7607 No need to use the Wide* version of string functions any longer. 2010-01-15 20:28:48 +00:00
52ea8f410a Use Unicode enabled TStringList instead of TWideStringList in all places. Should have no visible effect, apart from a very minor performance optimization, as String reference pointers are handled by Delphi, WideString by Windows. 2010-01-14 19:41:58 +00:00
25ac096554 Make more use of Generics, this time for columns, keys and foreigne keys lists, used by main unit and table editor. Frees code from annoying casting and makes it more type safe. 2010-01-08 00:30:51 +00:00
7d401ffde8 Upgrade to Delphi 2010:
* Removes TNT Unicode controls, which are no longer required. All VCL controls now have native Unicode support.
* Remove Delphi 11 packages, otherwise we would either need to keep TNT or break Unicode
* PngComponents update from Uwe Raabe on http://cc.embarcadero.com/Item/26127
* Adjust auto build process
* Since Delphi 2009, Strings are now UnicodeStrings, not AnsiStrings any longer. Fix a bunch of compiler errors which came along with this change.
TODO: Project should compile but give tons of compiler warnings.
2010-01-05 23:14:33 +00:00
6c74af1ec8 Add a menu item "Reset sorting", to remove ORDER BY columns with one click / shortcut. Fixes issue #561. 2009-12-27 16:39:54 +00:00
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
43fe695bc1 Make SHOW KEYS FROM <selected-table> and SHOW COLUMNS FROM <selected-table> superfluous. To achieve that, move parser for SHOW CREATE TABLE string from table editor to helpers unit, where it can be called by everyone. For consistency reasons the index list in table editor is converted from a TWideStringList to a TObjectList, like both table and foreign key list. However, that results in a large diff here. 2009-12-04 21:20:06 +00:00
12a8e2ebc5 Implement a more lightweight connection layer, consisting of 2 units in source directory. Breaks threading and window to window communication, which should be reimplemented later. 2009-10-28 00:08:49 +00:00
358100d6b3 Fix issue #990: SQL error if switching from table to data view, if column to sort by has been deleted. Plus: fix relevant naming convention for property + field. 2009-06-06 19:42:20 +00:00
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