The R Project SVN R

Rev

Rev 19110 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19110 Rev 33093
Line 22... Line 22...
22
 *                          printer use drawto(...) and the drawXXX
22
 *                          printer use drawto(...) and the drawXXX
23
 *                          functions + nextpage(printer)
23
 *                          functions + nextpage(printer)
24
 *                          printers can be deleted by 'del(printer)'
24
 *                          printers can be deleted by 'del(printer)'
25
 */
25
 */
26
 
26
 
-
 
27
#define ENABLE_NLS 1
-
 
28
#include "../win-nls.h"
27
#include "internal.h"
29
#include "internal.h"
28
#include "rui.h"
30
#include "rui.h"
29
 
31
 
30
 
32
 
31
/*
33
/*
Line 85... Line 87...
85
 
87
 
86
    dc = PrintDlg( &pd ) ? pd.hDC : NULL;
88
    dc = PrintDlg( &pd ) ? pd.hDC : NULL;
87
    SetCurrentDirectory(cwd);
89
    SetCurrentDirectory(cwd);
88
    if (!dc) {
90
    if (!dc) {
89
	rc = CommDlgExtendedError(); /* 0 means user cancelled */
91
	rc = CommDlgExtendedError(); /* 0 means user cancelled */
90
	if (rc) R_ShowMessage("Unable to choose printer");
92
	if (rc) R_ShowMessage(_("Unable to choose printer"));
91
    }
93
    }
92
    return dc;
94
    return dc;
93
}
95
}
94
 
96
 
95
 
97
 
Line 113... Line 115...
113
	}
115
	}
114
    } else hDC = chooseprinter();
116
    } else hDC = chooseprinter();
115
    if ( !hDC ) return NULL;
117
    if ( !hDC ) return NULL;
116
    obj = new_object(PrinterObject, (HANDLE) hDC, get_printer_base());
118
    obj = new_object(PrinterObject, (HANDLE) hDC, get_printer_base());
117
    if ( !obj ) {
119
    if ( !obj ) {
118
	R_ShowMessage("Insufficient memory for new printer");
120
	R_ShowMessage(_("Insufficient memory for new printer"));
119
	DeleteDC(hDC);
121
	DeleteDC(hDC);
120
	return NULL;
122
	return NULL;
121
    }
123
    }
122
    if ((width == 0.0) && (height == 0.0)) {
124
    if ((width == 0.0) && (height == 0.0)) {
123
	ww = GetDeviceCaps(hDC, HORZRES);
125
	ww = GetDeviceCaps(hDC, HORZRES);
Line 146... Line 148...
146
    docinfo.lpszOutput = 0;		/* no file output... */
148
    docinfo.lpszOutput = 0;		/* no file output... */
147
    docinfo.lpszDatatype = 0;
149
    docinfo.lpszDatatype = 0;
148
    docinfo.fwType = 0;
150
    docinfo.fwType = 0;
149
 
151
 
150
    if (StartDoc(hDC, &docinfo) <= 0) {
152
    if (StartDoc(hDC, &docinfo) <= 0) {
151
	R_ShowMessage("Unable to start the print job");
153
	R_ShowMessage(_("Unable to start the print job"));
152
	del(obj);
154
	del(obj);
153
	return NULL;
155
	return NULL;
154
    }
156
    }
155
 
157
 
156
    StartPage(hDC);
158
    StartPage(hDC);