Cambiato in 0 il default della write_enable delle relazioni

I colori delle maschere e lo stato dei righelli e' stato spostato da prassi.ini
a user.ini (Ora prassi.ini non contiene 'na mazza di niente)


git-svn-id: svn://10.65.10.50/trunk@1425 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-06-01 09:09:30 +00:00
parent 66f345e712
commit 6b677c5eca
6 changed files with 20 additions and 22 deletions

View File

@ -53,7 +53,7 @@ bool TConfig::_read_paragraph()
if (val[0] == '%')
{
if (val == "%yr%") val.format("%04d", TDate(TODAY).year()); else
if (val == "%frm%") val.format("%05ld", main_app().get_firm());
if (val == "%frm%") val.format("%05ld", prefix().get_codditta());
}
// sostituzione abilitata
_data.add(key,val,TRUE);
@ -431,7 +431,7 @@ TConfig::TConfig(int which_config, const char* paragraph)
break;
case CONFIG_USER:
case CONFIG_STAMPE:
_file = main_app().get_firm_dir();
_file = firm2dir(0);
if (_file.not_empty())
{
for (int i = _file.len()-1; i >= 0; i--)

View File

@ -95,7 +95,7 @@ protected:
virtual void init_modify_mode(TMask&) { } // Inizializza la maschera per il modo modifica
virtual bool force_cursor_usage() const { return FALSE;}
virtual void write_enable(const bool on = TRUE) { get_relation()->write_enable(-1, on); }
virtual void write_enable(bool on = TRUE) { get_relation()->write_enable(0, on); }
void write_disable() { write_enable(FALSE); }
virtual bool save_and_new() const;

View File

@ -1,4 +1,4 @@
// $Id: relation.cpp,v 1.43 1995-05-30 16:01:34 guy Exp $
// $Id: relation.cpp,v 1.44 1995-06-01 09:09:18 guy Exp $
// relation.cpp
// fv 12/8/93
// relation class for isam files
@ -87,18 +87,18 @@ public:
TRelationdef(const TRelation* rel, int file, byte key,
int linkto, const char* relexprs, int alias,
bool allow_lock, bool write_enable = FALSE);
bool allow_lock);
virtual ~TRelationdef() {}
};
TRelationdef::TRelationdef(const TRelation* rel, int idx_file, byte key,
int idx_to, const char* relexprs, int alias,
bool allow_lock, bool write_enable)
bool allow_lock)
: _num(idx_file), _key(key), _numto(idx_to),
_rel(rel), _fields(4), _exprs(4), _alias(alias),
_first_match(FALSE), _allow_lock(allow_lock),
_write_enable(write_enable)
_write_enable(FALSE)
{
TToken_string rels(relexprs);
int i = 0;
@ -374,7 +374,7 @@ TLocalisamfile& TRelation::lfile(const char* name) const
void TRelation::write_enable(int logicnum, const bool on)
{
if (logicnum == - 1)
if (logicnum == 0)
{
for (int i = 0; i < _reldefs.items(); i++)
reldef(i).write_enable(on);
@ -382,8 +382,8 @@ void TRelation::write_enable(int logicnum, const bool on)
else
{
const int idx = log2ind(logicnum);
CHECKD(idx != NOTFOUND, "File not found n. ", logicnum);
reldef(idx).write_enable(on);
CHECKD(idx > 0, "File not found n. ", logicnum);
reldef(idx-1).write_enable(on);
}
}
@ -391,8 +391,8 @@ void TRelation::write_enable(const char* name, const bool on)
{
const int idx = name2ind(name);
CHECKS(idx != NOTFOUND, "File or Table not found:", name);
reldef(idx).write_enable(on);
CHECKS(idx > 0, "File or Table not found:", name);
reldef(idx-1).write_enable(on);
}
@ -442,9 +442,7 @@ TRectype& TRelationdef::load_rec(TRectype& r, const TBaseisamfile& from) const
for (int j = 0 ; j < _fields.items(); j++) // for each field
{
TFieldref& s = (TFieldref&) _fields[j];
s.write(s.read(from.curr()),r);
}

View File

@ -1,4 +1,4 @@
/* $Id: relation.h,v 1.19 1995-05-30 16:01:36 guy Exp $ */
/* $Id: relation.h,v 1.20 1995-06-01 09:09:21 guy Exp $ */
// join.h
// fv 12/8/93
// join class for isam files
@ -52,9 +52,9 @@ public:
TLocalisamfile& lfile(int logicnum = 0) const;
TLocalisamfile& lfile(const char* name) const;
void write_enable(int logicnum = -1, const bool on = TRUE) ;
void write_enable(int logicnum = 0, const bool on = TRUE) ;
void write_enable(const char* name, const bool on = TRUE) ;
void write_disable(int logicnum = -1) { write_enable(logicnum, FALSE); }
void write_disable(int logicnum = 0) { write_enable(logicnum, FALSE); }
void write_disable(const char* name) { write_enable(name, FALSE); }
TRectype& curr(int logicnum = 0) const { return lfile(logicnum).curr(); }

View File

@ -2287,9 +2287,9 @@ TViswin::TViswin(const char *fname,
if (_toplevel)
{
// load info from config on buttons and rulers
TConfig cnf (CONFIG_GENERAL, "Visualizzazione");
_showbuts = cnf.get("Bottoni",NULL,-1,"X") == "X";
_rulers = cnf.get("Righelli",NULL,-1,"X") == "X";
TConfig cnf(CONFIG_USER, "Visualizzazione");
_showbuts = cnf.get_bool("Bottoni", NULL, -1,TRUE);
_rulers = cnf.get_bool("Righelli", NULL, -1,TRUE);
}
const int larg = 76;

View File

@ -557,7 +557,7 @@ void dispatch_e_scroll(WINDOW win, KEY key)
void customize_controls(bool on)
{
TConfig colors(CONFIG_GENERAL, "Colors");
TConfig colors(CONFIG_USER, "Colors");
MASK_BACK_COLOR = colors.get_color("MaskBack", NULL, -1, MASK_BACK_COLOR);
MASK_LIGHT_COLOR = colors.get_color("MaskLight", NULL, -1, MASK_LIGHT_COLOR);
@ -630,7 +630,7 @@ XVT_FNTID xvt_default_font()
NormalFont = GetStockObject(ANSI_FIXED_FONT);
GetObject(NormalFont, sizeof(LOGFONT), &LogFont);
TConfig font(CONFIG_GENERAL, "Font");
TConfig font(CONFIG_USER, "Font");
CHARY = (int)font.get_long("Height");
if (CHARY > 0)
{