[Initranslator-svncheckins] SF.net SVN: initranslator: [177] translator/trunk/src
Brought to you by:
peter3
|
From: <pe...@us...> - 2006-12-09 17:55:31
|
Revision: 177
http://svn.sourceforge.net/initranslator/?rev=177&view=rev
Author: peter3
Date: 2006-12-09 09:55:30 -0800 (Sat, 09 Dec 2006)
Log Message:
-----------
- New plugin: ToolKeyCheck. Displays access and accelerator keys in the translation
Modified Paths:
--------------
translator/trunk/src/ToolConsistency/ToolConsistencyImpl.pas
Added Paths:
-----------
translator/trunk/src/ToolKeyCheck/
translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dof
translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dpr
translator/trunk/src/ToolKeyCheck/ToolKeyCheck.res
translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.dfm
translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.pas
translator/trunk/src/ToolKeyCheck/ToolKeyCheckImpl.pas
Modified: translator/trunk/src/ToolConsistency/ToolConsistencyImpl.pas
===================================================================
--- translator/trunk/src/ToolConsistency/ToolConsistencyImpl.pas 2006-12-09 14:22:59 UTC (rev 176)
+++ translator/trunk/src/ToolConsistency/ToolConsistencyImpl.pas 2006-12-09 17:55:30 UTC (rev 177)
@@ -154,7 +154,9 @@
Orphans: ITranslationItems;
const SelectedItem: ITranslationItem): Integer;
begin
- Result := TOOL_VISIBLE or TOOL_ENABLED;
+ Result := TOOL_VISIBLE;
+ if Items.Count > 0 then
+ Result := Result or TOOL_ENABLED;
end;
end.
Added: translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dof
===================================================================
--- translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dof (rev 0)
+++ translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dof 2006-12-09 17:55:30 UTC (rev 177)
@@ -0,0 +1,132 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=3
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=1
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=..\..\bin\plugins
+UnitOutputDir=..\..\dcu
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=C:\Program Files\Borland\projects\Private\translator\trunk\bin\translator.exe
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Version Info]
+IncludeVerInfo=1
+AutoIncBuild=1
+MajorVer=1
+MinorVer=9
+Release=0
+Build=22
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=1
+Locale=1053
+CodePage=1252
+[Version Info Keys]
+CompanyName=Peter Th\xF6rnqvist
+FileDescription=Tool Key Check plugin for IniTranslator
+FileVersion=1.9.0.22
+InternalName=ToolKeyCheck.dll
+LegalCopyright=Copyright (c) 2003-2006 by Peter Th\xF6rnqvist; all rights reserved
+LegalTrademarks=
+OriginalFilename=ToolKeyCheck.dll
+ProductName=IniTranslator
+ProductVersion=1.9.0.13
+Comments=Latest version from http://initranslator.sourceforge.net
Added: translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dpr
===================================================================
--- translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dpr (rev 0)
+++ translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dpr 2006-12-09 17:55:30 UTC (rev 177)
@@ -0,0 +1,21 @@
+library ToolKeyCheck;
+
+
+uses
+ SysUtils,
+ Classes,
+ ToolKeyCheckImpl in 'ToolKeyCheckImpl.pas',
+ TransIntf in '..\TransIntf.pas',
+ ToolKeyCheckFrm in 'ToolKeyCheckFrm.pas' {frmToolKeyCheck: TfrmToolKeyCheck},
+ CommonUtils in '..\CommonUtils.pas';
+
+{$R *.res}
+function InstallPlugin(out ToolItems: IToolItems): HResult; stdcall;
+begin
+ ToolItems := TToolKeyCheckPlugins.Create;
+ Result := S_OK;
+end;
+
+exports InstallPlugin name cRegisterTransToolItemsFuncName;
+begin
+end.
Property changes on: translator/trunk/src/ToolKeyCheck/ToolKeyCheck.dpr
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate
LastChangedRevision
LastChangedBy
HeadURL
Id
Added: translator/trunk/src/ToolKeyCheck/ToolKeyCheck.res
===================================================================
(Binary files differ)
Property changes on: translator/trunk/src/ToolKeyCheck/ToolKeyCheck.res
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.dfm
===================================================================
--- translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.dfm (rev 0)
+++ translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.dfm 2006-12-09 17:55:30 UTC (rev 177)
@@ -0,0 +1,396 @@
+object frmToolKeyCheck: TfrmToolKeyCheck
+ Left = 434
+ Top = 211
+ Width = 593
+ Height = 439
+ Caption = 'Accelerator and access key checker'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Shell Dlg 2'
+ Font.Style = []
+ Icon.Data = {
+ 000001000200101010000000000028010000260000002020100000000000E802
+ 00004E0100002800000010000000200000000100040000000000800000000000
+ 0000000000001000000010000000000000000000800000800000008080008000
+ 0000800080008080000080808000C0C0C0000000FF0000FF000000FFFF00FF00
+ 0000FF00FF00FFFF0000FFFFFF000000000000000000078888888888800007FF
+ FFFFFFFF800007FFFFF000FF800007FF0004430F800007FFFF04440F800007FF
+ 0008440F800007FFFFF000FF800007FF000000FF800007FFFFFFFFFF800007FF
+ 000F00FF800007FFFFFFFFFF800007FFFFFFFFFF800007F0F0F0F0F0F000000F
+ 7F7F7F7F00000000000000000000C00700008003000080030000800300008003
+ 0000800300008003000080030000800300008003000080030000800300008003
+ 000080030000C0070000EAAF0000280000002000000040000000010004000000
+ 0000000200000000000000000000100000001000000000000000000080000080
+ 00000080800080000000800080008080000080808000C0C0C0000000FF0000FF
+ 000000FFFF00FF000000FF00FF00FFFF0000FFFFFF0000000000000000000000
+ 00000000000000078888888888888888888880800000007FFFFFFFFFFFFFFFFF
+ FFFFF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007FF000000FFFFF0000
+ 0FFFF8080000007FFFFFFFFFFFF0C22240FFF8080000007FF000000FFF0CCC22
+ 240FF8080000007FFFFFFFFFFF4CCCC2220FF8080000007FFFFFFFFFFF4ACCCC
+ 220FF8080000007FF00000000042ACC2220FF8080000007FFFFFFFFFFF4A27CC
+ 220FF8080000007FF000000000B4ACCC208FF8080000007FFFFFFFFFFFFB4444
+ 00FFF8080000007FF000000000000000000FF8080000007FFFFFFFFFFFFFFFFF
+ FFFFF8080000007FF000000000000000000FF8080000007FFFFFFFFFFFFFFFFF
+ FFFFF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007FF000000FFFFFFFFF
+ FFFFF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007FFFFFFFFFFFFFFFFF
+ FFFFF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007FF000000FFFFFFFFF
+ FFFFF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007FF000000FFFFFFF0F
+ 000FF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007FFFFFFFFFFFFFFFFF
+ FFFFF8080000007FFFFFFFFFFFFFFFFFFFFFF8080000007F0FF0FF0FF0FF0FF0
+ FF0FF7080000007F0FF0FF0FF0FF0FF0FF0FF70800000007F77F77F77F77F77F
+ 77F77F70000000000000000000000000000000000000F000001FE000000FC000
+ 0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C000
+ 0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C000
+ 0007C0000007C0000007C0000007C0000007C0000007C0000007C0000007C000
+ 0007C0000007C0000007C0000007E000000FF24924BF}
+ OldCreateOrder = False
+ OnCreate = TntFormCreate
+ OnDestroy = TntFormDestroy
+ PixelsPerInch = 96
+ TextHeight = 13
+ object TntStatusBar1: TTntStatusBar
+ Left = 0
+ Top = 386
+ Width = 585
+ Height = 19
+ Panels = <
+ item
+ Width = 50
+ end>
+ end
+ object lvItems: TTntListView
+ Left = 0
+ Top = 0
+ Width = 585
+ Height = 343
+ Align = alClient
+ BevelKind = bkFlat
+ BorderStyle = bsNone
+ Columns = <
+ item
+ Caption = 'Original'
+ Width = 150
+ end
+ item
+ Caption = 'Translation'
+ Width = 160
+ end
+ item
+ Caption = 'Accelerator key'
+ Width = 100
+ end
+ item
+ Caption = 'Access key'
+ Width = 100
+ end>
+ GridLines = True
+ HideSelection = False
+ ReadOnly = True
+ RowSelect = True
+ SmallImages = ilSortArrows
+ TabOrder = 1
+ ViewStyle = vsReport
+ OnColumnClick = lvItemsColumnClick
+ OnDblClick = lvItemsDblClick
+ OnEnter = lvItemsEnter
+ OnInsert = lvItemsInsert
+ OnResize = lvItemsResize
+ OnSelectItem = lvItemsSelectItem
+ end
+ object TntPanel1: TTntPanel
+ Left = 0
+ Top = 343
+ Width = 585
+ Height = 43
+ Align = alBottom
+ BevelOuter = bvNone
+ ParentBackground = False
+ TabOrder = 2
+ DesignSize = (
+ 585
+ 43)
+ object chkIgnoreEmpty: TTntCheckBox
+ Left = 18
+ Top = 12
+ Width = 457
+ Height = 17
+ Caption = '&Ignore items without keys'
+ TabOrder = 0
+ OnClick = chkIgnoreEmptyClick
+ end
+ object TntButton1: TTntButton
+ Left = 486
+ Top = 8
+ Width = 75
+ Height = 25
+ Action = acUpdate
+ Anchors = [akTop, akRight]
+ TabOrder = 1
+ end
+ end
+ object ilSortArrows: TImageList
+ Height = 15
+ Width = 15
+ Left = 84
+ Top = 70
+ Bitmap = {
+ 494C01010600090004000F000F00FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
+ 00000000000036000000280000003C0000001E0000000100200000000000201C
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000A19D
+ 9D00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000A19D9D00FFFFFF00000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000A19D9D00A19D9D00C0C0C000C0C0C000C0C0
+ C000C0C0C000FFFFFF00FFFFFF00000000000000000000000000000000000000
+ 000000000000000000000000000000000000A19D9D00A19D9D00FFFFFF00FFFF
+ FF00000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000A19D9D00C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000A19D9D00C0C0C000C0C0C000FFFFFF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000A19D9D00A19D9D00C0C0C000C0C0
+ C000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000A19D9D00A19D9D00C0C0C000C0C0C000FFFF
+ FF00FFFFFF000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000A19D9D00C0C0C000C0C0C000FFFFFF0000000000000000000000
+ 000000000000000000000000000000000000000000000000000000000000A19D
+ 9D00C0C0C000C0C0C000C0C0C000C0C0C000FFFFFF0000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000000000000000000000000000A19D9D00A19D9D00FFFF
+ FF00FFFFFF000000000000000000000000000000000000000000000000000000
+ 00000000000000000000A19D9D00A19D9D00C0C0C000C0C0C000C0C0C000C0C0
+ C000FFFFFF00FFFFFF0000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 00000000000000000000A19D9D00FFFFFF000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000A19D9D00A19D
+ 9D00A19D9D00A19D9D00A19D9D00A19D9D00A19D9D00A19D9D00000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000028002800280028002800
+ 2800280028002800280000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000280028000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000002800280084860000848600008486000028002800000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000002800280097712800280028000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000800000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000028002800848600008486
+ 0000848600002800280000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000002800280097712800848600009771
+ 2800280028000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000008000000080000000800000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000800000008000000080000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000002800280084860000848600008486000028002800000000000000
+ 0000000000000000000000000000000000000000000000000000000000002800
+ 2800977128008486000084860000848600009771280028002800000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000800000008000000080000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000800000008000
+ 0000800000008000000080000000000000000000000000000000000000000000
+ 0000000000000000000028002800280028002800280028002800848600008486
+ 0000848600002800280028002800280028002800280000000000000000000000
+ 0000000000000000000028002800977128008486000084860000848600008486
+ 0000848600009771280028002800000000000000000000000000000000000000
+ 0000000000008000000080000000800000008000000080000000800000008000
+ 0000800000008000000000000000000000000000000000000000000000000000
+ 0000000000008000000080000000800000008000000080000000800000008000
+ 0000000000000000000000000000000000000000000000000000000000002800
+ 2800977128008486000084860000848600008486000084860000977128002800
+ 2800000000000000000000000000000000000000000028002800280028002800
+ 2800280028008486000084860000848600002800280028002800280028002800
+ 2800000000000000000000000000000000000000000000000000800000008000
+ 0000800000008000000080000000800000008000000000000000000000000000
+ 0000000000000000000000000000000000008000000080000000800000008000
+ 0000800000008000000080000000800000008000000000000000000000000000
+ 0000000000000000000000000000000000002800280097712800848600008486
+ 0000848600009771280028002800000000000000000000000000000000000000
+ 0000000000000000000000000000000000002800280084860000848600008486
+ 0000280028000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000800000008000000080000000800000008000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000800000008000000080000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000002800280097712800848600009771280028002800000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000280028008486000084860000848600002800280000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000800000008000000080000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000008000
+ 0000800000008000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000280028009771
+ 2800280028000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000002800280084860000848600008486
+ 0000280028000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000080000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000280028000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000280028002800280028002800280028002800280000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 0000000000000000000000000000000000000000000000000000000000000000
+ 000000000000000000000000000000000000424D3E000000000000003E000000
+ 280000003C0000001E0000000100010000000000F00000000000000000000000
+ 000000000000000000000000FFFFFF00FFFFFFFC00000000FFFFFFFC00000000
+ FFFFFFFC00000000FFFFFFFC00000000E01FF9FC00000000E01FF0FC00000000
+ F03FF0FC00000000F03FE07C00000000F87FE07C00000000F87FC03C00000000
+ FCFFC03C00000000FFFFFFFC00000000FFFFFFFC00000000FFFFFFFC00000000
+ FFFFFFFC00000000FFFFFFFFFFFFFFF0FFFFFFFFFFFFFFF0F83FFDFFFFFFF7F0
+ F83FF8FFE0FFE3F0F83FF07FE0FFC1F0F83FE03E000F80F0C007C01F001F0070
+ E00F800F803E0030F01FF07FC07C0010F83FF07FE0FFC1F0FC7FF07FF1FFC1F0
+ FEFFF07FFBFFFFF0FFFFFFFFFFFFFFF0FFFFFFFFFFFFFFF0FFFFFFFFFFFFFFF0}
+ end
+ object alMain: TTntActionList
+ Left = 126
+ Top = 70
+ object acUpdate: TTntAction
+ Caption = '&Update'
+ ShortCut = 116
+ OnExecute = acUpdateExecute
+ end
+ object acEdit: TTntAction
+ Caption = 'Edit'
+ ShortCut = 113
+ OnExecute = acEditExecute
+ end
+ object acClose: TTntAction
+ Caption = 'Close'
+ ShortCut = 27
+ OnExecute = acCloseExecute
+ end
+ end
+end
Added: translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.pas
===================================================================
--- translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.pas (rev 0)
+++ translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.pas 2006-12-09 17:55:30 UTC (rev 177)
@@ -0,0 +1,301 @@
+unit ToolKeyCheckFrm;
+
+interface
+uses
+ Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
+ Dialogs, TntForms, ComCtrls, TransIntf, TntComCtrls, ImgList, ActnList,
+ TntActnList, StdCtrls, TntStdCtrls, ExtCtrls, TntExtCtrls;
+
+type
+ TListViewInfo = class
+ Column:TListColumn;
+ Descending:boolean;
+ end;
+
+ TfrmToolKeyCheck = class(TTntForm)
+ TntStatusBar1: TTntStatusBar;
+ lvItems: TTntListView;
+ ilSortArrows: TImageList;
+ TntPanel1: TTntPanel;
+ chkIgnoreEmpty: TTntCheckBox;
+ TntButton1: TTntButton;
+ alMain: TTntActionList;
+ acUpdate: TTntAction;
+ acEdit: TTntAction;
+ acClose: TTntAction;
+ procedure lvItemsResize(Sender: TObject);
+ procedure lvItemsEnter(Sender: TObject);
+ procedure lvItemsColumnClick(Sender: TObject; Column: TListColumn);
+ procedure TntFormCreate(Sender: TObject);
+ procedure TntFormDestroy(Sender: TObject);
+ procedure lvItemsDblClick(Sender: TObject);
+ procedure lvItemsSelectItem(Sender: TObject; Item: TListItem;
+ Selected: Boolean);
+ procedure lvItemsInsert(Sender: TObject; Item: TListItem);
+ procedure acCloseExecute(Sender: TObject);
+ procedure acUpdateExecute(Sender: TObject);
+ procedure chkIgnoreEmptyClick(Sender: TObject);
+ procedure acEditExecute(Sender: TObject);
+ private
+ { Private declarations }
+ FAppServices:IApplicationServices;
+ FListViewInfo:TListViewInfo;
+ FItems: ITranslationItems;
+ procedure LoadItems;
+ procedure LoadSettings;
+ procedure SaveSettings;
+ public
+ { Public declarations }
+ class function Edit(const ApplicationServices:IApplicationServices; const Items: ITranslationItems): boolean;
+ end;
+
+implementation
+
+uses
+ CommonUtils, TntWindows, TntMenus, Math;
+
+{$R *.DFM}
+const
+ cUpArrow = 4;
+ cDnArrow = 5;
+
+{ TfrmToolKeyCheck }
+
+class function TfrmToolKeyCheck.Edit(const ApplicationServices:IApplicationServices; const Items: ITranslationItems): boolean;
+var
+ frm: TfrmToolKeyCheck;
+ FAppHandle:Cardinal;
+begin
+ FAppHandle := Application.Handle;
+ Application.Handle := ApplicationServices.AppHandle;
+ frm := self.Create(Application);
+ try
+ frm.FItems := Items;
+ frm.FAppServices := ApplicationServices;
+ frm.LoadSettings;
+ frm.acUpdate.Execute;
+ frm.ShowModal;
+ frm.SaveSettings;
+ Result := true;
+ finally
+ frm.Free;
+ Application.Handle := FAppHandle;
+ end;
+end;
+
+procedure TfrmToolKeyCheck.LoadItems;
+var
+ i: integer;
+ li: TTntListItem;
+ aAccess, aAccel:WideString;
+
+ function GetAccelerator(const S: WideString): WideString;
+ begin
+ Result := WideGetHotkey(S);
+ end;
+
+ function GetAccessKey(const S: WideString): WideString;
+ var
+ i: integer;
+ aShortCut: TShortCut;
+ tmp :WideString;
+ begin
+ Result := '';
+ // sanity check
+ if Pos(WideString('Ctrl'),S) +
+ Pos(WideString('Shift'),S) + Pos(WideString('Alt'),S) +
+ Pos(WideString('\t'),S) + Pos(WideString(#9),S) <= 0 then
+ Exit;
+
+ // trim off as much as possible
+ tmp := S;
+ i := Pos(WideChar(' '), tmp);
+ while i > 0 do
+ begin
+ tmp := Copy(tmp, i + 1, MaxInt);
+ i := Pos(WideChar(' '), tmp);
+ end;
+ i := Pos(WideString('\t'), tmp);
+ while i > 0 do
+ begin
+ tmp := Copy(tmp, i + 1, MaxInt);
+ i := Pos(WideString('\t'), tmp);
+ end;
+
+ i := Pos(WideChar(#9), tmp);
+ while i > 0 do
+ begin
+ tmp := Copy(tmp, i + 1, MaxInt);
+ i := Pos(WideChar(#9), tmp);
+ end;
+
+ // brute force (slow!)
+ for i := 1 to Length(tmp) - 1 do // need at least 2 characters
+ begin
+ aShortCut := WideTextToShortCut(Copy(tmp, i, MaxInt));
+ if aShortCut <> 0 then
+ begin
+ Result := WideShortCutToText(aShortCut);
+ Exit;
+ end;
+ end;
+ Result := '';
+ end;
+begin
+ WaitCursor;
+ if FItems = nil then Exit;
+ lvItems.Items.BeginUpdate;
+ try
+ lvItems.Items.Clear;
+ for i := 0 to FItems.Count - 1 do
+ begin
+ aAccess := GetAccessKey(FItems[i].Translation);
+ aAccel := GetAccelerator(FItems[i].Translation);
+ if not chkIgnoreEmpty.Checked or (aAccel <> '') or (aAccess <> '') then
+ begin
+ li := lvItems.Items.Add;
+ li.Caption := FItems[i].Original;
+ li.SubItems.Add(FItems[i].Translation);
+ li.SubItems.Add(aAccel);
+ li.SubItems.Add(aAccess);
+ li.Data := Pointer(FItems[i]);
+ end;
+ end;
+ FListViewInfo.Column := nil;
+ lvItemsColumnClick(lvItems, lvItems.Columns[2]);
+ finally
+ lvItems.Items.EndUpdate;
+ end;
+end;
+
+procedure TfrmToolKeyCheck.lvItemsResize(Sender: TObject);
+var i, W: integer;
+begin
+ W := lvItems.ClientWidth div lvItems.Columns.Count;
+ for i := 0 to lvItems.Columns.Count - 1 do
+ lvItems.Columns[i].Width := W;
+end;
+
+procedure TfrmToolKeyCheck.lvItemsEnter(Sender: TObject);
+begin
+ if (lvItems.Items.Count > 0) and (lvItems.Selected = nil) then
+ begin
+ lvItems.Selected := lvItems.Items[0];
+ lvItems.Selected.Focused := true;
+ end;
+end;
+
+
+function ListViewSort(lParam1, lParam2, lParamSort: Integer): Integer; stdcall;
+var
+ Item1:TTntListItem absolute lParam1;
+ Item2:TTntListItem absolute lParam2;
+ Info:TListVIewInfo absolute lParamSort;
+ S1, S2:WIdeString;
+begin
+ if Info.Column.Index = 0 then
+ begin
+ S1 := Item1.Caption;
+ S2 := Item2.Caption;
+ end
+ else
+ begin
+ S1 := Item1.SubItems[Info.Column.Index - 1];
+ S2 := Item2.SubItems[Info.Column.Index - 1];
+ end;
+ Result := WideCompareText(S1, S2);
+ if Result = 0 then
+ Result := WideCompareStr(S1, S2);
+ if Info.Descending then
+ Result := -Result;
+end;
+
+procedure TfrmToolKeyCheck.lvItemsColumnClick(Sender: TObject;
+ Column: TListColumn);
+var i:integer;
+begin
+ if FListViewInfo.Column = Column then
+ FListViewInfo.Descending := not FListViewInfo.Descending
+ else
+ FListViewInfo.Descending := false;
+ FListViewInfo.Column := Column;
+ lvItems.CustomSort(ListViewSort, integer(FListViewInfo));
+ for i := 0 to lvItems.Columns.Count - 1 do
+ lvItems.Columns[i].ImageIndex := -1;
+ if FListViewInfo.Descending then
+ Column.ImageIndex := cUpArrow
+ else
+ Column.ImageIndex := cDnArrow;
+end;
+
+procedure TfrmToolKeyCheck.TntFormCreate(Sender: TObject);
+begin
+ FListViewInfo := TListViewInfo.Create;
+end;
+
+procedure TfrmToolKeyCheck.TntFormDestroy(Sender: TObject);
+begin
+ FListViewInfo.Free;
+end;
+
+procedure TfrmToolKeyCheck.lvItemsDblClick(Sender: TObject);
+var AItem:ITranslationItem;
+begin
+ if lvItems.Selected <> nil then
+ AItem := ITranslationItem(lvItems.Selected.Data);
+ if AItem <> nil then
+ FAppServices.SelectedItem := AItem;
+end;
+
+procedure TfrmToolKeyCheck.lvItemsSelectItem(Sender: TObject;
+ Item: TListItem; Selected: Boolean);
+var AItem:ITranslationItem;
+begin
+ if Assigned(Item) and Assigned(Item.Data) then
+ begin
+ AItem := ITranslationItem(Item.Data);
+ TntStatusBar1.Panels[0].Text := WideFormat('"%s", "%s", "%s", "%s"',
+ [AItem.Section, AItem.Name, AItem.Original, AItem.Translation]);
+ end
+ else
+ TntStatusBar1.Panels[0].Text := '';
+end;
+
+procedure TfrmToolKeyCheck.lvItemsInsert(Sender: TObject; Item: TListItem);
+begin
+ Item.ImageIndex := -1;
+ Item.StateIndex := -1;
+end;
+
+procedure TfrmToolKeyCheck.acCloseExecute(Sender: TObject);
+begin
+ Close;
+end;
+
+procedure TfrmToolKeyCheck.acUpdateExecute(Sender: TObject);
+begin
+ LoadItems;
+end;
+
+procedure TfrmToolKeyCheck.chkIgnoreEmptyClick(Sender: TObject);
+begin
+ acUpdate.Execute;
+end;
+
+procedure TfrmToolKeyCheck.LoadSettings;
+begin
+// TODO
+end;
+
+procedure TfrmToolKeyCheck.SaveSettings;
+begin
+// TODO
+end;
+
+procedure TfrmToolKeyCheck.acEditExecute(Sender: TObject);
+begin
+//
+end;
+
+end.
+
Property changes on: translator/trunk/src/ToolKeyCheck/ToolKeyCheckFrm.pas
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate
LastChangedRevision
LastChangedBy
HeadURL
Id
Added: translator/trunk/src/ToolKeyCheck/ToolKeyCheckImpl.pas
===================================================================
--- translator/trunk/src/ToolKeyCheck/ToolKeyCheckImpl.pas (rev 0)
+++ translator/trunk/src/ToolKeyCheck/ToolKeyCheckImpl.pas 2006-12-09 17:55:30 UTC (rev 177)
@@ -0,0 +1,96 @@
+unit ToolKeyCheckImpl;
+
+interface
+uses
+ TransIntf;
+
+type
+ TToolKeyCheckPlugins = class(TInterfacedObject, IUnknown, IToolItems)
+ public
+ function Count: Integer; safecall;
+ function ToolItem(Index: Integer; out ToolItem: IToolItem): HRESULT; safecall;
+ end;
+
+ TTToolKeyCheckPlugin = class(TInterfacedObject, IUnknown, IToolItem)
+ private
+ FOldAppHandle:Cardinal;
+ FAppServices:IApplicationServices;
+ public
+ function About: WideString; safecall;
+ function DisplayName: WideString; safecall;
+ function Execute(const Items, Orphans: ITranslationItems; var SelectedItem:ITranslationItem): HRESULT; safecall;
+ function Icon: Cardinal; safecall;
+ procedure Init(const ApplicationServices: IApplicationServices); safecall;
+ function Status(const Items, Orphans: ITranslationItems; const SelectedItem:ITranslationItem): Integer; safecall;
+ destructor Destroy; override;
+ end;
+
+
+implementation
+uses
+ Forms, ToolKeyCheckFrm;
+
+{ TTToolKeyCheckPlugins }
+
+function TToolKeyCheckPlugins.Count: Integer;
+begin
+ Result := 1;
+end;
+
+function TToolKeyCheckPlugins.ToolItem(Index: Integer;
+ out ToolItem: IToolItem): HRESULT;
+begin
+ Result := S_FALSE;
+ if Index = 0 then
+ begin
+ ToolItem := TTToolKeyCheckPlugin.Create;
+ Result := S_OK;
+ end;
+end;
+
+{ TTToolKeyCheckPlugin }
+
+function TTToolKeyCheckPlugin.About: WideString;
+begin
+ Result := 'Key Check plugin for IniTranslator';
+end;
+
+destructor TTToolKeyCheckPlugin.Destroy;
+begin
+ Application.Handle := FOldAppHandle;
+ inherited;
+end;
+
+function TTToolKeyCheckPlugin.DisplayName: WideString;
+begin
+ Result := '&Check accelerator and access keys...';
+end;
+
+function TTToolKeyCheckPlugin.Execute(const Items, Orphans: ITranslationItems; var SelectedItem: ITranslationItem): HRESULT;
+begin
+ TfrmToolKeyCheck.Edit(FAppServices, Items);
+ Result := S_OK;
+end;
+
+function TTToolKeyCheckPlugin.Icon: Cardinal;
+begin
+ Result := 0;
+end;
+
+procedure TTToolKeyCheckPlugin.Init(const ApplicationServices: IApplicationServices);
+begin
+ FOldAppHandle := Application.Handle;
+ Application.Handle := ApplicationServices.AppHandle;
+ FAppServices := ApplicationServices;
+end;
+
+function TTToolKeyCheckPlugin.Status(const Items,
+ Orphans: ITranslationItems;
+ const SelectedItem: ITranslationItem): Integer;
+begin
+ Result := TOOL_VISIBLE;
+ if Items.Count > 0 then
+ Result := Result or TOOL_ENABLED;
+end;
+
+end.
Property changes on: translator/trunk/src/ToolKeyCheck/ToolKeyCheckImpl.pas
___________________________________________________________________
Name: svn:keywords
+ LastChangedDate
LastChangedRevision
LastChangedBy
HeadURL
Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|