Corretto e migliorato aspetto e colorazione spreadsheet
git-svn-id: svn://10.65.10.50/branches/R_10_00@22658 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8d8d430ce0
commit
aab604b35f
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#define ANA_TIPOA "TIPOA"
|
#define ANA_TIPOA "TIPOA"
|
||||||
#define ANA_CODANAGR "CODANAGR"
|
#define ANA_CODANAGR "CODANAGR"
|
||||||
|
#define ANA_STATOPAIV "STATOPAIV"
|
||||||
#define ANA_PAIV "PAIV"
|
#define ANA_PAIV "PAIV"
|
||||||
#define ANA_COFI "COFI"
|
#define ANA_COFI "COFI"
|
||||||
#define ANA_RAGSOC "RAGSOC"
|
#define ANA_RAGSOC "RAGSOC"
|
||||||
|
@ -196,7 +196,8 @@ bool delete_box(const char* fmt, ...)
|
|||||||
ASK_RESPONSE r = RESP_DEFAULT;
|
ASK_RESPONSE r = RESP_DEFAULT;
|
||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
const bool no_def = ini_get_bool(CONFIG_GUI, "Colors", "NoOnDelete", dongle().active(LVAUT));
|
const bool no_def = ini_get_bool(CONFIG_GUI, "Colors", "NoOnDelete",
|
||||||
|
dongle().number() > 0 && dongle().active(LVAUT));
|
||||||
if (no_def)
|
if (no_def)
|
||||||
r = xvt_dm_post_ask("No", "Si", NULL, msg);
|
r = xvt_dm_post_ask("No", "Si", NULL, msg);
|
||||||
else
|
else
|
||||||
|
@ -457,6 +457,8 @@ void customize_colors()
|
|||||||
|
|
||||||
BTN_DARK_COLOR = colors.get_color("ButtonDark", NULL, -1, BTN_DARK_COLOR);
|
BTN_DARK_COLOR = colors.get_color("ButtonDark", NULL, -1, BTN_DARK_COLOR);
|
||||||
aga_set_pref(AGA_PREF_BTN_COLOR_DARK, BTN_DARK_COLOR);
|
aga_set_pref(AGA_PREF_BTN_COLOR_DARK, BTN_DARK_COLOR);
|
||||||
|
|
||||||
|
aga_set_pref(AGA_PREF_BTN_COLOR_TEXT, PROMPT_COLOR);
|
||||||
|
|
||||||
if (_picture)
|
if (_picture)
|
||||||
_picture->reload();
|
_picture->reload();
|
||||||
@ -1858,12 +1860,11 @@ void TPushbutton_control::update()
|
|||||||
XI_RCT rct; xi_get_rect(_obj, &rct); // = _obj->v.btn->rct;
|
XI_RCT rct; xi_get_rect(_obj, &rct); // = _obj->v.btn->rct;
|
||||||
xi_inflate_rect(&rct, -3);
|
xi_inflate_rect(&rct, -3);
|
||||||
xi_set_clip(win, &rct);
|
xi_set_clip(win, &rct);
|
||||||
|
|
||||||
// Cancello il testo sottostante
|
/*if (CAMPI_SCAVATI)
|
||||||
CBRUSH brush = { PAT_SOLID, BTN_BACK_COLOR };
|
xi_draw_shaded_rect(win, &rct, _obj->v.btn->down, 2, BTN_LIGHT_COLOR, BTN_BACK_COLOR, BTN_DARK_COLOR);
|
||||||
xvt_dwin_set_cbrush((WINDOW)win, &brush);
|
else*/
|
||||||
xvt_dwin_set_std_cpen((WINDOW)win, TL_PEN_HOLLOW);
|
xi_draw_3d_rect(win, &rct, _obj->v.btn->down, 2, BTN_LIGHT_COLOR, BTN_BACK_COLOR, BTN_DARK_COLOR);
|
||||||
xi_draw_rect(win, &rct);
|
|
||||||
|
|
||||||
const int bmp = (_bmp_dn > 0 && _obj->v.btn->down) ? _bmp_dn : _bmp_up;
|
const int bmp = (_bmp_dn > 0 && _obj->v.btn->down) ? _bmp_dn : _bmp_up;
|
||||||
if (bmp > 0)
|
if (bmp > 0)
|
||||||
|
@ -1468,5 +1468,5 @@ bool Tdninst::encode(const TString& f) const
|
|||||||
Tdninst::Tdninst() : _year_assist(0)
|
Tdninst::Tdninst() : _year_assist(0)
|
||||||
{
|
{
|
||||||
TEnigma_machine s;
|
TEnigma_machine s;
|
||||||
_year_assist = s.year_assist(); // 2091 or 2101?
|
_year_assist = s.year_assist(); // 2101 or 2121?
|
||||||
}
|
}
|
||||||
|
@ -88,12 +88,7 @@ int findfld(const RecDes *recd, const char *s)
|
|||||||
return(FIELDERR);
|
return(FIELDERR);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool __file_is_crypted(int logicnum)
|
void __getfieldbuff(byte l, byte t, const char * recin, TString& s)
|
||||||
{
|
|
||||||
return logicnum == LF_TURNI;
|
|
||||||
}
|
|
||||||
|
|
||||||
void __getfieldbuff(byte l, byte t, const char * recin, TString& s, bool is_crypted)
|
|
||||||
{
|
{
|
||||||
CHECK(recin, "Can't read from a Null record");
|
CHECK(recin, "Can't read from a Null record");
|
||||||
|
|
||||||
@ -153,7 +148,7 @@ void __getfieldbuff(byte l, byte t, const char * recin, TString& s, bool is_cryp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __putfieldbuff(byte l, byte d, byte t, const char* s, char* recout, bool is_crypted)
|
void __putfieldbuff(byte l, byte d, byte t, const char* s, char* recout)
|
||||||
{
|
{
|
||||||
CHECK(recout, "Can't write null record" );
|
CHECK(recout, "Can't write null record" );
|
||||||
|
|
||||||
@ -3540,7 +3535,7 @@ const TString& TRectype::get_str(const char* fieldname) const
|
|||||||
{
|
{
|
||||||
const RecFieldDes& fd = recd.Fd[nf];
|
const RecFieldDes& fd = recd.Fd[nf];
|
||||||
TString& tmp = get_tmp_string(fd.Len + (fd.TypeF == _datefld ? 2 : 0));
|
TString& tmp = get_tmp_string(fd.Len + (fd.TypeF == _datefld ? 2 : 0));
|
||||||
__getfieldbuff(fd.Len, fd.TypeF, _rec + fd.RecOff, tmp, __file_is_crypted(num()));
|
__getfieldbuff(fd.Len, fd.TypeF, _rec + fd.RecOff, tmp);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -3608,7 +3603,7 @@ char TRectype::get_char(const char* fieldname) const
|
|||||||
bool TRectype::get_bool(const char* fieldname) const
|
bool TRectype::get_bool(const char* fieldname) const
|
||||||
{
|
{
|
||||||
const char c = get_char(fieldname);
|
const char c = get_char(fieldname);
|
||||||
return strchr("XY1", c) != NULL;
|
return (c == 'X') || (c == '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
TDate TRectype::get_date(const char* fieldname) const
|
TDate TRectype::get_date(const char* fieldname) const
|
||||||
@ -3696,7 +3691,7 @@ void TRectype::put_str(const char* fieldname, const char* val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
__putfieldbuff(fd.Len, fd.Dec, ft, val, _rec + fd.RecOff, __file_is_crypted(num()));
|
__putfieldbuff(fd.Len, fd.Dec, ft, val, _rec + fd.RecOff);
|
||||||
}
|
}
|
||||||
|
|
||||||
setempty(FALSE);
|
setempty(FALSE);
|
||||||
@ -3732,10 +3727,10 @@ void TRectype::zero(const char* fieldname)
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case _datefld:
|
case _datefld:
|
||||||
__putfieldbuff(len, dec, _datefld, "", p, __file_is_crypted(num()));
|
__putfieldbuff(len, dec, _datefld, "", p);
|
||||||
break;
|
break;
|
||||||
case _memofld:
|
case _memofld:
|
||||||
__putfieldbuff(len, dec, _memofld, "", p, __file_is_crypted(num()));
|
__putfieldbuff(len, dec, _memofld, "", p);
|
||||||
_memo_data->add("", nf);
|
_memo_data->add("", nf);
|
||||||
_memo_data->set_dirty(nf);
|
_memo_data->set_dirty(nf);
|
||||||
break;
|
break;
|
||||||
@ -4147,7 +4142,7 @@ int TRecfield::operator =(int i)
|
|||||||
{
|
{
|
||||||
TString16 buff; buff << i;
|
TString16 buff; buff << i;
|
||||||
if (_sub_field.empty())
|
if (_sub_field.empty())
|
||||||
__putfieldbuff( _len, _dec, _type, buff, _p, __file_is_crypted(_rec->num()));
|
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||||
else
|
else
|
||||||
put_subfield(buff);
|
put_subfield(buff);
|
||||||
_rec->setempty(FALSE);
|
_rec->setempty(FALSE);
|
||||||
@ -4159,7 +4154,7 @@ long TRecfield::operator =(long l)
|
|||||||
{
|
{
|
||||||
TString16 buff; buff << l;
|
TString16 buff; buff << l;
|
||||||
if (_sub_field.empty())
|
if (_sub_field.empty())
|
||||||
__putfieldbuff( _len, _dec, _type, buff, _p, __file_is_crypted(_rec->num()));
|
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||||
else
|
else
|
||||||
put_subfield(buff);
|
put_subfield(buff);
|
||||||
_rec->setempty(false);
|
_rec->setempty(false);
|
||||||
@ -4170,7 +4165,7 @@ const real& TRecfield::operator =(const real& r)
|
|||||||
{
|
{
|
||||||
const char* buff = r.string();
|
const char* buff = r.string();
|
||||||
if (_sub_field.empty())
|
if (_sub_field.empty())
|
||||||
__putfieldbuff( _len, _dec, _type, buff, _p, __file_is_crypted(_rec->num()));
|
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||||
else
|
else
|
||||||
put_subfield(buff);
|
put_subfield(buff);
|
||||||
_rec->setempty(FALSE);
|
_rec->setempty(FALSE);
|
||||||
@ -4181,7 +4176,7 @@ const TDate& TRecfield::operator =(const TDate& d)
|
|||||||
{
|
{
|
||||||
const TString16 buff = d.stringa();
|
const TString16 buff = d.stringa();
|
||||||
if (_sub_field.empty())
|
if (_sub_field.empty())
|
||||||
__putfieldbuff( _len, _dec, _type, buff, _p, __file_is_crypted(_rec->num()));
|
__putfieldbuff( _len, _dec, _type, buff, _p);
|
||||||
else
|
else
|
||||||
put_subfield(buff);
|
put_subfield(buff);
|
||||||
_rec->setempty(FALSE);
|
_rec->setempty(FALSE);
|
||||||
@ -4195,7 +4190,7 @@ const char* TRecfield::operator =(const char* s)
|
|||||||
if (_type == _memofld)
|
if (_type == _memofld)
|
||||||
_rec->put(_name, s);
|
_rec->put(_name, s);
|
||||||
else
|
else
|
||||||
__putfieldbuff( _len, _dec, _type, s, _p, __file_is_crypted(_rec->num()));
|
__putfieldbuff( _len, _dec, _type, s, _p);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
put_subfield(s);
|
put_subfield(s);
|
||||||
@ -4257,7 +4252,7 @@ TRecfield::operator int() const
|
|||||||
if (_type == _intfld || _type == _intzerofld || _type == _longfld || _type == _longzerofld)
|
if (_type == _intfld || _type == _intzerofld || _type == _longfld || _type == _longzerofld)
|
||||||
tmp.strncpy(_p, _len);
|
tmp.strncpy(_p, _len);
|
||||||
else
|
else
|
||||||
__getfieldbuff( _len, _type, _p, tmp, __file_is_crypted(_rec->num()));
|
__getfieldbuff( _len, _type, _p, tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
get_subfield(tmp);
|
get_subfield(tmp);
|
||||||
@ -4274,7 +4269,7 @@ TRecfield::operator long() const
|
|||||||
if (_type == _longfld || _type == _longzerofld || _type == _intfld || _type == _intzerofld)
|
if (_type == _longfld || _type == _longzerofld || _type == _intfld || _type == _intzerofld)
|
||||||
tmp.strncpy(_p, _len);
|
tmp.strncpy(_p, _len);
|
||||||
else
|
else
|
||||||
__getfieldbuff( _len, _type, _p, tmp, __file_is_crypted(_rec->num()));
|
__getfieldbuff( _len, _type, _p, tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
get_subfield(tmp);
|
get_subfield(tmp);
|
||||||
@ -4292,7 +4287,7 @@ TRecfield::operator const real() const
|
|||||||
if (_type == _realfld)
|
if (_type == _realfld)
|
||||||
tmp.strncpy(_p, _len);
|
tmp.strncpy(_p, _len);
|
||||||
else
|
else
|
||||||
__getfieldbuff( _len, _type, _p, tmp, __file_is_crypted(_rec->num()));
|
__getfieldbuff( _len, _type, _p, tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
get_subfield(tmp);
|
get_subfield(tmp);
|
||||||
@ -4312,7 +4307,7 @@ TRecfield::operator TDate() const
|
|||||||
tmp.strncpy(_p, 8);
|
tmp.strncpy(_p, 8);
|
||||||
return TDate(atol(tmp));
|
return TDate(atol(tmp));
|
||||||
}
|
}
|
||||||
__getfieldbuff(_len, _type, _p, tmp, __file_is_crypted(_rec->num()));
|
__getfieldbuff(_len, _type, _p, tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
get_subfield(tmp);
|
get_subfield(tmp);
|
||||||
@ -4329,7 +4324,7 @@ TRecfield::operator const char*() const
|
|||||||
{
|
{
|
||||||
if (_type == _memofld)
|
if (_type == _memofld)
|
||||||
return _rec->get(_name);
|
return _rec->get(_name);
|
||||||
__getfieldbuff(_len, _type, _p, tmp, __file_is_crypted(_rec->num()));
|
__getfieldbuff(_len, _type, _p, tmp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
get_subfield(tmp);
|
get_subfield(tmp);
|
||||||
|
@ -1320,7 +1320,7 @@ WINDOW TMask::create_book(bool single)
|
|||||||
CHECK(_single == NULL_WIN, "Notebook and Single?");
|
CHECK(_single == NULL_WIN, "Notebook and Single?");
|
||||||
XVT_COLOR_COMPONENT xcc[4]; memset(xcc, 0, sizeof(xcc));
|
XVT_COLOR_COMPONENT xcc[4]; memset(xcc, 0, sizeof(xcc));
|
||||||
xcc[0].type = XVT_COLOR_BACKGROUND; xcc[0].color = MASK_BACK_COLOR;
|
xcc[0].type = XVT_COLOR_BACKGROUND; xcc[0].color = MASK_BACK_COLOR;
|
||||||
xcc[1].type = XVT_COLOR_FOREGROUND; xcc[1].color = NORMAL_COLOR;
|
xcc[1].type = XVT_COLOR_FOREGROUND; xcc[1].color = PROMPT_COLOR;
|
||||||
|
|
||||||
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
|
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
|
||||||
wd.wtype = WC_NOTEBK;
|
wd.wtype = WC_NOTEBK;
|
||||||
|
@ -406,8 +406,10 @@ void TMask_field::construct(TScanner& scanner, WINDOW parent)
|
|||||||
{
|
{
|
||||||
long mod = _modules->last_one();
|
long mod = _modules->last_one();
|
||||||
for (; mod > BAAUT; mod--)
|
for (; mod > BAAUT; mod--)
|
||||||
if (main_app().has_module(mod))
|
{
|
||||||
|
if (in_module(mod) && main_app().has_module(mod))
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
if (mod <= 0)
|
if (mod <= 0)
|
||||||
_ctl_data._flags << 'H';
|
_ctl_data._flags << 'H';
|
||||||
}
|
}
|
||||||
@ -3270,7 +3272,7 @@ const char* TReal_field::win2raw(const char* data) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
real n(real::ita2eng(data));
|
const real n = real::ita2eng(data);
|
||||||
if (n.is_zero())
|
if (n.is_zero())
|
||||||
str.cut(0);
|
str.cut(0);
|
||||||
else
|
else
|
||||||
|
@ -607,9 +607,8 @@ TSpreadsheet::TSpreadsheet(
|
|||||||
else
|
else
|
||||||
_column_disabled.set(i);
|
_column_disabled.set(i);
|
||||||
|
|
||||||
coldef = xi_add_column_def(listdef, cid, flags, cid,
|
coldef = xi_add_column_def(listdef, cid, flags, cid, v_width[i] * XI_FU_MULTIPLE,
|
||||||
v_width[i] * XI_FU_MULTIPLE, m_width[i],
|
m_width[i], (char*)(const char*)testo);
|
||||||
(char*)(const char*)testo);
|
|
||||||
|
|
||||||
coldef->app_data = (long)this;
|
coldef->app_data = (long)this;
|
||||||
coldef->v.column->heading_platform = true;
|
coldef->v.column->heading_platform = true;
|
||||||
@ -1598,6 +1597,7 @@ bool TSpreadsheet::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
|
|||||||
const int sel = xvtil_drop_down_list(&cell, lst.get_codes(), lst.get_values());
|
const int sel = xvtil_drop_down_list(&cell, lst.get_codes(), lst.get_values());
|
||||||
if (sel >= 0)
|
if (sel >= 0)
|
||||||
copy_cell2field(&cell);
|
copy_cell2field(&cell);
|
||||||
|
_ignore_button = clock() + 250;
|
||||||
}
|
}
|
||||||
else // edit_field
|
else // edit_field
|
||||||
{
|
{
|
||||||
|
@ -1275,27 +1275,31 @@ const char *real::eng2ita (char *s)
|
|||||||
// Elimina gli spazi ed i punti, converte le virgole in punti
|
// Elimina gli spazi ed i punti, converte le virgole in punti
|
||||||
const char *real::ita2eng (const char *s)
|
const char *real::ita2eng (const char *s)
|
||||||
{
|
{
|
||||||
TString& tmp = get_tmp_string();
|
char* __string = "";
|
||||||
char* __string = tmp.get_buffer(strlen(s));
|
if (s && *s)
|
||||||
|
{
|
||||||
|
TString& tmp = get_tmp_string();
|
||||||
|
__string = tmp.get_buffer(strlen(s));
|
||||||
|
|
||||||
int j = 0;
|
int j = 0;
|
||||||
if (s)
|
if (s)
|
||||||
for (int i = 0; s[i]; i++)
|
for (int i = 0; s[i]; i++)
|
||||||
{
|
|
||||||
switch (s[i])
|
|
||||||
{
|
{
|
||||||
case ' ':
|
switch (s[i])
|
||||||
case '.':
|
{
|
||||||
break;
|
case ' ':
|
||||||
case ',':
|
case '.':
|
||||||
__string[j++] = '.';
|
break;
|
||||||
break;
|
case ',':
|
||||||
default:
|
__string[j++] = '.';
|
||||||
__string[j++] = s[i];
|
break;
|
||||||
break;
|
default:
|
||||||
|
__string[j++] = s[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
__string[j] = '\0';
|
||||||
__string[j] = '\0';
|
}
|
||||||
return __string;
|
return __string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1254,7 +1254,7 @@ bool TRelation_application::relation_remove()
|
|||||||
TRelation& r = *get_relation();
|
TRelation& r = *get_relation();
|
||||||
r.restore_status();
|
r.restore_status();
|
||||||
if (protected_record(r))
|
if (protected_record(r))
|
||||||
return message_box(TR("Elemento non eliminabile"));
|
return warning_box(TR("Elemento non eliminabile"));
|
||||||
|
|
||||||
if (_curr_transaction == TRANSACTION_DELETE ||
|
if (_curr_transaction == TRANSACTION_DELETE ||
|
||||||
delete_box(FR("Confermare l'eliminazione del record %s"), r.file().description()))
|
delete_box(FR("Confermare l'eliminazione del record %s"), r.file().description()))
|
||||||
|
@ -2955,13 +2955,16 @@ void TReport::msg_isam_read(TVariant_stack& stack)
|
|||||||
{ // scansione sugli elementi dell'input
|
{ // scansione sugli elementi dell'input
|
||||||
curr = tok;
|
curr = tok;
|
||||||
const int poseq= curr.find('='); // divide la stringa corrente in lvalue e rvalue
|
const int poseq= curr.find('='); // divide la stringa corrente in lvalue e rvalue
|
||||||
int posrv = poseq+1;
|
if (poseq > 0)
|
||||||
if (curr[posrv] == '=')
|
{
|
||||||
posrv++;
|
int posrv = poseq+1;
|
||||||
|
if (curr[posrv] == '=')
|
||||||
|
posrv++;
|
||||||
|
|
||||||
evaluate(curr.mid(posrv), var, _alfafld);
|
evaluate(curr.mid(posrv), var, _alfafld);
|
||||||
const TString& fld = curr.left(poseq); // preleva il nome del campo del file alla sinistra dell'uguale
|
const TString& fld = curr.left(poseq); // preleva il nome del campo del file alla sinistra dell'uguale
|
||||||
keyrec.put(fld, var.as_string()); // scrive il risultato dell'espressione nel campo del file
|
keyrec.put(fld, var.as_string()); // scrive il risultato dell'espressione nel campo del file
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user