27 Commits

Author SHA1 Message Date
ff2a5522e7 Fix bug #160 : interface allows selecting autoinc without index or key. Not the neatest solution as the PK checkbox could be unchecked again if AI is unchecked but that didn't seem worth the hacks that would need. The table creation dialog should be reinvented some day. 2008-09-25 23:06:34 +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
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
df37fb8be0 Terminology and similar updates (followup). 2008-08-08 08:22:42 +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
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
1e3102d0b6 Fix warn colors in table name TEdit of CREATE TABLE dialog if table name is empty (2nd report in issue #556) 2008-06-26 05:46:56 +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
e53db0a9b7 PngIcons:
- Ban glyph data of all TSpeedButton's + TBitBtn's out of dfm files by converting them to TPngSpeedButtons and assign an image from PngImageListMain at runtime.
- Add "highlight" versions of "database" and "table" icons and use these on selected DBtree nodes.
- Remove no longer used BMP icons

Todo: Fill PngImageListMain at runtime.
Note 1: TBitBtn's are not Windows-theme-aware, even with a manifest in place, so we should avoid using them anywhere.
Note 2: T(Png)SpeedButton lacks a TabOrder property, so some of the other TabOrder's are automatically changed here.
2008-03-09 19:56:52 +00:00
be733f6821 Fix preselection of context relevant database in pulldown (CreateTable). Was done in two redundant places before and both did it wrong, not taking DBRightClickSelectedItem into account. 2008-01-26 23:16:17 +00:00
a79ac546e5 Fix bug #1856457 "Incorect table creation queries / wrong error handling"
Solution: Just keep CreateTableForm open after firing a faulty CREATE TABLE statement.
Note: The "Create" button has ModalResult := mrOK, so the form is automatically closed in the normal case.
2008-01-11 20:39:23 +00:00
26f5d5ce88 - Get rid of lame helper notinlist(), use TStringList.IndexOf() instead.
- Get rid of TCreateTableForm.ButtonsChange(), merge code into TCreateTableForm.EditFieldnameChange()
2008-01-11 16:10:14 +00:00
5fbee3c690 Make selection of table engine available on pre 4.1 servers. Applies to "Alter table" dialog as well as "Create table".
- Use variables like "have_innodb" for detection of supported engines.
- Move redundant code from two places to Childwin.TableEnginesCombo()
- Remove some legacy code around this logic
- Don't free the instance of CreateTableForm after closing it. Saves some SQL queries from being fired each time the form gets created.
2008-01-11 15:45:21 +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
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
3b1bdbea7d Populate engine dropdown in CREATE TABLE dialog automatically if the server supports SHOW ENGINES. Preselect servers default engine. 2007-09-29 23:47:22 +00:00
cfafa94e68 Fix needed after change in rev 961: createtable-dialog refreshed the cached table dataset twice. Set ActiveDatabase early, so we only need to call MenuRefreshClick instead of RefreshDbTableList + PopulateTreeTableList. 2007-09-28 19:02:06 +00:00
6968817941 Minor enhancements and consistency fixes for CreateDatabase + CreateTable dialogs:
- Fetch charsets from collations dataset rather than firing an extra "SHOW CHARSET"
- Move fetching defaultCharset to existing TRY clause. No functionality change, just more consistent.
- Sort all comboboxes with charsets and collations alphabetically
- Leave the responsibility for disabling the comboboxes on old servers to the code rather than to the DFM file.
- Adapt Enabled-property of TLables to the comboboxes they belong to.
2007-09-25 18:47:34 +00:00
76a37d3552 Implement selection of character set and collation in "create table" dialog. 2007-09-23 12:24:26 +00:00
4449a6c055 * Bugfix: regression from r903: Fix the last couple of cases where ExecUseQuery was being used to no effect.
* Make export table locks local to current connection work.
 * Bugfix: In non-file mode, export commands go directly to server without being parsed; thus they must not have semicolons at end of sentence.  A regression here causes issue #1747558 and issue #1795486, which this commit fixes again.

(Briefly considered adding a cleanSql() which just runs result := parseSql(sql)[0], which would do the same in fewer lines of code, albeit with the small overhead of having the semicolon both added and afterwards removed again..)
2007-09-17 19:10:38 +00:00
5cf0d55e9e Make sure current database in dbtree has a fresh tablelist before selecting a newly created table. 2007-09-14 19:17:47 +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
cc1063b8dd Implement RFE #1685787: create table button in popup menu. 2007-08-21 18:28:53 +00:00
f39222fea5 Refresh table cache when one or more tables got renamed, created, dropped. 2007-07-14 12:59:25 +00:00
7a80a82f11 Move creation of CreateTableForm from application startup to a place where it's done on demand. 2007-07-03 18:25:25 +00:00
3c8f123a81 Move *.pas, *.dfm and *.inc files from root directory to a new "source" subdirectory. Leaving just the readme in the root to give all newbies a very clear and unique starting point. 2007-06-28 20:00:04 +00:00