[utf8vcl-cvs] utf8vcl TestForm.dfm, 1.11, 1.12 TestForm.pas, 1.16, 1.17 UTF8VCLMessages.pas, 1.19,
Status: Alpha
Brought to you by:
bluelive
From: Robert M. <mar...@us...> - 2007-03-18 11:49:23
|
Update of /cvsroot/utf8vcl/utf8vcl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2263 Modified Files: TestForm.dfm TestForm.pas UTF8VCLMessages.pas UTF8VCLUtils.pas Log Message: some fiddling with the sources, added more test components, TPanel buggy Index: TestForm.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.pas,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TestForm.pas 16 Mar 2007 23:39:11 -0000 1.16 --- TestForm.pas 18 Mar 2007 07:56:10 -0000 1.17 *************** *** 11,15 **** uses Windows, SysUtils, Classes, Controls, Forms, ! Dialogs, ComCtrls, StdCtrls, Menus, Grids; type --- 11,15 ---- uses Windows, SysUtils, Classes, Controls, Forms, ! Dialogs, ComCtrls, StdCtrls, Menus, Grids, ValEdit, Buttons, ExtCtrls; type *************** *** 35,38 **** --- 35,43 ---- Deactivate: TButton; Button4: TButton; + BitBtn1: TBitBtn; + SpeedButton1: TSpeedButton; + StaticText1: TStaticText; + ValueListEditor1: TValueListEditor; + Panel1: TPanel; procedure Button2Click(Sender: TObject); procedure Button3Click(Sender: TObject); *************** *** 118,121 **** --- 123,142 ---- CheckTranslation(ListView1.Name, ListView1.Items[0].SubItems[0]); ListView1.Items[1].SubItems[0] := TestText; + BitBtn1.Caption := TestText; + CheckTranslation(BitBtn1.Name, BitBtn1.Caption); + SpeedButton1.Caption := TestText; + CheckTranslation(SpeedButton1.Name, SpeedButton1.Caption); + StaticText1.Caption := TestText; + CheckTranslation(StaticText1.Name, StaticText1.Caption); + Panel1.Caption := TestText; + CheckTranslation(StaticText1.Name, Panel1.Caption); + ValueListEditor1.TitleCaptions[0] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.TitleCaptions[0]); + ValueListEditor1.TitleCaptions[1] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.TitleCaptions[1]); + ValueListEditor1.Keys[1] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.Keys[1]); + ValueListEditor1.Values[TestText] := TestText; + CheckTranslation(ValueListEditor1.Name, ValueListEditor1.Values[TestText]); end; Index: UTF8VCLUtils.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLUtils.pas,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** UTF8VCLUtils.pas 17 Mar 2007 21:48:28 -0000 1.11 --- UTF8VCLUtils.pas 18 Mar 2007 07:56:10 -0000 1.12 *************** *** 242,248 **** if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(WideChar) * (LenOut + 2)); Result[LenOut] := #0; - Result[LenOut + 1] := #0; if MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, Result, LenOut + 1) = 0 then RaiseLastOSError; --- 242,247 ---- if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(WideChar) * (LenOut + 1)); Result[LenOut] := #0; if MultiByteToWideChar(CP_UTF8, 0, lpUTF8, LenIn, Result, LenOut + 1) = 0 then RaiseLastOSError; *************** *** 281,285 **** if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(Utf8Byte) * (LenOut + 2)); Result[LenOut] := #0; if WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, Result, LenOut, nil, nil) = 0 then --- 280,284 ---- if LenOut = 0 then RaiseLastOSError; ! GetMem(Result, SizeOf(Utf8Byte) * (LenOut + 1)); Result[LenOut] := #0; if WideCharToMultiByte(CP_UTF8, 0, lpWide, LenIn, Result, LenOut, nil, nil) = 0 then Index: TestForm.dfm =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/TestForm.dfm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** TestForm.dfm 16 Mar 2007 23:39:11 -0000 1.11 --- TestForm.dfm 18 Mar 2007 07:56:10 -0000 1.12 *************** *** 25,28 **** --- 25,35 ---- Caption = 'Label1' end + object SpeedButton1: TSpeedButton + Left = 96 + Top = 184 + Width = 81 + Height = 22 + Caption = 'SpeedButton1' + end object Edit1: TEdit Left = 7 *************** *** 188,191 **** --- 195,235 ---- OnClick = Button4Click end + object BitBtn1: TBitBtn + Left = 8 + Top = 184 + Width = 75 + Height = 25 + Caption = 'BitBtn1' + TabOrder = 16 + end + object StaticText1: TStaticText + Left = 200 + Top = 184 + Width = 58 + Height = 18 + Caption = 'StaticText1' + TabOrder = 17 + end + object ValueListEditor1: TValueListEditor + Left = 8 + Top = 216 + Width = 273 + Height = 49 + DisplayOptions = [doColumnTitles, doAutoColResize] + Strings.Strings = ( + 'KeyItem=ValueItem') + TabOrder = 18 + ColWidths = ( + 133 + 134) + end + object Panel1: TPanel + Left = 288 + Top = 240 + Width = 121 + Height = 41 + Caption = 'Panel1' + TabOrder = 19 + end object MainMenu1: TMainMenu Left = 104 Index: UTF8VCLMessages.pas =================================================================== RCS file: /cvsroot/utf8vcl/utf8vcl/UTF8VCLMessages.pas,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** UTF8VCLMessages.pas 17 Mar 2007 21:48:28 -0000 1.19 --- UTF8VCLMessages.pas 18 Mar 2007 07:56:10 -0000 1.20 *************** *** 12,16 **** uses ! Messages, Windows, UTF8VCLUtils; procedure MessageW2UBefore(hWnd: HWND; Msg: UINT; InWParam: WPARAM; InLParam: LPARAM; --- 12,16 ---- uses ! Windows, UTF8VCLUtils; procedure MessageW2UBefore(hWnd: HWND; Msg: UINT; InWParam: WPARAM; InLParam: LPARAM; *************** *** 25,28 **** --- 25,31 ---- implementation + uses + Messages, SysUtils; + const UnusedWParam = WPARAM(0); *************** *** 45,49 **** begin Inc(L); // wparam needs space for the trailing zero ! GetMem(Pointer(OutLParam), SizeOf(Utf8Byte) * L) end else --- 48,52 ---- begin Inc(L); // wparam needs space for the trailing zero ! GetMem(Pointer(OutLParam), SizeOf(Utf8Byte) * L); end else *************** *** 92,96 **** EM_LINELENGTH, EM_LINEINDEX, EM_GETSEL, EM_SETSEL: begin - end; else --- 95,98 ---- |