Non mi ricordo.

git-svn-id: svn://10.65.10.50/trunk@28 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-08-17 14:08:21 +00:00
parent 3d2d9d579f
commit 2fc3fcb138

View File

@ -1,4 +1,4 @@
// $Id: relapp.cpp,v 1.1.1.1 1994-08-12 10:52:05 alex Exp $ // $Id: relapp.cpp,v 1.2 1994-08-17 14:08:21 guy Exp $
#include <mailbox.h> #include <mailbox.h>
#include <sheet.h> #include <sheet.h>
#include <urldefid.h> #include <urldefid.h>
@ -77,7 +77,7 @@ TKey_array::TKey_array(const TMask* m) : _mask(m)
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
TRelation_application::TRelation_application() TRelation_application::TRelation_application()
: _mask(NULL), _maskeys(NULL), _search_id(-1), _lnflag(FALSE) : _mask(NULL), _maskeys(NULL), _search_id(-1), _lnflag(FALSE)
{} {}
TRelation_application::~TRelation_application() TRelation_application::~TRelation_application()
@ -217,8 +217,8 @@ void TRelation_application::enable_query()
const bool has_query = c.has_query(); const bool has_query = c.has_query();
if (k == 1) if (k == 1)
{ {
// THIS should have been fixed // THIS should have been fixed
// if (!query && has_query) c.check(STARTING_CHECK); // if (!query && has_query) c.check(STARTING_CHECK);
c.enable(query); c.enable(query);
} }
if (has_query) if (has_query)
@ -253,7 +253,7 @@ void TRelation_application::set_toolbar(bool all)
} }
_mask->fld(pos).enable(enabdel); _mask->fld(pos).enable(enabdel);
} }
/* /*
const bool full = !file().empty() && _first != -1; const bool full = !file().empty() && _first != -1;
pos = _mask->id2pos(DLG_FIRSTREC); pos = _mask->id2pos(DLG_FIRSTREC);
if (pos >= 0) _mask->fld(pos).enable(full); if (pos >= 0) _mask->fld(pos).enable(full);
@ -261,24 +261,25 @@ void TRelation_application::set_toolbar(bool all)
if (pos >= 0) _mask->fld(pos).enable(full); if (pos >= 0) _mask->fld(pos).enable(full);
pos = _mask->id2pos(DLG_STOPREC); pos = _mask->id2pos(DLG_STOPREC);
if (pos >= 0) _mask->fld(pos).enable(full); if (pos >= 0) _mask->fld(pos).enable(full);
*/ */
} }
enable_query(); enable_query();
/* /*
const TRecnotype rpos = file().recno(); const TRecnotype rpos = file().recno();
pos = _mask->id2pos(DLG_PREVREC); pos = _mask->id2pos(DLG_PREVREC);
if (pos >= 0) _mask->fld(pos).enable(mod && rpos != _first); if (pos >= 0) _mask->fld(pos).enable(mod && rpos != _first);
pos = _mask->id2pos(DLG_NEXTREC); pos = _mask->id2pos(DLG_NEXTREC);
if (pos >= 0) _mask->fld(pos).enable(mod && rpos != _last); if (pos >= 0) _mask->fld(pos).enable(mod && rpos != _last);
*/ */
} }
int TRelation_application::set_mode(int mode) int TRelation_application::set_mode(int mode)
{ {
static int _mode = NO_MODE; static int _mode = NO_MODE;
if (mode < NO_MODE) mode = _mode;
const int m = ((TMaskmode)mode == NO_MODE) ? (int) MODE_QUERY : mode; const int m = ((TMaskmode)mode == NO_MODE) ? (int) MODE_QUERY : mode;
_mask->set_mode(m); _mask->set_mode(m);
@ -551,7 +552,8 @@ bool TRelation_application::save(bool check_dirty)
return TRUE; return TRUE;
} }
const KEY k = yesnocancel_box("Registrare le modifiche?"); const KEY k = yesnocancel_box(mode == MODE_MOD ? "Registrare le modifiche?"
: "Registrare i dati inseriti?");
if (k == K_ESC) if (k == K_ESC)
{ {
was_dirty = TRUE; was_dirty = TRUE;
@ -844,7 +846,7 @@ bool TRelation_application::filter()
const int key = body.get_int(); const int key = body.get_int();
const int max = _mask->fields(); const int max = _mask->fields();
// _autoins_caller = msg->from(); // _autoins_caller = msg->from();
_lnflag = TRUE; _lnflag = TRUE;
const char* v = body.get(); const char* v = body.get();