150 Commits

Author SHA1 Message Date
a827f68509 Work around for issue #1097: Text editor mangles text containing NUL. Pops up a warning if text contains one or more #0 chars and removes all of them for editing. 2009-04-25 18:08:31 +00:00
5687b8d7bf Extend detection of irregular linebreaks into a more informative method, now detecting various (non)consistent linebreaks. Related: issue #1095 and issue #1094 2009-04-21 17:06:42 +00:00
34520be50c * Update to WideString.
* Update to SynEdit (rather than MEMO) bugs.
2009-04-17 11:56:08 +00:00
51f8c54e91 Partial revert of r2369 to restore potentially useful functions. 2009-04-17 11:20:31 +00:00
c92994aa99 * Redo r2106 and r2283, fixing issue #916 and #1000.
Did not bother adding char5, char6 and char7, opted instead to run escChars() twice.  Haven't tested performance but adding the extra chars could be faster.

* Add comment explaining why these characters are escaped.
2009-04-17 01:03:53 +00:00
6ee468fb26 Revert r2106 and a similar change. Fixes issue #1092. 2009-04-16 14:33:06 +00:00
d3c505f032 Remove unused constants and code. 2009-04-05 11:54:02 +00:00
fc433bf38f Add background color feature to SQL highlighting via preferences 2009-03-31 22:57:08 +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
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
dbb84e6df9 Integrate stored procedures and functions into the GUI flow, so they are visible like tables and editable from everywhere.
- FetchDbTableList now makes use of various tables in INFORMATION_SCHEMA if available - the only way of listing stored routines.
- If a routine is selected, Table + Data tab hide their grids and display a corresponding message instead. Seemed the only way to keep the normal flow of clicks, not changing too much click logic.
2009-03-02 21:40:44 +00:00
f20dad8adb Implement stored routine editor, see issue #420
Todo: make routines visible in the database tab so they can be edited.
2009-02-28 22:57:55 +00:00
edc2d538d3 Fix issue #1000: export tables - sql syntax error. Escape null characters so they don't cut a string somewhere after escChars was called. 2009-02-18 19:42:01 +00:00
0d6cada653 Finalize performance fix from r2278: Discard node data prior to calling EnsureChunkLoaded with FullWidth.
* makes it superflous to call EnsureFullWidth for any previously loaded nodes - significantly faster now
* no need to have a unique key in the selected table any longer
2009-02-16 23:15:49 +00:00
dcecedd5ba Fix poor performance in GridToXYZ actions on tables with lots of larger text columns: EnsureFullWidth called lots of mini SELECTs. Now, EnsureChunkLoaded is called with FullWidth=True in relevant places. Only already loaded data still has to be completed with EnsureFullWidth - which could be optimized by discarding all loaded data first, but then again this could result in a waste of SELECTs in taller tables. 2009-02-16 20:37:13 +00:00
26a5713c27 Performance fix: EnsureChunkLoaded should be called in a node, not cell context (which is way too often) 2009-02-16 19:51:33 +00:00
c726dddd4a Fix GridToXYZ actions for query grid - warned about a missing unique key although the query grid does no delayed loading. (Broken in r2236) 2009-02-16 19:22:46 +00:00
bfa3189188 Set focused node to the first selected one after a refresh action. Not doing this, the focused node somehow "jumps" randomly if the list was sorted. Plus: break early if the list doesn't have multiselection enabled. 2009-01-28 19:49:32 +00:00
d4368bc33b Fulfill rfe #637: Reintroduce filter history drop down. Integrated as submenu of the existing context menu in filter memo. 2009-01-25 10:35:51 +00:00
d7b49cdb1c Fix reselecting nodes after refreshing a virtualtree. Non selected nodes were selected afterwards if the list was non default sorted. Also the focused node "jumps" in these cases, which wants to be fixed somehow. 2009-01-20 22:47:38 +00:00
3a52febc38 Fix the part of bug #938 which causes an empty WHERE clause. If CheckUniqueKeyClause returns false, EnsureFullWidth can never succeed. This fix only makes sure that the user gets an informative error popup instead of the above mentioned SQL error. 2009-01-20 19:14:28 +00:00
405240a0a2 Fix start position of progressbar for all callers. 2009-01-20 17:58:23 +00:00
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