applicat.* Corretto metodo get_module_name (tolta stringa statica)
classes.h Aggiunta CLASS_TREE_FIELD default.url Aggiunter bitmap standard per i tree field execp.cpp Tolta #define inutile git-svn-id: svn://10.65.10.50/trunk@6144 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7d509dda34
commit
cf5fee43d1
@ -187,7 +187,7 @@ long XVT_CALLCONV1 TApplication::task_eh(WINDOW win, EVENT *ep)
|
||||
{
|
||||
const TString16 dname(encode("DATA"));
|
||||
const TString16 hname(encode("ORA"));
|
||||
TConfig c(CONFIG_STUDIO, "Main");
|
||||
TConfig c(CONFIG_INSTALL, "Main");
|
||||
TDate data(decode(c.get(dname)));
|
||||
TDate oggi(TODAY);
|
||||
real remaining_time(decode(c.get(hname)));
|
||||
@ -409,8 +409,7 @@ bool TApplication::remove_menu(MENU_TAG id)
|
||||
|
||||
|
||||
TApplication::TApplication()
|
||||
: _savefirm(0), _create_ok(FALSE), /* _bar(TASK_MENUBAR), */
|
||||
_name(80), _title(80)
|
||||
: _savefirm(0), _create_ok(FALSE)
|
||||
{}
|
||||
|
||||
|
||||
@ -467,33 +466,42 @@ void TApplication::terminate()
|
||||
|
||||
|
||||
const char* TApplication::get_module_name() const
|
||||
{
|
||||
TScanner scanner("prassi.aut");
|
||||
|
||||
bool ok = FALSE;
|
||||
for (int aut = 0; scanner.line() != ""; aut++)
|
||||
if (strncmp(scanner.token(), _name, 2) == 0) { ok = TRUE; break; }
|
||||
|
||||
TString module(scanner.token().mid(3));
|
||||
if (ok && check_autorization()) ok = has_module(aut);
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
TString& module = ((TApplication*)this)->_module_name; // Fool the compiler
|
||||
if (module.empty())
|
||||
{
|
||||
TToken_string em(extra_modules());
|
||||
const int items = em.items();
|
||||
if (items != 0)
|
||||
for (int j = 0; j < items; j++)
|
||||
{
|
||||
ok = has_module(em.get_int());
|
||||
if (!ok)
|
||||
break;
|
||||
}
|
||||
TScanner scanner("prassi.aut");
|
||||
|
||||
bool ok = FALSE;
|
||||
for (int aut = 0; scanner.line() != ""; aut++)
|
||||
if (strncmp(scanner.token(), _name, 2) == 0)
|
||||
{ ok = TRUE; break; }
|
||||
module = scanner.token().mid(3);
|
||||
if (ok && check_autorization())
|
||||
ok = has_module(aut);
|
||||
if (!ok)
|
||||
{
|
||||
error_box("Il modulo '%s' non e' autorizzato", (const char*)module);
|
||||
module = "";
|
||||
TToken_string em(extra_modules());
|
||||
if (em != "*")
|
||||
{
|
||||
FOR_EACH_TOKEN(em, cod)
|
||||
{
|
||||
if (has_module(atoi(cod)))
|
||||
{
|
||||
ok = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ok = TRUE;
|
||||
if (!ok)
|
||||
{
|
||||
error_box("Il modulo '%s' non e' autorizzato", (const char*)module);
|
||||
module.cut(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return module;
|
||||
}
|
||||
|
||||
|
@ -44,6 +44,8 @@ class TApplication
|
||||
TString _name;
|
||||
// @cmember:(INTERNAL) Nome della applicazione
|
||||
TString _title;
|
||||
// @cmember:(INTERNAL) Nome del modulo principale applicazione
|
||||
TString _module_name;
|
||||
|
||||
// @cmember:(INTERNAL) Codice della ditta
|
||||
long _savefirm;
|
||||
|
@ -48,6 +48,7 @@
|
||||
#define CLASS_REAL_FIELD 245
|
||||
#define CLASS_DATE_FIELD 246
|
||||
#define CLASS_GRID_FIELD 247
|
||||
#define CLASS_TREE_FIELD 248
|
||||
|
||||
#define CLASS_GOLEM 900
|
||||
|
||||
|
@ -118,11 +118,11 @@ image BMP_CANCEL QRESDIR"cancel.bmp"
|
||||
image BMP_QUIT QRESDIR"quit.bmp"
|
||||
image BMP_QUITDN QRESDIR"quitdn.bmp"
|
||||
image BMP_SELECT QRESDIR"select.bmp"
|
||||
// image BMP_FIRSTREC QRESDIR"firstrec.bmp"
|
||||
// image BMP_PREVREC QRESDIR"prevrec.bmp"
|
||||
// image BMP_NEXTREC QRESDIR"nextrec.bmp"
|
||||
// image BMP_LASTREC QRESDIR"lastrec.bmp"
|
||||
image BMP_STOPREC QRESDIR"stoprec.bmp"
|
||||
//image BMP_FIRSTREC QRESDIR"firstrec.bmp"
|
||||
//image BMP_PREVREC QRESDIR"prevrec.bmp"
|
||||
//image BMP_NEXTREC QRESDIR"nextrec.bmp"
|
||||
//image BMP_LASTREC QRESDIR"lastrec.bmp"
|
||||
//image BMP_STOPREC QRESDIR"stoprec.bmp"
|
||||
image BMP_SAVEREC QRESDIR"saverec.bmp"
|
||||
image BMP_SAVERECDN QRESDIR"saverecd.bmp"
|
||||
image BMP_NEWREC QRESDIR"newrec.bmp"
|
||||
@ -152,6 +152,9 @@ image BMP_OLE QRESDIR"ole.bmp"
|
||||
image BMP_LENTE QRESDIR"lente.bmp"
|
||||
image BMP_FAX QRESDIR"fax.bmp"
|
||||
image BMP_EMAIL QRESDIR"email.bmp"
|
||||
image BMP_DIR QRESDIR"dir.bmp"
|
||||
image BMP_DIRDN QRESDIR"dirdn.bmp"
|
||||
image BMP_FILE QRESDIR"file.bmp"
|
||||
|
||||
#scan <xil.h>
|
||||
#transparent $$$
|
||||
|
@ -83,11 +83,7 @@ word TExternal_app::run(
|
||||
}
|
||||
|
||||
if (utente)
|
||||
#if XVT_OS == XVT_OS_WIN || XVT_OS == XVT_OS_WIN32
|
||||
path << " /u" << user();
|
||||
#else
|
||||
path << " -u" << user();
|
||||
#endif
|
||||
|
||||
_error = 0;
|
||||
_exitcode = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user