HelpUtil: replace Shell with fpSystem; PropListUtil: fix to always return UTF8, as encoded.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5024 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
4f4b878e17
commit
a7cab840e7
@ -123,7 +123,7 @@ begin
|
||||
Result := shrSuccess;
|
||||
{$ELSE}
|
||||
{$IFDEF DARWIN}
|
||||
if Shell('Open -a "HelpViewer" "' + Application.HelpFile + '"') = 127 then
|
||||
if fpSystem('Open -a "HelpViewer" "' + Application.HelpFile + '"') = 127 then
|
||||
// Note: Renamed from Help Viewer.app to HelpViewer.app with 10.5.
|
||||
//
|
||||
// Note: With OS X earlier than 10.4 (Tiger), if connected to network
|
||||
@ -137,7 +137,7 @@ begin
|
||||
{$ELSE} {For now, shell to first browser found, passing help file name}
|
||||
if GetBrowserPath <> '' then {Found a browser?}
|
||||
begin
|
||||
if Shell(GetBrowserPath + ' ' + Application.HelpFile) = 127 then
|
||||
if fpSystem(GetBrowserPath + ' ' + Application.HelpFile) = 127 then
|
||||
Result := shrViewerError
|
||||
else
|
||||
Result := shrSuccess;
|
||||
|
@ -131,7 +131,7 @@ begin
|
||||
if not Assigned(Value) then {Key not found?}
|
||||
Exit;
|
||||
if CFGetTypeID(Value) = CFStringGetTypeID then {Value is a string?}
|
||||
Result := CFStrToAnsiStr(Value);
|
||||
Result := CFStrToAnsiStr(Value, kCFStringEncodingUTF8); //will always be UTF8
|
||||
end;
|
||||
|
||||
|
||||
@ -166,7 +166,7 @@ begin
|
||||
ValueRef := CFBundleGetValueForInfoDictionaryKey(BundleRef, KeyRef);
|
||||
if CFGetTypeID(ValueRef) <> CFStringGetTypeID then {Value not a string?}
|
||||
Exit;
|
||||
Result := CFStrToAnsiStr(ValueRef);
|
||||
Result := CFStrToAnsiStr(ValueRef, kCFStringEncodingUTF8); //will always be UTF8
|
||||
finally
|
||||
FreeCFRef(KeyRef);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user