----- Original Message ----- From: "darekm" <[EMAIL PROTECTED]> To: "lazarus" <[email protected]> Sent: Friday, December 30, 2005 1:07 PM Subject: [lazarus] patch for printers
> I've tested some of CUPS4Lazarus, but there are two bugs. > First: DoEnumPrinters is invoked two times during Refresh, > Second: on reset fPrinters should by unset fPrintersValid > This bug cause segFault, when DialogSelectPrinter is invoked second time > (cups doubled printers.count) > > > > Darek > > > > > > PS.Can somebody change CUPS4Lazarus: > > procedure TCUPSPrinter.DoResetPrintersList; > begin > inherited DoResetPrintersList; > > if Assigned(fcupsPrinter) then > begin > if Assigned(fcupsPPD) then > ppdClose(fcupsPPD); > > fcupsPPD:=nil; > > DeleteFile(fcupsPPDName); > fcupsPPDName:=''; > end; > > FreeOptions; > > if Assigned(fcupsPrinters) then begin > > cupsFreeDests(Printers.Count,fcupsPrinters); > fcupsPrinters:=nil; // > <- added > end; > end; > > -------------------------------------------------------------------------------- > Index: lcl/printers.pas > =================================================================== > --- lcl/printers.pas (wersja 8395) > +++ lcl/printers.pas (kopia robocza) > @@ -344,7 +344,6 @@ > // it wont be filled on getting printers > // due to only one initialization > GetPrinters; > - DoEnumPrinters(fPrinters); > > fPrinterIndex:=-1; > > @@ -578,6 +577,7 @@ > procedure TPrinter.DoResetPrintersList; > begin > file://Override this methode > + fPrintersValid:=false; > end; > > procedure TPrinter.DoResetFontsList; > I will take a look at this one. Jesus Reyes A. __________________________________________________ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam Ągratis! Regístrate ya - http://correo.yahoo.com.mx/ _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
