128 Commits

Author SHA1 Message Date
7946e8fce9 Display progress in GridToXYZ by putting a progessbar in a new panel of the status bar. Should be used for other time consuming loops as well. Related to bug #793: app freezes when 'copy as csv/xml/html' is selected 2009-01-18 23:07:46 +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
6998a88ac8 Change ListVariables to be updated on demand, when it gets painted or refreshed. Removes SHOW VARIABLES from startup queries. 2009-01-14 20:38:10 +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
5a09fac960 Implement rfe #792: Copy grid data as SQL 2008-12-25 10:26:16 +00:00
107bb0398d Fix bug #916: UNIX newline style auto converted to Windows style when executing queries . Extends escChars() to spit out \r + \n for new line chars, and tries not to break performance in that method. 2008-12-16 20:33:24 +00:00
5249426f25 Fix bug #866 : "Copy grid data as HTML" produces overlapping data in IE with very wide tables.
"white-space:pre" works similar like <pre></pre> which can cause more layout problems than it has good impact.
2008-12-12 19:57:33 +00:00
6fa7b9363e Fix sstr() to return the exact wanted length instead of length + 1 2008-12-03 12:25:00 +00:00
5216553868 Use single ellipsis char instead of 3 dot chars in sstr(). See bug #897 2008-12-02 18:04:46 +00:00
52362b0872 Fix bug #897 : Title of "table" tab gets "..." (ellipsis) appended although the whole name is visible 2008-12-02 18:03:44 +00:00
317ef0494f Workaround issue #868 : AV in various places if DecimalSeparator = ThousandSeparator 2008-11-23 11:04:31 +00:00
8b1a4f18ea Oops, forgot to expand array. See r1905. 2008-10-27 10:23:47 +00:00
b839a8031a Add support for hebrew. Not an exact match; 0xa4 is 'sheqel sign' in windows-1255 and 'generic currency sign' in "hebrew" charset/iso 8859-8, according to wikipedia. 2008-10-26 23:18:45 +00:00
c5dc9a25c4 Accept negative sign before floats in FloatStr(), fixes bug #826 2008-10-25 11:59:41 +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
1e410726ef Bugfix (regression): the value '-' was handled incorrectly when scanning for values looking like floating point stuff. 2008-10-09 23:30:23 +00:00
1992dd9edb Performance fix: explicitly checking for an empty string is much faster than catching an exception. 2008-10-08 17:40:50 +00:00
9b4588912c Uniform project settings for a brighter tomorrow. 2008-10-08 17:33:39 +00:00
df880e0a27 Implement SET editor, rfe #764 2008-09-23 22:04:35 +00:00
4efb511b95 * Bugfix: after an edit, a new row which did not match the filter was included in the grid.
* Bugfix: the entire width of all fields of edited columns were loaded, instead of a limited view.
* Bugfix: (follow-up to above) one too many rows were included in RootNodeCount after less rows were matched than expected from the data source.
* Bugfix: some memory was not released as early as it could've been when less rows were matched than expected from the data source.

Hopefully fixes issue #730.
2008-09-08 16:09:20 +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
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
ff25e466d6 * Bugfix: fix issue #717.
* Rely on IsFloat instead of a more obscure check to determine float values.
2008-09-05 12:28:00 +00:00
ca726ca567 Normalize node heights in dbtree and all other virtual trees, make them slightly less high. Keeping 120 DPI compatibility for editing boxes.
Cosmetic todo: Fix Vista selection colors and tree collapse/expand buttons
2008-09-04 19:22:35 +00:00
86d034b7d0 * Exclude "0x" from XML and CSV files, making the hex strings easier to parse on import.
* Handle NULLs explicitly in HTML export.
* Switch CSV import defaults to match those used by export.  Helps with issue #709.
2008-09-04 13:07:48 +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
c1e48c3bf5 Bugfix: buffer length is the input buffer, not the output buffer.
Bugfix: HexToBin() will simply stop when hitting invalid characters, make sure the buffers are valid in that case (should add code to raise an exception).
2008-09-02 20:09:55 +00:00
2efb248325 Virtual Tree needs a further fix for usage with custom DPI settings: its default node height is hardcoded and only works for 96 DPI. Make that dynamically by checking the grid's font height. Fixes issue #705: Unreadable text on Vista 2008-09-02 18:34:39 +00:00
881da41fa0 * Export binary data to SQL without corruption.
* Add todo notes in GridTo[Xml,Csv,Html}.
* Whitespace adjustments.

