Patch level : 10.0
Files correlati : ba0.exe ba1.exe Ricompilazione Demo : [ ] Commento : ba0.exe Vietato aggiungere ai preveriti voci di primo livello del menu ba1.exe Consente anche di aggiornare e non solo inserire da file .txt git-svn-id: svn://10.65.10.50/branches/R_10_00@21513 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1c3f50eecd
commit
365bf905cf
@ -2026,7 +2026,6 @@ void TMenu_application::load_preferences()
|
||||
|
||||
TMenuitem::always_run_fullscreen(cfg.get_bool("AlwaysFullScreen"));
|
||||
_tree_view = cfg.get_int("TreeView", "Colors", -1, 3);
|
||||
|
||||
}
|
||||
|
||||
void TMenu_application::save_preferences()
|
||||
@ -2073,9 +2072,14 @@ void TMenu_application::add_to_preferred()
|
||||
{
|
||||
TTree_field& tf = tree_field();
|
||||
tf.goto_selected();
|
||||
tf.tree()->get_description(tok);
|
||||
TString id; tf.tree()->curr_id(id);
|
||||
tok.add(id);
|
||||
if (tf.tree()->has_father()) // Aggiunge solo nodi NON radice
|
||||
{
|
||||
tf.tree()->get_description(tok);
|
||||
TString id; tf.tree()->curr_id(id);
|
||||
tok.add(id);
|
||||
}
|
||||
else
|
||||
error_box(TR("Non è possibile aggiungere voci di primo livello"));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -485,25 +485,20 @@ bool TSubmenu::enabled() const
|
||||
if (_enabled < 0)
|
||||
{
|
||||
bool yes = _exist != 0;
|
||||
if (yes)
|
||||
if (yes && _modules.full() && _modules != "0" && _modules != "ba")
|
||||
{
|
||||
if (_modules.full() && _modules != "0" && _modules != "ba")
|
||||
yes = false;
|
||||
bool is_good = false;
|
||||
TToken_string& mod = (TToken_string&)_modules;
|
||||
FOR_EACH_TOKEN(mod, cod)
|
||||
{
|
||||
yes = false;
|
||||
TToken_string& mod = (TToken_string&)_modules;
|
||||
FOR_EACH_TOKEN(mod, cod)
|
||||
{
|
||||
if (_menu->has_module(cod))
|
||||
{
|
||||
yes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
is_good = _menu->has_module(cod);
|
||||
if (is_good)
|
||||
break;
|
||||
}
|
||||
if (yes)
|
||||
if (is_good)
|
||||
{
|
||||
yes = false;
|
||||
for (int i = items()-1; i >= 0 && !yes; i--)
|
||||
for (int i = items()-1; i >= 0 && !yes; i--)
|
||||
{
|
||||
const TMenuitem& mi = item(i);
|
||||
yes = mi.enabled();
|
||||
|
@ -741,6 +741,8 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e == fe_modify) // Permette l'aggiunta ai preferiti per i non NON radice
|
||||
main_app().enable_menu_item(30005, _tree.has_father());
|
||||
break;
|
||||
case DLG_LOOK:
|
||||
if (e == fe_modify)
|
||||
@ -771,7 +773,8 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll
|
||||
}
|
||||
if (_picture.objptr(sel))
|
||||
book_field().set_back(_picture.row(sel));
|
||||
main_app().enable_menu_item(30005, id.find("MENU_PREFERITI") < 0);
|
||||
// Vieta l'aggiunta della radice ai preferiti
|
||||
main_app().enable_menu_item(30005, false);
|
||||
} else
|
||||
if (e == fe_init)
|
||||
{
|
||||
|
@ -753,8 +753,12 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
|
||||
const char fd = *esc(m.get(FLD_FD));
|
||||
const char rs = *esc(m.get(FLD_RS));
|
||||
const bool indexed = !m.get_bool(FLD_WITHKEY);
|
||||
const bool over = m.get_bool(FLD_UPDATE);
|
||||
ninp = m.get(FLD_INFILE);
|
||||
f.load(ninp, fs, fd, rs, true, false, indexed);
|
||||
if (over)
|
||||
f.overwrite(ninp, fs, fd, rs, true);
|
||||
else
|
||||
f.load(ninp, fs, fd, rs, true, false, indexed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define FLD_WITHDEL 208
|
||||
|
||||
#define FLD_INFILE 301
|
||||
#define FLD_UPDATE 302
|
||||
|
||||
#define F_NOMEF 101
|
||||
#define FLD_TIPO 102
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <defmask.h>
|
||||
#include "ba1100a.h"
|
||||
|
||||
PAGE "Carico Archivio" -1 -1 70 13
|
||||
PAGE "Caricamento Archivio" -1 -1 70 13
|
||||
|
||||
STRING FLD_INFILE 50
|
||||
BEGIN
|
||||
@ -11,7 +11,7 @@ END
|
||||
|
||||
BOOLEAN FLD_FIXLEN
|
||||
BEGIN
|
||||
PROMPT 2 3 "Lunghezza fissa"
|
||||
PROMPT 2 2 "Lunghezza fissa"
|
||||
HELP "Indicare se i record hanno lunghezza fissa"
|
||||
MESSAGE FALSE ENABLE,FLD_FS|ENABLE,FLD_FD|ENABLE,FLD_RS|"\0x7c",FLD_FS|"\0",FLD_FD|"\n",FLD_RS
|
||||
MESSAGE TRUE DISABLE,FLD_FS|DISABLE,FLD_FD|DISABLE,FLD_RS|"\0",FLD_FS|"\0",FLD_FD|"\n",FLD_RS
|
||||
@ -19,7 +19,7 @@ END
|
||||
|
||||
BOOLEAN FLD_WITHKEY
|
||||
BEGIN
|
||||
PROMPT 24 3 "Indicizza solo alla fine del processo (Usare SOLO su file vuoti)"
|
||||
PROMPT 2 3 "Indicizza solo alla fine del processo (Usare SOLO su file vuoti)"
|
||||
END
|
||||
|
||||
STRING FLD_FS 5
|
||||
@ -43,6 +43,13 @@ BEGIN
|
||||
FLAGS "P"
|
||||
END
|
||||
|
||||
RADIOBUTTON FLD_UPDATE 1 36
|
||||
BEGIN
|
||||
PROMPT 32 4 "@bOpzioni di aggiornamento"
|
||||
ITEM " |Inserire solo nuovi record"
|
||||
ITEM "X|Inserire o aggiornare record"
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
@ -512,10 +512,7 @@ bool TWizard_mask::file_open(TFilename& fname) const
|
||||
xvt_fsys_get_dir(&dir); // Save dir
|
||||
|
||||
FILE_SPEC fs;
|
||||
fs.dir = dir;
|
||||
strcpy(fs.type, fname.ext());
|
||||
strcpy(fs.name, fname);
|
||||
strcpy(fs.creator, "WIZ");
|
||||
xvt_fsys_convert_str_to_fspec(fname, &fs);
|
||||
|
||||
const bool good = xvt_dm_post_file_open(&fs, TR("Selezionare il file ...")) == FL_OK;
|
||||
xvt_fsys_set_dir(&dir); // Restore dir
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <sheet.h>
|
||||
#include <tabmod.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <viswin.h>
|
||||
@ -787,9 +788,8 @@ bool TMailer_mask::file2app(const TString& file, TString& app) const
|
||||
const TString* run = (const TString*)_apps.objptr(file);
|
||||
if (run == NULL)
|
||||
{
|
||||
TConfig d(CONFIG_DITTA, "ba7");
|
||||
TString16 appname; appname << "Edit_" << file;
|
||||
app = d.get(appname);
|
||||
app = ini_get_string(CONFIG_DITTA, "ba7", appname);
|
||||
if (app.empty())
|
||||
{
|
||||
if (isdigit(file[0]))
|
||||
@ -808,6 +808,11 @@ bool TMailer_mask::file2app(const TString& file, TString& app) const
|
||||
{
|
||||
TTable table(file);
|
||||
ok = table.get_relapp(app);
|
||||
} else
|
||||
if (len >= 4 && file[0] == '&')
|
||||
{
|
||||
TModule_table tabmod(file);
|
||||
ok = tabmod.get_relapp(app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user