cg2100c.uml Allargata ricerca sui cambi giornalieri

cg2100s.uml  Corretta posizione del residuo rata
cg3600.cpp   Adattata la visualizzazione mastrini all XI_R4
             Ora col tasto ENTER si possono espandere le riga di mastrino
             Errore MI6287
cg3700.cpp   Corretta gestione date di stampa. Errori 6285 e 6286


git-svn-id: svn://10.65.10.50/trunk@6081 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1998-02-02 13:42:43 +00:00
parent fcc968f279
commit 76925a8652
5 changed files with 39 additions and 27 deletions

View File

@ -1,9 +1,9 @@
#include <config.h> #include <config.h>
#include <execp.h>
#include <mailbox.h> #include <mailbox.h>
#include <modaut.h> #include <modaut.h>
#include <msksheet.h> #include <msksheet.h>
#include <urldefid.h> #include <urldefid.h>
#include <execp.h>
#include <utility.h> #include <utility.h>
#include "cgpagame.h" #include "cgpagame.h"

View File

@ -429,7 +429,7 @@ BEGIN
DISPLAY "Cod" CODTAB[1,3] DISPLAY "Cod" CODTAB[1,3]
DISPLAY "Data@10" D0 DISPLAY "Data@10" D0
DISPLAY "Cambio@18" R10 DISPLAY "Cambio@18" R10
DISPLAY "Valuta@50" 104@->S0 DISPLAY "Valuta@60" 104@->S0
OUTPUT SK_DATACAMBIO D0 OUTPUT SK_DATACAMBIO D0
OUTPUT SK_CAMBIO R10 OUTPUT SK_CAMBIO R10
GROUP 3 GROUP 3

View File

@ -90,7 +90,7 @@ END
NUMBER S_RESIDUORATA 18 NUMBER S_RESIDUORATA 18
BEGIN BEGIN
PROMPT 48 5 "Residuo rata " PROMPT 46 5 "Residuo rata "
PICTURE "." PICTURE "."
FLAGS "DRV" FLAGS "DRV"
END END

View File

