Improves wince platform detection and adds a new convenience routine to customshelltreeview

git-svn-id: trunk@27111 -
This commit is contained in:
sekelsenmat 2010-08-16 14:35:59 +00:00
parent 6cf974a082
commit e5b69bef2d
2 changed files with 10 additions and 1 deletions

View File

@ -1265,7 +1265,10 @@ begin
else if WideStrCmp(@buf, 'SmartPhone') = 0 then
Result := atKeyPadDevice
else
Result := atPDA;
// Other devices can set anything for the platform name,
// see http://bugs.freepascal.org/view.php?id=16615
// Here we just suppose that they are atDesktop
Result := atDesktop;
end
else if GetLastError = ERROR_ACCESS_DENIED then
Result := atKeyPadDevice

View File

@ -71,6 +71,7 @@ type
AMask: string; AObjectTypes: TObjectTypes; AResult: TStrings; AFileSortType: TFileSortType = fstNone);
{ Other methods specific to Lazarus }
function GetPathFromNode(ANode: TTreeNode): string;
function GetSelectedNodePath(): string;
{ Properties }
property ObjectTypes: TObjectTypes read FObjectTypes write FObjectTypes;
@ -594,6 +595,11 @@ begin
Result := GetBasePath + rootDir;
end;
function TCustomShellTreeView.GetSelectedNodePath(): string;
begin
Result := GetPathFromNode(Selected);
end;
{ TCustomShellListView }
procedure TCustomShellListView.SetShellTreeView(