libDtSearch: Remove optional code for NO_DBN which is not used on CDE
[oweals/cde.git] / cde / programs / types / printerNN.dt.src
1 XCOMM ######################################################################
2 XCOMM 
3 XCOMM      printerNN.dt
4 XCOMM 
5 XCOMM      Template file for configuring printers in the printer sub-panel.
6 XCOMM 
7 XCOMM     (c) Copyright 1993, 1994 Hewlett-Packard Company
8 XCOMM     (c) Copyright 1993, 1994 International Business Machines Corp.
9 XCOMM     (c) Copyright 1993, 1994 Sun Microsystems, Inc.
10 XCOMM     (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary
11 XCOMM         of Novell, Inc.
12 XCOMM 
13 XCOMM      $XConsortium: printerNN.dt.src /main/4 1996/04/23 17:36:17 drk $
14 XCOMM 
15 XCOMM #####################################################################
16
17 XCOMM ##############################
18 XCOMM 
19 XCOMM  To configure a printer in the DT printer slide-up:
20 XCOMM 
21 XCOMM   1. Identify which printer icon in the slide-up panel should be
22 XCOMM      associated with the printer.  Icons are numbered from the
23 XCOMM      top beginning with 01.  (E.g 01 is the top icon, 02 is the
24 XCOMM      next, etc.)
25 XCOMM 
26 XCOMM   2. Copy this file to CDE_INSTALLATION_TOP/examples/types/printer<NN>.dt
27 XCOMM      where <NN> is replaced by the number of the icon.  For
28 XCOMM      example, copy it to CDE_INSTALLATION_TOP/examples/types/printer01.dt to
29 XCOMM      configure the top printer.
30 XCOMM 
31 XCOMM   3. Edit the "set PRINTER_NUMBER=nn" line below and replace
32 XCOMM      "nn" with the number of the printer icon.  For example,
33 XCOMM      change it to "set PRINTER_NUMBER=01" for the top printer
34 XCOMM      icon. 
35 XCOMM 
36 XCOMM   4. Edit the "set PRINTER_NAME=name" line below and replace
37 XCOMM      "name" with the device name assigned to the printer in step
38 XCOMM      1.
39 XCOMM 
40 XCOMM   5. Invoke the ReloadApps action from the System_Admin
41 XCOMM      container of the General toolbox.
42 XCOMM 
43 XCOMM ###############################
44
45 set PRINTER_NUMBER=nn
46 set PRINTER_NAME=name
47
48 ACTION Print${PRINTER_NUMBER}
49 {
50         ARG_TYPE        *
51         TYPE            COMMAND
52         WINDOW_TYPE     NO_STDIO
53         EXEC_STRING     lp -d${PRINTER_NAME} %(File)Args%
54 }
55
56 ACTION PrinterInfo${PRINTER_NUMBER}
57 {
58         TYPE            COMMAND
59         WINDOW_TYPE     OUTPUT_ONLY
60         EXEC_STRING     \
61           sh -c ' \
62             (echo %|nls-8001-#"Printer#|; \
63            lpstat -r -p${PRINTER_NAME}) | \${PAGER:-more}; \
64             echo %|nls-8002-#Select#|'
65 }