View Issue Details

IDProjectCategoryView StatusLast Update
0031245LazarusPrinterpublic2017-12-01 22:16
Reporterd.l.i.w Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.6.2 
Summary0031245: Expose CUPS header and printer class (printer4lazarus)
DescriptionThe unit "OSPrinters" from package printer4lazarus uses different TPrinter classes depending on the widgetset. On Linux it is impossible to use TCUPSPrinter when using QT, although CUPS does not depend on any widgetset.

Additionally it is not possible to use the CUPS interface directly (cupsdyn.pp). IMO fpc packages would be a better place for this unit.
TagsNo tags attached.
Fixed in Revisionr56528
LazTarget-
Widgetset
Attached Files

Relationships

related to 0032729 closedFlorian FPC Move unit cupsdyn.pp from Lazarus package Printer4Lazarus to FPC sources 

Activities

Juha Manninen

2017-02-01 21:23

developer   ~0097892

Do you have an idea how it should be refactored? I believe a patch would be applied.

d.l.i.w

2017-02-04 00:01

reporter   ~0097956

Last edited: 2017-02-10 14:37

View 4 revisions

1. Expose the CUPS header in cupsdyn.pp
As this unit is platform dependent, "Use unit" cannot be checked and there is no way to use this unit directly (apart from copy&paste).

The best place IMHO would be free pascal packages, but I don't know, what needs to be done to create a new package.
Should I create a separate feature request for this?


2. At the moment the unit "OSPrinters" includes *printers_h.inc and *printers.inc depending on the current platform (* being a specific implementation).

One way to allow access to multiple implementations at the same time would be to create a separate unit for each printer. But the code then still would be platform dependent and "Use unit" cannot be used. Backwards compatibility also may be a issue.

I don't really know the internals of the printer4lazarus package and I'm mainly interested in the cupsdyn.pp unit.


EDIT:
@Juha
I saw your commit and revert. Thanks for trying, but this is exactly the issue I had, otherwise a patch would be rather simple.
There really should be a way to expose platform dependent units in packages to the user....

Juha Manninen

2017-02-10 16:38

developer   ~0098079

You could indeed open a new issue for FPC to include cupsdyn.pp in their libs.
If they add it, we then change other units in Printer4Lazarus accordingly.
Unfortunately it often takes a long time for FPC project to apply patches.

Juha Manninen

2017-11-25 11:23

developer   ~0104252

I fixed the license text in CupsDyn unit to match other units and the Printer4Lazarus package itself.

Juha Manninen

2017-11-28 20:38

developer   ~0104341

Solved by moving unit cupsdyn to FPC sources.

d.l.i.w

2017-12-01 22:16

reporter   ~0104380

Closing, thank you!

Issue History

Date Modified Username Field Change
2017-01-17 20:11 d.l.i.w New Issue
2017-02-01 21:23 Juha Manninen Note Added: 0097892
2017-02-04 00:01 d.l.i.w Note Added: 0097956
2017-02-04 00:02 d.l.i.w Note Edited: 0097956 View Revisions
2017-02-09 12:35 Juha Manninen Assigned To => Juha Manninen
2017-02-09 12:35 Juha Manninen Status new => assigned
2017-02-10 14:37 d.l.i.w Note Edited: 0097956 View Revisions
2017-02-10 14:37 d.l.i.w Note Edited: 0097956 View Revisions
2017-02-10 16:38 Juha Manninen Note Added: 0098079
2017-11-25 11:23 Juha Manninen Note Added: 0104252
2017-11-25 11:39 Juha Manninen Relationship added related to 0032729
2017-11-28 20:38 Juha Manninen Fixed in Revision => r56528
2017-11-28 20:38 Juha Manninen LazTarget => -
2017-11-28 20:38 Juha Manninen Note Added: 0104341
2017-11-28 20:38 Juha Manninen Status assigned => resolved
2017-11-28 20:38 Juha Manninen Resolution open => fixed
2017-12-01 22:16 d.l.i.w Note Added: 0104380
2017-12-01 22:16 d.l.i.w Status resolved => closed