129 Commits

Author SHA1 Message Date
ac8a9e4473 Add support for moving header columns in all 5 VirtualStringGrids and remembering their position between sessions. 2007-09-29 12:34:01 +00:00
6e9a08c12f Follow up to rev 870 and 958:
Implement an optimized and universal way to safe and restore the column visibibility of ListTables (and all other VirtualStringTrees) by merging that code with the code for the column-resizing feature.
- Drops global var ListTablesColumnNames and proc SetupListTablesHeader.
- Change + move "RestoreColumnWidths" to private "RestoreListSetup", add code from SetupListTablesHeader
- Change + move "SafeColumnWidths" to private "SafeListSetup", add code from MenuTablelistColumnsClick
- Default visible columns are (must be) set at design time now

Pro:
- RestoreListSetup is called once in FormShow, while SetupListTablesHeader was called each time in LoadDatabaseProperties.
- SafeListSetup is only called once in FormClose
- Just safes the column indexes, not the column names in registry. Makes it safe to rename columns in the future
- Less registry read/write access in general.
- Safe/RestoreListSetup open an easy way to implement further list features (column moving, etc.)
- Makes it a cakewalk to implement the same column un/hiding feature for the remaining 4 Lists.
Contra:
- people/developers who used a build from 870 to this one on will see their activated columns in ListTables reset to the default (7 first columns) because the registry key and value has changed. (but: better do that now than after an official relase)
2007-09-28 21:08:37 +00:00
515bee7049 Disable time consuming animation when DBtree items are deleted and restored. 2007-09-28 16:57:47 +00:00
6f114624f4 Ensure PopulateTreeTableList does its job even when it's called with ForceRefresh=False and the node was already filled before. Refreshing the table status dataset again is not wanted when we
1. drop, create or rename table(s)
2. call RefreshDbTableList + LoadDatabaseProperties
3. call PopulateTreeTableList

Pro: Safes an extra and superflous "SHOW TABLE STATUS FROM..." query
Contra: PopulateTreeTableList is called in quite many places and doesn't exit early now
2007-09-28 16:55:45 +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
4f0d2b9403 Spam registry with column widths of all 5 VirtualTrees on FormClose. Restore these values in ReadWindowOptions. Should make users happy which resize columns precisely to fit their needs. 2007-09-26 20:45:10 +00:00
a8809f4975 SQL Process: handling of DELIMITER to mimic mysql CLI 2007-09-25 02:05:38 +00:00
adfac67b1a Nuke now superflous, redundant table features since we have them all gathered in "Advanced properties" dialog:
- Change table engine via popupmenu in ListTables
- Edit comment via same popupmenu + an own dialog

Not keeping the same feature in different corners of the application looks more straight forward. Users will have exactly one point where they can modify all table related properties. Should simplify it in the end, although some users will have to get used to it.
2007-09-24 22:00:43 +00:00
69572e38a7 Create once and then cache tbl_properties_form when it's needed. Avoids querying COLLATIONS and ENGINES each time the form gets displayed. 2007-09-24 20:04:46 +00:00
4b2af25072 Fix bug: MenuChangeTypeClick called MenuRefreshClick, which called RefreshActiveDbTableList + ShowDBProperties, but not LoadDatabaseProperties.
So, after changing the engine of a table the table status dataset was refreshed but never displayed, until having switched to a different db. So, MenuRefreshClick was loading but not displaying the table status.
2007-09-23 22:36:25 +00:00
917ede28d7 Implement new feature: "Alter database", reachable in rightclick menu from within dbtree. Supports renaming a database and changing existing charset + collation. 2007-09-18 22:10:55 +00:00
7c05ba1f75 Recycle CreateDatabase-form after first usage / don't FreeAndNil' it. Avoids 3 SQL-queries for each calling time after the first one. 2007-09-18 16:10:29 +00:00
e1d76db62d Suppress exception message about not finding the ActiveDatabase node in dbtree when
a) option "Remember last used database" is active
b) the last used db was dropped externally or
   the session was just opened with "OnlyDBs" in place and the last db is not contained in this list.
