RxFPC:fix compile rxtools on windows

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4637 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2016-05-05 06:22:50 +00:00
parent 631f9bf1b1
commit fdbf8a6f0b
4 changed files with 32 additions and 19 deletions

View File

@ -181,11 +181,13 @@ type
private private
FActive: boolean; FActive: boolean;
FColor: TColor; FColor: TColor;
FDrawFullLine: boolean;
FOwner: TRxDBGrid; FOwner: TRxDBGrid;
FRowCount: integer; FRowCount: integer;
FStyle: TTitleStyle; FStyle: TTitleStyle;
procedure SetActive(AValue: boolean); procedure SetActive(AValue: boolean);
procedure SetColor(AValue: TColor); procedure SetColor(AValue: TColor);
procedure SetDrawFullLine(AValue: boolean);
procedure SetRowCount(AValue: integer); procedure SetRowCount(AValue: integer);
procedure SetStyle(AValue: TTitleStyle); procedure SetStyle(AValue: TTitleStyle);
protected protected
@ -198,6 +200,7 @@ type
property Color: TColor read FColor write SetColor default clWindow; property Color: TColor read FColor write SetColor default clWindow;
property RowCount: integer read FRowCount write SetRowCount default 0; property RowCount: integer read FRowCount write SetRowCount default 0;
property Style: TTitleStyle read FStyle write SetStyle default tsLazarus; property Style: TTitleStyle read FStyle write SetStyle default tsLazarus;
property DrawFullLine: boolean read FDrawFullLine write SetDrawFullLine;
end; end;
{ TRxDBGridColumnDefValues } { TRxDBGridColumnDefValues }
@ -571,7 +574,6 @@ type
FPressed: boolean; FPressed: boolean;
FSwapButtons: boolean; FSwapButtons: boolean;
FTracking: boolean; FTracking: boolean;
FDrawFullLine: boolean;
F_Clicked: boolean; F_Clicked: boolean;
F_PopupMenu: TPopupMenu; F_PopupMenu: TPopupMenu;
@ -1864,6 +1866,12 @@ begin
FOwner.Invalidate; FOwner.Invalidate;
end; end;
procedure TRxDBGridFooterOptions.SetDrawFullLine(AValue: boolean);
begin
if FDrawFullLine=AValue then Exit;
FDrawFullLine:=AValue;
end;
procedure TRxDBGridFooterOptions.SetRowCount(AValue: integer); procedure TRxDBGridFooterOptions.SetRowCount(AValue: integer);
begin begin
if FRowCount=AValue then Exit; if FRowCount=AValue then Exit;

View File

@ -44,13 +44,15 @@ function NormalizeDirectoryName(const DirName:string):string;
function GetUserName:string; function GetUserName:string;
implementation implementation
uses uses
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
Windows, Windows;
{$ELSE} {$ELSE}
{$ENDIF} {$ENDIF}
FileUtil, LazFileUtils, LazUTF8; (*
FileUtil, LazFileUtils, LazUTF8;
*)
{$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)} {$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)}
function LStrError(const Ernum: Longint; const UseUTF8: Boolean = False): string; function LStrError(const Ernum: Longint; const UseUTF8: Boolean = False): string;
const const
@ -141,8 +143,9 @@ var
S:string; S:string;
begin begin
{$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)} {$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)}
GetFileNameOwner(UTF8ToSys(SearchDomain), UTF8ToSys(FileName), Result, S); (* GetFileNameOwner(UTF8ToSys(SearchDomain), UTF8ToSys(FileName), Result, S);
Result:=UTF8Encode(Result); Result:=UTF8Encode(Result);*)
GetFileNameOwner(SearchDomain, FileName, Result, S);
{$ELSE} {$ELSE}
Result:=''; Result:='';
{$ENDIF} {$ENDIF}
@ -152,9 +155,10 @@ procedure GetFileOwnerData(const SearchDomain, FileName: String; out UserName,
DomainName: string); DomainName: string);
begin begin
{$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)} {$IF DEFINED(WINDOWS) AND NOT DEFINED(WINCE)}
GetFileNameOwner(UTF8ToSys(SearchDomain), UTF8ToSys(FileName), UserName, DomainName); { GetFileNameOwner(UTF8ToSys(SearchDomain), UTF8ToSys(FileName), UserName, DomainName);
UserName:=UTF8Encode(UserName); UserName:=UTF8Encode(UserName);
DomainName:=UTF8Encode(DomainName); DomainName:=UTF8Encode(DomainName);}
GetFileNameOwner(SearchDomain, FileName, UserName, DomainName);
{$ELSE} {$ELSE}
UserName:=''; UserName:='';
DomainName:=''; DomainName:='';
@ -184,10 +188,12 @@ begin
L:=SizeOf(A)-1; L:=SizeOf(A)-1;
if Windows.GetUserNameA(@A, L) then if Windows.GetUserNameA(@A, L) then
begin begin
Result:=SysToUTF8(StrPas(@A)); (* Result:=SysToUTF8(StrPas(@A)); *)
Result:=StrPas(@A);
end end
else else
Result:=GetEnvironmentVariableUTF8('USERNAME'); (*Result:=GetEnvironmentVariableUTF8('USERNAME');*)
Result:=SysUtils.GetEnvironmentVariable('USERNAME');
{$ELSE} {$ELSE}
Result:=GetEnvironmentVariable('USER'); Result:=GetEnvironmentVariable('USER');
{$ENDIF} {$ENDIF}

View File

@ -13,14 +13,13 @@ uses
RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon, rxapputils, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon, rxapputils,
rxclock, rxconst, rxctrls, rxcustomchartpanel, RxDBColorBox, rxdbcomb, rxclock, rxconst, rxctrls, rxcustomchartpanel, RxDBColorBox, rxdbcomb,
RxDBCtrls, rxdbgrid, rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, RxDBCtrls, rxdbgrid, rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit,
RxDBTimeEdit, rxdconst, rxdice, rxFileUtils, rxfilterby, rxiconv, rxlogin, RxDBTimeEdit, rxdconst, rxdice, rxfilterby, rxiconv, rxlogin, rxlookup,
rxlookup, rxmemds, rxpopupunit, rxsortmemds, rxspin, rxswitch, rxmemds, rxpopupunit, rxsortmemds, rxspin, rxswitch, RxSystemServices,
RxSystemServices, rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo, rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxxpman,
RxViewsPanel, rxxpman, seldsfrm, tooledit, vclutils, RxCloseFormValidator, seldsfrm, tooledit, vclutils, RxCloseFormValidator, RxHistoryNavigator,
RxHistoryNavigator, ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby,
ex_rx_xml_datapacket, rxsortby, RxMDI, RxIniPropStorage, RxMDI, RxIniPropStorage, rxDateRangeEditUnit, RxDBGridFooterTools,
rxDateRangeEditUnit, RxDBGridFooterTools, rxdbgridfootertools_setup, rxdbgridfootertools_setup, rxShortCutUnit, LazarusPackageIntf;
rxShortCutUnit, LazarusPackageIntf;
implementation implementation

View File

@ -8,7 +8,7 @@ unit rxtools;
interface interface
uses uses
rxConfigValues, rxstrutils, dateutil, LazarusPackageIntf; rxConfigValues, rxstrutils, dateutil, rxFileUtils, LazarusPackageIntf;
implementation implementation