From 54e3d963a89f50372fc36021dff9361dc84864b7 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 19 Dec 2003 14:34:56 +0000 Subject: [PATCH] Patch level : 2.0 664 Files correlati : ba2.exe Ricompilazione Demo : [ ] Commento : CM20075 Bisogna che anche la cartella Custom venga salvata come File di configurazione. Sia quella presente nel direttorio della ditta sia quella che si trova nel direttorio dati comuni. git-svn-id: svn://10.65.10.50/trunk@11685 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba0102.cpp | 25 ++++++++++++++++--------- ba/ba2200.cpp | 19 ++++++++++++++++--- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/ba/ba0102.cpp b/ba/ba0102.cpp index 9f9fd1b8a..01d32608b 100755 --- a/ba/ba0102.cpp +++ b/ba/ba0102.cpp @@ -582,20 +582,27 @@ void TMenulist_window::handler(WINDOW win, EVENT* ep) { case E_MOUSE_DOWN: { - int index = 0; - if (ep->v.mouse.button > 0) // Tasto destro = Torna sł + RCT rct; xvt_vobj_get_client_rect(win, &rct); + const int row = ep->v.mouse.where.v * MENU_ROWS / rct.bottom; + const int col = ep->v.mouse.where.h * MENU_COLS / rct.right; + const index = row * MENU_COLS + col; + if (ep->v.mouse.button > 0) // Tasto destro { - if (!_can_go_back) - return; + if (index < _sorted.items()) + { + const TMenuitem& mi = (const TMenuitem&)_sorted[index]; + message_box(mi.action()); + } + else + { + if (_can_go_back) + click_on(0); + } } else { - RCT rct; xvt_vobj_get_client_rect(win, &rct); - const int row = ep->v.mouse.where.v * MENU_ROWS / rct.bottom; - const int col = ep->v.mouse.where.h * MENU_COLS / rct.right; - index = row * MENU_COLS + col; + click_on(index); // Tasto sinistro } - click_on(index); } break; default: diff --git a/ba/ba2200.cpp b/ba/ba2200.cpp index 11ce2bb45..3a2ea59c9 100755 --- a/ba/ba2200.cpp +++ b/ba/ba2200.cpp @@ -1,3 +1,5 @@ +#include + #include #include @@ -197,7 +199,7 @@ bool TArchive_app::split_file(const TFilename& archive, unsigned long max_chunk) fclose(o); add_file(output); - TString16 ext; ext.format("z%02d", ++disk); + TString4 ext; ext.format("z%02d", ++disk); output.ext(ext); o = fopen(output, "wb"); scritti = 0; @@ -339,7 +341,7 @@ void TArchive_app::backup(int mode, long firm, const TFilename& floppy_path, con const TString16 old = prefix().name(); prefix().set(NULL); // Libera tutti i lock - long max_chunk = ~0; + long max_chunk = LONG_MAX; if (xvt_fsys_is_removable_drive(floppy_path)) { message_box(FR("Inserire un disco vuoto nel drive %c:"), floppy_path[0]); @@ -376,12 +378,20 @@ void TArchive_app::backup(int mode, long firm, const TFilename& floppy_path, con name.add("config"); // Aggiungi configurazioni ok = zip_dir(name, max_chunk); } + if (ok && (mode & 0x4)) + { + name = firm2dir(-1); // __ptprf + name.add("custom"); // Aggiungi personalizzazioni + if (name.exist()) + ok = zip_dir(name, max_chunk); + } if (ok && (mode & 0x8)) { name = firm2dir(-1); // __ptprf name.add("m770"); // Aggiungi 770 - ok = zip_dir(name, max_chunk); + if (name.exist()) + ok = zip_dir(name, max_chunk); } prefix().set(old); // Ripristina prefix @@ -490,7 +500,10 @@ void TArchive_app::restore(int mode, long firm, const TFilename& floppy_path) } if (mode & 0x4) + { read_paragraph(ini, "config"); + read_paragraph(ini, "custom"); + } if (mode & 0x8) read_paragraph(ini, "m770");