54 Commits

Author SHA1 Message Date
0444ebbdb7 Issue #861: support hiding row id column through new preference checkbox 2023-10-12 07:27:00 +02: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
d46716ff2e Issue #1503: reactivate DPI awareness, and try to read/write component dimensions DPI independently 2021-12-26 13:06:24 +01:00
cb1024b048 Fix more potential theme related EAccessViolation's, due to Action:=caFree in OnClose event of modal forms. Their caller now frees these modal forms. In non-modal forms, keep caFree in OnClose but remove existing OnDestroy events, moving code to OnClose instead.
https://www.heidisql.com/forum.php?t=38043
https://stackoverflow.com/questions/2075405/how-to-close-non-modal-form-in-delphi
2021-06-22 20:37:34 +02: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
8b548862de Prefer String.IsEmpty over self-baken IsEmpty(String) 2020-07-04 08:12:17 +02: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
88a9e53f0d Remove remainders of DPI related code, and move TExtForm.AddSizeGrip procedure to property .HasSizeGrip. Uses TSizeGripXP instead of TSizeGripThemed, as this looks quite the same. 2019-07-21 19:44:05 +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
4f9613b05c High DPI: fix growing window dimensions on each opening. Related to #378 2019-07-07 21:22:19 +02:00
0f6b3ff695 Make column selection dialog more crash safe against clicks between items. Closes #534. 2019-02-10 14:28:19 +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
082368e947 Fix various selection bugs in column selection panel 2015-06-28 13:39:08 +00:00
4ec81e42d4 Bugfix: Remember currently checked items when clicking "Sort alphabetically", or when filter is active 2014-10-31 16:55:55 +00:00
176445e6c5 Remove unused variable 2014-10-09 17:18:37 +00:00
cf72ee2953 Add filter textbox to column selector in "Data" tab 2014-10-09 17:14:34 +00:00
6e608f157e Replace out-dated code which does not compile in 64bit mode in helpers.SetWindowSizeGrip. Use a TForm descendant in the new unit "extra_controls". Code parts taken from http://www.delphigroups.info/2/4/326787.html 2013-11-01 14:54:13 +00:00
e8adf2095f Turn column selection form into a tool window, so I can apply a size-grip at the lower right edge of the form. Remember form dimensions. Fixes issue #3299. 2013-08-21 05:01:28 +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
90ab0b6cf1 Refactor logic for reading and writing application and session settings:
* Introduce TAppSettings, created in dpr file
* Implement read and write methods, and replace callers of GetRegValue and MainReg.WriteInt/... with these
* Optimize read and write methods for avoiding redundant accesses to registry
* Auto-remove stored default settings from registry to avoid registry spam
* Replace synced MainForm.pref* variables with TAppSettings.Read* calls
* Move SetLocales call to dpr file
* Move MainForm.FDirname* variables to appropriate methods in helpers.pas
* Implement TQueryHistory.Create(SessionPath), reading its items within constructor
2012-08-19 10:55:08 +00:00
5e8bf8306a Remove unused unit inclusions, detected by CNPack/Uses cleaner 2012-05-01 08:34:12 +00:00
5cb54b3711 Remove helper function ToggleCheckListBox, replace the few callers with simple code alternatives 2012-05-01 06:50:57 +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
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
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
0ec73d7727 Clear column selection box before repopulating it after "Sort alphabetically" was clicked. Fixes issue #1330. 2009-08-30 06:20:36 +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
25e0b395b7 Fix mixed up order of checked states in column selection pulldown after clicking "Sort alphabetically". 2008-12-02 18:17:13 +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
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +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
747be5b4ef Code simplification: Replace remaining shabby RegObj.ReadXY() routines with Main.GetRegValue . 2008-03-23 23:20:19 +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
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
4f2246d598 Fix a minor compiler warning, introduced in previous revision. 2007-08-27 00:04:24 +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