diff --git a/include/b3.uml b/include/b3.uml index 7a7caf5ff..c5f644507 100755 --- a/include/b3.uml +++ b/include/b3.uml @@ -1,87 +1,96 @@ -#include - -PAGE "CAMPO DI STAMPA" -1 -1 60 12 - -LIST F_CLASS 10 -BEGIN - PROMPT 1 1 "Tipo " - FLAGS "D" - ITEM "STRING|Testo" MESSAGE HIDE,2@ - ITEM "NUMBER|Numero" MESSAGE SHOW,2@ - ITEM "DATE|Data" MESSAGE HIDE,2@ - ITEM "LIST|Selettore" MESSAGE HIDE,2@ -END - -STRING F_KEY 44 -BEGIN - PROMPT 1 2 "Descrizione " -END - -NUMBER F_Y 3 -BEGIN - PROMPT 1 4 "Riga " -END - -NUMBER F_X 3 -BEGIN - PROMPT 21 4 "Colonna " -END - -NUMBER F_WIDTH 3 -BEGIN - PROMPT 41 4 "Dimensione " -END - -STRING F_PROMPT 40 -BEGIN - PROMPT 1 5 "Testo " -END - -BOOLEAN F_HIDDEN -BEGIN - PROMPT 1 6 "Nascosto" -END - -BOOLEAN F_DISABLED -BEGIN - PROMPT 21 6 "Disabilitato" -END - -BOOLEAN F_AUTOMAGIC -BEGIN - PROMPT 41 6 "Automatico" - FLAGS "H" -END - -STRING F_FIELD 24 -BEGIN - PROMPT 1 7 "Campo su file " - FLAGS "H" -END - -STRING F_PICTURE 16 -BEGIN - PROMPT 1 8 "Formato di stampa " - GROUP 2 -END - - -STRING F_GROUP 16 -BEGIN - PROMPT 1 9 "Gruppo di stampa " -END - - -BUTTON DLG_OK 9 2 -BEGIN - PROMPT -12 -1 "" -END - -BUTTON DLG_CANCEL 9 2 -BEGIN - PROMPT -22 -1 "" -END - -ENDPAGE - -ENDMASK +#include + +PAGE "CAMPO DI STAMPA" -1 -1 60 12 + +LIST F_CLASS 10 +BEGIN + PROMPT 1 1 "Tipo " + FLAGS "D" + ITEM "STRING|Testo" MESSAGE HIDE,2@ + ITEM "NUMBER|Numero" MESSAGE SHOW,2@ + ITEM "DATE|Data" MESSAGE HIDE,2@ + ITEM "LIST|Selettore" MESSAGE HIDE,2@ +END + +STRING F_KEY 44 +BEGIN + PROMPT 1 2 "Descrizione " + HELP "Descrizione del campo da configurare" +END + +NUMBER F_Y 3 +BEGIN + PROMPT 1 4 "Riga " + HELP "Riga in cui stampare il campo" +END + +NUMBER F_X 3 +BEGIN + PROMPT 21 4 "Colonna " + HELP "Colonna in cui stampare il campo" +END + +NUMBER F_WIDTH 3 +BEGIN + PROMPT 41 4 "Dimensione " + HELP "Lunghezza di stampa del campo" +END + +STRING F_PROMPT 40 +BEGIN + PROMPT 1 5 "Testo " + HELP "Eventuale commento al valore del campo" +END + +BOOLEAN F_HIDDEN +BEGIN + PROMPT 1 6 "Nascosto" + HELP "Inidcare se il campo va calcolato ma non visualizzato" +END + +BOOLEAN F_DISABLED +BEGIN + PROMPT 21 6 "Disabilitato" + HELP "Indicare se il campo viene ignorato" +END + +BOOLEAN F_AUTOMAGIC +BEGIN + PROMPT 41 6 "Automatico" + FLAGS "H" +END + +STRING F_FIELD 24 +BEGIN + PROMPT 1 7 "Campo su file " + FLAGS "H" +END + +STRING F_PICTURE 16 +BEGIN + PROMPT 1 8 "Formato di stampa " + HELP "Indicare il formato in cui stampare il campo (vedi codici sul manuale)" + GROUP 2 +END + + +STRING F_GROUP 16 +BEGIN + PROMPT 1 9 "Gruppo di stampa " + HELP "Indicare il numero del gruppo nel quale rientra il campo" +END + + +BUTTON DLG_OK 9 2 +BEGIN + PROMPT -12 -1 "" +END + +BUTTON DLG_CANCEL 9 2 +BEGIN + PROMPT -22 -1 "" +END + +ENDPAGE + +ENDMASK diff --git a/include/bagn001a.uml b/include/bagn001a.uml index 15bdf16c8..2fb6f8cdf 100755 --- a/include/bagn001a.uml +++ b/include/bagn001a.uml @@ -5,7 +5,7 @@ PAGE "IMPOSTAZIONE STAMPANTE" -1 -1 76 13 RADIOBUTTON MSK_1_TYPE 70 BEGIN PROMPT 1 1 "Stampa su..." - HELP "Selezionare il tipo di stampa" + HELP "Selezionare il tipo dove direzionare la stampa" ITEM "0|Stampante" MESSAGE HIDE,MSK_1_FILENAME|RESET,MSK_1_FILENAME|SHOW,MSK_1_PRINTERS MESSAGE ENABLE,MSK_1_PRINTERS @@ -33,20 +33,20 @@ LIST MSK_1_PRINTERS 50 BEGIN /* viene riempito a run-time con nomi letti da config */ PROMPT 4 5 "Stampante " - HELP "Selezionare la stampante desiderata" + HELP "Selezionare il tipo di stampante desiderata" END STRING MSK_1_FILENAME 52 BEGIN PROMPT 4 5 "Nome file " - HELP "Inserire qui il nome del file in caso di stampa su file" + HELP "Nome del file su cui direzionare la stampa" END LIST MSK_1_CODES 40 BEGIN PROMPT 4 6 "Tipo stampa " /* pure */ - HELP "Selezionare la modalita' nelle quale si desidera la stampa" + HELP "Modalita' nelle quale si desidera la stampa" END LIST MSK_1_SIZE 3 @@ -58,7 +58,7 @@ BEGIN ITEM "12|12" ITEM "15|15" ITEM "17|17" - HELP "Selezionare le dimensioni del carattere di stampa" + HELP "Dimensioni del carattere di stampa" END LIST MSK_1_LINES 3 @@ -71,12 +71,13 @@ BEGIN ITEM "8|8" ITEM "9|9" ITEM "10|10" - HELP "Selezionare il numero di linee per pollice" + HELP "Numero di linee per pollice" END LIST MSK_1_FONT 10 BEGIN PROMPT 4 6 "Font " + HELP "Font di stampa su video o stampante" ITEM "1|Courier" FLAGS "D" END @@ -84,12 +85,13 @@ END NUMBER MSK_1_NPAGES 3 0 BEGIN PROMPT 54 8 "N.o copie " + HELP "Numero di copie da fare" END BOOLEAN MSK_1_ISGRAPHICS BEGIN PROMPT 4 8 "Stampa elementi grafici" - HELP "Stampa elementi grafici (linee, box, logo) se la stampante lo consente" + HELP "Indicare se stampare elementi grafici (linee, box, logo) quando la stampante lo consente" END diff --git a/include/bagn002.uml b/include/bagn002.uml index 8a6942d51..def2b7d2f 100755 --- a/include/bagn002.uml +++ b/include/bagn002.uml @@ -5,7 +5,7 @@ PAGE "Selezione Ditta" -1 -1 64 7 NUMBER F_CODDITTA 5 BEGIN PROMPT 1 1 "Codice " - HELP "Codice della ditta" + HELP "Codice della ditta da attivare" FLAGS "FR" USE LF_NDITTE KEY 1 CHECKTYPE NORMAL @@ -22,6 +22,7 @@ END LIST F_TIPO 20 BEGIN PROMPT 40 1 "" + HELP "Tipo di dati da selezionare" ITEM "0|Ditte" MESSAGE ENABLE,1@ ITEM "1|Dati comuni" @@ -36,7 +37,7 @@ STRING F_RAGSOC 50 BEGIN PROMPT 1 3 "Rag. Soc. " USE LF_NDITTE KEY 2 - HELP "Ragione sociale della ditta" + HELP "Ragione sociale della ditta da selezionare" INPUT RAGSOC F_RAGSOC DISPLAY "Ragione sociale@50" RAGSOC DISPLAY "Codice" CODDITTA diff --git a/include/bagn004.uml b/include/bagn004.uml index 350dc3cba..42df630c2 100755 --- a/include/bagn004.uml +++ b/include/bagn004.uml @@ -24,7 +24,7 @@ END STRING F_FILE_DESTINAZIONE 13 BEGIN PROMPT 27 4 "Nome file " - HELP "Assegna il nome del file che verra' generato" + HELP "Nome del file che verra' generato" END STRING F_LABEL 12 @@ -52,4 +52,3 @@ END ENDPAGE ENDMASK - diff --git a/include/controls.cpp b/include/controls.cpp index 5147557fe..8f3e3991a 100755 --- a/include/controls.cpp +++ b/include/controls.cpp @@ -185,7 +185,7 @@ void TControl::create( _win = xvtcm_create(id, left, top, right, bottom, prop_count, (char**)prop_list, parent, 0, 0, NULL, handler, set_creation_args); - CHECKS(_win, "Can't create control ", title); + CHECKD(_win, "Can't create control ", id); creating = NULL; set_app_data(_win, app_data); diff --git a/include/mask.h b/include/mask.h index e7d29e434..c5bab53ee 100755 --- a/include/mask.h +++ b/include/mask.h @@ -55,6 +55,7 @@ protected: // Ritorna la finestra della pagina corrente (Usare con attenzione) WINDOW win() const { return _page == -1 ? NULL_WIN : _pagewin[_page]; } WINDOW toolwin() const { return _pagewin[MAX_PAGES]; } + WINDOW fieldwin(short id) const { return field(id).win(); } int find_field_win(WINDOW win) const; // number of field with window win diff --git a/include/maskfld.cpp b/include/maskfld.cpp index 6ff3e4f23..027542b28 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -1,4 +1,4 @@ -// $Id: maskfld.cpp,v 1.46 1994-11-14 13:22:38 guy Exp $ +// $Id: maskfld.cpp,v 1.47 1994-11-15 11:23:06 guy Exp $ #include #include @@ -37,6 +37,7 @@ TMask_field::TField_Flags::TField_Flags() dirty = focusdirty = FALSE; roman = exchange = FALSE; firm = ghost = FALSE; + password = FALSE; } // Certified 100% @@ -46,6 +47,8 @@ char TMask_field::TField_Flags::update(const char* s) for (; *s; s++) switch(toupper(*s)) { + case '*': + password = TRUE; break; case 'A': automagic = persistent = TRUE; break; case 'D': @@ -1443,13 +1446,18 @@ KEY TBrowse::run() TToken_string* sib = siblings.empty() ? NULL : &siblings; byte buttons = 0; if (_insert.not_empty()) - { + { + TFilename path; if (_insert[0] == 'M') - buttons = 1; + path = "ba3 -0"; else { - TExternal_app a(_insert.mid(1)); - if (a.can_run()) buttons = 1; + path = _insert.mid(1); + if (main_app().name() != cmd2name(path)) // Se non lancerei me stesso e ... + { + TExternal_app a(path); + if (a.can_run()) buttons = 1; // ... se c'e' memoria + } } } @@ -1816,7 +1824,10 @@ void TEdit_field::create(WINDOW parent) { const int len = create_prompt(parent); - long align = _flags.rightjust ? CTL_FLAG_RIGHT_JUST : CTL_FLAG_LEFT_JUST; + long bandiere = _flags.rightjust ? CTL_FLAG_RIGHT_JUST : CTL_FLAG_LEFT_JUST; + if (_flags.uppercase) bandiere |= CTL_FLAG_MAC_GENEVA9; + if (_flags.password) bandiere |= CTL_FLAG_MAC_MONACO9; + _x += len; #if XVTWS == WMWS @@ -1825,14 +1836,11 @@ void TEdit_field::create(WINDOW parent) const int delta = 1; #endif - wincreate(WC_EDIT, _width+delta, 1, _str, parent, align); + wincreate(WC_EDIT, _width+delta, 1, _str, parent, bandiere); #if XVT_OS == XVT_OS_WIN HWND hwnd = (HWND)get_value(win(), ATTR_NATIVE_WINDOW); SendMessage(hwnd, EM_LIMITTEXT, _size, 0L); // Limita il testo - long style = GetWindowLong(hwnd, GWL_STYLE); - if (_flags.uppercase) style != ES_UPPERCASE; // Edit in maiuscolo - SetWindowLong(hwnd, GWL_STYLE, style); #endif if (_browse || _sheet) diff --git a/include/maskfld.h b/include/maskfld.h index 9e02a0292..397464f5a 100755 --- a/include/maskfld.h +++ b/include/maskfld.h @@ -1,4 +1,4 @@ -/* $Id: maskfld.h,v 1.8 1994-11-14 10:00:04 guy Exp $ */ +/* $Id: maskfld.h,v 1.9 1994-11-15 11:23:11 guy Exp $ */ #ifndef __MASKFLD_H #define __MASKFLD_H @@ -70,6 +70,7 @@ protected: bool firm : 1; // Is the current firm ? bool focusdirty : 1; // Modified during focus ? bool ghost : 1; + bool password : 1; bool persistent : 1; bool rightjust : 1; bool roman : 1; // Is a Roman number ? diff --git a/include/msksheet.cpp b/include/msksheet.cpp index c151bfa6c..ac90b9c2d 100755 --- a/include/msksheet.cpp +++ b/include/msksheet.cpp @@ -624,6 +624,7 @@ break; { set_dirty(3); xiev->refused = TRUE; + mask2str(_cur_row); } } break; diff --git a/include/prassi.ver b/include/prassi.ver index 2b2f55dd9..0704a4464 100755 --- a/include/prassi.ver +++ b/include/prassi.ver @@ -1 +1 @@ -#define VERSION 1.16 +#define VERSION 1.15 diff --git a/include/prefix.cpp b/include/prefix.cpp index 7e4b117b7..4fb8fed54 100755 --- a/include/prefix.cpp +++ b/include/prefix.cpp @@ -18,7 +18,6 @@ HIDDEN const char* const glockname = "xx"; TPrefix::TPrefix() - { CHECK(prefhndl == NULL, "Can't create two prefix objects"); @@ -27,6 +26,14 @@ TPrefix::TPrefix() _recfl = recfl; _fdir = fdir; _rdir = rdir; + + CGetPref(); + const long primaditta = atol(cprefix); + if (primaditta > 0 && !exist(primaditta)) + { + ofstream out_pr("prefix.txt"); + out_pr << "com" << endl; + } } diff --git a/include/relapp.cpp b/include/relapp.cpp index 06cda6e8e..f9e99cbeb 100755 --- a/include/relapp.cpp +++ b/include/relapp.cpp @@ -1,4 +1,4 @@ -// $Id: relapp.cpp,v 1.27 1994-11-14 13:22:46 guy Exp $ +// $Id: relapp.cpp,v 1.28 1994-11-15 11:23:19 guy Exp $ #include #include #include @@ -562,7 +562,7 @@ bool TRelation_application::save(bool check_dirty) KEY k; if (errore) { - if (annulla) k = yesno_box("Annullare %s?", ms); + if (annulla) k = yesno_box("Annullare %s?", ms) ? K_NO : K_ESC; else k = K_ESC; } else @@ -592,7 +592,8 @@ bool TRelation_application::save(bool check_dirty) } } was_dirty = FALSE; - + + xvt_statbar_set("Registrazione in corso ..."); if (mode == MODE_INS) { bool changed = TRUE; diff --git a/include/stdtypes.cpp b/include/stdtypes.cpp index 414e10d49..3cd05b339 100755 --- a/include/stdtypes.cpp +++ b/include/stdtypes.cpp @@ -4,7 +4,6 @@ #define __STDTYPES_CPP #include -#include #include #include @@ -34,7 +33,8 @@ void init_global_vars() CHECK(prefhndl == NULL, "Can't init global vars two times"); prefhndl = new TPrefix; - prefhndl->set("DEF"); + + // prefhndl->set("DEF"); prefhndl->set(""); stdlevel = prefhndl->filelevel(); diff --git a/include/strings.cpp b/include/strings.cpp index 0453349d2..7efc224c5 100755 --- a/include/strings.cpp +++ b/include/strings.cpp @@ -560,8 +560,8 @@ void TFilename::ext(const char* e) // Certified 90% const char* TFilename::name() const { - const char* d = strrchr(_str, '\\'); - if (d == NULL) d = strrchr(_str, '/'); + const char* d = strrchr(_str, '/'); + if (d == NULL) d = strrchr(_str, '\\'); if (d == NULL) d = strchr(_str, ':'); if (d == NULL) d = _str-1; return d+1; @@ -570,8 +570,8 @@ const char* TFilename::name() const // Certified 90% const char* TFilename::path() const { - const char* d = strrchr(_str, '\\'); - if (d == NULL) d = strrchr(_str, '/'); + const char* d = strrchr(_str, '/'); + if (d == NULL) d = strrchr(_str, '\\'); if (d == NULL) { d = strchr(_str, ':'); @@ -589,9 +589,10 @@ const TFilename& TFilename::tempdir() if (dirpref == NULL) dirpref = getenv("TMP"); if (dirpref == NULL) dirpref = "/tmp"; set(dirpref); + const int last = len()-1; - - if (!is_not_slash(_str[last])) cut(last); + if (!is_not_slash(_str[last])) + cut(last); int res = 0; @@ -605,15 +606,15 @@ const TFilename& TFilename::tempdir() #endif } - if (res == 0) - { - if (not_empty()) + const TString& user = main_app().user(); + if (res == 0 && user.not_empty()) + { #if XVT_OS==XVT_OS_SCOUNIX - *this << '/' ; + *this << '/' #else - *this << '\\' ; + *this << '\\' #endif - *this << main_app().user(); + << user; lower(); if (!fexist(_str)) { diff --git a/include/xvtility.cpp b/include/xvtility.cpp index 44673144f..10261e063 100755 --- a/include/xvtility.cpp +++ b/include/xvtility.cpp @@ -208,6 +208,7 @@ static BOOLEAN event_hook(HWND hwnd, HIDDEN WIN_TYPE _wc_type = W_NONE; +HIDDEN long _bandiere = 0L; static void createwindow_hook(DWORD* exstyle, LPCSTR* classname, LPCSTR* windowname, DWORD* styl, int* x, int* y, int* width, int* height, HWND* parent, HMENU* menu, @@ -215,12 +216,13 @@ static void createwindow_hook(DWORD* exstyle, LPCSTR* classname, LPCSTR* windown { if (_wc_type == WC_EDIT) { - *y++; - } else - if (_wc_type == WC_GROUPBOX) - { - *classname = "Static"; - } + if (_bandiere & CTL_FLAG_RIGHT_JUST) + *exstyle |= ES_MULTILINE | ES_RIGHT; + if (_bandiere & CTL_FLAG_MAC_GENEVA9) + *exstyle |= ES_UPPERCASE; + if (_bandiere & CTL_FLAG_MAC_MONACO9) + *exstyle |= ES_PASSWORD; + } _wc_type = W_NONE; } @@ -489,8 +491,8 @@ void customize_controls(bool on) { set_value(NULL_WIN,ATTR_WIN_PM_DRAWABLE_TWIN, TRUE); set_value(NULL_WIN,ATTR_EVENT_HOOK, (long)event_hook); + set_value(NULL_WIN,ATTR_WIN_CREATEWINDOW_HOOK, (long)createwindow_hook); #ifdef __CTL3D__ - // set_value(NULL_WIN,ATTR_WIN_CREATEWINDOW_HOOK, (long)createwindow_hook); HINSTANCE _hInstance = (HINSTANCE)get_value(NULL_WIN, ATTR_WIN_INSTANCE); Ctl3dRegister(_hInstance); Ctl3dAutoSubclass(_hInstance); @@ -632,6 +634,8 @@ WINDOW xvt_create_control(WIN_TYPE wt, #if XVT_OS == XVT_OS_WIN _wc_type = wt; + _bandiere = flags; + flags &= ~(CTL_FLAG_MAC_MONACO9 | CTL_FLAG_MAC_GENEVA9); if (wt == WC_PUSHBUTTON) win = xvt_create_pushbutton(r.left, r.top, r.right, r.bottom, @@ -674,8 +678,9 @@ WINDOW xvt_create_control(WIN_TYPE wt, if (dy == 2) r.bottom -= ROWY; if (id == DLG_F9) { wt = WC_TEXT; r.right = r.left+CHARX; caption = "*"; } - else if (*caption == '#') caption = ""; + else if (*caption == '*') caption = ""; } + while (*caption == '@') caption += 2; win = create_control(wt, &r, (char*)caption, parent, flags, app_data, id); @@ -694,7 +699,13 @@ WINDOW xvt_create_control(WIN_TYPE wt, #endif { HWND hwnd = (HWND)get_value(win, ATTR_NATIVE_WINDOW); - SendMessage(hwnd, WM_SETFONT, NormalFont, TRUE); + SendMessage(hwnd, WM_SETFONT, NormalFont, FALSE); + if (_bandiere & CTL_FLAG_MAC_MONACO9) + SendMessage(hwnd, EM_SETPASSWORDCHAR, (WORD)'#', 0); +#ifdef DBG + DWORD stylecheck = GetWindowLong(hwnd, GWL_STYLE); + stylecheck |= 0; +#endif #ifdef __CTL3D__ Ctl3dSubclassCtl(hwnd); #endif