28 Commits

Author SHA1 Message Date
f96288fce9 Translate string variables and literals in .pas files. TODO: translate constants. 2012-11-26 05:44:01 +00:00
ca1d94c87b Issue #557: Include gnugettext.pas from https://dxgettext.svn.sourceforge.net/svnroot/dxgettext/trunk/dxgettext/sample/ . And add basic code to all FormCreate events to translate their components in the future. 2012-11-10 14:28:44 +00:00
f84f6e78a3 Don't catch too many types of exceptions, only file stream related ones, in a loop with much code which was never meant to be handled by a try/except block. 2012-03-08 20:14:59 +00:00
bc599ba495 Free sql batch object after the while loop (not within). Fixes issue #2762. 2012-03-08 20:12:36 +00:00
4de1b3012d Move code from GetSQLSplitMarkers and SplitSQL into TSQLBatch class. Enables me to access details like string size of batch. Preparation for query history. 2012-03-06 21:52:57 +00:00
2d548b5ef6 Introduce some wrapper functions for message and error dialogs in order to have less code and to avoid hidden titles on Windows XP. Fixes issue #2425. 2011-05-27 04:48:21 +00:00
478c0306c7 Use modern TaskMessageDlg as a replacement for MessageDlg where appropriate. 2011-05-26 06:08:19 +00:00
2e44387eb2 Remove seconds from uptime and connected time in status bar. Should fix flickering finally. See http://www.heidisql.com/forum.php?t=7977 2011-04-06 19:59:36 +00:00
0fa6c15c9d Implement multiple connections per window. DBtree and friends now have their nodes bound to TDBObject instances. Fixes issue #2144. 2010-10-05 23:06:29 +00:00
47afa8dfe7 Add "Clear file list" to query load menu. Fixes issue #2082. 2010-07-13 14:54:45 +00:00
49d0bb3193 Remove Mince() function to shorten a file path - setting a label's EllipsisPosition to epPathEllipsis does the same. 2010-07-02 23:26:47 +00:00
d436df314a Use TOpenTextFileDialog instead of TOpenDialog for two places where we load SQL and text cell contents. That dialog has an additional "Encoding" dropdown, where the user can select the file's encoding, which can be required if the auto detection did not succeed. Fixes issue #2025. 2010-06-20 10:05:37 +00:00
e38db938b7 Rewrite parseSQL routine into two new ones: GetSQLSplitMarkers() and SplitSQL(). Also, use these to turn "Run current line" query action into "Run current query". Fixes issue #821. 2010-05-20 18:30:55 +00:00
9acec6dfe1 Code cosmetic: Remove last XYZWindow() function 2010-03-25 21:42:18 +00:00
9080ad7607 No need to use the Wide* version of string functions any longer. 2010-01-15 20:28:48 +00:00
52ea8f410a Use Unicode enabled TStringList instead of TWideStringList in all places. Should have no visible effect, apart from a very minor performance optimization, as String reference pointers are handled by Delphi, WideString by Windows. 2010-01-14 19:41:58 +00:00
a4652d39a4 * Fix compiler warnings due to implicit AnsiString to (Unicode)String or vice versa
* Remove workaround for Unicode text to and from clipboard
* Fix writing/reading wrong encoded text into/from registry - no need to use Utf8Encode() any longer
* Implement TMySQLQuery.ColAsAnsi() for cases in which we read binary data.
2010-01-07 00:00:56 +00:00
7d401ffde8 Upgrade to Delphi 2010:
* Removes TNT Unicode controls, which are no longer required. All VCL controls now have native Unicode support.
* Remove Delphi 11 packages, otherwise we would either need to keep TNT or break Unicode
* PngComponents update from Uwe Raabe on http://cc.embarcadero.com/Item/26127
* Adjust auto build process
* Since Delphi 2009, Strings are now UnicodeStrings, not AnsiStrings any longer. Fix a bunch of compiler errors which came along with this change.
TODO: Project should compile but give tons of compiler warnings.
2010-01-05 23:14:33 +00:00
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
12a8e2ebc5 Implement a more lightweight connection layer, consisting of 2 units in source directory. Breaks threading and window to window communication, which should be reimplemented later. 2009-10-28 00:08:49 +00:00
f1b3f5501f Remove last traces of MDI (issue #513). Merges code, controls and events from childwin into main. 2009-01-01 23:24:36 +00:00
9e235926b2 Bugfix: Read 5M instead of 50 bytes per loop while an SQL file loads and gets executed. 50 bytes per round take way too many loops, time and CPU. 2008-10-03 10:10:24 +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
815aaaf3e7 Fix remembering delimiter string after detecting one with parsesql() 2008-07-07 05:38:37 +00:00
7908f769e0 Accidently forgotten file in r1558 2008-07-02 22:41:10 +00:00
8b898a4a71 Make runsqlfile dialog unicode safe. 2008-06-19 20:01:42 +00:00
c15dcc0c3a Convert callers of parsesql to make the code compile. Note the TSynWideStringList nastiness in childwin, is there a proper way of doing this in Delphi? 2008-06-17 11:57:46 +00:00
6d8f8e1299 Implement a dialog/mechanism to run a SQL file directly without loading it into the query editor (= memory):
1. When user opens a file which is bigger than LOAD_SIZE (currently 5M), ask what to do
2. User can normally open the file, cancel, or use the new mechanism:
3. Load a chunk of LOAD_SIZE of SQL into memory
4. Split chunk with parseSQL into single queries
5. Run queries and go on with 3.

parseSQL is the bottleneck here, very CPU consuming, as it has to take care of different comment-styles and delimiters. So, the above strategy effected a good compromise regarding overall performance on different tests with worst case SQL files:
- "Wide" table exports with many big sized fields => long lines
- "Narrow" table exports with only one mini-sized field, extended INSERTs => short lines
Especially in the latter case it avoids to cause a hellfire of parseSQL-calls

Still seems to have some memory leaks somewhere.
2007-07-23 20:25:29 +00:00