2007-09-17 23:23:29 +00:00
1e08e582e8 Partly fullfill feature wish #1693393 "Selection of charset and engine at creation"
By turning the CREATE DATABASE dialog from an InputQuery into a real form with 2 additional pulldowns:
- character set
- collation

See also: http://www.heidisql.com/forum/viewtopic.php?p=1322#1322
2007-09-17 23:11:39 +00:00
b04631b21e Bugfix: regression from r903: user manager was non-functional. 2007-09-17 16:41:21 +00:00
e6009d6bc2 Follow up to rev 917: Take care of just created databases on servers with lower_case_table_names = 0. Same goes for creating tables. 2007-09-14 19:09:40 +00:00
11e7f9d82d Replace obsolete function "CompareText" by similar working "AnsiCompareText".
See also: http://www.delphibasics.co.uk/RTL.asp?Name=CompareText
2007-09-13 23:17:51 +00:00
c535625db0 Fix errorhandling when creating databases:
- Let ExecUpdateQuery raise the errordialog if creating a database failed. Tells the user the exact reason for why it has failed, not just a vague guess "Maybe that was not a valid name"
- Avoid a superflous exception when creating a database with upper case characters in it and the server lowercases all dbnames silently. Gracefully compare case-insensitive when searching the new created db in dbtree.
2007-09-13 20:30:42 +00:00
cb3aa812b6 Add menuitem "Lookup field datatype in SQL help" to popupDatagrid. Makes help system more visible. 2007-09-12 08:46:39 +00:00
fe93a520e9 Fix CallSQLHelp to use the correct SynMemo when pressing F1 in SQLlog 2007-09-12 08:33:00 +00:00
912c46b20c Add menuitem "Lookup [keyword] in SQL help" to popupQuery. Many users likely don't know that they can press F1 in SynMemoQuery/SynMemoFilter to do the same, so here's the more visible solution. 2007-09-12 08:31:01 +00:00
e5ccc0716f Bugfix: Regression from r903: Selecting a database then expanding it would cause it to be deselected. 2007-09-11 20:47:43 +00:00
b056d43e4b Fix a range error and various other bugs in vstFreeNode(). 2007-09-11 20:40:41 +00:00
7ef5d4c34b Follow-up to r903: A few more optimizations and fixes. Thanks for the review! 2007-09-11 18:50:45 +00:00
0fc363f988 Bugfix: Load database properties (tables) when switching directly to a new table in another database via the tree. 2007-09-11 18:06:57 +00:00
9409c798ab Remove ActualDatabase and ActualTable variables, plus various minor optimizations that ensued from said change. Fixes a problem where when:
- viewing data in a table
 - switching to query tab
 - pressing master refresh
some of the tabs would disappear.
2007-09-11 15:58:47 +00:00
c8da2bf945 Bugfix: Do not reset the enable state to something incorrect of buttons that already has been given correct state. A regression, not sure from which revision. 2007-09-11 09:55:41 +00:00
970d267a23 Implement feature wish #1779324 : Support for field COMMENT in ListColumns and field editor. 2007-09-06 14:39:11 +00:00
6d72ead5dd Refactor logic in preferences dialog:
- Consistency:
  - Move all global preferences vars from mainform to childwin.
  - Get rid of unused legacy vars NativeFieldTypes + LanguageOffset
- Readability:
  - Add documentation
  - Prefix preferences vars with "pref"
  - Get rid of WITH .. DO statements
