WinPrinterContext.st
changeset 2304 f39eb95d4d48
parent 2301 135f21a3d127
child 2313 a3fa5abef172
equal deleted inserted replaced
2303:06b20d5a52da 2304:f39eb95d4d48
    65     "Modified: / 04-08-2006 / 12:55:01 / fm"
    65     "Modified: / 04-08-2006 / 12:55:01 / fm"
    66     "Modified: / 16-04-2007 / 12:36:26 / cg"
    66     "Modified: / 16-04-2007 / 12:36:26 / cg"
    67 ! !
    67 ! !
    68 
    68 
    69 !WinPrinterContext class methodsFor:'accessing'!
    69 !WinPrinterContext class methodsFor:'accessing'!
    70 
       
    71 defaultPrinterName
       
    72     "Answer the name of the default printer, or nil if none."
       
    73     
       
    74     |printerInfo printerName|
       
    75 
       
    76     printerInfo := OperatingSystem getDefaultPrinterName.
       
    77     printerName := (printerInfo copyFrom:1 to:(printerInfo indexOf:$,) - 1) trimBlanks.
       
    78     ^ printerName size == 0 ifTrue:[ nil ] ifFalse:[ printerName ]
       
    79 
       
    80     "
       
    81      PrinterContext defaultPrinterName
       
    82     "
       
    83 
       
    84     "Modified: / 02-08-2006 / 17:26:09 / fm"
       
    85     "Modified: / 10-10-2006 / 17:32:45 / cg"
       
    86 !
       
    87 
    70 
    88 getPrinterInformation:printerNameString 
    71 getPrinterInformation:printerNameString 
    89     " Answer the printer information for the printer named printerNameString.  If no name is specified,
    72     " Answer the printer information for the printer named printerNameString.  If no name is specified,
    90       answer the information for the default printer."
    73       answer the information for the default printer."
    91     
    74     
   614 ! !
   597 ! !
   615 
   598 
   616 !WinPrinterContext class methodsFor:'documentation'!
   599 !WinPrinterContext class methodsFor:'documentation'!
   617 
   600 
   618 version
   601 version
   619     ^ '$Header: /cvs/stx/stx/libview2/WinPrinterContext.st,v 1.2 2007-04-16 10:56:32 cg Exp $'
   602     ^ '$Header: /cvs/stx/stx/libview2/WinPrinterContext.st,v 1.3 2007-04-16 11:04:45 cg Exp $'
   620 ! !
   603 ! !