Patch level : 2.0 nopatch

Files correlati     : ba0.exe ba6.exe
Ricompilazione Demo : [ ]
Commento            :

Allineato uso di process_link


git-svn-id: svn://10.65.10.50/trunk@11558 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-11-03 16:21:03 +00:00
parent 42a8d1e1ff
commit b3963c9baf
3 changed files with 22 additions and 19 deletions

View File

@ -178,7 +178,7 @@ bool TMenuitem::enabled() const
if (is_submenu())
{
TSubmenu* mnu = menu().find(_action);
yes = mnu && mnu->enabled();
yes = mnu && mnu->enabled() && mnu->items() > 0;
}
else
{
@ -489,6 +489,8 @@ bool TMenu::set_firm(long firm) const
{
cur = 0L;
firm = rel.curr().get_long("CODDITTA");
if (!prefix().exist(firm))
firm = 0;
}
}
return main_app().set_firm(firm);

View File

@ -2,22 +2,23 @@
// Stampa anagrafiche
// Control code
// ***********************************************************************
#include <recarray.h>
#include <progind.h>
#include <mailbox.h>
#include <execp.h>
#include <recarray.h>
#include "ba6100.h"
// ------- utils --------------------------------------------
#include "anagr.h"
#include "nditte.h"
// ------- utils --------------------------------------------
const TRectype& TAnaprint_app::look_com(const char* cod, const char* sta)
{
TString16 key;
TString8 key;
if (sta && *sta)
key << sta;
key << "|";
key << '|';
if (cod && *cod)
key << cod;
return cache().get(LF_COMUNI, key);
@ -38,24 +39,24 @@ const char* TAnaprint_app::look_tab(const char* tabname, const char* cod,
// link
void TAnaprint_app::process_link(int id, const char* txt)
bool TAnaprint_app::process_link(int id, const char* txt)
{
bool reload = false;
if (id == _ana_link)
{
TString80 ss = "1|"; ss << txt;
TMessage fs(cmd2name("ba4","-1"), MSG_LN, ss);
fs.send();
TExternal_app ba4(_pr_what == anafis ? "ba4 -1 F" : "ba4 -1 G");
if (ba4.run()) beep();
TRectype persona(LF_ANAG);
persona.put(ANA_TIPOA, _pr_what == anafis ? 'F' : 'G');
persona.put(ANA_CODANAGR, atol(txt));
TString8 hint; hint.format("ba4 -1 %c", _pr_what == anafis ? 'F' : 'G');
reload = persona.edit(LF_ANAG, NULL, hint);
}
else if (id == _dit_link)
{
TString80 ss = "1|"; ss << txt << "|" << txt;
TMessage fs(cmd2name("ba4","-2"), MSG_LN, ss);
fs.send();
TExternal_app ba4("ba4 -2");
if (ba4.run()) beep();
TRectype ditta(LF_NDITTE);
ditta.put(NDT_CODDITTA, atol(txt));
reload = ditta.edit(LF_NDITTE, NULL, "ba4 -2");
}
return reload;
}
// ---- here we go -------------------------------------------------

View File

@ -56,7 +56,7 @@ protected:
virtual bool user_create();
virtual bool user_destroy();
virtual bool set_print(int n);
virtual void process_link(int id, const char* txt);
virtual bool process_link(int id, const char* txt);
public: