McdeSys gains mcde_sys_print_file(path, printer): it looks for lp(1) (/usr/bin, /usr/local/bin, /usr/sbin, pkg prefix; MCDE_PRINT_COMMAND overrides it for tests), passes -d PRINTER when one is named, and runs it as the existing job (fd into the event loop, finish/cancel). dtpaint links libMcdeSys, adds File > Print... (Ctrl+P): it picks the default queue from mcde_sys_printers (or the first), writes the image to /tmp/dtpaint-PID.bmp, starts the job and removes the file when the job ends; errors and 'no printer is set up' go to the information dialog. Measured under Xvfb with MCDE_PRINT_COMMAND=fake lp: argv '-d HP_LaserJet_M110w_CC1016 /tmp/dtpaint-3543226.bmp', the fake copied a valid 640x480 BMP and the temporary file was gone; no physical page was printed (the real queue is the user's step).
15 lines
287 B
Makefile
15 lines
287 B
Makefile
MAINTAINERCLEANFILES = Makefile.in
|
|
|
|
bin_PROGRAMS = dtpaint
|
|
|
|
dtpaint_CPPFLAGS = -I$(top_srcdir)/include \
|
|
-DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\"
|
|
|
|
dtpaint_LDADD = $(LIBMCDESYS) $(DTCLIENTLIBS) $(XTOOLLIB)
|
|
|
|
if SOLARIS
|
|
dtpaint_LDADD += -lintl
|
|
endif
|
|
|
|
dtpaint_SOURCES = dtpaint.c
|