New component - RxPropStorage

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2737 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75 2013-05-09 05:37:53 +00:00
parent e16f5bacfb
commit 9a9db1d08a
13 changed files with 148 additions and 42 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

View File

@ -1,2 +1,2 @@
rm rx.lrs rm rx.lrs
/usr/local/share/lazarus/tools/lazres rx.lrs TDBDateEdit.xpm TRXLookUpEdit.xpm TRxDBCalcEdit.xpm TRxDBLookupCombo.xpm TRxDBGrid.xpm TDualListDialog.xpm TFolderLister.xpm TRxMemoryData.xpm TCURRENCYEDIT.xpm TRXSWITCH.xpm TRXDICE.xpm TRXDBCOMBOBOX.xpm ttoolpanel.xpm trxxpmanifest.xpm TPAGEMANAGER.xpm TRXAPPICON.xpm TSECRETPANEL.xpm TRXLABEL.xpm tautopanel.xpm TRxCalendarGrid.xpm TRxDateEdit.png TRxClock.png TRxSpeedButton.png TRxSpinButton.png TRxSpinEdit.png TRXDBSpinEdit.png TRxTimeEdit.png TRxDBTimeEdit.png TRxDBProgressBar.png TRxDBTrackBar.png TRxLoginDialog.png TRxVersionInfo.png TRxAboutDialog.png TRxDBCurrEdit.png TRxViewsPanel.png TRxDBColorBox.png TRxRadioGroup.png TRxDBRadioGroup.png TRxHistoryNavigator.png TRxCloseFormValidator.png /usr/local/share/lazarus/tools/lazres rx.lrs TDBDateEdit.xpm TRXLookUpEdit.xpm TRxDBCalcEdit.xpm TRxDBLookupCombo.xpm TRxDBGrid.xpm TDualListDialog.xpm TFolderLister.xpm TRxMemoryData.xpm TCURRENCYEDIT.xpm TRXSWITCH.xpm TRXDICE.xpm TRXDBCOMBOBOX.xpm ttoolpanel.xpm trxxpmanifest.xpm TPAGEMANAGER.xpm TRXAPPICON.xpm TSECRETPANEL.xpm TRXLABEL.xpm tautopanel.xpm TRxCalendarGrid.xpm TRxDateEdit.png TRxClock.png TRxSpeedButton.png TRxSpinButton.png TRxSpinEdit.png TRXDBSpinEdit.png TRxTimeEdit.png TRxDBTimeEdit.png TRxDBProgressBar.png TRxDBTrackBar.png TRxLoginDialog.png TRxVersionInfo.png TRxAboutDialog.png TRxDBCurrEdit.png TRxViewsPanel.png TRxDBColorBox.png TRxRadioGroup.png TRxDBRadioGroup.png TRxHistoryNavigator.png TRxCloseFormValidator.png TRxIniPropStorage.png

View File

@ -763,3 +763,23 @@ LazarusResources.Add('TRxCloseFormValidator','PNG',[
+#245#155#252#163'G'#135#136#6#134#250#3'|'#0#10'!sr'#165'GZ'#12#0#0#0#0'IEND' +#245#155#252#163'G'#135#136#6#134#250#3'|'#0#10'!sr'#165'GZ'#12#0#0#0#0'IEND'
+#174'B`'#130 +#174'B`'#130
]); ]);
LazarusResources.Add('TRxIniPropStorage','PNG',[
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
+#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#14#196#0#0#14#196#1#149'+'
+#14#27#0#0#1'LIDATH'#137#213#148#193'N'#195'0'#12#134'?''}'#27'$'#144#184#240
+#10#28'9'#240'>'#177#243'T'#188#0#210'8 61'#222#166#141#185#172'U'#179#181
+#163#29#187#236#147#162#184#177#235'?'#137#221#194#173'#'#0#170#234#215'N'
+#156's'#166#148'"M'#191#240#250#242'|U'#1'3'#3#160#25'/'#222'?'#190#225'+'
+#206#210'u'#137#166#137#180'mK'#211'4'#195#188#251'|'#31'b*'#1'wV'#9#132#16#0
+'?'#204#12#243#152'J'#224#251'k'#237'5'#253#29'_'#9#220'=<'#173#20#152#230'g'
+#247'1'#216#167'g'#154#193#204#8'! "C'#1#151#208#204'9b'#140#184';]'#215#145
+'s'#198#204'h'#219#22#17'!'#198#8'@J'#169#138#19#145#233'd'#170#234#251#237
+#198'{B'#8#14'8'#224'"'#226'"r'#214#238#159'K)'#238#238#190#223'nz'#223#244#9
+#142'w'#212#239#216'G-6'#23#179#248#138'D'#4#17'!'#132#128#187#163#170#149
+#223#204#136'1RJ'#153#191#154's'#2'9'#231#193'VU,%: '#31#10#156'R'#194#204
+#170#184')'#22'wQ'#25'%_'#195#170'6'#189#132'E'#2'S'#201#205#172'*'#250'Y'
+#142#219'TU'''#219'p<'#142#215'Uux'#127#220#166#147#2#238#238#165#148'j'#244
+#162#128#171#234#137#127#204'"'#129#255'0'#251#161#141#127'R'#215'B'#0'D'#196
+#23#23#236#130#252#183#205'/'#245#161'[H'#1#236'`'#148#0#0#0#0'IEND'#174'B`'
+#130
]);

