Riaggiustata gestione stampanti, maschere e risorse

git-svn-id: svn://10.65.10.50/trunk@531 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-11-04 10:09:35 +00:00
parent 7deaba2654
commit 2a1f95ad3d
7 changed files with 160 additions and 123 deletions

View File

@ -8,12 +8,11 @@
// in modo che la maschera sia compatibile // in modo che la maschera sia compatibile
// con i metodi di ba2300, usati anche // con i metodi di ba2300, usati anche
// da printer // da printer
#define MSK_1_SAVE 112
#define MSK_1_SETUP 333
#define MSK_1_ISGRAPHICS 334 #define MSK_1_ISGRAPHICS 334
#define MSK_1_SIZE 335 #define MSK_1_SIZE 335
#define MSK_1_LINES 336 #define MSK_1_LINES 336
#define MSK_1_NPAGES 337 #define MSK_1_NPAGES 337
#define MSK_1_FONT 338
#define MSK_1_PRINTERFILE prn.epf #define MSK_1_PRINTERFILE prn.epf
#define MSK_1_NAMESFILE nms.epf #define MSK_1_NAMESFILE nms.epf

View File

@ -1,71 +1,57 @@
#include <bagn001a.h> #include <bagn001a.h>
PAGE "IMPOSTAZIONE STAMPANTE" -1 -1 76 10 PAGE "IMPOSTAZIONE STAMPANTE" -1 -1 76 13
RADIOBUTTON MSK_1_TYPE 16 RADIOBUTTON MSK_1_TYPE 70
BEGIN BEGIN
PROMPT 1 1 "Stampa su..." PROMPT 1 1 "Stampa su..."
HELP "Selezionare il tipo di stampa" HELP "Selezionare il tipo di stampa"
ITEM "0|Stampante" ITEM "0|Stampante"
MESSAGE DISABLE,MSK_1_FILENAME|RESET,MSK_1_FILENAME MESSAGE HIDE,MSK_1_FILENAME|RESET,MSK_1_FILENAME|SHOW,MSK_1_PRINTERS
MESSAGE ENABLE,MSK_1_PRINTERS MESSAGE ENABLE,MSK_1_PRINTERS
MESSAGE ENABLE,MSK_1_CODES MESSAGE ENABLE,MSK_1_CODES
MESSAGE ENABLE,MSK_1_SIZE MESSAGE ENABLE,MSK_1_SIZE
ITEM "1|File" MESSAGE ENABLE,MSK_1_LINES
MESSAGE ENABLE,MSK_1_FILENAME|DISABLE,MSK_1_PRINTERS MESSAGE ENABLE,DLG_SETPRINT
MESSAGE ENABLE,MSK_1_CODES ITEM "2|Visualizzazione"
MESSAGE DISABLE,MSK_1_SIZE MESSAGE HIDE,MSK_1_FILENAME|RESET,MSK_1_FILENAME
ITEM "2|Video" MESSAGE SHOW,MSK_1_PRINTERS|DISABLE,MSK_1_PRINTERS
MESSAGE DISABLE,MSK_1_FILENAME|RESET,MSK_1_FILENAME
MESSAGE DISABLE,MSK_1_PRINTERS
MESSAGE DISABLE,MSK_1_CODES MESSAGE DISABLE,MSK_1_CODES
MESSAGE DISABLE,MSK_1_SIZE MESSAGE DISABLE,MSK_1_SIZE
MESSAGE DISABLE,MSK_1_LINES
MESSAGE DISABLE,DLG_SETPRINT
ITEM "1|File"
MESSAGE SHOW,MSK_1_FILENAME|HIDE,MSK_1_PRINTERS
MESSAGE ENABLE,MSK_1_CODES
MESSAGE DISABLE,MSK_1_SIZE
MESSAGE DISABLE,MSK_1_LINES
MESSAGE DISABLE,DLG_SETPRINT
FLAGS "Z"
END END
LIST MSK_1_PRINTERS 40 LIST MSK_1_PRINTERS 50
BEGIN BEGIN
/* viene riempito runtime con nomi letti da config */ /* viene riempito a run-time con nomi letti da config */
PROMPT 21 1 "Stampante " PROMPT 4 5 "Stampante "
HELP "Selezionare la stampante desiderata" HELP "Selezionare la stampante desiderata"
END END
STRING MSK_1_FILENAME 40 STRING MSK_1_FILENAME 52
BEGIN BEGIN
PROMPT 21 3 "Nome file " PROMPT 4 5 "Nome file "
HELP "Inserire qui il nome del file in caso di stampa su file" HELP "Inserire qui il nome del file in caso di stampa su file"
END END
LIST MSK_1_CODES 40 LIST MSK_1_CODES 40
BEGIN BEGIN
PROMPT 21 5 "Tipo stampa " PROMPT 4 6 "Tipo stampa "
/* pure */ /* pure */
HELP "Selezionare la modalita' nelle quale si desidera la stampa" HELP "Selezionare la modalita' nelle quale si desidera la stampa"
END END
BUTTON MSK_1_SETUP 20 1
BEGIN
PROMPT 33 5 "Imposta stampante... "
HELP "Chiama l'Impostazione Stampante di Windows"
MESSAGE EXIT,MSK_1_SETUP
END
BOOLEAN MSK_1_SAVE
BEGIN
PROMPT 1 6 "Salva la configurazione"
HELP "Salva la configurazione corrente della stampante"
END
BOOLEAN MSK_1_ISGRAPHICS
BEGIN
PROMPT 1 7 "Stampa elementi grafici"
HELP "Stampa elementi grafici (linee, box, logo) se la stampante lo consente"
END
LIST MSK_1_SIZE 3 LIST MSK_1_SIZE 3
BEGIN BEGIN
PROMPT 57 5 "Carattere " PROMPT 32 6 "Carattere "
ITEM "7|7" ITEM "7|7"
ITEM "8|8" ITEM "8|8"
ITEM "10|10" ITEM "10|10"
@ -77,7 +63,7 @@ END
LIST MSK_1_LINES 3 LIST MSK_1_LINES 3
BEGIN BEGIN
PROMPT 57 6 "Linee/Inch " PROMPT 52 6 "Linee/Inch "
ITEM "4|4" ITEM "4|4"
ITEM "5|5" ITEM "5|5"
ITEM "6|6" ITEM "6|6"
@ -88,20 +74,51 @@ BEGIN
HELP "Selezionare il numero di linee per pollice" HELP "Selezionare il numero di linee per pollice"
END END
LIST MSK_1_FONT 10
BEGIN
PROMPT 4 6 "Font "
ITEM "1|Courier"
FLAGS "D"
END
NUMBER MSK_1_NPAGES 3 0 NUMBER MSK_1_NPAGES 3 0
BEGIN BEGIN
PROMPT 57 7 "N.o copie " PROMPT 54 8 "N.o copie "
END
BOOLEAN MSK_1_ISGRAPHICS
BEGIN
PROMPT 4 8 "Stampa elementi grafici"
HELP "Stampa elementi grafici (linee, box, logo) se la stampante lo consente"
END END
GROUPBOX DLG_NULL 74 4
BEGIN
PROMPT 1 9 ""
END
BUTTON DLG_SETPRINT 9 2
BEGIN
PROMPT -14 -2 "Imposta"
HELP "Chiama l'Impostazione Stampante di Windows"
MESSAGE EXIT,DLG_SETPRINT
END
BUTTON DLG_SAVEREC 9 2
BEGIN
PROMPT -24 -2 ""
MESSAGE EXIT,K_INS
END
BUTTON DLG_OK 9 2 BUTTON DLG_OK 9 2
BEGIN BEGIN
PROMPT -12 -1 "" PROMPT -34 -2 ""
END END
BUTTON DLG_CANCEL 9 2 BUTTON DLG_CANCEL 9 2
BEGIN BEGIN
PROMPT -22 -1 "" PROMPT -44 -2 ""
END END
ENDPAGE ENDPAGE

