From bda6dbec205039451d15f1f8921ec8d1dfa6025a Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 13 Dec 2006 22:14:29 +0000 Subject: [PATCH] Patch level : 4.0 667 Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 766 git-svn-id: svn://10.65.10.50/trunk@14631 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba1100.cpp | 34 ++++++++++++++++++++-------------- include/applicat.cpp | 4 ++-- include/inst.cpp | 2 ++ include/spotlite.cpp | 2 +- include/utility.cpp | 2 +- xvaga/xvt.h | 2 +- xvaga/xvtextra.cpp | 3 +-- 7 files changed, 28 insertions(+), 21 deletions(-) diff --git a/ba/ba1100.cpp b/ba/ba1100.cpp index d3857563b..14a9bebae 100755 --- a/ba/ba1100.cpp +++ b/ba/ba1100.cpp @@ -47,7 +47,7 @@ protected: void insert_riga(long, TToken_string&); void edit_riga(long, TToken_string&); void edit_riga(const TString&); - void delete_riga(); + void delete_riga(long); virtual bool extended_firm() const { return true; } bool recover(TSystemisamfile& f, int err); @@ -760,25 +760,28 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga) } } -void TManutenzione_app::delete_riga () +void TManutenzione_app::delete_riga (long riga_sel) { - _browse->dir()->get(LF_DIR); - if (_browse->dir()->eod() == 0) return; + const int logicnum = int(riga_sel) + 1; + const int num_files = (int)_browse->items(); + TTrec r; - int logicnum = (int)_browse->items(); + /* shift di uno in avanti degli elementi del direttorio partendo dall'ultimo */ + for (int i = logicnum + 1; i <= num_files; i++) + { + _browse->dir()->get (i, _nolock, _nordir, _sysdirop); + _browse->dir()->put (i - 1, _nordir, _sysdirop); + _browse->rec()->get (i); + _browse->rec()->put (i - 1); + } - _browse->dir()->get(logicnum); - if (!yesno_box(FR("Confermare l'eliminzione dell'archivio %s"), _browse->dir()->name())) - return; _browse->dir()->get(LF_DIR); + r.zero(); + r.put(_browse->dir()->eod()); _browse->dir()->eod()--; _browse->set_items(_browse->dir()->eod()); _browse->dir()->put(LF_DIR); - - // Azzera il tracciato record del file eliminato. - TTrec r; - r.zero(); - r.put(logicnum); + _browse->force_update(); } bool TManutenzione_app::recover(TSystemisamfile& f, int err) @@ -1548,7 +1551,10 @@ void TManutenzione_app::main_loop() edit_riga (riga_selezionata, riga); break; - case K_DEL: delete_riga(); break; + case K_DEL: + riga_selezionata = _browse->selected(); + delete_riga(riga_selezionata); + break; case K_QUIT: case K_ESC: done = true; close_history(); break; diff --git a/include/applicat.cpp b/include/applicat.cpp index 18e49fe5f..e01ffc2e2 100755 --- a/include/applicat.cpp +++ b/include/applicat.cpp @@ -178,8 +178,8 @@ HIDDEN void paint_background(WINDOW win) xvt_dwin_draw_text(win, x, y, t, -1); xvtil_set_font(win, NULL, XVT_FS_NONE); - TString spa; - t = producer_name(spa); +// TString spa; qui +// t = producer_name(spa); w = xvt_dwin_get_text_width(win, t, -1); x = (r.right-r.left-w)>>1; y = r.bottom-CHARY; xvt_dwin_draw_text(win, x, y, t, -1); diff --git a/include/inst.cpp b/include/inst.cpp index 9a8fe1636..81f5c313d 100755 --- a/include/inst.cpp +++ b/include/inst.cpp @@ -4,6 +4,8 @@ #include #include "../ba/bainsta.h" +#define AUT_FILE "campo.aut" + // ******************************** // classe TSystemtempfile // ******************************** diff --git a/include/spotlite.cpp b/include/spotlite.cpp index 668277d1c..8b6b8d0d1 100755 --- a/include/spotlite.cpp +++ b/include/spotlite.cpp @@ -88,6 +88,6 @@ bool spotlite_send_mail(const TFilename& pdf) bool ui = true; bool ok = main_app().get_next_mail(to, cc, ccn, subj, text, attach, ui); - ok = xvt_mail_send(to, cc, ccn, subj, text, attach, ui) != 0; + ok = xvt_mail_send(to, cc, ccn, subj, text, attach, ui) != 0; return ok; } diff --git a/include/utility.cpp b/include/utility.cpp index 5c2398582..452e443a1 100755 --- a/include/utility.cpp +++ b/include/utility.cpp @@ -575,7 +575,7 @@ istream & eatwhite(istream & i) const TString & get_hostname() { - Tstring & tmp = get_tmp_string(256); + TString & tmp = get_tmp_string(256); char* buff = tmp.get_buffer(); if (xvt_sys_get_host_name(buff, tmp.size())) diff --git a/xvaga/xvt.h b/xvaga/xvt.h index 7ded7321d..41b064a5f 100755 --- a/xvaga/xvt.h +++ b/xvaga/xvt.h @@ -174,7 +174,7 @@ XVTDLL BOOLEAN xvt_fsys_test_disk_free_space(const char* path, unsigned l XVTDLL BOOLEAN xvt_fsys_mkdir(const char *pathname); XVTDLL BOOLEAN xvt_fsys_rmdir(const char *pathname); XVTDLL BOOLEAN xvt_fsys_removefile(const char *pathname); -XVTDLL BOOLEAN xvt_fsys_access(const char *pathname, int mode); +XVTDLL int xvt_fsys_access(const char *pathname, int mode); XVTDLL BOOLEAN xvt_fsys_file_exists(const char *pathname); XVTDLL int xvt_fsys_get_campo_stp_value(const char* name, char* value, int valsize); XVTDLL const char* xvt_fsys_get_campo_ini(); diff --git a/xvaga/xvtextra.cpp b/xvaga/xvtextra.cpp index ff92c9370..0aa845952 100755 --- a/xvaga/xvtextra.cpp +++ b/xvaga/xvtextra.cpp @@ -117,7 +117,7 @@ public: bool HasBadDriver() const { return m_bBadDriver; } wxString PrinterName() const; - bool IsPDF() const { return !HasBadDriver() && xvt_print_is_pdf(m_prcd) != 0; } + bool IsPDF() const { return !HasBadDriver() && xvt_print_is_pdf((PRINT_RCD *)m_prcd) != 0; } void InitDC(const TPRINT_RCD* prcd, const char* title); TwxPrintOut(const TPRINT_RCD* prcd = NULL); @@ -205,7 +205,6 @@ wxDC* TwxPrintOut::CreateDC(const TPRINT_RCD* prcd, const char* title) if (ispdf) dc = new TwxPDFDC(data, title); else - { #ifdef WIN32 dc = new wxPrinterDC(data); #else