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:
guy 2011-01-26 09:22:41 +00:00
parent 1c3f50eecd
commit 365bf905cf
8 changed files with 46 additions and 30 deletions

View File

@ -2026,7 +2026,6 @@ void TMenu_application::load_preferences()
TMenuitem::always_run_fullscreen(cfg.get_bool("AlwaysFullScreen")); TMenuitem::always_run_fullscreen(cfg.get_bool("AlwaysFullScreen"));
_tree_view = cfg.get_int("TreeView", "Colors", -1, 3); _tree_view = cfg.get_int("TreeView", "Colors", -1, 3);
} }
void TMenu_application::save_preferences() void TMenu_application::save_preferences()
@ -2073,10 +2072,15 @@ void TMenu_application::add_to_preferred()
{ {
TTree_field& tf = tree_field(); TTree_field& tf = tree_field();
tf.goto_selected(); tf.goto_selected();
if (tf.tree()->has_father()) // Aggiunge solo nodi NON radice
{
tf.tree()->get_description(tok); tf.tree()->get_description(tok);
TString id; tf.tree()->curr_id(id); TString id; tf.tree()->curr_id(id);
tok.add(id); tok.add(id);
} }
else
error_box(TR("Non è possibile aggiungere voci di primo livello"));
}
break; break;
} }
if (tok.full() && tok.find("MENU_PREFERITI")<0 && _preferred.find(tok)<0) if (tok.full() && tok.find("MENU_PREFERITI")<0 && _preferred.find(tok)<0)

View File

@ -485,24 +485,19 @@ bool TSubmenu::enabled() const
if (_enabled < 0) if (_enabled < 0)
{ {
bool yes = _exist != 0; bool yes = _exist != 0;
if (yes) if (yes && _modules.full() && _modules != "0" && _modules != "ba")
{
if (_modules.full() && _modules != "0" && _modules != "ba")
{ {
yes = false; yes = false;
bool is_good = false;
TToken_string& mod = (TToken_string&)_modules; TToken_string& mod = (TToken_string&)_modules;
FOR_EACH_TOKEN(mod, cod) FOR_EACH_TOKEN(mod, cod)
{ {
if (_menu->has_module(cod)) is_good = _menu->has_module(cod);
{ if (is_good)
yes = true;
break; break;
} }
} if (is_good)
}
if (yes)
{ {
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); const TMenuitem& mi = item(i);

View File

@ -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; break;
case DLG_LOOK: case DLG_LOOK:
if (e == fe_modify) 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)) if (_picture.objptr(sel))
book_field().set_back(_picture.row(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 } else
if (e == fe_init) if (e == fe_init)
{ {

View File

@ -753,7 +753,11 @@ void TManutenzione_app::edit_riga (long riga_sel, TToken_string& riga)
const char fd = *esc(m.get(FLD_FD)); const char fd = *esc(m.get(FLD_FD));
const char rs = *esc(m.get(FLD_RS)); const char rs = *esc(m.get(FLD_RS));
const bool indexed = !m.get_bool(FLD_WITHKEY); const bool indexed = !m.get_bool(FLD_WITHKEY);
const bool over = m.get_bool(FLD_UPDATE);
ninp = m.get(FLD_INFILE); ninp = m.get(FLD_INFILE);
if (over)
f.overwrite(ninp, fs, fd, rs, true);
else
f.load(ninp, fs, fd, rs, true, false, indexed); f.load(ninp, fs, fd, rs, true, false, indexed);
} }
} }

View File

@ -28,6 +28,7 @@
#define FLD_WITHDEL 208 #define FLD_WITHDEL 208
#define FLD_INFILE 301 #define FLD_INFILE 301
#define FLD_UPDATE 302
#define F_NOMEF 101 #define F_NOMEF 101
#define FLD_TIPO 102 #define FLD_TIPO 102

View File

@ -1,7 +1,7 @@
#include <defmask.h> #include <defmask.h>
#include "ba1100a.h" #include "ba1100a.h"
PAGE "Carico Archivio" -1 -1 70 13 PAGE "Caricamento Archivio" -1 -1 70 13
STRING FLD_INFILE 50 STRING FLD_INFILE 50
BEGIN BEGIN
@ -11,7 +11,7 @@ END
BOOLEAN FLD_FIXLEN BOOLEAN FLD_FIXLEN
BEGIN BEGIN
PROMPT 2 3 "Lunghezza fissa" PROMPT 2 2 "Lunghezza fissa"
HELP "Indicare se i record hanno 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 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 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 BOOLEAN FLD_WITHKEY
BEGIN 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 END
STRING FLD_FS 5 STRING FLD_FS 5
@ -43,6 +43,13 @@ BEGIN
FLAGS "P" FLAGS "P"
END 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 ENDPAGE
TOOLBAR "topbar" 0 0 0 2 TOOLBAR "topbar" 0 0 0 2

View File

@ -512,10 +512,7 @@ bool TWizard_mask::file_open(TFilename& fname) const
xvt_fsys_get_dir(&dir); // Save dir xvt_fsys_get_dir(&dir); // Save dir
FILE_SPEC fs; FILE_SPEC fs;
fs.dir = dir; xvt_fsys_convert_str_to_fspec(fname, &fs);
strcpy(fs.type, fname.ext());
strcpy(fs.name, fname);
strcpy(fs.creator, "WIZ");
const bool good = xvt_dm_post_file_open(&fs, TR("Selezionare il file ...")) == FL_OK; const bool good = xvt_dm_post_file_open(&fs, TR("Selezionare il file ...")) == FL_OK;
xvt_fsys_set_dir(&dir); // Restore dir xvt_fsys_set_dir(&dir); // Restore dir

View File

@ -10,6 +10,7 @@
#include <recarray.h> #include <recarray.h>
#include <relation.h> #include <relation.h>
#include <sheet.h> #include <sheet.h>
#include <tabmod.h>
#include <tabutil.h> #include <tabutil.h>
#include <utility.h> #include <utility.h>
#include <viswin.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); const TString* run = (const TString*)_apps.objptr(file);
if (run == NULL) if (run == NULL)
{ {
TConfig d(CONFIG_DITTA, "ba7");
TString16 appname; appname << "Edit_" << file; TString16 appname; appname << "Edit_" << file;
app = d.get(appname); app = ini_get_string(CONFIG_DITTA, "ba7", appname);
if (app.empty()) if (app.empty())
{ {
if (isdigit(file[0])) if (isdigit(file[0]))
@ -808,6 +808,11 @@ bool TMailer_mask::file2app(const TString& file, TString& app) const
{ {
TTable table(file); TTable table(file);
ok = table.get_relapp(app); ok = table.get_relapp(app);
} else
if (len >= 4 && file[0] == '&')
{
TModule_table tabmod(file);
ok = tabmod.get_relapp(app);
} }
} }
} }