Corretta gestione del flag di dirty degli sheet in ambiente Unix
git-svn-id: svn://10.65.10.50/trunk@221 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2442a6edf3
commit
7b3d496386
@ -284,7 +284,6 @@ TPrinter& TApplication::printer()
|
|||||||
|
|
||||||
bool TApplication::create()
|
bool TApplication::create()
|
||||||
{
|
{
|
||||||
// include_progind(); // TBC da eliminare quando il linker diventa furbo
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
#include <keys.h>
|
#include <keys.h>
|
||||||
#else
|
#else
|
||||||
#include <xvtility.h>
|
#include <xvtility.h>
|
||||||
#include <applicat.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
#include <applicat.h>
|
||||||
#endif // XVT_OS
|
#endif // XVT_OS
|
||||||
|
|
||||||
|
|
||||||
@ -32,24 +31,27 @@
|
|||||||
|
|
||||||
int fatal_box(const char* fmt, ...)
|
int fatal_box(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
MessageBeep(MB_ICONHAND);
|
MessageBeep(MB_ICONHAND);
|
||||||
MessageBox(GetFocus(), msg, "ERRORE FATALE", MB_OK | MB_ICONHAND | MB_SYSTEMMODAL);
|
MessageBox(GetFocus(), msg, "ERRORE FATALE", MB_OK | MB_ICONHAND | MB_SYSTEMMODAL);
|
||||||
FatalAppExit(0, "ERRORE FATALE");
|
const TApplication* a = MainApp();
|
||||||
|
if (a != NULL)
|
||||||
|
a->wake_up_caller();
|
||||||
|
xvt_terminate();
|
||||||
#else
|
#else
|
||||||
beep();
|
beep();
|
||||||
if (xvt_running()) xvt_fatal("%s", msg);
|
if (xvt_running()) xvt_fatal("%s", msg);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s\n", msg);
|
fprintf(stderr, "%s\n", msg);
|
||||||
getchar();
|
getchar();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -62,12 +64,12 @@ int error_box(const char* fmt, ...)
|
|||||||
MessageBox(GetFocus(), msg, "ERRORE", MB_OK | MB_ICONEXCLAMATION);
|
MessageBox(GetFocus(), msg, "ERRORE", MB_OK | MB_ICONEXCLAMATION);
|
||||||
#else
|
#else
|
||||||
beep();
|
beep();
|
||||||
if (xvt_running()) xvt_error("%s", msg);
|
if (xvt_running()) xvt_error("%s", msg);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s\n", msg);
|
fprintf(stderr, "%s\n", msg);
|
||||||
getchar();
|
getchar();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -83,38 +85,38 @@ int warning_box(const char* fmt, ...)
|
|||||||
MessageBox(GetFocus(), msg, "ATTENZIONE", MB_OK | MB_ICONQUESTION);
|
MessageBox(GetFocus(), msg, "ATTENZIONE", MB_OK | MB_ICONQUESTION);
|
||||||
#else
|
#else
|
||||||
beep();
|
beep();
|
||||||
xvt_note("%s", msg);
|
xvt_note("%s", msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int message_box(const char* fmt, ...)
|
int message_box(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
MessageBox(GetFocus(), msg, "INFORMAZIONE", MB_OK | MB_ICONINFORMATION);
|
MessageBox(GetFocus(), msg, "INFORMAZIONE", MB_OK | MB_ICONINFORMATION);
|
||||||
#else
|
#else
|
||||||
xvt_note("%s", msg);
|
xvt_note("%s", msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sorry_box(const char* fmt, ...)
|
int sorry_box(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
MessageBeep(MB_OK);
|
MessageBeep(MB_OK);
|
||||||
MessageBox(GetFocus(), msg, "SPIACENTE", MB_OK | MB_ICONINFORMATION);
|
MessageBox(GetFocus(), msg, "SPIACENTE", MB_OK | MB_ICONINFORMATION);
|
||||||
#else
|
#else
|
||||||
xvt_note("%s", msg);
|
xvt_note("%s", msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int yesno_box(const char* fmt, ...)
|
int yesno_box(const char* fmt, ...)
|
||||||
@ -122,11 +124,11 @@ int yesno_box(const char* fmt, ...)
|
|||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
int r = MessageBox(GetFocus(), msg, "RICHIESTA", MB_YESNO | MB_ICONQUESTION);
|
int r = MessageBox(GetFocus(), msg, "RICHIESTA", MB_YESNO | MB_ICONQUESTION);
|
||||||
return r == IDYES;
|
return r == IDYES;
|
||||||
#else
|
#else
|
||||||
ASK_RESPONSE r = xvt_ask((char*) "Si", (char*) "No", NULL, "%s", msg);
|
ASK_RESPONSE r = xvt_ask((char*) "Si", (char*) "No", NULL, "%s", msg);
|
||||||
return r == RESP_DEFAULT;
|
return r == RESP_DEFAULT;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +139,7 @@ int yesnofatal_box(const char* fmt, ...)
|
|||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
char s[256]; sprintf(s, "%s\nContinuare ugualmente?", msg);
|
char s[256]; sprintf(s, "%s\nContinuare ugualmente?", msg);
|
||||||
const int ret = yesno_box("%s", s);
|
const int ret = yesno_box("%s", s);
|
||||||
if (!ret) fatal_box("");
|
if (!ret) fatal_box("");
|
||||||
#else
|
#else
|
||||||
fatal_box("%s", msg);
|
fatal_box("%s", msg);
|
||||||
@ -150,24 +152,24 @@ int yesnofatal_box(const char* fmt, ...)
|
|||||||
|
|
||||||
int yesnocancel_box(const char* fmt, ...)
|
int yesnocancel_box(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
buildmsg();
|
buildmsg();
|
||||||
|
|
||||||
#if XVT_OS == XVT_OS_WIN
|
#if XVT_OS == XVT_OS_WIN
|
||||||
int r = MessageBox(GetFocus(), msg, "RICHIESTA", MB_YESNOCANCEL | MB_ICONQUESTION);
|
int r = MessageBox(GetFocus(), msg, "RICHIESTA", MB_YESNOCANCEL | MB_ICONQUESTION);
|
||||||
if (r == IDYES) r = K_YES;
|
if (r == IDYES) r = K_YES;
|
||||||
else
|
else
|
||||||
if (r == IDNO) r = K_NO;
|
if (r == IDNO) r = K_NO;
|
||||||
else
|
else
|
||||||
r = K_ESC;
|
r = K_ESC;
|
||||||
return r;
|
return r;
|
||||||
#else
|
#else
|
||||||
ASK_RESPONSE r = xvt_ask((char*) "Si", (char*) "No", (char*) "Annulla", "%s", msg);
|
ASK_RESPONSE r = xvt_ask((char*) "Si", (char*) "No", (char*) "Annulla", "%s", msg);
|
||||||
if (r == RESP_DEFAULT) r = K_YES;
|
if (r == RESP_DEFAULT) r = K_YES;
|
||||||
else
|
else
|
||||||
if (r == RESP_2) r = K_NO;
|
if (r == RESP_2) r = K_NO;
|
||||||
else
|
else
|
||||||
r = K_ESC;
|
r = K_ESC;
|
||||||
return r;
|
return r;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,7 +194,7 @@ int fatal_box(const char* fmt, ...)
|
|||||||
|
|
||||||
int message_box(const char* fmt, ...)
|
int message_box(const char* fmt, ...)
|
||||||
{
|
{
|
||||||
buildmsg();
|
buildmsg();
|
||||||
_UserError(msg);
|
_UserError(msg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#define __ISAM_CPP
|
#define __ISAM_CPP
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
|
|
||||||
|
#include <execp.h>
|
||||||
#include <extcdecl.h>
|
#include <extcdecl.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
@ -12,8 +13,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NOT_LINKED(i,f) CHECKS(i != NULL, "Record senza tracciato: impossibile eseguire ", f)
|
#define NOT_LINKED(i,f) CHECKS(i != NULL, "Record senza tracciato: impossibile eseguire ", f)
|
||||||
#define NOT_OPEN(f) CHECKS(_isamfile != NULL, "File chiuso, impossiibile eseguire ", f)
|
#define NOT_OPEN(f) CHECKS(_isamfile != NULL, "File chiuso, impossibile eseguire ", f)
|
||||||
#define UNKNOWN_FIELD(num, name) yesnofatal_box("Il campo '%s' non appartiene al file %d", name, num)
|
|
||||||
|
HIDDEN void UNKNOWN_FIELD(int num, const char* name)
|
||||||
|
{ yesnofatal_box("Il campo '%s' non appartiene al file %d", name, num); }
|
||||||
|
|
||||||
#define NOALLOC (char **) -1
|
#define NOALLOC (char **) -1
|
||||||
|
|
||||||
@ -26,8 +29,7 @@ public:
|
|||||||
virtual ~TExtrectype();
|
virtual ~TExtrectype();
|
||||||
};
|
};
|
||||||
|
|
||||||
TExtrectype::TExtrectype(const TTrec& r)
|
TExtrectype::TExtrectype(const TTrec& r) : TRectype(6)
|
||||||
: TRectype(6)
|
|
||||||
|
|
||||||
{
|
{
|
||||||
delete _rec;
|
delete _rec;
|
||||||
|
@ -501,12 +501,10 @@ break;
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
xiev->refused = TRUE;
|
xiev->refused = TRUE;
|
||||||
set_dirty(2); // Set error status
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
xvt_statbar_set("");
|
xvt_statbar_set("");
|
||||||
set_dirty();
|
|
||||||
}
|
}
|
||||||
_check_enabled = TRUE;
|
_check_enabled = TRUE;
|
||||||
}
|
}
|
||||||
@ -892,7 +890,10 @@ void TSpreadsheet::str2mask(int riga)
|
|||||||
// Certified 100%
|
// Certified 100%
|
||||||
bool TSpreadsheet::notify(int n, KEY k)
|
bool TSpreadsheet::notify(int n, KEY k)
|
||||||
{
|
{
|
||||||
return _notify ? _notify(n, k) : TRUE;
|
const bool ok = _notify ? _notify(n, k) : TRUE;
|
||||||
|
if (k == K_ENTER)
|
||||||
|
set_dirty(ok ? TRUE : 2);
|
||||||
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user