91 Commits

Author SHA1 Message Date
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
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
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
79d8db08b3 Support Unicode in list of wanted database names. 2008-08-19 21:35:04 +00:00
2d5c69a9cb Buttons/toolbar enhancement:
- Add missing "Cancel editing" button to main toolbar
- Add missing "Post updates" button to popupDataGrid
- Add shortcut "Ctrl+Enter" to "Post updates" action
2008-08-19 17:27:35 +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
4adf27a845 Fix bug #678. Changes FSelectedTableColumns and FSelectedTableKeys to be properties, fetched on demand, set to nil to signalize they're invalid after renaming or deleting a column. 2008-08-13 21:31:15 +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
2bf9736522 Correct a comment. 2008-08-11 20:07:25 +00:00
95b4b2a642 * Make virtual desktop name on application load, resolution change, monitor count change and monitor placement change.
* Store main window placement using above name.
 * Load main window placement using above name.
 * Fixes issue #568.
2008-08-11 19:54:20 +00:00
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
4c4387c155 * Close() yields mrCancel, remove the Close() call. The dialog closes anyway when a button is clicked, now with the correct modal result.
* Return an integer from ConnectionWindow() rather than Booolean, makes the code in caller easier to read.
* Close HeidiSQL if the user chooses not to connect to a server.
2008-08-08 10:17:50 +00:00
df37fb8be0 Terminology and similar updates (followup). 2008-08-08 08:22:42 +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
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
6b17b239ba Give the memo editor its own unit + dfm file. Enables us to use the IDE for designing it. 2008-08-07 20:32:01 +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
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
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
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
2d12725550 Minor comfort enhancement as described in rfe #619: Recall last manually set LIMIT values in top menu on startup. 2008-07-16 21:26:06 +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
db1dae81de Merge old code from IsValidDelimiter into Mainform.SetDelimiter so it creates the same validation error messages as before, also in parsesql() now. Formal adjustment: SetDelimiter raises an exception now for invalid values which has to be caught by parsesql() instead of just displaying a returned message string. 2008-07-08 22:16:04 +00:00
75b7d25bf8 Fix hint for actSetDelimiter for cases in which parsesql() changes the delimiter silently. 2008-07-07 17:09:15 +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
0a3e514983 Add button on query toolbar for executing the current SQL line and find different icons for both "exec selection" and "exec line" actions. 2008-07-06 08:53:38 +00:00
754ccec6a4 Find/create more distinct icons for
- add field
- edit field
- drop field
- create view
- edit view
- stop on errors in batch mode
- wordwrap mode
- various weblinks in help menu
- export/import settings
- maybe more..
2008-07-05 20:04:09 +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
450edab57c Try to fix bug #604, AV when pressing help button 2008-07-02 21:51:11 +00:00
4215631083 Fix bug #603 (Ctrl+A shortcut in query editor). Would have been nice to put this TEditSelectAll action into the "Edit" main menu, as it provides a global shortcut which magically works in all TEdits and other descendants of TCustomEdit. But TEditSelectAll interferes with SynEdit's own shortcut in a way that
a) the action's shortcut has prio over SynMemo's shortcut
b) the "select all" action itself is not functioning for a SynMemo
Not sure where the bug is, either in TEditSelectAll or in TSynMemo.
2008-07-02 21:29:02 +00:00
b145877d95 Finally move ToolbarQuery and relevant code to main unit. 2008-07-02 19:32:27 +00:00
844c87f356 Add buttons to main toolbars to edit selected database and table 2008-07-01 19:07:20 +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
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
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
2be5153edf Convert old style TDBNavigator to standard toolbuttons, use PNG icons for them and keep only needed (not redundant) buttons: first, last, insert, delete, post. Fixes bug #572 which was caused by r1401. 2008-06-23 23:09:20 +00:00
758507d87a Show db navigator as soon as a table was selected, also when tabTable is active. Passing the sender component to viewdata() in all situations so we can check that for first time loading from within the table tab. 2008-06-23 22:31:42 +00:00
1bd1bb8a6e Remove preference option to select whether auto limiting should be applied or not, for the benefit of consistency and usability. See bug #282 which complains about the limit not being remembered. This is still the case for large tables now, but GetCalculatedLimit is more a safety check to avoid huge net loads than it wants to annoy the user. A even better compromise could be not to touch the limit number in the GUI if its value is lower than GetCalculatedLimit. 2008-06-23 20:15:37 +00:00
03ca9c92f4 Kill all users of StrUtils. 2008-06-17 12:44:17 +00:00
2ed4507666 Code cosmetic: Sanitize NODETYPE_BASETABLE constant from superflous "BASE" 2008-06-14 12:48:04 +00:00
41074d211e Convert database tree from TTreeView to TVirtualStringTree.
- Fixes bug #271 "F5 shortcut in database tree not working"
- Fullfills rfe #519 "Highlight selected item in tree view when focus is elsewhere"
- Fixes inconsistent expansion state of nodes after refreshing
- Fixes plus sign staying when a db node with 0 tables was selected
- Slightly enhances painting speed within the dbtree
- Removes temporary storage of a rightclicked node (DBRightClickSelectItem). VirtualTree handles its right clicked selection exactly like the left clicked one, which makes makes coding a bit cleaner as we can always use the selected item instead of hacking with the right and left clicked node. On the other side it removes a quite user friendly feature. Well, we can reimplement this feature later, though it's not user UNfriendly currently.
- Reasonably rename the StringList "OnlyDBs" to "DatabasesWanted" and "OnlyDBs2" to "Databases"
2008-06-13 23:05:51 +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
d4c32d56d7 Implement a completely new user manager (look + feel + logic):
- Accounts and existing privileges are presented in a pulldown which makes it as easy to use as a toy
- Adding privileges calls the new SelectDBO dialog which is basically a tree like childwins dbtree
- Updating accounts canonicalizes various odd/legacy mechanisms in the MySQL user system
- Fullfills feature request #1547437 (btw)
- Wants to be tested heavily on different servers

A result of a team work. 1000 thanks to rosenfield for the admin friendly logic implementation, tons of fixes and usability ideas.
2008-05-08 20:45:51 +00:00
ece84cc5a8 Ensure main window (that means: the upper left corner) is placed inside current monitor resolution, important e.g. after having plugged off a second monitor. This ensures a minimum visible area of 80x80 pixels, giving the user the possibility to manually resize and move the window.
TODO: This only works if AutoReconnect is set to True. Do the same for the connection dialog which is the first window with AutoReconnect = False.
2008-04-05 12:58:57 +00:00
10ea69ab93 Try to fix bug #1931387 "Hangs on large number of tables". Plus: Remove "find" parameter from PopulateTreeTableList procedure as that was used only once and there only to pass SelectedTable. 2008-04-05 11:34:48 +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
f64daf6917 New feature: VIEW editor, can create and edit views. Rather a simple dialog with only the most important options on it. The toolbuttons on mainform are partly moved around, that's the reason for the myriad of changes there. 2008-03-19 21:20:28 +00:00