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:
parent
800c6a4f69
commit
8ceafaef70
@ -44,9 +44,12 @@ HIDDEN bool find_string_callback(TTree& tree, void* jolly, word flags)
|
||||
if (flags == SCAN_PRE_ORDER)
|
||||
{
|
||||
TMenu_tree& mt = (TMenu_tree&)tree;
|
||||
TFind_string_data& data = *(TFind_string_data*)jolly;
|
||||
|
||||
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()))
|
||||
return FALSE;
|
||||
|
||||
@ -449,7 +452,7 @@ void TMenulist_window::draw_item(int i)
|
||||
set_color(item.color(), FOCUS_BACK_COLOR);
|
||||
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);
|
||||
}
|
||||
|
||||
@ -646,9 +649,11 @@ bool TMenulist_window::on_key(KEY k)
|
||||
select(_selected + MENU_COLS, +1);
|
||||
break;
|
||||
case K_LEFT:
|
||||
case K_BTAB:
|
||||
select(_selected-1, -1);
|
||||
break;
|
||||
case K_RIGHT:
|
||||
case K_TAB:
|
||||
select(_selected+1, +1);
|
||||
break;
|
||||
case K_END:
|
||||
|
@ -4,8 +4,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <dos.h>
|
||||
|
||||
#include <applicat.h>
|
||||
#include <extcdecl.h>
|
||||
#include <dongle.h>
|
||||
@ -26,12 +24,6 @@
|
||||
#define Dir_file "dir.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
|
||||
{
|
||||
TDir_sheet* _browse;
|
||||
@ -74,6 +66,7 @@ protected:
|
||||
void close_log();
|
||||
void save_file(const char * file);
|
||||
|
||||
bool moveable_file(int file) const;
|
||||
public:
|
||||
|
||||
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()
|
||||
{
|
||||
// Particolare significato dei flags oltre i 10000:
|
||||
@ -898,7 +897,7 @@ void TManutenzione_app::update_dir()
|
||||
{
|
||||
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());
|
||||
save_file(n);
|
||||
@ -971,7 +970,7 @@ void TManutenzione_app::update_dir()
|
||||
d.get(i, _nolock, _nordir, _sysdirop);
|
||||
|
||||
bool cmn_file = FALSE;
|
||||
bool valid_file = movable_file(i);
|
||||
bool valid_file = moveable_file(i);
|
||||
if (!is_com && valid_file && d.is_com())
|
||||
cmn_file = TRUE; // Salta in questo caso:
|
||||
// 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
|
||||
// vanno creati comunque nel direttorio COM, vuoti, (se non esistono gia').
|
||||
if (is_com && !to_create)
|
||||
if (movable_file(i))
|
||||
if (moveable_file(i))
|
||||
to_create = TRUE;
|
||||
|
||||
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++)
|
||||
{
|
||||
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);
|
||||
tr.put(i);
|
||||
}
|
||||
@ -1305,21 +1304,10 @@ void TManutenzione_app::load_des(const int maxfdir)
|
||||
//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.eox() = (long)last_newln;
|
||||
d.flags() = _level = flags;
|
||||
set_std_level(flags);
|
||||
prefix().set_stdlevel(flags);
|
||||
d.put(LF_DIR,_nordir,_sysdirop);
|
||||
}
|
||||
|
||||
@ -1370,7 +1358,6 @@ void TManutenzione_app::load_des(const int maxfdir)
|
||||
d.put(i, _nordir, _sysdirop);
|
||||
r.set_des();
|
||||
}
|
||||
//remove(desc_file);
|
||||
}
|
||||
}
|
||||
_dirs.add(d, i);
|
||||
@ -1393,11 +1380,11 @@ void TManutenzione_app::update()
|
||||
if (utenti.get("AUTSTR") == "CONVERTING")
|
||||
{
|
||||
#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)
|
||||
break;
|
||||
#else
|
||||
ok = error_box(TR("E' gia' in corso una conversione:\nImpossibile proseguire"));
|
||||
ok = error_box(TR("Conversione in corso:\nImpossibile proseguire"));
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
@ -1411,7 +1398,9 @@ void TManutenzione_app::update()
|
||||
{
|
||||
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);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user