View File

@ -1,6 +1,6 @@
{ RegisterRxTools unit { RegisterRxTools unit
Copyright (C) 2005-2011 Lagunov Aleksey alexs@hotbox.ru and Lazarus team Copyright (C) 2005-2013 Lagunov Aleksey alexs@hotbox.ru and Lazarus team
original conception from rx library for Delphi (c) original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it This library is free software; you can redistribute it and/or modify it
@ -31,7 +31,7 @@
unit RegisterRxTools; unit RegisterRxTools;
{$mode objfpc}{$H+} {$I rx.inc}
interface interface
@ -41,7 +41,8 @@ uses
procedure Register; procedure Register;
implementation implementation
uses RxSystemServices, RxLogin, RxVersInfo, RxCloseFormValidator; uses RxSystemServices, RxLogin, RxVersInfo, RxCloseFormValidator, RxIniPropStorage;
const const
sRxToolsPage = 'RX Tools'; sRxToolsPage = 'RX Tools';
@ -62,7 +63,12 @@ end;
procedure RegisterCloseFormValidator; procedure RegisterCloseFormValidator;
begin begin
RegisterComponents('RX Tools',[TRxCloseFormValidator]); RegisterComponents(sRxToolsPage,[TRxCloseFormValidator]);
end;
procedure RegisterRxIniPropStorage;
begin
RegisterComponents(sRxToolsPage,[TRxIniPropStorage]);
end; end;
procedure Register; procedure Register;
@ -71,7 +77,7 @@ begin
RegisterUnit('RxVersInfo', @RegisterRxVersInfo); RegisterUnit('RxVersInfo', @RegisterRxVersInfo);
RegisterUnit('RxSystemServices', @RegisterRxSystemServices); RegisterUnit('RxSystemServices', @RegisterRxSystemServices);
RegisterUnit('RxCloseFormValidator', @RegisterCloseFormValidator); RegisterUnit('RxCloseFormValidator', @RegisterCloseFormValidator);
RegisterUnit('RxIniPropStorage', @RegisterRxIniPropStorage);
end; end;
end. end.

View File

@ -763,3 +763,23 @@ LazarusResources.Add('TRxCloseFormValidator','PNG',[
+#245#155#252#163'G'#135#136#6#134#250#3'|'#0#10'!sr'#165'GZ'#12#0#0#0#0'IEND' +#245#155#252#163'G'#135#136#6#134#250#3'|'#0#10'!sr'#165'GZ'#12#0#0#0#0'IEND'
+#174'B`'#130 +#174'B`'#130
]); ]);
LazarusResources.Add('TRxIniPropStorage','PNG',[
#137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0
+#0#0#4'sBIT'#8#8#8#8'|'#8'd'#136#0#0#0#9'pHYs'#0#0#14#196#0#0#14#196#1#149'+'
+#14#27#0#0#1'LIDATH'#137#213#148#193'N'#195'0'#12#134'?''}'#27'$'#144#184#240
+#10#28'9'#240'>'#177#243'T'#188#0#210'8 61'#222#166#141#185#172'U'#179#181
+#163#29#187#236#147#162#184#177#235'?'#137#221#194#173'#'#0#170#234#215'N'
+#156's'#166#148'"M'#191#240#250#242'|U'#1'3'#3#160#25'/'#222'?'#190#225'+'
+#206#210'u'#137#166#137#180'mK'#211'4'#195#188#251'|'#31'b*'#1'wV'#9#132#16#0
+'?'#204#12#243#152'J'#224#251'k'#237'5'#253#29'_'#9#220'=<'#173#20#152#230'g'
+#247'1'#216#167'g'#154#193#204#8'! "C'#1#151#208#204'9b'#140#184';]'#215#145
+'s'#198#204'h'#219#22#17'!'#198#8'@J'#169#138#19#145#233'd'#170#234#251#237
+#198'{B'#8#14'8'#224'"'#226'"r'#214#238#159'K)'#238#238#190#223'nz'#223#244#9
+#142'w'#212#239#216'G-6'#23#179#248#138'D'#4#17'!'#132#128#187#163#170#149
+#223#204#136'1RJ'#153#191#154's'#2'9'#231#193'VU,%: '#31#10#156'R'#194#204
+#170#184')'#22'wQ'#25'%_'#195#170'6'#189#132'E'#2'S'#201#205#172'*'#250'Y'
+#142#219'TU'''#219'p<'#142#215'Uux'#127#220#166#147#2#238#238#165#148'j'#244
+#162#128#171#234#137#127#204'"'#129#255'0'#251#161#141#127'R'#215'B'#0'D'#196
+#23#23#236#130#252#183#205'/'#245#161'[H'#1#236'`'#148#0#0#0#0'IEND'#174'B`'
+#130
]);