Partly fixes issue #659.
2008-09-02 15:05:02 +00:00
cc2f93b24e * Add a binary editor to allow editing (var)binary and (tiny|medium|long)blob fields without messing up NULs etc.
* Add a few notes about where AVs seem to randomly occur when GridPost{Insert,Update,Delete} and EnsureDataLoaded invokes the query logic from outside the main thread.

Fixes issue #659 as far as the grids go,  but not for export functions.
2008-09-01 21:46:28 +00:00
d60b1b6f93 Rename 'memoeditor' to 'texteditor', in preparation for inclusion of a binary editor. 2008-09-01 19:47:05 +00:00
084914b077 Sanitize GridToCSV/HTML/XML routines from redundant stream writing code. Introduce new StreamWrite() method, also used by wfs() which does slightly more than StreamWrite(). 2008-08-29 17:49:52 +00:00
76f2952a84 Try to fix issue #693 : Import CSV file: LOAD DATA fails with UTF-16 encoded file.
Pros:
- CSV/HTML/XML exports are now encoded as UTF-8, not UTF-16. Importing such CSV files should now work magically when using the Import CSV dialog.
- Exported files should now be significanty smaller when most content is latin1 encoded.
2008-08-28 16:05:56 +00:00
776fa891a8 Use WideDequotedStr as a replacement for the helpers:TrimC . Fixes Unicode in autocompletion logic. 2008-08-27 18:09:53 +00:00
d8f5674b3d Implement ENUM grid field editor, basically a combobox 2008-08-26 05:14:05 +00:00
3517253af7 Fix unicode table names and comments in alter table dialog 2008-08-19 23:01:31 +00:00
79d8db08b3 Support Unicode in list of wanted database names. 2008-08-19 21:35:04 +00:00
9ae9a3a768 Refactor dataset2html/csv/xml routines:
- Use TMemoryStreams for copy actions, TFileStreams for export actions. Should save some memory when saving to files and improves performance by factor ~100 on larger grid results.
- Fetch text from the Grid.Text, not from the underlying TGridResult.Rows array. Fixes issue #685 .
- Removes non functionial export of image files from BLOBs
- Sanitize helpers function from GUI code (mousecursor, opening result file, ...)

Todo:
- Limit export to a user defined number of rows. Important for large tables.
- Fetch entire TEXT field content, currently limited to 256 chars
2008-08-18 21:55:59 +00:00
3ddc5a849f Fix remaining ANSI escaping bug in esc(), related to bug #683 . 2008-08-16 06:14:44 +00:00
87a804275a Fix bug #683, cli version exports escaped and quoted like ANSI exports. 2008-08-15 20:42:21 +00:00
538cfde530 Fasten string replace by avoiding lots of SetLength(..., Length(...)+1) calls. Maybe. Haven't actually tested it ;-). 2008-08-14 20:23:53 +00:00
e0d847ed8a Fix bug #682 2008-08-14 18:59:28 +00:00
6e4cb43813 * Experimental: adjust row limit by dragging the data grid scrollbar instead of manually entering numbers in the toolbar.
* Experimental: fetch only first 256 bytes of large fields when loading rows into the data grid.
* Fixes rfe #362, rfe #459, rfe #475 and rfe #621.
2008-08-12 02:06:22 +00:00
c25f3ff8c7 Terminology: a column can be part of a primary key. 2008-08-11 21:24:47 +00:00
3b0f5be4bb Implement handling of maximum input length for the memo editor 2008-08-10 15:34:47 +00:00
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
bf24403596 * Crashed tables were mistaken for views. Fixes issue #650.
* Add separate node type for crashed tables, so that some sort of a graphic can be associated with those.
2008-08-07 23:17:28 +00:00
ad9ebc4161 Treat varchars in grids like text fields are treated: green color + memo editor 2008-08-07 23:07:03 +00:00
70370dca8c Always export files in UTF-8. 2008-08-07 19:44:40 +00:00