2007-09-03 15:44:18 +00:00
b3b0225f8b Code clean up in ReadWindowOptions:
- Get rid of confusing WITH .. DO statement
- Make code more compact and readable (reverts parts of the dodgy revision 620)
2007-09-03 14:39:53 +00:00
cfc49dc186 Fix broken rev 878: Restore preference "Remember WHERE filters" on startup was using the registry folder of the session although it's a global preference. 2007-09-03 14:23:56 +00:00
21a7d22af9 TimerProcesslist should not exclusively refresh ListProcesses. Instead it look useful that the other two subtabs ListVariables + ListCommandstats have this auto-refresh feature too. 2007-09-03 09:17:08 +00:00
f279d9cc3f Add support for killing more than one process in one go. 2007-09-02 23:04:42 +00:00
f4ce711c4c Empty table using faster TRUNCATE statement on newer servers. Fullfills feature request #1644143 2007-09-02 22:18:20 +00:00
a140b4d1d6 Fullfill feature request #1724941 Add option "Remember data pane filters across sessions" 2007-09-02 21:54:29 +00:00
544ff577c0 Followup to rev 740: Refresh table cache also after relevant properties of one or more tables got changed by
- TTableComment.ButtonOKClick()
- TMDIChild.EmptyTable()
- TMDIChild.MenuChangeTypeClick()
- TMDIChild.MenuChangeTypeOtherClick()
- TMDIChild.MenuOptimizeClick()
- TMDIChild.MenuRepairClick()
2007-09-02 19:00:28 +00:00
4e9336d10d Minor code simplification: use "continue" instead of large begin/end block 2007-09-02 14:09:20 +00:00
0f361d5af0 Avoid time consuming animation when DBtree items are deleted and restored in databases with many tables. 2007-09-02 10:36:55 +00:00
bab0a38fe4 MakeInt(): Correctly backconvert strings which were previously formatted by FormatByteNumber() . Fixes incorrect sorting of columns in VirtualTrees which contain some byte values. Also enables us to call FormatToByteNumber() in "Size" column of ListTables. 2007-09-02 10:05:09 +00:00
8ab0b95440 Implement a more effective solution for hiding and unhiding columns in ListColumns.
Pros:
- ShowDBProperties doesn't reset column layout
- Sort direction is remembered automatically
- Reading columnlist from registry is done once in a TMDIChild, not on each ShowDBProperties
- Hiding/unhiding columns doesn't call ShowDBProperties
- No more hassling with what is called a "default column" or not. popupDBGrid is usable like in Windows Explorer.
- Column layout is stored global, not per session.
Cons:
- Column layout from old settings logic needed to be discarded

Side effect:
- Fixes a potential AV in FormatNumber(str) with empty strings.
- Created an overloaded FormatByteNumber() which can take a string as input
2007-08-30 23:49:38 +00:00
996de281d7 * Bugfix: Properly propagate exception when editing forbidden (access denied) data in a grid.
* Cosmetic: Fix haywire indentation in TMysqlQueryThread.Execute.
2007-08-29 01:48:28 +00:00
627bd0b51c Bugfix: Switch to database selected in db tree before firing user query. 2007-08-28 23:23:52 +00:00
e77a3ec06d Fix displaying the current database in childwins window caption. 2007-08-28 23:18:25 +00:00
b9d7377b64 Fix firing various queries via GUI or query-editor on the current database after selecting a db which was cached before. 2007-08-28 23:16:23 +00:00
98e2fb7541 Minor fix for sorting columns in list which contain large numbers which exceed Integer (fx "Max_data_length"). 2007-08-28 19:35:06 +00:00
e40df52ead Don't call sorting procedure on right clicking header columns. Some list-headers have a contextmenu which should popup then. 2007-08-28 19:32:01 +00:00
c4f7ada3cb Paint background of sorted columns light grey. Imitates behaviour of the Windows XP Explorer and adds a clear signal to the user that the list is somehow sorted currently. 2007-08-27 20:58:33 +00:00
cc470b33fe Fix previous revision: The compiler complains about declaring properties after functions and procedures. 2007-08-27 18:36:26 +00:00
2977bcb735 Encapsulate detection of data array for a VirtualTree in a new function "GetVTreeDataArray". Should make it easier to read data from these arrays instead of the nodes. 2007-08-27 18:32:08 +00:00
46cad8f9eb The right place to call ValidateControls is in ListTables.OnChange rather than in ListTables.OnClick + popupDbGrid.OnPopup. 2007-08-27 18:10:24 +00:00