View File

@ -113,12 +113,9 @@ begin
else else
begin begin
Result := ExtractFileName(ChangeFileExt(Application.ExeName, '.ini')); Result := ExtractFileName(ChangeFileExt(Application.ExeName, '.ini'));
{$IFNDEF WIN32}
S:=UTF8ToSys(GetAppConfigDir(false)); S:=UTF8ToSys(GetAppConfigDir(false));
if not DirectoryExists(S) then ForceDirectoriesUTF8(S);
mkdir(S);
Result:=S+Result; Result:=S+Result;
{$ENDIF}
end; end;
end; end;

View File

@ -1,6 +1,6 @@
{ RxCloseFormValidator unit { RxCloseFormValidator unit
Copyright (C) 2005-2010 Lagunov Aleksey alexs@hotbox.ru and Lazarus team Copyright (C) 2005-2013 Lagunov Aleksey alexs@hotbox.ru and Lazarus team
original conception from rx library for Delphi (c) original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it This library is free software; you can redistribute it and/or modify it

View File

@ -2467,9 +2467,6 @@ var
MLI:TMLCaptionItem; MLI:TMLCaptionItem;
FTitle:TRxColumnTitle; FTitle:TRxColumnTitle;
begin begin
{ CE:=-1;
CB:=Columns.Count;}
for i:=0 to Columns.Count-1 do for i:=0 to Columns.Count-1 do
begin begin
FTitle:=TRxColumnTitle(Columns[i].Title); FTitle:=TRxColumnTitle(Columns[i].Title);
@ -2478,32 +2475,11 @@ begin
MLI:=FTitle.CaptionLine(j); MLI:=FTitle.CaptionLine(j);
if MLI.FInvalidDraw<0 then if MLI.FInvalidDraw<0 then
begin begin
InvalidateRow(0); //InvalidateRow(0);
{ CE:=Max(CE, i);
while Assigned(MLI.Prior) do
MLI:=MLI.Prior;
CB:=Min(MLI.Col.Index, CB);}
exit; exit;
end; end;
end; end;
end; end;
(*
if CE>=CB then
begin
DebugLn('------');
InvalidateRow(0);
{ for i:=CE downto CB do
begin
DebugLn(['DoTestInvalidCaption', CE, ' ', CB, ' ', i]);
if i = 2 then
begin
end;
InvalidateCell(i, 0, true);
end; }
end;
*)
end; end;

View File

@ -1,6 +1,6 @@
{ rxFileUtils is part of RxFPC library { rxFileUtils is part of RxFPC library
Copyright (C) 2005-2010 Lagunov Aleksey alexs@hotbox.ru and Lazarus team Copyright (C) 2005-2013 Lagunov Aleksey alexs@hotbox.ru and Lazarus team
original conception from rx library for Delphi (c) original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it This library is free software; you can redistribute it and/or modify it
@ -31,7 +31,7 @@
unit rxFileUtils; unit rxFileUtils;
{$mode objfpc}{$H+} {$I rx.inc}
interface interface
@ -42,6 +42,7 @@ function GetFileOwnerUser(const SearchDomain, FileName:String):String;
procedure GetFileOwnerData(const SearchDomain, FileName:String;out UserName, DomainName:string); procedure GetFileOwnerData(const SearchDomain, FileName:String;out UserName, DomainName:string);
function NormalizeDirectoryName(const DirName:string):string; function NormalizeDirectoryName(const DirName:string):string;
function GetUserName:string; function GetUserName:string;
implementation implementation
uses uses
{$IFDEF WINDOWS} {$IFDEF WINDOWS}

View File

@ -0,0 +1,82 @@
{ RegisterRxTools unit
Copyright (C) 2005-2013 Lagunov Aleksey alexs@hotbox.ru and Lazarus team
original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version with the following modification:
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,and
to copy and distribute the resulting executable under terms of your choice,
provided that you also meet, for each linked independent module, the terms
and conditions of the license of that module. An independent module is a
module which is not derived from or based on this library. If you modify
this library, you may extend this exception to your version of the library,
but you are not obligated to do so. If you do not wish to do so, delete this
exception statement from your version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
unit RxIniPropStorage;
{$I rx.inc}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, IniPropStorage;
type
{ TRxIniPropStorage }
TRxIniPropStorage = class(TIniPropStorage)
private
FSeparateFiles: boolean;
protected
function GetIniFileName: string; override;
public
{ Public declarations }
published
property SeparateFiles:boolean read FSeparateFiles write FSeparateFiles;
end;
implementation
uses rxapputils, LazUTF8, FileUtil;
{ TRxIniPropStorage }
function TRxIniPropStorage.GetIniFileName: string;
var
S:string;
begin
if ExtractFileDir(IniFileName) <> '' then
Result:=IniFileName
else
begin
S:=GetDefaultIniName;
if IniFileName <> '' then
Result:=AppendPathDelim(ExtractFileDir(S)) + IniFileName
else
begin
if FSeparateFiles then
Result:=AppendPathDelim(ExtractFileDir(S)) + RootSection + '.cfg'
else
Result:=S;
end;
end;
end;
end.

View File

@ -26,8 +26,8 @@ Copyright (c) 1998 Master-Bank
translate to Lazarus by alexs in 2005 - 2012 translate to Lazarus by alexs in 2005 - 2012
"/> "/>
<License Value="LGPL"/> <License Value="LGPL"/>
<Version Major="2" Minor="4" Release="6" Build="132"/> <Version Major="2" Minor="5" Release="1" Build="134"/>
<Files Count="67"> <Files Count="68">
<Item1> <Item1>
<Filename Value="autopanel.pas"/> <Filename Value="autopanel.pas"/>
<UnitName Value="AutoPanel"/> <UnitName Value="AutoPanel"/>
@ -299,6 +299,10 @@ translate to Lazarus by alexs in 2005 - 2012
<Filename Value="rxmdi.pas"/> <Filename Value="rxmdi.pas"/>
<UnitName Value="RxMDI"/> <UnitName Value="RxMDI"/>
</Item67> </Item67>
<Item68>
<Filename Value="rxinipropstorage.pas"/>
<UnitName Value="RxIniPropStorage"/>
</Item68>
</Files> </Files>
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/> <LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
<i18n> <i18n>

View File

@ -18,7 +18,7 @@ uses
RxSystemServices, rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo, RxSystemServices, rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo,
RxViewsPanel, rxxpman, seldsfrm, tooledit, vclutils, RxCloseFormValidator, RxViewsPanel, rxxpman, seldsfrm, tooledit, vclutils, RxCloseFormValidator,
RxHistoryNavigator, ex_rx_bin_datapacket, ex_rx_datapacket, RxHistoryNavigator, ex_rx_bin_datapacket, ex_rx_datapacket,
ex_rx_xml_datapacket, rxsortby, RxMDI, LazarusPackageIntf; ex_rx_xml_datapacket, rxsortby, RxMDI, RxIniPropStorage, LazarusPackageIntf;
implementation implementation

View File

@ -1,6 +1,6 @@
{ vclutils unit { vclutils unit
Copyright (C) 2005-2010 Lagunov Aleksey alexs@hotbox.ru Copyright (C) 2005-2013 Lagunov Aleksey alexs@hotbox.ru
original conception from rx library for Delphi (c) original conception from rx library for Delphi (c)
This library is free software; you can redistribute it and/or modify it This library is free software; you can redistribute it and/or modify it