mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 16:38:02 +02:00
Components, ActiveX: localized, improved dialog layout and added Russian translation
git-svn-id: trunk@43805 -
This commit is contained in:
parent
0b9e3dcde4
commit
06f699bc2f
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -243,8 +243,11 @@ components/activex/LazActiveX.lpk svneol=native#text/plain
|
||||
components/activex/LazActiveX.pas svneol=native#text/plain
|
||||
components/activex/README.txt svneol=native#text/plain
|
||||
components/activex/activexcontainer.pas svneol=native#text/plain
|
||||
components/activex/activexstrconsts.pas svneol=native#text/pascal
|
||||
components/activex/importtypelib.lfm svneol=native#text/plain
|
||||
components/activex/importtypelib.pas svneol=native#text/plain
|
||||
components/activex/languages/activexstrconsts.po svneol=native#text/plain
|
||||
components/activex/languages/activexstrconsts.ru.po svneol=native#text/plain
|
||||
components/activex/lazactivexreg.pas svneol=native#text/plain
|
||||
components/aggpas/Agg2DDemo.dpr svneol=native#text/plain
|
||||
components/aggpas/FreeMono.ttf -text
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<Package Version="4">
|
||||
<PathDelim Value="\"/>
|
||||
@ -21,7 +21,7 @@
|
||||
<Description Value="Type Library importer and visual ActiveX container"/>
|
||||
<License Value="modified LGPL-2"/>
|
||||
<Version Minor="1"/>
|
||||
<Files Count="4">
|
||||
<Files Count="5">
|
||||
<Item1>
|
||||
<Filename Value="activexcontainer.pas"/>
|
||||
<UnitName Value="activexcontainer"/>
|
||||
@ -40,7 +40,15 @@
|
||||
<Filename Value="importtypelib.pas"/>
|
||||
<UnitName Value="ImportTypelib"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="activexstrconsts.pas"/>
|
||||
<UnitName Value="activexstrconsts"/>
|
||||
</Item5>
|
||||
</Files>
|
||||
<i18n>
|
||||
<EnableI18N Value="True"/>
|
||||
<OutDir Value="languages"/>
|
||||
</i18n>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="1">
|
||||
<Item1>
|
||||
|
@ -7,7 +7,8 @@ unit LazActiveX;
|
||||
interface
|
||||
|
||||
uses
|
||||
activexcontainer, lazactivexreg, ImportTypelib, LazarusPackageIntf;
|
||||
activexcontainer, lazactivexreg, ImportTypelib, activexstrconsts,
|
||||
LazarusPackageIntf;
|
||||
|
||||
implementation
|
||||
|
||||
|
24
components/activex/activexstrconsts.pas
Normal file
24
components/activex/activexstrconsts.pas
Normal file
@ -0,0 +1,24 @@
|
||||
unit activexstrconsts;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
axImportTypeLibrary = 'Import Type Library';
|
||||
axSelectDirectoryToStorePackagePLpk = 'Select directory to store package %sP'
|
||||
+'.lpk';
|
||||
axFileContainingTypeLibrary = 'File containing type library:';
|
||||
axCreateVisualComponentTActiveXContainerDescendant = 'Create visual '
|
||||
+'component (TActiveXContainer descendant)';
|
||||
axCreatePackage = 'Create package';
|
||||
axConvertDependantTypelibs = 'Convert dependant typelibs';
|
||||
axTypeLibraryFilesTlbDllExeOcxOlbTlbDllExeOcxOlbAllF = 'Type library files ('
|
||||
+'*.tlb;*.dll;*.exe;*.ocx;*.olb)|*.tlb;*.dll;*.exe;*.ocx;*.olb|All Files ('
|
||||
+'*.*)|*.*';
|
||||
axImportTypeLibraryMenu = 'Import Type Library ...';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
@ -1,82 +1,114 @@
|
||||
object FrmTL: TFrmTL
|
||||
Left = 251
|
||||
Height = 186
|
||||
Height = 153
|
||||
Top = 189
|
||||
Width = 341
|
||||
AutoSize = True
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Import Type Library'
|
||||
ClientHeight = 186
|
||||
ClientHeight = 153
|
||||
ClientWidth = 341
|
||||
LCLVersion = '1.1'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.3'
|
||||
object FNETL: TFileNameEdit
|
||||
Left = 12
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 21
|
||||
Top = 40
|
||||
Width = 292
|
||||
Top = 19
|
||||
Width = 294
|
||||
DialogOptions = []
|
||||
Filter = 'Type library files (*.tlb;*.dll;*.exe;*.ocx;*.olb)|*.tlb;*.dll;*.exe;*.ocx;*.olb|All Files (*.*)|*.*'
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 0
|
||||
NumGlyphs = 1
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 12
|
||||
Height = 14
|
||||
Top = 16
|
||||
Width = 131
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 13
|
||||
Top = 6
|
||||
Width = 130
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'File containing type library:'
|
||||
ParentColor = False
|
||||
end
|
||||
object CBxTLActiveX: TCheckBox
|
||||
Left = 12
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = FNETL
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Hint = 'CBxTLActiveX'
|
||||
Top = 72
|
||||
Width = 298
|
||||
Top = 46
|
||||
Width = 296
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'Create visual component (TActiveXContainer descendant)'
|
||||
OnChange = CBxTLActiveXChange
|
||||
TabOrder = 1
|
||||
end
|
||||
object CBxTLPackage: TCheckBox
|
||||
Left = 12
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = CBxTLActiveX
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 96
|
||||
Width = 96
|
||||
Top = 69
|
||||
Width = 94
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
Caption = 'Create package'
|
||||
OnChange = CBxTLPackageChange
|
||||
TabOrder = 2
|
||||
end
|
||||
object BtnTLOK: TButton
|
||||
Left = 248
|
||||
Height = 25
|
||||
Top = 152
|
||||
Width = 75
|
||||
Caption = 'OK'
|
||||
ModalResult = 1
|
||||
object CBxTLRecurse: TCheckBox
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = CBxTLPackage
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 92
|
||||
Width = 152
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Right = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'Convert dependant typelibs'
|
||||
TabOrder = 3
|
||||
end
|
||||
object BtnTLCancel: TButton
|
||||
Left = 157
|
||||
Height = 25
|
||||
Top = 152
|
||||
Width = 75
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
object ButtonPanel: TButtonPanel
|
||||
AnchorSideTop.Control = CBxTLRecurse
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 32
|
||||
Top = 115
|
||||
Width = 329
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
TabOrder = 4
|
||||
end
|
||||
object CBxTLRecurse: TCheckBox
|
||||
Left = 12
|
||||
Height = 17
|
||||
Top = 120
|
||||
Width = 154
|
||||
Caption = 'Convert dependant typelibs'
|
||||
TabOrder = 5
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
end
|
||||
object SelectDirectoryDialog1: TSelectDirectoryDialog
|
||||
left = 220
|
||||
top = 8
|
||||
left = 240
|
||||
end
|
||||
end
|
||||
|
@ -7,15 +7,15 @@ interface
|
||||
{$ifndef wince}
|
||||
uses
|
||||
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, EditBtn,
|
||||
StdCtrls,lazideintf,projectintf,PackageIntf;
|
||||
StdCtrls, ButtonPanel, lazideintf, projectintf, PackageIntf, activexstrconsts,
|
||||
LazUTF8;
|
||||
|
||||
type
|
||||
|
||||
{ TFrmTL }
|
||||
|
||||
TFrmTL = class(TForm)
|
||||
BtnTLOK: TButton;
|
||||
BtnTLCancel: TButton;
|
||||
ButtonPanel: TButtonPanel;
|
||||
CBxTLActiveX: TCheckBox;
|
||||
CBxTLPackage: TCheckBox;
|
||||
CBxTLRecurse: TCheckBox;
|
||||
@ -24,6 +24,7 @@ type
|
||||
SelectDirectoryDialog1: TSelectDirectoryDialog;
|
||||
procedure CBxTLActiveXChange(Sender: TObject);
|
||||
procedure CBxTLPackageChange(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
@ -39,6 +40,7 @@ procedure ImpTypeLib(Sender: TObject);
|
||||
implementation
|
||||
|
||||
{$ifndef wince}
|
||||
|
||||
uses typelib;
|
||||
|
||||
procedure ImpTypeLib(Sender: TObject);
|
||||
@ -74,7 +76,7 @@ begin
|
||||
begin
|
||||
with FrmTL.SelectDirectoryDialog1 do
|
||||
begin
|
||||
Title:='Select directory to store package '+sUnitName+'P.lpk';
|
||||
Title:=Format(axSelectDirectoryToStorePackagePLpk, [sUnitName]);
|
||||
Execute;
|
||||
sDir:=Filename;
|
||||
end;
|
||||
@ -113,7 +115,7 @@ begin
|
||||
if slTypelibs.IndexOf(TLI.Dependencies[j])=-1 then
|
||||
slTypelibs.Add(TLI.Dependencies[j]);
|
||||
except
|
||||
on E: Exception do ShowMessage(E.Message)
|
||||
on E: Exception do ShowMessage(UTF16ToUTF8(E.Message));
|
||||
end;
|
||||
finally
|
||||
TLI.destroy;
|
||||
@ -140,6 +142,16 @@ begin
|
||||
CBxTLActiveX.Checked:=true;
|
||||
end;
|
||||
|
||||
procedure TFrmTL.FormCreate(Sender: TObject);
|
||||
begin
|
||||
Caption:=axImportTypeLibrary;
|
||||
Label1.Caption:=axFileContainingTypeLibrary;
|
||||
CBxTLActiveX.Caption:=axCreateVisualComponentTActiveXContainerDescendant;
|
||||
CBxTLPackage.Caption:=axCreatePackage;
|
||||
CBxTLRecurse.Caption:=axConvertDependantTypelibs;
|
||||
FNETL.Filter:=axTypeLibraryFilesTlbDllExeOcxOlbTlbDllExeOcxOlbAllF;
|
||||
end;
|
||||
|
||||
{$R *.lfm}
|
||||
{$endif wince}
|
||||
|
||||
|
35
components/activex/languages/activexstrconsts.po
Normal file
35
components/activex/languages/activexstrconsts.po
Normal file
@ -0,0 +1,35 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: activexstrconsts.axconvertdependanttypelibs
|
||||
msgid "Convert dependant typelibs"
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.axcreatepackage
|
||||
msgid "Create package"
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.axcreatevisualcomponenttactivexcontainerdescendant
|
||||
msgid "Create visual component (TActiveXContainer descendant)"
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.axfilecontainingtypelibrary
|
||||
msgid "File containing type library:"
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.aximporttypelibrary
|
||||
msgid "Import Type Library"
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.aximporttypelibrarymenu
|
||||
msgid "Import Type Library ..."
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.axselectdirectorytostorepackageplpk
|
||||
msgid "Select directory to store package %sP.lpk"
|
||||
msgstr ""
|
||||
|
||||
#: activexstrconsts.axtypelibraryfilestlbdllexeocxolbtlbdllexeocxolballf
|
||||
msgid "Type library files (*.tlb;*.dll;*.exe;*.ocx;*.olb)|*.tlb;*.dll;*.exe;*.ocx;*.olb|All Files (*.*)|*.*"
|
||||
msgstr ""
|
||||
|
43
components/activex/languages/activexstrconsts.ru.po
Normal file
43
components/activex/languages/activexstrconsts.ru.po
Normal file
@ -0,0 +1,43 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: \n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: Maxim Ganetsky <maxkill@mail.ru>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: activexstrconsts.axconvertdependanttypelibs
|
||||
msgid "Convert dependant typelibs"
|
||||
msgstr "Преобразовать зависимости библиотеки типов"
|
||||
|
||||
#: activexstrconsts.axcreatepackage
|
||||
msgid "Create package"
|
||||
msgstr "Создать пакет"
|
||||
|
||||
#: activexstrconsts.axcreatevisualcomponenttactivexcontainerdescendant
|
||||
msgid "Create visual component (TActiveXContainer descendant)"
|
||||
msgstr "Создать визуальный компонент (потомок TActiveXContainer)"
|
||||
|
||||
#: activexstrconsts.axfilecontainingtypelibrary
|
||||
msgid "File containing type library:"
|
||||
msgstr "Файл библиотеки типов:"
|
||||
|
||||
#: activexstrconsts.aximporttypelibrary
|
||||
msgid "Import Type Library"
|
||||
msgstr "Импортировать библиотеку типов"
|
||||
|
||||
#: activexstrconsts.aximporttypelibrarymenu
|
||||
msgid "Import Type Library ..."
|
||||
msgstr "Импортировать библиотеку типов ..."
|
||||
|
||||
#: activexstrconsts.axselectdirectorytostorepackageplpk
|
||||
msgid "Select directory to store package %sP.lpk"
|
||||
msgstr "Выберите каталог для сохранения пакета %sP.lpk"
|
||||
|
||||
#: activexstrconsts.axtypelibraryfilestlbdllexeocxolbtlbdllexeocxolballf
|
||||
msgid "Type library files (*.tlb;*.dll;*.exe;*.ocx;*.olb)|*.tlb;*.dll;*.exe;*.ocx;*.olb|All Files (*.*)|*.*"
|
||||
msgstr "Файлы библиотек типов (*.tlb;*.dll;*.exe;*.ocx;*.olb)|*.tlb;*.dll;*.exe;*.ocx;*.olb|All Files (*.*)|*.*"
|
||||
|
@ -43,13 +43,14 @@ procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses classes,LResources,MenuIntf, LCLIntf;
|
||||
uses Classes, LResources, MenuIntf, LCLIntf, activexstrconsts;
|
||||
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
{$ifndef wince}
|
||||
RegisterIDEMenuCommand(itmSecondaryTools, 'ImportTL','Import Type Library',nil,@ImpTypeLib);
|
||||
RegisterIDEMenuCommand(itmSecondaryTools, 'ImportTL', axImportTypeLibraryMenu, nil
|
||||
, @ImpTypeLib);
|
||||
{$endif wince}
|
||||
RegisterComponents('ActiveX', [TActiveXContainer]);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user