324 Commits

Author SHA1 Message Date
ae87769f9c Bugfix: switch back to normal cursor after failed database operation.
Issue #180 doesn't seem to reproduce anymore, not here anyway.
2008-08-08 00:08:45 +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
7d168f5526 Now the memo editor has its own unit to live in the editor link should also live there. Moves relevant code from main and rename the object to TMemoEditorLink to be more clear. 2008-08-07 22:39:22 +00:00
1ce34e9f10 Compose a query as a widestring to accommodate table names containing weird characters. 2008-08-07 19:43:33 +00:00
bfbf1ee2f1 Terminology update: a table consists of columns vs rows, and the intersection of a row and a column is called a field.
(Except for Delphi's TField and MySql's FIELD, obviously, which are harder to fix.)
2008-08-07 18:56:06 +00:00
e01567dcb6 Revert r1609. 2008-08-07 18:19:24 +00:00
71860be67c Revert r1611. 2008-08-07 18:17:07 +00:00
b9d4b88b50 Implement a simple memo editor, embedded in the grid and activated when a grid cell goes into edit mode. 2008-08-06 23:48:25 +00:00
0751e46b80 Fix refetching utf8 contents of UPDATEd or INSERTed cells, similar to r1609 2008-08-06 22:32:45 +00:00
b98c532c9e Fix bug #655: Export function failure with datatype double. Also applies for floats in WHERE clauses in grid editing. 2008-08-05 21:22:55 +00:00
1680561311 Fix Utf8 field contents displayed in datagrids and exported to SQL. 2008-08-04 20:48:44 +00:00
fcf70e8666 Fix bug #651: Missing keyboard navigation with new virtualtreeview data editor 2008-08-04 19:02:03 +00:00
cf70d2e4c7 Fix compiler error from r1604 2008-08-03 19:33:07 +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
ef18f802f4 Get rid of superflous panel + nesting of PageControlMain in that (TableShow panel). Looked like some legacy from the old MySQL-Front days. 2008-07-20 16:44:08 +00:00
dbea69431b Enhance filter controls in data tab:
- Drop "Remove filter" action which seems useless when having a "Clear filter" action
- Let the Apply button be triggered with Enter when table wide filter edit is focused
2008-07-17 20:07:13 +00:00
04d314d5ea Autolimit optimizations:
- Do not uncheck the LIMIT checkbox if the value in EditLimitEnd is larger than the total row count. In such (very common) cases it doesn't matter if a LIMIT is applied or not, so we don't annoy the user now by not auto-unchecking it.
- EditLimitEnd's value was never increased, only decreased, as of r1521. This seems more annoying than it helps prioritizing what the user wants.
2008-07-16 23:07:09 +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
19533a23f9 Fix bug #614 window title shows session name, but not session number 2008-07-14 22:43:09 +00:00
118cd13473 Fix bug #616 Pressing shift-del in query editor 2008-07-14 22:05:16 +00:00
fe5479d56f Move filter editor and relevant components to above the datagrid. The filter panel can be manually activated by a third button besides "Columns" and "Sorting": "Filter". Or, if the preference option "Remember filters" is switched on, it is activated each time a filter is loaded from registry, just like before, but without stealing focus from the sql log or editor tab. If RememberFilters is ON, the filter panel is auto shown/hidden as long as it's not manually activated by the above button - in the latter case it stays until it gets manually hidden.
Plus: Removes the load/save filter file buttons as proposed on the mailing list. Seemed totally unneeded and confusing.

I tried to add a new form for this filter stuff, just like the two other buttons do it (Columns, Sorting) but that was of horrible usability as it would have been auto closed as soon as you unfocus it.

