Patch level : 10.0

Files correlati     : ba0 ba1 ba8
Ricompilazione Demo : [ ]
Commento            :
Migliore supporto per compilazione DEMO
Aggiunto supporto per campi booleani nell'editor di report


git-svn-id: svn://10.65.10.50/trunk@19532 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-10-28 10:25:32 +00:00
parent 145d520370
commit 092d797131
7 changed files with 24 additions and 36 deletions

View File

@ -323,11 +323,12 @@ bool TMenuitem::perform_program() const
}
if (_firm && main_app().get_firm() == 0)
#ifdef _DEMO_
ok = menu().set_firm(1);
#else
ok = menu().set_firm(0);
#endif
{
if (dongle().demo())
ok = menu().set_firm(1); // Forza la ditta 1
else
ok = menu().set_firm(0); // Chiede la ditta all'utente
}
if (ok)
{
@ -615,13 +616,8 @@ bool TMenu::jumpto(TSubmenu* next)
{
if (next->query_firm())
{
#ifdef _DEMO_
if (!set_firm(1))
if (!set_firm(dongle().demo() ? 1 : 0))
next = NULL;
#else
if (!set_firm(0))
next = NULL;
#endif
}
if (next)
{

View File

@ -315,15 +315,14 @@ bool TManutenzione_app::create() // initvar e arrmask
TString sw(argc()>2 ? argv(2) : "");
// Posso fare le operazione avanzate solo se sono ammistratore
// e NON mi trovo su di una installazione di tipo client
_superprassi = user() == ::dongle().administrator();
_superprassi = user() == ::dongle().administrator() && !::dongle().demo();
if (_superprassi)
{
TConfig campo_ini(CONFIG_INSTALL, "Main");
const int type = campo_ini.get_int("Type");
const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type");
if (type == 1 || type == 2)
_superprassi = true;
else
_superprassi = campo_ini.get_bool("TestDatabase");
_superprassi = ini_get_bool(CONFIG_INSTALL, "Main", "TestDatabase");
}
if (argc() > 2 && sw == "-C")
@ -358,19 +357,15 @@ bool TManutenzione_app::create() // initvar e arrmask
dump_trc(dir,des_too,modules);
return false;
}
#ifndef _DEMO_
else
if (!set_firm())
if (!::dongle().demo() && !set_firm())
return false;
#endif
load_des();
_mask = new TMask("ba1100a");
_browse = new TDir_sheet(TR("Manutenzione file di sistema"), _superprassi);
if (_superprassi)
{
_mask->enable(-1); // Abilita campi privilegiati del gruppo 1
}
}
enable_menu_item(M_FILE_PRINT);
return TSkeleton_application::create();

View File

@ -136,10 +136,8 @@ int TInstall_ini::build_complete_list(const TString& module, TString_array& a,
const char* sommario, bool agg)
{
if (sommario && *sommario)
{
TConfig sum(sommario, "Main");
sum.set("Demo", demo() ? "X" : "");
}
ini_set_bool(sommario, "Main", "Demo", demo());
// Lista dei file appartenenti ai sottomoduli del modulo principale (0-9)
build_list(module, a, sommario, agg);

View File

@ -18,7 +18,7 @@ public:
void export_paragraph(const char* module, const char* summary,const bool remove);
void export_module_paragraphs(const char* module, const char* summary,const bool remove);
bool demo() { return get_bool("Demo", "Main"); }
bool demo() const { return get_bool("Demo", "Main"); }
const TString& version(const char* module);
int patch(const char* module);
void version_info(const char* module,

View File

@ -676,13 +676,11 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
if (year < 2009)
return error_box(FR("Il modulo '%s' non ha una versione valida."), module);
#ifndef _DEMO_
if (year > dongle().year_assist())
{
if (!update_assistance_year())
return false;
}
#endif
TAuto_token_string altri(ini.get("Moduli", module));
if (xvt_str_compare_ignoring_case(module, "sy") != 0) //SY e' indipendente dagli altri moduli

View File

@ -11,6 +11,7 @@ BEGIN
ITEM "V|Valuta"
ITEM "P|Prezzo"
ITEM "D|Data"
ITEM "B|Booleano"
ITEM "A|Array (Lista)"
ITEM "I|Immagine"
ITEM "L|Linea"

View File

@ -428,14 +428,14 @@ bool TReport_base_mask::on_field_event(TOperable_field& o, TField_event e, long
case F_FGCOLOR:
if (e == fe_button)
{
_fgcolor = xvt_dm_post_choose_color(win(), _fgcolor);
_fgcolor = choose_color(_fgcolor, o.parent());
force_update();
}
break;
case F_BGCOLOR:
if (e == fe_button)
{
_bgcolor = xvt_dm_post_choose_color(win(), _bgcolor);
_bgcolor = choose_color(_bgcolor, o.parent());
force_update();
}
break;
@ -570,7 +570,7 @@ void TReport_field_mask::vedo_non_vedo()
const bool is_text = is_numeric || strchr("ADST", type) != NULL;
show(F_HIDE_ZEROES, is_numeric || type == 'D'),
show(F_HALIGN, is_text);
show(F_HALIGN, is_text || type == 'B');
if (is_numeric)
{
disable(F_HALIGN);
@ -579,20 +579,20 @@ void TReport_field_mask::vedo_non_vedo()
else
enable(F_HALIGN);
show(F_VALIGN, is_text);
show(F_VALIGN, is_text || type == 'B');
show(F_TEXT, is_text && !is_currency);
show(F_HIDE_DOTS, is_currency);
show(F_DYNAMIC_HEIGHT, type == 'S');
show(F_FGCOLOR, type != 'I');
show(F_BGCOLOR, type != 'L');
show(F_PATTERN, type != 'L' && type != 'I');
show(F_RADIUS, type != 'E' && type != 'L' && type != 'I');
show(F_SHADE_OFFSET,type != 'E' && type != 'L');
show(F_PATTERN, type != 'L' && type != 'I' && type != 'B');
show(F_RADIUS, type != 'E' && type != 'L' && type != 'I' && type != 'B');
show(F_SHADE_OFFSET,type != 'E' && type != 'L' && type != 'B');
show(F_FONT_SELECT, is_text); // Bottone font
show(F_PRFONT_SELECT, is_text); // Bottone font stampante
enable(DLG_BAR, is_text); // Bottone font sulla toolbar
show(F_SOURCE, (is_text || type == 'I') && type != 'T');
show(F_SOURCE2, is_text && type != 'T');
show(F_SOURCE, (is_text || type == 'I' || type == 'B') && type != 'T');
show(F_SOURCE2, field(F_SOURCE).shown());
enable(DLG_FINDREC, is_text && type != 'T');
show(F_CODVAL, is_currency); // Codice valuta di riferimento
show(F_LINK, strchr("DNS", type) != NULL); // Chi puo' essere un link?