@ -1,3 +1,5 @@
#include <xinclude.h>
#include <applicat.h> #include <applicat.h>
#include <colors.h> #include <colors.h>
#include <controls.h> #include <controls.h>
@ -1180,7 +1182,7 @@ TGrid_control::TGrid_control(
} }
// Calcola rettangolo massimo per lo sheet // Calcola rettangolo massimo per lo sheet
XI_RCT rct; coord2rct(parent, x, y, dx, dy, rct); RCT rct; coord2rct(parent, x, y, dx, dy, rct);
rct.right -= 2*XI_FU_MULTIPLE; // toglie scroll-bar rct.right -= 2*XI_FU_MULTIPLE; // toglie scroll-bar
// Controlla se ci sono troppe colonne fisse // Controlla se ci sono troppe colonne fisse
@ -1200,7 +1202,11 @@ TGrid_control::TGrid_control(
listdef->app_data = (long)this; listdef->app_data = (long)this;
XI_LIST_DEF* l = listdef->v.list; XI_LIST_DEF* l = listdef->v.list;
#ifdef XI_R4
l->min_heading_height = xi_button_calc_height_font(xi_get_system_font()) * lines_in_header;
#else
l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header; l->min_heading_height = xi_button_calc_height_font_id(xvt_default_font()) * lines_in_header;
#endif
l->sizable_columns = TRUE; l->sizable_columns = TRUE;
l->movable_columns = TRUE; l->movable_columns = TRUE;
l->fixed_columns = fixed_columns; l->fixed_columns = fixed_columns;
@ -1243,7 +1249,7 @@ TGrid_control::TGrid_control(
cd->wrap_text = _type[i] != 'R'; cd->wrap_text = _type[i] != 'R';
} }
RCT rd; xi_get_def_rect(listdef, &rd); RCT rd; xi_get_def_rect(listdef, (XinRect*)&rd);
if ((rd.right - rd.left) > (rct.right - rct.left)) if ((rd.right - rd.left) > (rct.right - rct.left))
l->width = rct.right - rct.left; l->width = rct.right - rct.left;
@ -1258,7 +1264,7 @@ TGrid_control::TGrid_control(
XI_OBJ** column = xi_get_member_list(_obj, &num); XI_OBJ** column = xi_get_member_list(_obj, &num);
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
{ {
RCT rct; xi_get_rect(column[i], &rct); RCT rct; xi_get_rect(column[i], (XinRect*)&rct);
_default_width[i] = rct.right - rct.left; _default_width[i] = rct.right - rct.left;
} }
} }
@ -1526,11 +1532,13 @@ bool TGrid_control::event_handler(XI_OBJ* itf, XI_EVENT *xiev)
{ {
const long rec = row2rec(xiev->v.select.xi_obj->v.row_data.row); const long rec = row2rec(xiev->v.select.xi_obj->v.row_data.row);
if (try_to_select(rec)) if (try_to_select(rec))
{ {
if (xiev->v.select.column == 0) if (xiev->v.select.column == 0)
{ {
_cur_rec = rec; // Assegno subito il record corrente #ifndef XI_R4
_grid->on_record_button(rec); _cur_rec = rec; // Assegno subito il record corrente
_grid->on_record_button(rec);
#endif
} }
else else
{ {
@ -1683,7 +1691,7 @@ void TGrid_control::set_columns_order(TToken_string* order)
if (col) if (col)
{ {
xi_move_column(col, index); xi_move_column(col, index);
RCT rct; xi_get_rect(col, &rct); RCT rct; xi_get_rect(col, (XinRect*)&rct);
if (_default_width[index] != rct.right - rct.left) if (_default_width[index] != rct.right - rct.left)
xi_column_set_pixel_width(col, _default_width[index]-offset); xi_column_set_pixel_width(col, _default_width[index]-offset);
} }
@ -1763,7 +1771,7 @@ void TGrid_control::save_columns_order() const
head.insert("n", acapo+1); head.insert("n", acapo+1);
} }
order.add(head); order.add(head);
RCT rct; xi_get_rect(column[i], &rct); RCT rct; xi_get_rect(column[i], (XinRect*)&rct);
order << ',' << rct.right - rct.left; order << ',' << rct.right - rct.left;
} }
config.set("Browse", order, NULL, TRUE, id()); config.set("Browse", order, NULL, TRUE, id());
@ -1885,7 +1893,7 @@ bool TGrid_field::parse_item(TScanner& scanner)
bool TGrid_field::handler(XI_EVENT* xiev) bool TGrid_field::handler(XI_EVENT* xiev)
{ {
return FALSE; return FALSE;
} }
@ -2142,11 +2150,11 @@ protected: // TGrid_field
virtual void cell_request(long rec, short id, TGrid_cell& cell); virtual void cell_request(long rec, short id, TGrid_cell& cell);
virtual void on_grid_button(); virtual void on_grid_button();
virtual bool on_resize_column(short id, int new_size); virtual bool on_resize_column(short id, int new_size);
virtual void on_dbl_cell(long rec, short id);
void update_mask() const; void update_mask() const;
public: public:
virtual void on_dbl_cell(long rec, short id);
virtual void on_record_button(long rec); virtual void on_record_button(long rec);
virtual long items() const { return _mastrino.items(); } virtual long items() const { return _mastrino.items(); }
@ -2336,7 +2344,7 @@ void TMastrini_grid::on_dbl_cell(long rec, short id)
else else
_mastrino.collapse(rec); _mastrino.collapse(rec);
update(); update();
} }
void TMastrini_grid::on_grid_button() void TMastrini_grid::on_grid_button()
{ {
@ -2406,7 +2414,7 @@ void TMastrini_grid::on_grid_button()
void TMastrini_grid::on_record_button(long rec) void TMastrini_grid::on_record_button(long rec)
{ {
begin_wait(); TWait_cursor hourglass;
const TRectype& testata = _mastrino.testata(rec); const TRectype& testata = _mastrino.testata(rec);
TString text; TString text;
@ -2426,8 +2434,6 @@ void TMastrini_grid::on_record_button(long rec)
if (yesno_box("Si desidera aggiornare il mastrino?")) if (yesno_box("Si desidera aggiornare il mastrino?"))
reread(); reread();
} }
end_wait();
} }
// Posso ridimensionare solo le descrizioni, le altre devono rimanere fisse per // Posso ridimensionare solo le descrizioni, le altre devono rimanere fisse per
@ -2523,7 +2529,7 @@ protected: // TMask
virtual TMask_field* parse_field(TScanner& sc); virtual TMask_field* parse_field(TScanner& sc);
virtual bool on_key(KEY k); virtual bool on_key(KEY k);
virtual void handler(WINDOW win, EVENT* ep); virtual void handler(WINDOW win, EVENT* ep);
static bool link_handler(TMask_field& f, KEY k); static bool link_handler(TMask_field& f, KEY k);
public: public:
@ -2590,6 +2596,12 @@ bool TGrid_mask::on_key(KEY k)
break; break;
case K_LEND: case K_LEND:
rec = _grid->items()-1; rec = _grid->items()-1;
break;
case K_ENTER:
case K_CTRL+'+':
case K_CTRL+'-':
if (focus_field().dlg() == _grid->dlg())
_grid->on_dbl_cell(rec, DLG_USER);
break; break;
default: default:
break; break;

View File

@ -180,16 +180,16 @@ bool TLista_fatture::filter_func2(const TRelation *r)
} }
bool TLista_fatture::date_handler(TMask_field& f, KEY key) bool TLista_fatture::date_handler(TMask_field& f, KEY key)
{ {
if (key == K_TAB && f.mask().is_running()) if (key == K_ENTER && f.empty())
{ {
if (f.get().empty()) if (f.dlg() == FLD_DATE_FROM)
if (f.dlg() == FLD_DATE_FROM) return f.error_box("La data di inizio e' obbligatoria.");
return f.error_box("La data di inizio e' obbligatoria."); else
else return f.error_box("La data di fine e' obbligatoria.");
return f.error_box("La data di fine e' obbligatoria.");
} }
if (f.to_check(key))
if ((key == K_TAB && f.focusdirty()) || key == K_ENTER)
{ {
TMask& m = f.mask(); TMask& m = f.mask();
TDate da(m.get_date(FLD_DATE_FROM)); TDate da(m.get_date(FLD_DATE_FROM));