55 Commits

Author SHA1 Message Date
ddbee4c536 Implement optional usage statistics call:
* Disabled by default, can be checked in preferences dialog
* If enabled, reports HeidiSQL revision and versions of recently used servers
2009-06-20 22:10:08 +00:00
2b8e3ac271 Issue #1074: Make maximum number of total rows displayed in datagrid configurable 2009-04-08 20:16:33 +00:00
2cbf85918f Add "Factory defaults" button to preferences dialog. Erases all registry values in HKCU\Software\HeidiSQL\* . Not recursive, as that would also delete sessions and their specific, automatic settings. 2009-04-05 09:19:25 +00:00
fc433bf38f Add background color feature to SQL highlighting via preferences 2009-03-31 22:57:08 +00:00
ab8171ee53 Fix AV if user clicks on sample SynMemo but doesn't hit any attribute representer. 2009-03-31 22:38:50 +00:00
cafd2a8c16 Enhancement in preferences dialog, SQL styles:
* Use AttrCount and Attribute[x] in SynEditHighlighters to iterate through available attributes, instead of doing less with more code.
* Use integer registry values for highlighter colors (were strings) and also integers for bold, italic, underline, strikeout (was one boolean per attribute).
a) optimizes registry access b) normalizes registry names and c) simplifies code. Unfortunately this breaks everyone's customized highlighter style - hopefully ok to do this is in an interim build.
2009-03-31 22:24:00 +00:00
dc9d55fbe8 Recycle preferences form so certain things can be initialized once in FormCreate instead of each time the dialog is called. The selected tab is remembered after the dialog is closed now. FormShow keeps fetching registry values each time the dialog is opened, so, if the user cancels, the next time the dialog is shown, all modified options are reset (which is the correct meaning of "cancel"). 2009-03-26 23:33:07 +00:00
992e2a4236 Fix issue #953: Add checkbox to toggle bold font in SQL font preferences. Also adds italic option for all attributes. 2009-03-18 21:51:06 +00:00
36c8937abb Remove feature "Prefer SHOW TABLES for performance reasons" and support for pre 3.23 servers
* Leads to unpredictable errors in special cases
* Advantage over SHOW TABLE STATUS is hardly measurable
* Makes integrating stored routines into the database tab complex and unstable for the benefit of nothing
2009-03-01 10:34:39 +00:00
da6606f9bc Always keep OK button enabled in preferences dialog. Seems to confuse users and lead to wrong bugreports. 2009-02-14 08:51:14 +00:00
1f6e894ba5 Implement a preference option to limit the size of "Copy as CSV/HTML/XML/SQL" actions. Helps with bug #793: app freezes when 'copy as csv/xml/html' is selected. 2009-01-18 22:32:31 +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
e6b3788924 Implement selection of pulldown attribute by click into SynMemo 2008-12-16 21:19:18 +00:00
d97ac10323 Work around access violation in SynEdit by postponing change event to OnExit (bug #914) 2008-12-16 10:45:23 +00:00
32fad96276 The new inplace editor neutralizes the need for a preference option "Enable popup text editor". Remove it. 2008-11-25 19:35:02 +00:00
b4f4942509 Implement rfe #816: wrong font in SQL log and query tab line numbers 2008-10-22 18:30:03 +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
d70ec31ca4 Work around bug #794: OK + Apply buttons enabled after just switching to a different tab
The bug seems caused by any TUpDown + TEdit which fire OnChange when they get visible for the first time. PageControl.OnChanging + .OnChange help here.
2008-10-12 09:56:02 +00:00
4cf1864921 Enable customizing SQL colors for identifiers, delimited identifiers, conditional comments and symbols. 2008-10-08 19:12:20 +00:00
5b4f5f1b5c Preferences dialog, SQL tab, enhancing color coding and font selection:
* Remove sub tabs
* Replace the color panels by a combobox showing which item is to be changed and a color combo box.
* Add a SynMemo, displaying color and font changes immediately using some sample SQL text.
2008-10-07 22:33:48 +00:00
026df1d4c9 Cosmetic face-lift on preferences dialog:
* Normalize component names
* Apply and use modal results to OK and Cancel buttons
* Fix apply button to be enabled after changing NULL color
* Fix all tab orders
* Fix cut labels on Vista
* Also disable btnOK after applying changes
* Find better/shorter captions for main tabs
* Remove form borders and apply 8px edge margins instead
2008-10-06 21:25:33 +00:00
fd9c44b576 Implement background colors for NULL fields, part 2 of rfe #692 2008-09-23 23:20:20 +00:00
0ef84eb62f Implement preference options to enable/disable the new SET editor, plus color selection for the grid font in SET fields. 2008-09-23 22:33:06 +00:00
d2f354275b Fix name, default value and meaning of preference option "Maximum column width". By default it's 300 now. 2008-09-11 22:44:28 +00:00
48a0f43644 Get rid of no longer used includes. 2008-09-09 21:44:19 +00:00
efbadf5b58 Fulfill rfe #692 "Add color-coding settings to data-appearance tab in preferences". Including new default color for ENUM fields and settings to enable/disable the grid editors. 2008-09-07 15:13:24 +00:00
5aa13c8195 Preferences dialog: Make data appearance options more compact, giving room for coming data color + editor options. Rename components reasonably. 2008-09-07 09:03:59 +00:00
1a3031414a * DPI fix: The node height of editable Virtual Trees was still not optimal as an editing node didn't have enough height to show the editing cursor. Steal some code from StdCtrls.TCustomEdit.AdjustHeight which does basically what we need here.
* Detected the VirtualTree.Header.ParentFont property and activated that instead of fixing the header font in FixVT
2008-09-06 18:38:51 +00:00
1defb9eaa6 * Bugfix: default enclose/separate for CSV should be " and ;. Takes care of export part of issue #709.
* Indicate in CSV files which rows need to be UNHEX()ed with LOAD DATA INFILE during import.  Takes care of export part of issue #709.
* Optimization: stop copying records and arrays to stack where appropriate.  See also note in helpers.pas.
* Factor out code to extract a cell in it's full width into EnsureFullWidth().
* Create method DiscardData() to release memory for a row.
* Bugfix: GridTo{Xml,Csv,Html} did not export cells in their full widths; they do now.  Fixes remainder of issue #685.
* Bugfix: remove superfluous field separator at end of each CSV record.
* Bugfix: CSV field enclose characters within field data must be escaped by printing the enclose character twice, as per de-facto (is it a standard when there are hundreds of applications supporting it, but *all* the major ones all come from the same company?..) CSV.
* Indicate in CSV files which cells are NULL by removing field enclosing (non-standard MySQL CSV extension).
* Indicate in XML files which cells are null and which cells are in hexadecimal format.
* Bugfix: always escape <, &, > in HTML and XML files.
2008-09-03 21:53:45 +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
2cff5732fc Remove no longer needed routine for autocalculating row limit: GetCalculatedLimit. The Export SQL dialog now uses a constant number of 5000 rows fetched per step. Also removes the option in the preferences screen for limiting the data amount, which was misleading the user before and only used to limit the export stuff. 2008-08-26 09:09:41 +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
e45c7c3325 Make datasize in LIMIT calculation configurable via preferences (defaults to 5M). Remove rounding to next 1000 in GetCalculatedLimit to avoid overriding low datasize preference. 2008-07-16 22:22:16 +00:00
764f444ebf Clean registry from unwanted WHERE clauses if "Remember WHERE filters" was unchecked. Avoids confusion with unwanted filters when that option was switched OFF and then ON again. 2008-07-14 21:46:38 +00:00
5b0bb48d0a Convert the myriad of redundant menuitems and buttons on the main controlbar + important toolbars in the tabsheets to use TActions. This moves
a) some hundred lines of code from childwin.pas to main.pas
b) redundant hints/captions/shortcuts/events for similar buttons/menuitems to their corresponding TAction in main.dfm .

