187 Commits

Author SHA1 Message Date
2e859faf5e Fix bug #1850358 Table name autocomplete shows "dummy node" 2007-12-14 18:41:46 +00:00
69e649b70b - Fix the copy+paste workaround in DBGrids, was malfunctioning when grid is in editormode.
- Add a reminder for enabling Unicode in this workaround
2007-12-05 13:01:09 +00:00
35ebc27761 Merge SynEdit sources with Unicode enabled version from http://www.mh-nexus.de/unisynedit.htm 2007-12-05 12:37:49 +00:00
db48c82110 Find a better fix for the black focus rectangle plus fix another graphical glitch for MEMO and BLOB cells, which didn't get covered completely by the (NULL). This fix just leaves the (MEMO) and only uses the grey color for it. 2007-12-05 00:36:03 +00:00
367cb4cc40 Fix a minor graphical glitch when a focus rectangle is displayed in a gridcell (broken in rev 1156) 2007-12-05 00:12:49 +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
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
a706163966 Bugfix: regression introduced in revision 1104 - Abort()ing in popupTreeView causes various misbehaviours.
Also added three debug statements so the rest of you can test and see that things happen in the right order now; feel free to remove these.
2007-11-08 12:10:37 +00:00
95125c1861 TTreeNode.AbsoluteIndex did not work exactly as I had imagined. With this patch we're back to right-click + refresh in tree view being unstable, in fact with the exact same exception as before. (But at least it should be easier to debug now.) 2007-11-07 12:09:59 +00:00
5f86b11cad * Bugfix: The TTreeView component has a nasty habit of inserting a bad memory reference into TTreeView.Selected whenever TTreeView.ClearSelection() or TTreeView.Items.Clear() are called. The bad memory reference is in turn picked up by GetActiveDatabase and GetSelectedTable, which are used all over the place, making stuff like this fun to debug. Worked around by constructing a 'fake' db tree in memory, then prodding the TTreeNodes structure from that on top of the regular DB tree. Someone bothered to do a bit of serialization / deserialization magic in TTreeNodes.Assign, making this work beautifully.
* Bugfix: When methods are called recursively, they should push/pop altered event handlers on a LIFO stack instead of blindly setting and unsetting them.

* Cosmetic: Reclaim screen real estate in ReadDatabasesAndTables().
2007-11-07 07:02:10 +00:00
a8c01d8f77 * Bugfix: node.Selected := true and tree.Selected := node is not the same, for some reason.
* Bugfix: Some state changes (tree.Selected) did not correctly take effect when tree.Items.{Begin,End}Update was used, causing an exception later on in GetSelectedTable, GetActiveDatabase etc.

To reproduce the bug, right-click a table, drop it, then right-click another table in same database and choose "refresh".
2007-11-06 14:53:12 +00:00
62eb57abf1 Follow-up to r1104: popup menu entry click event handlers are invoked via window messages, sigh. 2007-11-06 14:19:21 +00:00
508bd4c96d Oops, forgot to check before committing. This line should not have been part of the last commit. 2007-11-06 13:38:22 +00:00
90035256ec Bugfix: Fix a whole slew of access violations when various routines try to read memory referenced by DBRightClickSelectedItem but already released (or reused). For example, the recurring AVs when opening the 'export tables' dialog. 2007-11-06 13:33:20 +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
f0bc98f305 Fix bug #1826253 "Too easy to change delimiter by accident" 2007-11-06 04:22:48 +00:00
0a3f6abdf9 Add a light "progress bar" to the percentage column of ListCommandStats to visualize the amount of the commands. 2007-10-23 22:58:20 +00:00
07be7a7222 GUI specific initializings and restoring registry settings belongs to ReadWindowOptions. So, move all two lines from FormCreate here. 2007-10-23 21:40:18 +00:00
edbfbedc2f Hide columns in ListTables if their header was "draggedout", which means: dragged up or down, not to the left or right. 2007-10-23 21:29:20 +00:00
f085be1ca8 Rename mysql.pas and it's helper file installer_function_list_generator.php so their purpose is more clearer to newbies. 2007-10-23 18:49:14 +00:00
13e925b9fa Bugfix: Quick fix for multiple access violations in filter code, as described in issue #1704044. 2007-10-23 12:52:37 +00:00
88076cd475 Cosmetic: clarify a comment. 2007-10-23 12:17:59 +00:00
7569a53c00 Fix memory leak when prefRememberFilters is false. 2007-10-23 10:59:35 +00:00
a4406b229f Fix a sorting bug in vstCompareNodes: Floats were always truncated to integers, then compared. So, sorting 0,1 and 0,2 placed these values somewhere between the 0 values.
- Introduce helper "MakeFloat" which does exactly the same as MakeInt except from truncating floats
- Use MakeFloat instead of MakeInt in vstCompareNodes to fix the above mentioned bug
2007-10-21 18:48:23 +00:00
e2e13aac42 Minor safety fix: Be sure status bar doesn't display old "db: xx tables". 2007-10-21 17:53:11 +00:00
ea8e9da577 Fix AV for usage on 5.1.22 servers when clicking on "information_schema": SHOW TABLE STATUS returns NULL in "Rows" column (rather than "0").
Fixes (last?) potential cause for bug #1772735 "unable to select a specific database"

