array.cpp Aggiunto controllo nell'operatore di asegnamento tra array

controls.cpp  Gestiti alcuni messaggi in piu' per i list controls
isam.h        Tolte tre righe vuote
maskfld.cpp   Tolto CHECK sui flag dei campi
msksheet.cpp  Corretta gestione righe colorate con colore di default
varmask.h     Tolto ennesimo include<mask.h> inutile
xvtility.cpp  Corretta gestione clessidra


git-svn-id: svn://10.65.10.50/trunk@3932 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-11-27 11:54:33 +00:00
parent 96f813af8d
commit 55799cf79a
7 changed files with 41 additions and 25 deletions

View File

@ -208,7 +208,16 @@ TArray& TArray::operator= (const TArray& a)
for (int i = a.size()-1; i >= 0; i--) for (int i = a.size()-1; i >= 0; i--)
{ {
const TObject* o = a.objptr(i); const TObject* o = a.objptr(i);
if (o != NULL) _data[i] = o->dup(); if (o != NULL)
{
_data[i] = o->dup();
#ifdef DBG
const long vir_tab1 = *((long*)o);
const long vir_tab2 = *((long*)_data[i]);
if (vir_tab1 != vir_tab2)
NFCHECK("Duplicazione di elementi di array pericolosa");
#endif
}
} }
_items = ( int )a.items(); _items = ( int )a.items();
_next = ( int )a._next; _next = ( int )a._next;

View File

@ -312,7 +312,7 @@ void init_controls()
event_map[XIE_ON_LIST] = a_obj; event_map[XIE_ON_LIST] = a_obj;
event_map[XIE_REC_ALLOCATE] = a_ignore; event_map[XIE_REC_ALLOCATE] = a_ignore;
event_map[XIE_REC_FREE] = a_ignore; event_map[XIE_REC_FREE] = a_ignore;
event_map[XIE_ROW_SIZE] = a_ignore; event_map[XIE_ROW_SIZE] = a_child;
event_map[XIE_SELECT] = a_select; event_map[XIE_SELECT] = a_select;
event_map[XIE_UPDATE] = a_update; event_map[XIE_UPDATE] = a_update;
event_map[XIE_COL_DELETE] = a_ignore; event_map[XIE_COL_DELETE] = a_ignore;
@ -1764,7 +1764,7 @@ void TDropDownList::ddl_str_eh(XI_OBJ* itf, XI_EVENT* xiev)
} }
break; break;
case XIE_GET_PREV: case XIE_GET_PREV:
if (xiev->v.rec_request.spec_rec == 0) if (xiev->v.rec_request.spec_rec <= 0)
xiev->refused = TRUE; xiev->refused = TRUE;
else else
{ {
@ -1780,9 +1780,6 @@ void TDropDownList::ddl_str_eh(XI_OBJ* itf, XI_EVENT* xiev)
ddl->select((int)(ddl->row2rec(xiev->v.xi_obj->v.cell.row))); ddl->select((int)(ddl->row2rec(xiev->v.xi_obj->v.cell.row)));
ddl->close(); ddl->close();
break; break;
case XIE_ON_ROW:
/* Guy: Per ora ignora sto evento, prova con XIE_SELECT */
break;
case XIE_SELECT: case XIE_SELECT:
if (xiev->v.xi_obj->type == XIT_ROW) if (xiev->v.xi_obj->type == XIT_ROW)
{ {
@ -1947,14 +1944,14 @@ void TDropDownList::open()
FOCUS_COLOR, FOCUS_BACK_COLOR, FOCUS_COLOR, FOCUS_BACK_COLOR,
DISABLED_COLOR, DISABLED_BACK_COLOR, DISABLED_COLOR, DISABLED_BACK_COLOR,
FOCUS_COLOR, 0); FOCUS_COLOR, 0);
XI_LIST_DEF* ld = lstdef->v.list;
lstdef->v.list->active_back_color = FOCUS_BACK_COLOR; ld->active_back_color = FOCUS_BACK_COLOR;
lstdef->v.list->scroll_bar = items() > 6; ld->scroll_bar = items() > 6;
lstdef->v.list->no_heading = TRUE; ld->no_heading = TRUE;
lstdef->v.list->no_horz_lines = TRUE; ld->no_horz_lines = TRUE;
// lstdef->v.list->no_vert_lines = TRUE; // ld->no_vert_lines = TRUE;
lstdef->v.list->resize_with_window = TRUE; ld->resize_with_window = TRUE;
lstdef->v.list->single_select = TRUE; ld->single_select = TRUE;
// compute size in pixel of field (with button enclosed) // compute size in pixel of field (with button enclosed)
RCT r; xi_get_rect(_obj, &r); RCT r; xi_get_rect(_obj, &r);

View File

@ -316,10 +316,6 @@ class TBaseisamfile : public TObject
TRecnotype _recno; TRecnotype _recno;
// @cmember:(INTERNAL) Indica se il file possiede dei campi memo // @cmember:(INTERNAL) Indica se il file possiede dei campi memo
bool _has_memo; bool _has_memo;
// @cmember:(INTERNAL) UNUSED // @cmember:(INTERNAL) UNUSED
int gethr(TRectype& rec, TDate& atdate); int gethr(TRectype& rec, TDate& atdate);
// @cmember:(INTERNAL) Ritorna NOERR // @cmember:(INTERNAL) Ritorna NOERR

View File

@ -103,7 +103,6 @@ char TMask_field::TField_Flags::update(const char* f)
case 'Z': case 'Z':
zerofilled = TRUE; break; zerofilled = TRUE; break;
default : default :
CHECKS(FALSE, "FLAG sconosciuto in ", f);
break; break;
} }
return *s; return *s;

