Patch level : 2.0 470

Files correlati     : ba0.exe ba1.exe
Ricompilazione Demo : [ ]
Commento            :

EP20074
Clicco su fine la finestra di dialogo si rimpicciolisce(si verifica spesso
ma non riesco a trovare la sequenza esatta di operazioni che generano
l'errore)


git-svn-id: svn://10.65.10.50/trunk@11145 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-05-16 13:10:09 +00:00
parent 800c6a4f69
commit 8ceafaef70
2 changed files with 24 additions and 30 deletions

View File

@ -44,9 +44,12 @@ HIDDEN bool find_string_callback(TTree& tree, void* jolly, word flags)
if (flags == SCAN_PRE_ORDER) if (flags == SCAN_PRE_ORDER)
{ {
TMenu_tree& mt = (TMenu_tree&)tree; TMenu_tree& mt = (TMenu_tree&)tree;
TFind_string_data& data = *(TFind_string_data*)jolly;
const TSubmenu& sm = mt.curr_submenu(); const TSubmenu& sm = mt.curr_submenu();
if (sm.disabled())
return FALSE;
TFind_string_data& data = *(TFind_string_data*)jolly;
if (data._ignore_list->is_key(sm.name())) if (data._ignore_list->is_key(sm.name()))
return FALSE; return FALSE;
@ -449,7 +452,7 @@ void TMenulist_window::draw_item(int i)
set_color(item.color(), FOCUS_BACK_COLOR); set_color(item.color(), FOCUS_BACK_COLOR);
else else
{ {
COLOR bc = item.enabled() ? NORMAL_BACK_COLOR : DISABLED_BACK_COLOR; COLOR bc = item.enabled() ? REQUIRED_BACK_COLOR : DISABLED_BACK_COLOR;
set_color(item.color(), bc); set_color(item.color(), bc);
} }
@ -646,9 +649,11 @@ bool TMenulist_window::on_key(KEY k)
select(_selected + MENU_COLS, +1); select(_selected + MENU_COLS, +1);
break; break;
case K_LEFT: case K_LEFT:
case K_BTAB:
select(_selected-1, -1); select(_selected-1, -1);
break; break;
case K_RIGHT: case K_RIGHT:
case K_TAB:
select(_selected+1, +1); select(_selected+1, +1);
break; break;
case K_END: case K_END:

View File

@ -4,8 +4,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <errno.h> #include <errno.h>
#include <dos.h>
#include <applicat.h> #include <applicat.h>
#include <extcdecl.h> #include <extcdecl.h>
#include <dongle.h> #include <dongle.h>
@ -26,12 +24,6 @@
#define Dir_file "dir.gen" #define Dir_file "dir.gen"
#define Trc_file "trc.gen" #define Trc_file "trc.gen"
bool movable_file(int file)
{
return file == LF_PCON || file == LF_CLIFO || file == LF_CAUSALI ||
file == LF_RCAUSALI || file == LF_CFVEN || file == LF_INDSP;
}
class TManutenzione_app : public TSkeleton_application class TManutenzione_app : public TSkeleton_application
{ {
TDir_sheet* _browse; TDir_sheet* _browse;
@ -74,6 +66,7 @@ protected:
void close_log(); void close_log();
void save_file(const char * file); void save_file(const char * file);
bool moveable_file(int file) const;
public: public:
TManutenzione_app(); TManutenzione_app();
@ -818,6 +811,12 @@ void TManutenzione_app::repair_file(int i)
} }
} }
bool TManutenzione_app::moveable_file(int file) const
{
return file == LF_PCON || file == LF_CLIFO || file == LF_CAUSALI ||
file == LF_RCAUSALI || file == LF_CFVEN || file == LF_INDSP;
}
void TManutenzione_app::update_dir() void TManutenzione_app::update_dir()
{ {
// Particolare significato dei flags oltre i 10000: // Particolare significato dei flags oltre i 10000:
@ -898,7 +897,7 @@ void TManutenzione_app::update_dir()
{ {
if (is_com) if (is_com)
{ {
if (old_is_firm && !movable_file(i) && d.eod() == 0L) if (old_is_firm && !moveable_file(i) && d.eod() == 0L)
{ {
TFilename n(d.filename()); TFilename n(d.filename());
save_file(n); save_file(n);
@ -971,7 +970,7 @@ void TManutenzione_app::update_dir()
d.get(i, _nolock, _nordir, _sysdirop); d.get(i, _nolock, _nordir, _sysdirop);
bool cmn_file = FALSE; bool cmn_file = FALSE;
bool valid_file = movable_file(i); bool valid_file = moveable_file(i);
if (!is_com && valid_file && d.is_com()) if (!is_com && valid_file && d.is_com())
cmn_file = TRUE; // Salta in questo caso: cmn_file = TRUE; // Salta in questo caso:
// sto aggiornando le ditte, // sto aggiornando le ditte,
@ -1169,7 +1168,7 @@ void TManutenzione_app::convert_dir()
// I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED // I files LF_PCON, LF_CAUS, LF_RCAUS, LF_CLIFO, LF_CFVEN, LF_INDSPED
// vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia'). // vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia').
if (is_com && !to_create) if (is_com && !to_create)
if (movable_file(i)) if (moveable_file(i))
to_create = TRUE; to_create = TRUE;
if (to_create && has_module(module, CHK_DONGLE)) if (to_create && has_module(module, CHK_DONGLE))
@ -1292,7 +1291,7 @@ void TManutenzione_app::load_des(const int maxfdir)
for (int i = last_newln+1; i<ln; i++) for (int i = last_newln+1; i<ln; i++)
{ {
ws.format("$f%d",i); ws.format("$f%d",i);
new_dir.set(ws,0L,-1L, "File non presente",""); new_dir.set(ws,0L,-1L, TR("File non presente"),"");
new_dir.put(i,_nordir,_sysdirop); new_dir.put(i,_nordir,_sysdirop);
tr.put(i); tr.put(i);
} }
@ -1305,21 +1304,10 @@ void TManutenzione_app::load_des(const int maxfdir)
//unlink(fn); //unlink(fn);
} }
/*
// Aggiorna il numero di files presenti in totale nel direttorio
if (last_newln > maxfdir) // rialloca openf altrimenti la TPrefix::closeall() provoca un grazioso errore in applicazione
{
isfdptr *newopenf = new isfdptr[last_newln];
for (int i = 0; i<last_newln; i++)
newopenf[i] = (i<items) ? openf[i] : NULL;
delete openf;
openf = newopenf;
}
*/
d.eod() = (long)last_newln; d.eod() = (long)last_newln;
d.eox() = (long)last_newln; d.eox() = (long)last_newln;
d.flags() = _level = flags; d.flags() = _level = flags;
set_std_level(flags); prefix().set_stdlevel(flags);
d.put(LF_DIR,_nordir,_sysdirop); d.put(LF_DIR,_nordir,_sysdirop);
} }
@ -1370,7 +1358,6 @@ void TManutenzione_app::load_des(const int maxfdir)
d.put(i, _nordir, _sysdirop); d.put(i, _nordir, _sysdirop);
r.set_des(); r.set_des();
} }
//remove(desc_file);
} }
} }
_dirs.add(d, i); _dirs.add(d, i);
@ -1393,11 +1380,11 @@ void TManutenzione_app::update()
if (utenti.get("AUTSTR") == "CONVERTING") if (utenti.get("AUTSTR") == "CONVERTING")
{ {
#ifdef DBG #ifdef DBG
ok = yesno_box(TR("E' gia' in corso una conversione:\nProseguire ugualmente?")); ok = yesno_box(TR("Conversione in corso:\nProseguire ugualmente?"));
if (!ok) if (!ok)
break; break;
#else #else
ok = error_box(TR("E' gia' in corso una conversione:\nImpossibile proseguire")); ok = error_box(TR("Conversione in corso:\nImpossibile proseguire"));
break; break;
#endif #endif
} }
@ -1411,7 +1398,9 @@ void TManutenzione_app::update()
{ {
if (utenti.get_bool("CONNECTED")) if (utenti.get_bool("CONNECTED"))
{ {
#ifndef DBG
ok = error_box(FR("La conversione non puo' essere effettuata\nmentre l'utente %s e' collegato"), (const char*)u); ok = error_box(FR("La conversione non puo' essere effettuata\nmentre l'utente %s e' collegato"), (const char*)u);
#endif
break; break;
} }
} }