default.url Corretto CORSOR in CURSOR
expr.cpp Corretta esecuzione del token _lteq mask.cpp Modificata gestione popup menu maskfld.cpp Corretta do_output e do_clear msksheet.cpp Tolte righe di commento obsolete relation.cpp Modificato uso della clessidra utility.cpp Cambiata indentazione git-svn-id: svn://10.65.10.50/trunk@3903 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a341853e58
commit
bf0b92ea09
@ -122,7 +122,7 @@ image BMP_FAX QRESDIR"fax.bmp"
|
||||
#transparent $$$
|
||||
XI_CURSOR_RESIZE CURSOR DISCARDABLE RESDIR/resize.cur
|
||||
XI_CURSOR_HAND CURSOR DISCARDABLE RESDIR/hand.cur
|
||||
XI_CURSOR_VRESIZE CORSOR DISCARDABLE RESDIR/vresize.cur
|
||||
XI_CURSOR_VRESIZE CURSOR DISCARDABLE RESDIR/vresize.cur
|
||||
COMBO_ICON ICON DISCARDABLE RESDIR/combo.ico
|
||||
ICO_SEARCH ICON DISCARDABLE RESDIR/search.ico
|
||||
ICO_CHECK_ON ICON DISCARDABLE RESDIR/checkon.ico
|
||||
|
@ -477,7 +477,7 @@ void TExpression::eval()
|
||||
if (type == _strexpr)
|
||||
{
|
||||
const TString & s2 = evalstack.pop_string();
|
||||
const TString & s1 = evalstack.peek_string();
|
||||
const TString & s1 = evalstack.pop_string();
|
||||
evalstack.push(real(s1 <= s2 ? 1.0 : 0.0));
|
||||
}
|
||||
else
|
||||
|
@ -88,6 +88,10 @@ void TMask::init_mask()
|
||||
memset(_pagewin, 0, sizeof(_pagewin));
|
||||
}
|
||||
|
||||
TMask::TMask()
|
||||
: _mask_num(0)
|
||||
{ init_mask(); }
|
||||
|
||||
|
||||
TMask::TMask(const char* title, int pages, int cols, int rows,
|
||||
int xpos, int ypos)
|
||||
@ -155,7 +159,7 @@ void TMask::read_mask(
|
||||
}
|
||||
|
||||
if (_pages <= 0)
|
||||
fatal_box("Impossibile leggere la maschera %s", name);
|
||||
fatal_box("Impossibile leggere la maschera %s : %d", name, num);
|
||||
|
||||
if (_pages > 1 || toolwin())
|
||||
add_tag_buttons(captions);
|
||||
@ -631,7 +635,7 @@ void TMask::handler(WINDOW win, EVENT* ep)
|
||||
{
|
||||
TSheet_field& sht = (TSheet_field&)*_last_sheet;
|
||||
#if (XVT_PTK_VERSION_MAJOR > 4) || (XVT_PTK_VERSION_MAJOR == 4 && XVT_PTK_VERSION_MINOR >= 50)
|
||||
MENU_ITEM* menu = xvt_res_get_menu(BROWSE_BAR);
|
||||
MENU_ITEM* menu = xvt_res_get_menu(BROWSE_BAR+1);
|
||||
if (menu)
|
||||
{
|
||||
const PNT& p = ep->v.mouse.where;
|
||||
@ -643,7 +647,7 @@ void TMask::handler(WINDOW win, EVENT* ep)
|
||||
if (p.h > 2 * cr.right / 3)
|
||||
pa = XVT_POPUP_RIGHT_ALIGN;
|
||||
|
||||
xvt_menu_popup(menu->child, win, p, pa, NULL);
|
||||
xvt_menu_popup(menu, win, p, pa, NULL);
|
||||
xvt_res_free_menu_tree(menu);
|
||||
}
|
||||
#else
|
||||
|
@ -147,7 +147,7 @@ protected:
|
||||
int curr_page() const
|
||||
{ return _page; }
|
||||
// @cmember Costruttore (crea una maschera vuota)
|
||||
TMask() { init_mask();}
|
||||
TMask();
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
|
@ -1979,30 +1979,26 @@ int TBrowse::do_input(
|
||||
return ne;
|
||||
}
|
||||
|
||||
static TBit_array s_checked;
|
||||
static short s_checking = 0;
|
||||
|
||||
void TBrowse::do_output(CheckTime t)
|
||||
{
|
||||
static TBit_array _checked;
|
||||
static short _checking = 0;
|
||||
|
||||
if (t == FINAL_CHECK)
|
||||
return;
|
||||
|
||||
bool master;
|
||||
if (_checking == 0)
|
||||
const bool master = s_checking == 0;
|
||||
if (master)
|
||||
{
|
||||
master = TRUE;
|
||||
_checking = field().dlg();
|
||||
_checked.reset();
|
||||
s_checking = field().dlg();
|
||||
s_checked.reset();
|
||||
// Rendo intoccabili i campi del MIO output
|
||||
for (const char* fld = _out_id.get(0); fld && *fld; fld = _out_id.get())
|
||||
{
|
||||
const short id = field().atodlg(fld);
|
||||
_checked.set(id);
|
||||
s_checked.set(id);
|
||||
}
|
||||
}
|
||||
else
|
||||
master = FALSE;
|
||||
|
||||
TString sum;
|
||||
TToken_string flds(24, '+');
|
||||
@ -2033,35 +2029,31 @@ void TBrowse::do_output(CheckTime t)
|
||||
}
|
||||
}
|
||||
|
||||
const bool changing = f.get() != sum;
|
||||
if (changing)
|
||||
{
|
||||
bool hit = FALSE;
|
||||
if (master)
|
||||
{
|
||||
f.set(sum);
|
||||
hit = id != _checking; // Il mio handler viene fatto nella on_key
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_checked[id])
|
||||
{
|
||||
f.set(sum);
|
||||
_checked.set(id);
|
||||
hit = TRUE;
|
||||
}
|
||||
}
|
||||
if (hit)
|
||||
bool hit = FALSE;
|
||||
if (master)
|
||||
{
|
||||
f.set(sum);
|
||||
hit = id != s_checking; // Il mio handler viene fatto nella on_key
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!s_checked[id])
|
||||
{
|
||||
f.check();
|
||||
f.on_hit();
|
||||
f.set(sum);
|
||||
s_checked.set(id);
|
||||
hit = TRUE;
|
||||
}
|
||||
}
|
||||
if (hit)
|
||||
{
|
||||
f.check();
|
||||
f.on_hit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (master)
|
||||
_checking = 0;
|
||||
s_checking = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -2071,15 +2063,13 @@ void TBrowse::do_clear()
|
||||
{
|
||||
const short id = field().atodlg(fld);
|
||||
TMask_field& f = field(atoi(fld));
|
||||
if (f.field() == NULL && _inp_id.get_pos(fld) < 0)
|
||||
if (f.field() == NULL && field().dlg() != id &&
|
||||
!s_checked[id] && _inp_id.get_pos(fld) < 0)
|
||||
{
|
||||
const bool hit = f.get().not_empty();
|
||||
f.reset();
|
||||
if (field().dlg() != id && hit)
|
||||
{
|
||||
f.on_hit();
|
||||
f.check();
|
||||
}
|
||||
s_checked.set(id);
|
||||
f.on_hit();
|
||||
f.check();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,10 +17,6 @@ extern "C" {
|
||||
#include <msksheet.h>
|
||||
#include <urldefid.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TRow_property
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// TSpreadsheet
|
||||
///////////////////////////////////////////////////////////
|
||||
|
@ -1056,15 +1056,13 @@ bool TCursor::changed()
|
||||
TRecnotype TCursor::update()
|
||||
|
||||
{
|
||||
main_app().begin_wait();
|
||||
begin_wait();
|
||||
|
||||
file().setkey(_nkey);
|
||||
if (file().curr().empty()) file().curr().zero();
|
||||
file().read(_isgteq);
|
||||
const TRecnotype totrec = buildcursor(file().recno());
|
||||
|
||||
main_app().end_wait();
|
||||
|
||||
isdef* fh = file().filehnd();
|
||||
const TRecnotype eod = DB_reccount(fh->fhnd);
|
||||
|
||||
@ -1072,6 +1070,8 @@ TRecnotype TCursor::update()
|
||||
_filename = fh->d->SysName;
|
||||
_lastkrec = DB_changed(fh->fhnd);
|
||||
|
||||
end_wait();
|
||||
|
||||
return totrec;
|
||||
}
|
||||
|
||||
@ -1544,7 +1544,7 @@ int TSorted_cursor::filtercursor(int pagecnt, TRecnotype* page)
|
||||
s.cut(s.len()-1);
|
||||
TFieldref f(s,0);
|
||||
TString sf=f.read(*relation());
|
||||
TRectype& frec = file(f.file()).curr();
|
||||
TRectype& frec = file(f.file()).curr();
|
||||
TFieldtypes fld_type = frec.type(f.name());
|
||||
if (fld_type == _datefld) // Se il campo e' di tipo data, la converte in ANSI!
|
||||
{
|
||||
|
@ -131,7 +131,7 @@ bool make_dir(
|
||||
// @doc EXTERNAL
|
||||
|
||||
// @func Ritorna la lista dei file il cui nome corrisponde alla stringa (con caratteri
|
||||
// jolly) passata.
|
||||
// jolly) passata.
|
||||
//
|
||||
// @rdesc Ritorna il numero di file che soddisfano la condizione passata (numero di elementi
|
||||
// della token string)
|
||||
@ -320,9 +320,9 @@ const char *esc(
|
||||
|
||||
// @comm Viene utilizzata soprattuto in UNIX.
|
||||
{
|
||||
const char *s1 = s;
|
||||
char *s2 = __tmp_string;
|
||||
int base;
|
||||
const char *s1 = s;
|
||||
char *s2 = __tmp_string;
|
||||
int base;
|
||||
|
||||
while (*s1)
|
||||
{
|
||||
@ -332,13 +332,13 @@ const char *esc(
|
||||
switch (tolower(*s1))
|
||||
{
|
||||
case 'b' : *s2++ = '\b'; break;
|
||||
case 'e' : *s2++ = '\033'; break;
|
||||
case 'f' : *s2++ = '\f'; break;
|
||||
case 'n' : *s2++ = '\n'; break;
|
||||
case 'r' : *s2++ = '\r'; break;
|
||||
case 't' : *s2++ = '\t'; break;
|
||||
default :
|
||||
{
|
||||
case 'e' : *s2++ = '\033'; break;
|
||||
case 'f' : *s2++ = '\f'; break;
|
||||
case 'n' : *s2++ = '\n'; break;
|
||||
case 'r' : *s2++ = '\r'; break;
|
||||
case 't' : *s2++ = '\t'; break;
|
||||
default :
|
||||
{
|
||||
if (isdigit(*s1))
|
||||
{
|
||||
if (*s1 == '0')
|
||||
|
Loading…
x
Reference in New Issue
Block a user