This change
a) avoids several inconsistent captions like described in issue #595
b) makes it easier to have toolbars on the mainform which are controlled by childform.
2008-07-01 18:59:07 +00:00
80c5d9cdd4 Get rid of secondary, confusing checkbox in preferences window for limiting data rows. 2008-06-17 13:21:17 +00:00
21ada0acc8 Fix setting customized font name and size of filter editor and process viewer. 2008-05-30 04:59:25 +00:00
88d25c902d Add option "Also check for updated nightly builds" to preferences dialog and implement needed logic in updatecheck dialog and main unit. 2008-05-25 19:35:58 +00:00
bba3d2afc1 Implement option to prefer SHOW TABLES over SHOW TABLES STATUS, as discussed on the mailing list. Fix relevant AVs and detection of VIEW/BASETABLE in GetDBObjectType (at least for 5.0.2+ servers). 2008-04-11 19:23:47 +00:00
c97111e759 Remove weird automatic column sizing as discussed in bug #1889628 . Fixes that bug. 2008-03-31 21:17:35 +00:00
8226fae2be Kill option to manually specify value of initial limit (DataLimitEnd) in preferences. Keeping the checkbox for autocalculating while rephrasing its caption. Now the limit number is set either automatically by GetCalculatedLimit() or not at all if the option is disabled. (Un-)checking the CheckboxLimit in Mainform now toggles this option permanently. 2008-03-24 00:11:38 +00:00
b584aa5ae4 Introduce automatism for calling the updatecheck dialog. User can set the interval how often this is done in preferences dialog (default interval: 3 days, can be completely disabled). The automatic calling of this dialog should not disturb anyone as it's closed immediately if there are no updates available or if a developer version with an unknown revision is used.
Some GUI controls on the dialog had to be moved around as well as some lines of code so everything works well with the automatic dialog closing.
2008-02-19 19:44:33 +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
42166f0975 Remove "Data always in edit mode" option again and setting that to False at designtime. (as discussed on the devels-mailinglist) 2007-12-04 23:51:41 +00:00
d3307814b5 Followup to rev 668 and rev 678: Reenable option "Datagrids always in edit-mode". Implement a simple workaround for the broken copy+paste shortcuts. However, don't touch the TAction items Copy+Paste to avoid unpredictable behaviour. 2007-12-02 13:01:52 +00:00
23c13d2531 Cleanup usage of background colors in grids and listviews:
* TNTGrid is not capable of displaying a sort arrow in column titles. So, signalize sort direction of columns in grids and listviews by lightgrey (= ascending) and mediumgrey (= descending)
* Remove special color for NULL cells in grids because it can conflict with the new sorting colors. Instead, place a grey (NULL) text in these cells. Less gaudy colors now.
* Also remove grey background in primary key columns for the benefit of sorting colors. PK cells have bold font anyway, should be noticable enough.
2007-12-01 22:37:21 +00:00
65cfbd462d Add user preference to disable snipping of long log lines. While it conserves memory, it is undesirable if you are debugging.
(Changed to help andipfaff troubleshoot issue #1815148.)
2007-11-06 12:48:31 +00:00
b7b652da67 Fix adjusting linenumbers in SQL log when user changed the max linecount in preferences. 2007-10-10 18:17:35 +00:00
5831c331a4 Add option to set SynMemoQuery.ActiveLineColor . By default, this color is set to clWindow (same as the memo itself has). Reverts rev 949 where ActiveLineColor was hardcoded. 2007-10-06 11:58:14 +00:00