Thanks to mdaems for the detailed bugreport via pm!
2007-10-16 20:10:31 +00:00
db81b8af50 Save/Restore the DELIMITER list on Registry: must be BEFORE read/write the key Servers. 2007-10-10 18:39:27 +00:00
96002807d8 Save/Restore the DELIMITER list on Registry. 2007-10-10 18:33:51 +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
8002d0bd46 Minor GUI fix: Scroll and repaint SQL Log AFTER adjusting line numbers. 2007-10-08 22:07:21 +00:00
4232f36909 * Remove spam.
* Improve performance by not painting the progress form if a query completes within 300 msecs.
2007-10-08 21:52:59 +00:00
74074fe633 Bugfix: There is no thread safety mechanism in Zeos for the SQL log, so implement one in HeidiSQL. This should speed up async queries tremendously, as they no longer have to wait for the GUI to repaint before firing the actual query. Haven't bothered thinking about thread safety around the creation of the critical section protecting the TStringList, mainly because I'm infinitely annoyed by Delphi not providing a thread-safe list capable of holding lists OOTB.. 2007-10-08 21:29:16 +00:00
3c5d236555 Bugfix: Don't try to access element -1 of a collection.
Please enable DEBUGGING in your builds so you can catch these sort of things before release time.
2007-10-08 16:56:43 +00:00
fce4a738f8 Fix minor bug: LogSQL always containted one more line than the value in the preferences screen said. Fix that by moving the code for deleting the first line to after adding the new one. 2007-10-07 20:18:43 +00:00
970272ad65 Give popupSQLLog 2 new items:
- "Log to file" (checkable, (de)activates file logging)
- "Open log folder" (opens the folder with logfiles)
2007-10-07 19:48:37 +00:00
f9be3e3a83 - Revert rev 950, re-adding SynMemoSQLLog.Gutter = visible.
- Show line numbers as they can be quite useful
- Increase starting number when the first line gets deleted from the log, so the line numbers don't lie about the real number of loglines.
2007-10-06 18:16:08 +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
531a32e69a Refresh active DB's tablelist in dbtree after renaming a table from within ListTables. 2007-10-06 06:01:55 +00:00
4286244eda Add meaningful messages to the SQL log when a delimiter is selected or declined. 2007-10-06 00:08:19 +00:00
55ef55d546 Enable displaying tooltips for shortened celltext in VirtualTrees like the old TListView did by default. 2007-10-05 23:41:25 +00:00
cae34f1a6c Write date + time to logfiles to enable more debugging on the users side. 2007-10-05 22:04:08 +00:00
c4665784c2 - Give SynMemoFilter his own popupFilter instead of using popupQuery twice. Fixes broken F9 shortcut from rev 975 in both SynMemoQuery and SynMemoFilter after switching between them.
- Rename toolbutton and menuitem "Set filter" to "Apply filter"
2007-10-05 21:54:30 +00:00
d33be19be0 Nuke ExpectResultSet. Opted not to disable the mysql driver exceptions in zeos, instead used Anse's TZConnection.GetAffectedRowsFromLastPost().
(Messing with the internals here, please test...)
2007-10-05 18:52:38 +00:00
ed54bb2be6 Changes based on delimiter review:
* DELIMITER is not a SQL reserved word interpreted in any way by mysqld.
 * ComboBoxQueryDelimiterExit was not attached to ComboBoxQueryDelimiter's exit event.
 * Fork out IsValidDelimiter to avoid code duplication.
 * Simplify delimiter handling:
   - Shortcut on whitespace in start of SQL sentences, trims it off by skipping it.
   - Remove start_of_command_pos variable in SQL parser, with the above change 'start' is interchangeable.
   - Remove comment stating that a delimiter could be part of the SQL command currently being parsed (it can't).
   - Disallow DELIMITER inside conditional comment.
   - Remove region without matching end-region (?).
   - Disallow DELIMITER DELIMITER, it makes for simpler code.

Plus minor optimizations:
 * Fast continue at end of one-line comments.
 * Test for most-likely-to-fail conditions first in some of the "if"'s.
 * Avoid calling (?) Length() for each invocation of the loop.
2007-10-04 17:07:27 +00:00
547b6161fa Fullfill feature request #1751455 "SQL log also in text-file".
- File logging can be activated in preferences dialog, by default of course NOT active.
- One file per session is written to [Documents and settings]\[username]\Application data\HeidiSQL\Sessionlogs\
- Filename pattern: "[session name] [zeropadded session nr].log"
- Fetch more descriptive CSIDL_* constants for system folders from ShlObj unit rather than hardcoded hex values
2007-10-03 12:35:32 +00:00
7581a86986 Slightly optimize LogSQL, avoid a workaround using bookmarks. 2007-10-02 22:57:09 +00:00
7ad12eb55c Fix bug #1805416 "quick filter on enum checkbox" 2007-10-02 22:19:04 +00:00