printers: fixed compilation (Duplicate identifier "PrinterName") on Mac OS X after revision 32243 #6d24d264ef

git-svn-id: trunk@32310 -
This commit is contained in:
vincents 2011-09-13 07:52:19 +00:00
parent ac90c7b3e0
commit 8f1076967c

View File

@ -188,7 +188,7 @@ procedure TCarbonPrinter.BeginEnumPrinters(Lst: TStrings);
var
P: PMPrinter;
I, C: CFIndex;
PrinterName: String;
NewPrinterName: String;
begin
if OSError(PMServerCreatePrinterList(kPMServerLocal, FPrinterArray),
Self, 'DoEnumPrinters', 'PMServerCreatePrinterList') then Exit;
@ -197,13 +197,13 @@ begin
for I := 0 to C - 1 do
begin
P := CFArrayGetValueAtIndex(FPrinterArray, I);
PrinterName := CFStringToStr(PMPrinterGetName(P));
NewPrinterName := CFStringToStr(PMPrinterGetName(P));
//DebugLn(DbgS(I) + ' ' + PrinterName);
if PrinterName = FDefaultPrinter then
Lst.InsertObject(0, PrinterName, TObject(I))
if NewPrinterName = FDefaultPrinter then
Lst.InsertObject(0, NewPrinterName, TObject(I))
else
Lst.AddObject(PrinterName, TObject(I));
Lst.AddObject(NewPrinterName, TObject(I));
end;
end;