67 Commits

Author SHA1 Message Date
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
de12c10721 Refactor Maintenance dialog to fullfill reasonable user wishes in bug #1865477 :
- Rename components with reasonable names
- Use caching mechanism from Childwin.FetchDBTableList to fill tables listbox
- Make form resizable, store and restore customized dimensions
- Keep form instance alive and recycle that instance as long as Mainform lives
- Fix confusion with action item (wasn't really used in both menuitems)
- Add documentation
2008-03-18 20:58:03 +00:00
b815b91039 Fix bug #1865477 "Table maintenance does not show any response"
By removing the (superflous) context menu versions of "Optimize", "Check", "Analyze" and "Repair" table.
2008-03-18 19:54:20 +00:00
112ea167a5 Add basic support for views, without changing too much GUI logic:
- Give them their own icon in dbtree and ListTables
- Disable pure table actions (like "Alter table", "Optimize" etc.) in context menus when a view is selected
- Add new column in ListTables: "Type" which is filled either with "Base table" or "View"
- Introduce new property "NodeType" in TVTreeData record, used currently to store NODETYPE_VIEW or NODETYPE_TABLE. This new property is meant to be used for various purposes in other VirtualTrees in the future.
- Introduce Childwin.SelectedTableType, corresponding to Childwin.SelectedTable
- Make DropTable action fit for also dropping views (and surely a list with a mixture of views and tables)
- Don't fetch rowcount from views in DisplayRowCountStats to fix bug #1844952
2008-03-17 20:35:50 +00:00
14b95f62ec Remove redundant and misleading menu items "Limit" and "Edit Memo/Blob" from popupmenu in datagrid 2008-03-15 10:59:41 +00:00
01c6552829 Fix/enhance various icon issues:
- Fix wrong imageindexes in quickfilter menus for clipboard inserting and "Drop filter"
- Assign existing, fitting icons to all other quick filter menu items and "Insert date/time" items.
- Replace icon for "Query" tab by the big blue arrow which is also used for the "Play" button
- Replace icon for "View Data" buttons and "Data" tab with a more simplistic one from the Silk set. This makes the normal "table" icon more distinct as these both looked very similar previously.
- Edit the "Import CSV file" icon: add some lines which can be better associated with a "text file"
- Remove "Reload privileges" button on toolbar and leave it in the tools "flush" menu. Also remove confusing icon for this menu item as that was highly similar to the master refresh symbol.
- Assign a different (hopefully clearer) icon to "Export SQL" action
- Add seperator between database and table toolbuttons
2008-03-15 10:45:00 +00:00
bd597d0c1d Use a PNGImageList and find replacements for nearly all icons in the application.
Sources:
- Mark James' Silk icons
- Everaldo's Crystal icons

Todo: Load icons at runtime
2008-03-04 00:20:38 +00:00
b584aa5ae4 Introduce automatism for calling the updatecheck dialog. User can set the interval how often this is done in preferences dialog (default interval: 3 days, can be completely disabled). The automatic calling of this dialog should not disturb anyone as it's closed immediately if there are no updates available or if a developer version with an unknown revision is used.
Some GUI controls on the dialog had to be moved around as well as some lines of code so everything works well with the automatic dialog closing.
2008-02-19 19:44:33 +00:00
30330bfea0 Minor: Remove unused legacy var 2008-02-12 18:58:54 +00:00
638b69ea85 Add feature 1769207 "Automatic Software Update":
Implements a simple dialog which tells the user if there is some new release or nightly build available. Parses http://www.heidisql.com/updatecheck.php as a .ini file. Download buttons just start the webbrowser currently.
Todo: Automatic invocation of this dialog at regular intervals (for example once a week)
Todo: Automatic download + update + restart
2008-02-10 23:29:39 +00:00
84dc50b9bd Fix compiler error from rev 1194 2008-02-06 06:51:57 +00:00
4e23728aa2 - Move all hardcoded preferences names (registry) plus their default values to const.inc to fix inconsistencies like the one described here: http://www.heidisql.com/forum/viewtopic.php?p=1739
- Consequently use Mainform.GetRegValue() to read these values, an overloaded method with either Boolean, String or Integer result. These methods keep a global TRegistry object (regMain) open while the application runs, rather than creating a new one for each caller.
- Remove Mainform.SaveRegValue() which was used in one or two callers. Rather use a TRegistry object and do that by hand. There's no significant advantage in using a SaveRegValue method currently.
2008-02-06 00:00:52 +00:00
85faa5ffc3 Implement parser for connection parameters on commandline.
Code snippets by Nemanja, see discussion: http://www.heidisql.com/forum/viewtopic.php?t=252
2007-11-30 21:34:41 +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
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
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
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
29b951b843 * Add svnversion + envpipe + sed as part of build process, as a quick fix to get WC revision numbers into main.pas. 2007-10-09 16:39:57 +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
94f1d6035f Fix compiler error in Delphi 10: Copy CSIDL_* constants from [delphi11]\source\win32\rtl\win\ShlObj.pas to const.inc to make them available also in Delphi 10. 2007-10-04 20:04:58 +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
c6fff14ed0 Refactor DROP TABLE procedure:
- Give the user a prettier confirmation message with listed tables to drop.
- Add documentation
- Drop large WITH .. DO statement
- Correctly call refresh-procedures
2007-09-28 16:43:59 +00:00
d315e45885 Nuke various never called procedures and functions. Just readd them if you want to use them somewhere, especially the helpers-functions. 2007-09-26 23:13:18 +00:00