View File

@ -1612,14 +1612,18 @@ void TSpreadsheet::get_back_and_fore_color(COLOR& back, COLOR& fore, int row)
TRow_property* prop = get_property(row, FALSE); TRow_property* prop = get_property(row, FALSE);
if (prop) if (prop)
{ {
back = prop->_back; if (prop->_back != NORMAL_BACK_COLOR)
fore = prop->_fore; back = prop->_back;
} if (prop->_fore != NORMAL_COLOR)
fore = prop->_fore;
}
/*
else else
{ {
back = NORMAL_BACK_COLOR; back = NORMAL_BACK_COLOR;
fore = NORMAL_COLOR; fore = NORMAL_COLOR;
} }
*/
} }
// @doc INTERNAL // @doc INTERNAL

View File

@ -2,7 +2,6 @@
#define __VARMASK_H #define __VARMASK_H
#include <mask.h>
#include <msksheet.h> #include <msksheet.h>
// @doc EXTERNAL // @doc EXTERNAL

View File

@ -1056,11 +1056,17 @@ HIDDEN void set_cursor(
// @flag FALSE | Cursore a frecca normale // @flag FALSE | Cursore a frecca normale
{ {
static int _count = 0; static int _count = 0;
static WINDOW _win = NULL_WIN;
if (w) if (w)
{ {
if (_count == 0) if (_count == 0)
xvt_win_set_cursor(TASK_WIN, CURSOR_WAIT); {
_win = cur_win();
if (_win == NULL_WIN)
_win = TASK_WIN;
xvt_win_set_cursor(_win, CURSOR_WAIT);
}
_count++; _count++;
} }
else else
@ -1068,7 +1074,13 @@ HIDDEN void set_cursor(
_count--; _count--;
CHECK(_count >= 0, "end_wait without matching begin_wait"); CHECK(_count >= 0, "end_wait without matching begin_wait");
if (_count == 0) if (_count == 0)
xvt_win_set_cursor(TASK_WIN, CURSOR_ARROW); {
WINDOW cur = cur_win();
if (cur == _win)
xvt_win_set_cursor(_win, CURSOR_ARROW);
else
xvt_win_set_cursor(TASK_WIN, CURSOR_ARROW);
}
} }
} }