View File

@ -564,6 +564,9 @@ TPush_button::TPush_button(short left, short top, short right, short bottom,
case DLG_PRINT: case DLG_PRINT:
capt = format("#%d", BMP_PRINT); capt = format("#%d", BMP_PRINT);
break; break;
case DLG_SETPRINT:
capt = format("#%d", BMP_SETPRINT);
break;
default: default:
break; break;
} }

View File

@ -78,6 +78,7 @@ ACCEL MENU_FILE "f" ALT
BMP_EDIT bitmap DISCARDABLE f:\p.due\bmp\edit.bmp BMP_EDIT bitmap DISCARDABLE f:\p.due\bmp\edit.bmp
BMP_LINK bitmap DISCARDABLE f:\p.due\bmp\link.bmp BMP_LINK bitmap DISCARDABLE f:\p.due\bmp\link.bmp
BMP_PRINT bitmap DISCARDABLE f:\p.due\bmp\print.bmp BMP_PRINT bitmap DISCARDABLE f:\p.due\bmp\print.bmp
BMP_SETPRINT bitmap DISCARDABLE f:\p.due\bmp\setprint.bmp
$$$ $$$
#endif #endif

View File

@ -27,6 +27,7 @@
#define DLG_EDIT 22 /* TAG del bottone Edit */ #define DLG_EDIT 22 /* TAG del bottone Edit */
#define DLG_LINK 23 /* TAG del bottone Collega (applicazione) */ #define DLG_LINK 23 /* TAG del bottone Collega (applicazione) */
#define DLG_PRINT 24 /* TAG del bottone Stampa */ #define DLG_PRINT 24 /* TAG del bottone Stampa */
#define DLG_SETPRINT 25 /* TAG del bottone Imposta Stampa */
#define DLG_USER 100 /* TAG del primo controllo definito dall'utente */ #define DLG_USER 100 /* TAG del primo controllo definito dall'utente */
/* @M /* @M

View File

@ -1,5 +1,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <xvt.h> #include <xvt.h>
#include <urldefid.h>
#if XVT_OS==XVT_OS_SCOUNIX #if XVT_OS==XVT_OS_SCOUNIX
#include <unistd.h> #include <unistd.h>
@ -60,10 +61,10 @@ BOOLEAN TPrinter::start_winprint (long data)
{ {
PrDesc *pd = (PrDesc *) data; PrDesc *pd = (PrDesc *) data;
TTextfile& txt = *(pd->_txt); TTextfile& txt = *(pd->_txt);
TPrintwin pw (pd->_prcd, txt, pd->_charsize); TPrintwin pw(pd->_prcd, txt, pd->_charsize);
pw.print_background (pd->_graphics); pw.print_background (pd->_graphics);
pw.do_print (); pw.do_print();
return pw.aborted (); return pw.aborted();
} }
#endif #endif
@ -619,19 +620,19 @@ bool printers_on_key (TMask_field & f, KEY key)
#if XVT_OS == XVT_OS_WIN #if XVT_OS == XVT_OS_WIN
bool set_windows_print_device (TMask_field & f, KEY key) bool set_windows_print_device (TMask_field& f, KEY key)
{ {
static char szDevice[80]; static char szDevice[80];
if (key == K_SPACE) if (key == K_SPACE && f.mask().is_running())
{ {
if (MainApp()->printer().get_printrcd() != NULL) if (MainApp()->printer().get_printrcd() != NULL)
free_print_rcd (MainApp ()->printer().get_printrcd ()); free_print_rcd (MainApp ()->printer().get_printrcd ());
TToken_string & pn = MainApp()->printer().getprinternames (); TToken_string & pn = MainApp()->printer().getprinternames ();
TString pdev (pn.get (atoi (f.get ()))); TString pdev (pn.get (atoi (f.get())));
GetProfileString ("devices", pdev, "", szDevice, sizeof (szDevice)); GetProfileString ("devices", pdev, "", szDevice, sizeof (szDevice));
pdev << "," << szDevice; pdev << "," << szDevice;
// WriteProfileString("windows","device", pdev); // scrivi (e semmai lo si risistema poi)
// madonna bona WriteProfileString("windows", "device", pdev);
MainApp()->printer().set_printrcd(get_print_rcd (&(MainApp ()->printer ().get_printrcdsize ()))); MainApp()->printer().set_printrcd(get_print_rcd (&(MainApp ()->printer ().get_printrcdsize ())));
MainApp()->printer().set_win_formlen(); MainApp()->printer().set_win_formlen();
} }
@ -688,7 +689,7 @@ TPrinter::TPrinter()
// determine index of current default printer // determine index of current default printer
for (int i = 0; i < pn2.items (); i++) for (int i = 0; i < pn2.items (); i++)
{ {
if (TString(dio.get(0)) == TString(pn2.get (i))) if (TString(dio.get(0)) == TString(pn2.get(i)))
{ {
_curprn = i; _curprn = i;
break; break;
@ -934,7 +935,7 @@ bool TPrinter::printrow (TPrintrow * rowtoprint)
return TRUE; return TRUE;
} }
word TPrinter::rows_left () const word TPrinter::rows_left() const
{ {
word left = _formlen - _currentrow - _footersize + 1; word left = _formlen - _currentrow - _footersize + 1;
if (_currentrow < 2) if (_currentrow < 2)
@ -942,7 +943,7 @@ word TPrinter::rows_left () const
return left; return left;
} }
bool TPrinter ::print (TPrintrow & rowtoprint) bool TPrinter::print(TPrintrow & rowtoprint)
{ {
bool ok = TRUE; bool ok = TRUE;
@ -951,42 +952,42 @@ bool TPrinter ::print (TPrintrow & rowtoprint)
// if (ok && _currentrow <= _headersize) // if (ok && _currentrow <= _headersize)
if (ok && _currentrow == 1) if (ok && _currentrow == 1)
ok = printheader (); ok = printheader();
if (ok) if (ok)
{ {
ok = printrow (&rowtoprint); ok = printrow(&rowtoprint);
_currentrow++; _currentrow++;
} }
return ok; return ok;
} }
bool TPrinter::printheader () bool TPrinter::printheader()
{ {
if (_headerhandler) if (_headerhandler)
_headerhandler (*this); _headerhandler (*this);
bool ok = TRUE; bool ok = TRUE;
for (int i = 0; i < _headersize && ok; i++) for (int i = 0; i < _headersize && ok; i++)
ok = printrow (getheaderline (i)); ok = printrow(getheaderline(i));
_currentrow = _headersize + 1; _currentrow = _headersize + 1;
return ok; return ok;
} }
bool TPrinter::printfooter () bool TPrinter::printfooter()
{ {
if (_footerhandler) if (_footerhandler)
_footerhandler (*this); _footerhandler (*this);
bool ok = TRUE; bool ok = TRUE;
for (int i = 0; i < _footersize && ok; i++) for (int i = 0; i < _footersize && ok; i++)
ok = printrow (getfooterline (i)); ok = printrow(getfooterline(i));
#if XVT_OS != XVT_OS_WIN #if XVT_OS != XVT_OS_WIN
if (ok) if (ok)
printformfeed (); printformfeed();
#endif #endif
_currentrow = 1; _currentrow = 1;
@ -995,79 +996,79 @@ bool TPrinter::printfooter ()
return ok; return ok;
} }
bool TPrinter::skip (int linestoskip) bool TPrinter::skip(int linestoskip)
{ {
int jumpline; int jumpline;
CHECK (linestoskip >= 0, "Linestoskip can't be negative"); CHECK (linestoskip >= 0, "Linestoskip can't be negative");
jumpline = _currentrow + linestoskip; jumpline = _currentrow + linestoskip;
return jump (jumpline); return jump(jumpline);
} }
bool TPrinter::jump (int jumpline) bool TPrinter::jump(int jumpline)
{ {
int i = 0; int i = 0;
bool ok = TRUE; bool ok = TRUE;
CHECK (jumpline >= 0, "Jumpline can't be negative"); CHECK (jumpline >= 0, "Jumpline can't be negative");
if (jumpline > _formlen - _footersize) if (jumpline > _formlen - _footersize)
ok = formfeed (); ok = formfeed();
else else
for (i = _currentrow; i < jumpline; i++) for (i = _currentrow; i < jumpline; i++)
if (!printrow ()) if (!printrow())
ok = FALSE; ok = FALSE;
if (jumpline > _formlen - _footersize) if (jumpline > _formlen - _footersize)
ok = FALSE; ok = FALSE;
return ok; return ok;
} }
bool TPrinter::formfeed () bool TPrinter::formfeed()
{ {
const int lastrow = _formlen - _footersize; const int lastrow = _formlen - _footersize;
for (; _currentrow <= lastrow; _currentrow++) for (; _currentrow <= lastrow; _currentrow++)
printrow (); printrow();
return printfooter (); return printfooter();
} }
void TPrinter::reset () void TPrinter::reset()
{ {
resetheader (); resetheader();
resetfooter (); resetfooter();
_currentpage = 1; _currentpage = 1;
_currentrow = 1; _currentrow = 1;
} }
bool TPrinter::printformfeed () bool TPrinter::printformfeed()
{ {
#if XVT_OS != XVT_OS_WIN #if XVT_OS != XVT_OS_WIN
const PrinterDef & pd = get_description (_curprn); const PrinterDef & pd = get_description(_curprn);
if (_printertype != screenvis && _hwformfeed) if (_printertype != screenvis && _hwformfeed)
fprintf (_fp, "%s", (const char *) pd._ffcode); fprintf(_fp, "%s",(const char *)pd._ffcode);
#endif #endif
return TRUE; return TRUE;
} }
bool TPrinter::open () bool TPrinter::open()
{ {
// qui // qui
#if XVT_OS==XVT_OS_SCOUNIX #if XVT_OS==XVT_OS_SCOUNIX
if (_printertype == spoolprinter) if (_printertype == spoolprinter)
{ {
const PrinterDef & def = get_description (_curprn); const PrinterDef & def = get_description(_curprn);
int pfd[2]; int pfd[2];
if (pipe (pfd) == -1) if (pipe(pfd) == -1)
return error_box ("Impossibile creare processo di stampa " "(pipe)"); return error_box ("Impossibile creare processo di stampa " "(pipe)");
int ret = fork (); int ret = fork();
if (ret == -1) if (ret == -1)
return error_box ("Impossibile creare processo di stampa " "(fork)"); return error_box("Impossibile creare processo di stampa " "(fork)");
if (ret == 0) if (ret == 0)
{ {
if (( :: close (0) != -1) && ( ::dup (pfd[0]) == 0) && if ((::close(0) != -1) && (::dup(pfd[0]) == 0) &&
( :: close (pfd[0]) == 0) && ( ::close (pfd[1]) != -1)) (::close(pfd[0]) == 0) && (::close(pfd[1]) != -1))
{ {
char s0[80]; char s0[80];
@ -1084,12 +1085,12 @@ bool TPrinter::open ()
{ {
char *ws[4] = char *ws[4] =
{"lpr", "-s", s0, NULL}; {"lpr", "-s", s0, NULL};
execvp (ws[0], ws); execvp(ws[0], ws);
} }
exit (-1); exit(-1);
} }
} }
if (( ::close (pfd[0]) == -1) || ((_fp = fdopen (pfd[1], "w")) == NULL)) if ((::close (pfd[0]) == -1) || ((_fp = fdopen(pfd[1], "w")) == NULL))
return error_box ("Impossibile creare processo di stampa" "(close)"); return error_box ("Impossibile creare processo di stampa" "(close)");
} }
else else
@ -1156,21 +1157,21 @@ void TPrinter::set()
} }
((TList_field &) (mask.field (MSK_1_PRINTERS))).replace_items (pn1, pn2); ((TList_field &) (mask.field (MSK_1_PRINTERS))).replace_items (pn1, pn2);
mask.hide(MSK_1_SETUP);
mask.hide(MSK_1_SIZE); mask.hide(MSK_1_SIZE);
mask.hide(MSK_1_LINES); mask.hide(MSK_1_LINES);
mask.disable(DLG_SETPRINT);
if (!_multiple_copies) mask.hide(MSK_1_NPAGES); if (!_multiple_copies) mask.hide(MSK_1_NPAGES);
pn1 = ""; pn1 = "";
pn2 = ""; pn2 = "";
for (i = 0; i < ((PrinterDef &)_printers[_curprn])._names.items (); i++) for (i = 0; i < ((PrinterDef &)_printers[_curprn])._names.items(); i++)
{ {
pn1.add (format ("%d", i)); pn1.add(format ("%d", i));
pn2.add ((TString &)((PrinterDef &) _printers[_curprn])._names[i]); pn2.add((TString &)((PrinterDef &) _printers[_curprn])._names[i]);
} }
((TList_field &) (mask.field (MSK_1_CODES))).replace_items (pn1, pn2); ((TList_field &)(mask.field (MSK_1_CODES))).replace_items(pn1, pn2);
mask.set_handler (MSK_1_PRINTERS, printers_on_key); mask.set_handler (MSK_1_PRINTERS, printers_on_key);
if (_printertype == fileprinter) if (_printertype == fileprinter)
mask.set (MSK_1_TYPE, "1"); mask.set (MSK_1_TYPE, "1");
@ -1179,17 +1180,17 @@ void TPrinter::set()
else else
mask.set (MSK_1_TYPE, "0"); mask.set (MSK_1_TYPE, "0");
mask.set (MSK_1_PRINTERS, format ("%d", _curprn)); mask.set(MSK_1_PRINTERS, format("%d", _curprn));
mask.set (MSK_1_CODES, format ("%d", _curcode)); mask.set(MSK_1_CODES, format("%d", _curcode));
mask.set (MSK_1_FILENAME, _printerfile); mask.set(MSK_1_FILENAME, _printerfile);
mask.set(MSK_1_NPAGES, _ncopies); mask.set(MSK_1_NPAGES, _ncopies);
mask.reset (MSK_1_SAVE); KEY k;
if (mask.run () == K_ESC) if ((k = mask.run()) == K_ESC)
return; return;
if (mask.get_bool(MSK_1_SAVE)) if (k == K_INS) // premuto REGISTRA
mask.save(); mask.save();
// get user choices // get user choices
@ -1232,7 +1233,9 @@ void TPrinter::set()
#else #else
_get_windows_printer_names (pn2); _get_windows_printer_names(pn2);
char old_default[80];
GetProfileString ("windows", "device", ",,,", old_default, sizeof(old_default));
for (i = 0; i < pn2.items (); i++) for (i = 0; i < pn2.items (); i++)
pn1.add(i); pn1.add(i);
@ -1257,55 +1260,67 @@ void TPrinter::set()
mask.set (MSK_1_TYPE, "0"); mask.set (MSK_1_TYPE, "0");
mask.set_handler (MSK_1_PRINTERS, set_windows_print_device); mask.set_handler (MSK_1_PRINTERS, set_windows_print_device);
mask.reset (MSK_1_SAVE);
KEY k; KEY k;
int oldprn = _curprn; int oldprn = _curprn;
while ((k = mask.run ()) != K_ESC && k != K_ENTER) while ((k = mask.run ()) != K_ESC && k != K_ENTER && k != K_INS)
{ {
if (k == MSK_1_SETUP) if (k == DLG_SETPRINT)
{ {
// l'handler setta default di windows a quella nel listbox e ribecca l'rcd
if (_print_rcd != NULL) if (_print_rcd != NULL)
{ {
if (page_setup_dlg (_print_rcd)) if (page_setup_dlg(_print_rcd))
{ {
// see if user has changed printer // see if user has changed printer
// determine index of currently selected printer // determine index of currently selected printer
// ACTHUNG! Deep hacking of XVT internals! NON PORTABLE! // ACTHUNG! Deep hacking of XVT internals! NON PORTABLE!
for (i = 0; i < pn2.items (); i++) if (_print_rcd != NULL)
if (strcmp((const char *)(_print_rcd + 4), pn2.get (i)) == 0) free_print_rcd (_print_rcd);
_print_rcd = get_print_rcd(&_print_rcd_size);
for (i = 0; i < pn2.items(); i++)
if (strcmp((const char *)(_print_rcd + 4), pn2.get(i)) == 0)
{ {
_curprn = i; _curprn = i;
break; break;
} }
mask.set (MSK_1_PRINTERS, pn1.get(_curprn));
set_win_formlen (); mask.set(MSK_1_PRINTERS, pn1.get(_curprn));
set_win_formlen();
} }
mask.set_focus (); mask.set_focus();
} }
else else
beep (); beep ();
} }
} }
_curprn = atoi(mask.get(MSK_1_PRINTERS));
if (k == K_INS)
{
// tutto resta com'e'
mask.save ();
}
if (k == K_ESC || k == K_ENTER)
{
// riaggiusta stampante default windows come prima
// curprn e rcd sono quelle di prima
MainApp()->enable_menu_item(M_FILE_PG_SETUP);
WriteProfileString("windows","device", old_default);
}
if (k == K_ESC) if (k == K_ESC)
{ {
// rimetti come prima
// WriteProfileString("windows","device", pdev);
if (_print_rcd != NULL) if (_print_rcd != NULL)
free_print_rcd (_print_rcd); free_print_rcd (_print_rcd);
_curprn = oldprn; _curprn = oldprn;
_print_rcd = get_print_rcd(&_print_rcd_size); _print_rcd = get_print_rcd(&_print_rcd_size);
set_win_formlen (); set_win_formlen();
MainApp()->enable_menu_item(M_FILE_PG_SETUP);
return; return;
} }
_curprn = atoi(mask.get(MSK_1_PRINTERS));
if (mask.get_bool(MSK_1_SAVE))
mask.save ();
_ncopies = atoi (mask.get (MSK_1_NPAGES)); _ncopies = atoi (mask.get (MSK_1_NPAGES));
switch (atoi (mask.get (MSK_1_TYPE))) switch (atoi (mask.get (MSK_1_TYPE)))

View File

@ -62,6 +62,7 @@
#define BMP_DELRECDN 154 #define BMP_DELRECDN 154
#define BMP_NEWRECDN 155 #define BMP_NEWRECDN 155
#define BMP_QUITDN 164 #define BMP_QUITDN 164
#define BMP_SETPRINT 165
#endif #endif