TODO:
+ Move LIMIT stuff to a popup, activated by a 4th button above the datagrid.
+ Remove memo/blob editors from the bottom page control, show them inline in the grid or as a new form. The log tab should never get automatically hidden any more then.
2008-07-14 21:18:03 +00:00
62f60653bf Fix bug #611 AV after renaming table + click another table 2008-07-08 22:58:18 +00:00
f0d48c92fa Bugfix: 'Rows' is null while 'avg_row_length' is not for some internal tables on some server versions; fx information_schema.statistics. Caused an exception while browsing those tables. 2008-07-08 14:58:49 +00:00
8ca2138a48 * Remove unused code paths.
* Raise flag when a bug occurs.
2008-07-08 14:56:09 +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
6b942bf1e0 Merge tables display their size as the sum of the underlying unioned tables, which is fine. But this size should not get counted to the overall sum, displayed besides the db nodes in the tree. 2008-07-07 18:24:57 +00:00
815aaaf3e7 Fix remembering delimiter string after detecting one with parsesql() 2008-07-07 05:38:37 +00:00
1d3bfe6219 Fix and simplify delimiter customizing, now that the dropdown was moved to the mainform and didn't fire the OnExit event any longer for some reason. The new mechanism just uses a button (surely including a new icon, sigh...) which asks via InputQuery for the new value. Delimmiter "validation" is only done when setting the value per button, not in parseSql() any longer - avoids being bug-per-bug compatible with MySQL's SQL parser at least in the non interactive mode.
(Hope that code is ok with Franciscos original implementation. At least the old validation IF's are adapted)
2008-07-06 20:22:16 +00:00
6004ebe5b8 Fix toggling enabled state of actExecuteSelection and actExecuteLine actions/buttons 2008-07-06 08:24:49 +00:00
580b5ed258 The option buttons "Stop on errors in batch mode" and "Wrap long lines" should be always enabled even if the query editor is empty. 2008-07-05 20:06:44 +00:00
31460322f5 Fix enabled query toolbar buttons after closing mdi child.
I thought I could replace this weird FrmIsFocused by a "FrmIsFocussed := not (csDestroying in ComponentState)" but this does csDestroying is set later in FormDestroy, not in FormClose.
2008-07-05 10:12:28 +00:00
ab291881e1 Slightly enhance open SQL file mechanism:
- Open the file in "read and leave" mode, don't lock it for write operations. This fixes opening a file which is opened and write locked in another application
- Handle exceptions for ReadTextfile in QueryLoad which was malfunctioning yet, lead to an AV.
- Enhance inline documentation
2008-07-05 10:00:55 +00:00
b335a120ec rfe #607 "Stop toolbar popups" . All toolbars are visible now, regardless of the activated tab. Only relevant buttons are enabled when switching tabs. 2008-07-05 09:16:38 +00:00
ffc58c022b Revert broken r1561. Worse than before - more AVs, even when pressing a speedbutton which has loaded its icon correctly. Weird. 2008-07-02 22:33:05 +00:00
94822c33fa Fix one critical AV, part of bug #580 . Loading a PNGImage from a TPNGImagelist onto a TSpeedbuttons seems buggy. Instead, assign icons at designtime. Ugly fix as we now have redundant icons, anyway, we should look after not using TPNGSpeedbutton in too many places. 2008-07-02 22:21:04 +00:00
b145877d95 Finally move ToolbarQuery and relevant code to main unit. 2008-07-02 19:32:27 +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
d571ce83b9 Convert remaining menuitems in database tab to use TActions (add "Alter table" and "Table properties") and prefix various neighbour actions with "act" 2008-06-28 20:16:20 +00:00
a72f5a0e0f Consistently use TActions on ToolbarDatabase.
-> Sanitizes code from various error prone button/menuitem enablings/disablings.
-> Ensure consistent captions + hints for actions which are used in more than one menu/toolbar
Fixes one part of bug #595
2008-06-28 19:15:35 +00:00
3e8080ff48 Move toolbar with field actions from tabTable to main controlbar.
TODO: Find more distinct icons for add|edit|delete field buttons.
2008-06-28 07:01:19 +00:00
7a0c9a6862 Fix bug #299 "Pageup/PageDown in Tree View Looses Focus". Only set focus to the relevant component in the new tab if the tabchange was done by a click on the pagecontrol, not on automatic changes. So the dbtree never looses focus if you navigate there. 2008-06-28 06:09:49 +00:00
a8022acb8b Important toolbars should live on the main controlbar. Move toolbar from database sheet there. Plus:
- Remove redundant buttons on it ("view data" + "table properties")
- Move table related buttons from ToolbarStandard to the new ToolbarDatabase ("delete table" + "create table").
2008-06-26 17:10:31 +00:00
84c3e0d260 Make various clipboard actions Unicode compliant:
- Copy (+ export to file) data as html, xml or csv
- Copy + paste actions in the grids
- Copy memo content
2008-06-26 12:37:34 +00:00
f296b1730c Move heading panels from above grids to tab captions (hostname, database, table) and status bar (uptime, MySQL version). Makes space for coming GUI changes. 2008-06-26 09:49:17 +00:00
71ec2f9f49 Replace DbMemo with TntDbMemo. 2008-06-25 14:29:21 +00:00
f148664018 * Zeos: Make SetFieldData() public to provide a way to poke NULL into a field.
* Heidi: Use above to set field to NULL when requested by user.
2008-06-25 13:47:15 +00:00
ab790b4072 Bring back SynUnicode to the uses clause to fix SynMemoQueryDropFiles . Files dropped were just not loaded with no error. Use namespace/unit prefixing in one place to avoid a compiler error. 2008-06-24 18:43:20 +00:00
3ed9ded4d6 Save unicode instead of ansi in "Save memo to textfile" action 2008-06-24 18:29:34 +00:00
9d13267e41 Bugfix: Make it possible to tell "no default value" apart from "default value is NULL" in the table view. 2008-06-24 11:24:36 +00:00