diff --git a/components/rx/trunk/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.lpi b/components/rx/trunk/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.lpi index 5e59267a6..62caa6860 100644 --- a/components/rx/trunk/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.lpi +++ b/components/rx/trunk/demos/rxdbgrid/RxDBGrid/RxDBGridDemo.lpi @@ -59,7 +59,7 @@ - + @@ -477,13 +477,12 @@ - - - + + - + @@ -515,11 +514,13 @@ - - - + + + + + @@ -539,7 +540,7 @@ - + @@ -562,7 +563,7 @@ - + @@ -571,182 +572,194 @@ - + - - + - - + - - + - - + - - + - - + - + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + + - - + + - - + + - - + + diff --git a/components/rx/trunk/registerrxtools.pas b/components/rx/trunk/registerrxtools.pas index 82406fd49..76f499f9b 100644 --- a/components/rx/trunk/registerrxtools.pas +++ b/components/rx/trunk/registerrxtools.pas @@ -41,7 +41,7 @@ uses procedure Register; implementation -uses RxSystemServices, RxLogin, RxVersInfo, RxCloseFormValidator, RxIniPropStorage; +uses RxSystemServices, RxLogin, RxVersInfo, RxCloseFormValidator, RxIniPropStorage, RxXMLPropStorage; const sRxToolsPage = 'RX Tools'; @@ -71,6 +71,11 @@ begin RegisterComponents(sRxToolsPage,[TRxIniPropStorage]); end; +procedure RegisterRxXMLPropStorage; +begin + RegisterComponents(sRxToolsPage,[TRxXMLPropStorage]); +end; + procedure Register; begin RegisterUnit('RxLogin', @RegisterRxLogin); @@ -78,6 +83,7 @@ begin RegisterUnit('RxSystemServices', @RegisterRxSystemServices); RegisterUnit('RxCloseFormValidator', @RegisterCloseFormValidator); RegisterUnit('RxIniPropStorage', @RegisterRxIniPropStorage); + RegisterUnit('RxXMLPropStorage', @RegisterRxXMLPropStorage); end; end. diff --git a/components/rx/trunk/rxcontrols/rxinipropstorage.pas b/components/rx/trunk/rxcontrols/rxinipropstorage.pas index b635238b8..67741a3bf 100644 --- a/components/rx/trunk/rxcontrols/rxinipropstorage.pas +++ b/components/rx/trunk/rxcontrols/rxinipropstorage.pas @@ -1,6 +1,6 @@ -{ RegisterRxTools unit +{ RxIniPropStorage unit - Copyright (C) 2005-2017 Lagunov Aleksey alexs75@yandex.ru and Lazarus team + Copyright (C) 2005-2018 Lagunov Aleksey alexs75@yandex.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 diff --git a/components/rx/trunk/rxcontrols/rxxmlpropstorage.pas b/components/rx/trunk/rxcontrols/rxxmlpropstorage.pas new file mode 100644 index 000000000..119bbc4bd --- /dev/null +++ b/components/rx/trunk/rxcontrols/rxxmlpropstorage.pas @@ -0,0 +1,98 @@ +{ RxXMLPropStorage unit + + Copyright (C) 2005-2018 Lagunov Aleksey alexs75@yandex.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 RxXMLPropStorage; + +{$I rx.inc} + +interface + +uses + Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, XMLPropStorage; + +const + defCFGFileExt = '.xcfg'; + +type + + { TRxXMLPropStorage } + + TRxXMLPropStorage = class(TXMLPropStorage) + private + FSeparateFiles: boolean; + protected + function GetXMLFileName: string; override; + public + + published + property SeparateFiles:boolean read FSeparateFiles write FSeparateFiles; + end; + + +implementation +uses LazFileUtils, LazUTF8, rxapputils; + +function GetDefaultCfgName: string; +var + S:string; +begin + Result := ExtractFileName(ChangeFileExt(Application.ExeName, defCFGFileExt)); + S:=RxGetAppConfigDir(false); + S:=SysToUTF8(S); + ForceDirectoriesUTF8(S); + Result:=S+Result; +end; + +{ TRxXMLPropStorage } + +function TRxXMLPropStorage.GetXMLFileName: string; +var + S: String; +begin + if ExtractFileDir(FileName) <> '' then + Result:=FileName + else + begin + S:=GetDefaultIniName; + if FileName <> '' then + Result:=AppendPathDelim(ExtractFileDir(S)) + FileName + else + begin + if FSeparateFiles then + Result:=AppendPathDelim(ExtractFileDir(S)) + RootSection + defCFGFileExt + else + Result:=S; + end; + end; + Result:=UTF8ToSys(Result); +end; + +end. diff --git a/components/rx/trunk/rxdb/rxdbgrid.pas b/components/rx/trunk/rxdb/rxdbgrid.pas index 8421681c4..119dd22bc 100644 --- a/components/rx/trunk/rxdb/rxdbgrid.pas +++ b/components/rx/trunk/rxdb/rxdbgrid.pas @@ -5424,11 +5424,7 @@ begin aRect.Top := (aRect.Top + aRect.Bottom - H) div 2; aRect.Bottom := aRect.Top + H; end; - {$IFDEF lcl_version < '1.9.0.0'} - RxColumn.ImageList.StretchDraw(Canvas, AImageIndex, aRect); - {$ELSE} RxColumn.ImageList.Draw(Canvas, aRect.Left, aRect.Top, AImageIndex); - {$ENDIF} end; procedure TRxDBGrid.SetEditText(ACol, ARow: longint; const Value: string); diff --git a/components/rx/trunk/rxdb/rxdbgrid_popupfilterunit.pas b/components/rx/trunk/rxdb/rxdbgrid_popupfilterunit.pas index 5f2798d2e..42e770d69 100644 --- a/components/rx/trunk/rxdb/rxdbgrid_popupfilterunit.pas +++ b/components/rx/trunk/rxdb/rxdbgrid_popupfilterunit.pas @@ -217,9 +217,11 @@ procedure TRxDBGrid_PopUpFilterForm.CheckBox1Change(Sender: TObject); var i: Integer; begin + CheckListBox1.OnClickCheck:=nil; for i:=0 to CheckListBox1.Items.Count - 1 do CheckListBox1.Checked[i]:=CheckBox1.Checked; - CheckListBox1ClickCheck(nil); + CheckListBox1.OnClickCheck:=@CheckListBox1ClickCheck; +// CheckListBox1ClickCheck(nil); end; procedure TRxDBGrid_PopUpFilterForm.CheckListBox1ClickCheck(Sender: TObject); @@ -237,6 +239,7 @@ begin AU:=false; end; + CheckBox1.OnChange:=nil; if AC then CheckBox1.Checked:=true else @@ -244,6 +247,7 @@ begin CheckBox1.Checked:=false else CheckBox1.State:=cbGrayed; + CheckBox1.OnChange:=@CheckBox1Change; end; procedure TRxDBGrid_PopUpFilterForm.FormClose(Sender: TObject; diff --git a/components/rx/trunk/rxnew.lpk b/components/rx/trunk/rxnew.lpk index 7637896dc..b4839769e 100644 --- a/components/rx/trunk/rxnew.lpk +++ b/components/rx/trunk/rxnew.lpk @@ -26,7 +26,7 @@ Copyright (c) 1998 Master-Bank translate to Lazarus by alexs in 2005 - 2018"/> - + @@ -318,6 +318,10 @@ translate to Lazarus by alexs in 2005 - 2018"/> + + + + diff --git a/components/rx/trunk/rxnew.pas b/components/rx/trunk/rxnew.pas index 326fcdf54..34f9b6e52 100644 --- a/components/rx/trunk/rxnew.pas +++ b/components/rx/trunk/rxnew.pas @@ -21,7 +21,7 @@ uses RxIniPropStorage, rxlclconst, rxlogin, RxMDI, rxpagemngr, rxpickdate, rxShortCutUnit, rxspin, rxswitch, RxSystemServices, rxtbrsetup, RxTimeEdit, rxtoolbar, rxtooledit, RxDBGrid_PopUpFilterUnit, rxdbverticalgrid, - rxlclutils, RxRangeSel, LazarusPackageIntf; + rxlclutils, RxRangeSel, RxXMLPropStorage, LazarusPackageIntf; implementation