changes for fpc 1.1

git-svn-id: trunk@3738 -
This commit is contained in:
mattias 2002-12-27 08:46:32 +00:00
parent 6167af23a2
commit 3bcd792d80
6 changed files with 87 additions and 25 deletions

View File

@ -116,11 +116,17 @@ begin
begin begin
AText:='"'+AFilename+'"'; AText:='"'+AFilename+'"';
case LinuxError of case LinuxError of
sys_eacces: AText:=Format(ctsExecuteAccessDeniedForFile,[AText]); {$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
sys_enoent: AText:=Format(ctsDirComponentDoesNotExistsOrIsDanglingSymLink,[AText]); AText:='read access denied for '+AText;
sys_enotdir: AText:=Format(ctsDirComponentIsNotDir,[AText]); {$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
sys_enomem: AText:=ctsInsufficientMemory; AText:='a directory component in '+AText
sys_eloop: AText:=Format(ctsFileHasCircularSymLink,[AText]); +' does not exist or is a dangling symlink';
{$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
AText:='a directory component in '+Atext+' is not a directory';
{$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
AText:='insufficient memory';
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
AText:=AText+' has a circular symbolic link';
else else
AText:=Format(ctsFileIsNotExecutable,[AText]); AText:=Format(ctsFileIsNotExecutable,[AText]);
end; end;

View File

@ -124,6 +124,27 @@ begin
CNSendMessage(LM_SETSELMODE, Self, @Msg); CNSendMessage(LM_SETSELMODE, Self, @Msg);
end; end;
{------------------------------------------------------------------------------
function TCustomListBox.GetTopIndex: Integer;
------------------------------------------------------------------------------}
function TCustomListBox.GetTopIndex: Integer;
begin
if HandleAllocated then
FTopIndex:=SendMessage(Handle, LB_GETTOPINDEX, 0, 0);
Result := FTopIndex;
end;
{------------------------------------------------------------------------------
procedure TCustomListBox.SetTopIndex(const AValue: Integer);
------------------------------------------------------------------------------}
procedure TCustomListBox.SetTopIndex(const AValue: Integer);
begin
if FTopIndex=AValue then exit;
FTopIndex:=AValue;
if HandleAllocated then
SendMessage(Handle, LB_SETTOPINDEX, FTopIndex, 0);
end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
procedure TCustomListBox.UpdateSorted; procedure TCustomListBox.UpdateSorted;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}

View File

@ -308,12 +308,17 @@ begin
if {$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF}.ReadLink(AFilename)='' then begin if {$IFDEF Ver1_0}Linux{$ELSE}Unix{$ENDIF}.ReadLink(AFilename)='' then begin
AText:='"'+AFilename+'"'; AText:='"'+AFilename+'"';
case LinuxError of case LinuxError of
sys_eacces: AText:='read access denied for '+AText; {$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
sys_enoent: AText:='a directory component in '+AText AText:='read access denied for '+AText;
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
AText:='a directory component in '+AText
+' does not exist or is a dangling symlink'; +' does not exist or is a dangling symlink';
sys_enotdir: AText:='a directory component in '+Atext+' is not a directory'; {$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
sys_enomem: AText:='insufficient memory'; AText:='a directory component in '+Atext+' is not a directory';
sys_eloop: AText:=AText+' has a circular symbolic link'; {$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
AText:='insufficient memory';
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
AText:=AText+' has a circular symbolic link';
else else
AText:=AText+' is not a symbolic link'; AText:=AText+' is not a symbolic link';
end; end;
@ -495,12 +500,17 @@ begin
begin begin
AText:='"'+AFilename+'"'; AText:='"'+AFilename+'"';
case LinuxError of case LinuxError of
sys_eacces: AText:='execute access denied for '+AText; {$IFDEF Ver1_0}sys_eacces{$ELSE}ESysEAcces{$ENDIF}:
sys_enoent: AText:='a directory component in '+AText AText:='read access denied for '+AText;
{$IFDEF Ver1_0}sys_enoent{$ELSE}ESysENoEnt{$ENDIF}:
AText:='a directory component in '+AText
+' does not exist or is a dangling symlink'; +' does not exist or is a dangling symlink';
sys_enotdir: AText:='a directory component in '+Atext+' is not a directory'; {$IFDEF Ver1_0}sys_enotdir{$ELSE}ESysENotDir{$ENDIF}:
sys_enomem: AText:='insufficient memory'; AText:='a directory component in '+Atext+' is not a directory';
sys_eloop: AText:=AText+' has a circular symbolic link'; {$IFDEF Ver1_0}sys_enomem{$ELSE}ESysENoMem{$ENDIF}:
AText:='insufficient memory';
{$IFDEF Ver1_0}sys_eloop{$ELSE}ESysELoop{$ENDIF}:
AText:=AText+' has a circular symbolic link';
else else
AText:=AText+' is not executable'; AText:=AText+' is not executable';
end; end;
@ -700,6 +710,9 @@ end;
{ {
$Log$ $Log$
Revision 1.9 2002/12/27 08:46:32 mattias
changes for fpc 1.1
Revision 1.8 2002/12/23 13:20:46 mattias Revision 1.8 2002/12/23 13:20:46 mattias
fixed backuping symlinks fixed backuping symlinks

View File

@ -89,15 +89,20 @@ end;
Creates a region if needed Creates a region if needed
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TRegion.GetHandle: HRGN; function TRegion.GetHandle: HRGN;
var
FillMode: integer;
begin begin
If FRegiondata.Handle = 0 then If FRegiondata.Handle = 0 then
With FRegionData do With FRegionData do
if (Polygon <> nil) or (((Rect.Right - Rect.Left) <> 0) or ((Rect.Bottom - Rect.Top) <> 0)) if (Polygon <> nil) or (((Rect.Right - Rect.Left) <> 0) or ((Rect.Bottom - Rect.Top) <> 0))
then then
If Polygon <> nil then If Polygon <> nil then begin
FRegionData.Handle := CreatePolygonRgn(Polygon, if Winding then
NumPoints, Winding) FillMode:=LCLType.Winding
else else
FillMode:=Alternate;
FRegionData.Handle := CreatePolygonRgn(Polygon, NumPoints, FillMode);
end else
With Rect do With Rect do
FRegionData.Handle := CreateRectRgn(Left, Top, Right, Bottom); FRegionData.Handle := CreateRectRgn(Left, Top, Right, Bottom);

View File

@ -136,9 +136,16 @@ const
LM_CB_ADDTEXT = LM_CB_FIRST+3; LM_CB_ADDTEXT = LM_CB_FIRST+3;
LM_CB_LAST = LM_CB_FIRST+9; // LM_COMUSER+99 LM_CB_LAST = LM_CB_FIRST+9; // LM_COMUSER+99
// additional for TNoteBook // TNoteBook
LM_NB_UpdateTab = LM_CB_LAST+1; LM_NB_First = LM_CB_LAST+1;
LM_NB_UpdateTab = LM_NB_First+1;
LM_NB_Last = LM_NB_UpdateTab; LM_NB_Last = LM_NB_UpdateTab;
// TListBox
LB_First = LM_NB_Last +1;
LB_GETTOPINDEX = LB_First +1;
LB_SETTOPINDEX = LB_First +2;
LB_Last = LB_SETTOPINDEX;
//------------- //-------------
//end of messages that are sent to the interface //end of messages that are sent to the interface
@ -892,6 +899,9 @@ end.
{ {
$Log$ $Log$
Revision 1.43 2002/12/27 08:46:32 mattias
changes for fpc 1.1
Revision 1.42 2002/12/16 09:02:27 mattias Revision 1.42 2002/12/16 09:02:27 mattias
applied win32 notebook patch from Vincent applied win32 notebook patch from Vincent

View File

@ -329,15 +329,18 @@ type
TCustomListBox = class(TWinControl) TCustomListBox = class(TWinControl)
private private
FBorderStyle : TBorderStyle; FBorderStyle: TBorderStyle;
FCanvas: TCanvas; FCanvas: TCanvas;
FExtendedSelect, FMultiSelect : boolean; FExtendedSelect, FMultiSelect : boolean;
FItems : TStrings; FItems: TStrings;
FItemHeight: Integer; FItemHeight: Integer;
FItemIndex: integer; FItemIndex: integer;
FOnDrawItem: TDrawItemEvent; FOnDrawItem: TDrawItemEvent;
FSorted : boolean; FSorted: boolean;
FStyle : TListBoxStyle; FStyle: TListBoxStyle;
FTopIndex: integer;
function GetTopIndex: Integer;
procedure SetTopIndex(const AValue: Integer);
procedure UpdateSelectionMode; procedure UpdateSelectionMode;
procedure UpdateSorted; procedure UpdateSorted;
procedure LMDrawListItem(var TheMessage : TLMDrawListItem); message LM_DrawListItem; procedure LMDrawListItem(var TheMessage : TLMDrawListItem); message LM_DrawListItem;
@ -377,6 +380,7 @@ type
property MultiSelect : boolean read FMultiSelect write SetMultiSelect; property MultiSelect : boolean read FMultiSelect write SetMultiSelect;
property SelCount : integer read GetSelCount; property SelCount : integer read GetSelCount;
property Selected[Index : integer] : boolean read GetSelected write SetSelected; property Selected[Index : integer] : boolean read GetSelected write SetSelected;
property TopIndex: Integer read GetTopIndex write SetTopIndex;
end; end;
@ -1387,6 +1391,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.71 2002/12/27 08:46:32 mattias
changes for fpc 1.1
Revision 1.70 2002/12/22 23:25:34 mattias Revision 1.70 2002/12/22 23:25:34 mattias
fixed setting TEdit properties after creating handle fixed setting TEdit properties after creating handle