Richiesta ditte anche nella ricerca veloce

git-svn-id: svn://10.65.10.50/trunk@444 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-24 15:00:02 +00:00
parent 99e736b0dd
commit bb4279849b

View File

@ -105,6 +105,7 @@ class TMenu_application : public TApplication
TArray _menu; // TAG|DESCRIPTION|ACTION TArray _menu; // TAG|DESCRIPTION|ACTION
int _level, _max; int _level, _max;
bool _ditta_asked;
static int _last_button; static int _last_button;
static bool _find_button; static bool _find_button;
@ -121,7 +122,7 @@ protected:
static bool menu_find_handler(TMask_field&f, KEY k); static bool menu_find_handler(TMask_field&f, KEY k);
public: public:
TMenu_application(const char* name) : _name(name) {} TMenu_application(const char* name) : _name(name), _ditta_asked(FALSE) {}
}; };
int TMenu_application::_last_button = 0; int TMenu_application::_last_button = 0;
@ -328,21 +329,31 @@ bool TMenu_application::menu(MENU_TAG)
if (m >= 0) if (m >= 0)
{ {
TToken_string& row = (TToken_string&)_menu[m]; TToken_string& row = (TToken_string&)_menu[m];
const char* option = row.get(2); const TFilename option(row.get(2));
if (option && *option) if (option.not_empty())
{ {
const int l = atoi(option); const int l = atoi(option);
if (l > 0) if (l > 0)
{ {
const char* flags = row.get(); const char* flags = row.get();
if (flags && strchr(flags, 'F') != NULL) if (flags && strchr(flags, 'F') != NULL)
{
set_firm(); set_firm();
_ditta_asked = TRUE;
}
refarray[i++] = _level; refarray[i++] = _level;
if (l < _max) _level = l; if (l < _max) _level = l;
} }
else else
{ {
TExternal_app a(option); TExternal_app a(option);
const TString& module = option.left(2);
if (module == "ba") _ditta_asked = FALSE; else
if (module == "cg" && !_ditta_asked)
{
set_firm();
_ditta_asked = TRUE;
}
a.run(); a.run();
} }
} }