config.cpp Aggiunto metodo remove_all per eliminare un intero paragrafo

senza ricorrere all'assoc_array interno che non setta il
            flag di dirty!
config.h    Aggiunto metodo TConfig::remove_all
default.url Modificata la voce di menu da ~Edit a ~Modifica in quanto
            nella visualizzazione stampe esiste gia' il bottone ~Edit,
            che fa cose turche diverse da quelle del menu.
maskfld.cpp Corretto filtraggio dei cursori nelle ricerche.


git-svn-id: svn://10.65.10.50/trunk@5583 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-11-10 13:46:38 +00:00
parent 9d8a8ed495
commit 82a5377d94
4 changed files with 19 additions and 10 deletions

View File

@ -200,6 +200,16 @@ bool TConfig::remove(
return ok;
}
void TConfig::remove_all()
{
if (_data.items() > 0)
{
_data.destroy();
_dirty = TRUE;
}
}
// @doc EXTERNAL
// @mfunc Ritorna il valore della variabile nella sezione corrente o in
@ -614,6 +624,7 @@ TConfig::TConfig(const char *fn, const char* pa)
TConfig::~TConfig()
{
// il distruttore riscrive il file con le modifiche se necessario
if (_dirty) _write_file();
if (_dirty)
_write_file();
}

View File

@ -50,7 +50,6 @@ class TConfig : public TObject
// @access:(INTERNAL) Private Member
{
// @cmember:(INTERNAL) Contenuto del paragrafo
TAssoc_array _data;
// @cmember:(INTERNAL) Nome del file di configurazione
@ -113,6 +112,9 @@ public:
// @cmember Elimina una variabile nel paragrafo attivo
bool remove(const char* var, int index = -1);
// @cmember Elimina tutte le variabili nel paragrafo attivo
void remove_all();
// @cmember Controlla se il paragrafo corrente e' nuovo (TRUE se nuovo)
bool new_paragraph()

View File

@ -45,7 +45,7 @@ MENUBAR VISWIN_BAR
MENU VISWIN_BAR
SUBMENU MENU_VISWIN "~Visualizzazione"
SUBMENU M_EDIT "~Edit"
SUBMENU M_EDIT "~Modifica"
MENU MENU_VISWIN
ITEM M_EDIT_CLIPBOARD "Interrompi\tESC"

View File

@ -1711,7 +1711,7 @@ bool TList_sheet::check(CheckTime t)
// Certified 100%
TBrowse::TBrowse(TEdit_field* f, TRelation* r, int key, const char* filter)
: TBrowse_button(f),
_relation(r), _cursor(new TCursor (r, filter, key)),
_relation(r), _cursor(new TCursor (r, "", key)),
_filter(filter), _secondary(FALSE)
{}
@ -2642,7 +2642,7 @@ bool TEdit_field::parse_item(TScanner& scanner)
}
else scanner.push();
TString filter = "";
TString filter;
if (scanner.popkey() == "SE")
filter = (const char*)scanner.line();
else
@ -2650,7 +2650,7 @@ bool TEdit_field::parse_item(TScanner& scanner)
if (r != NULL)
{
_browse = new TBrowse(this, r, key, ""); // create browse with no filter ...
_browse = new TBrowse(this, r, key, filter); // create browse with no filter ...
// ... complete relation by parsing all Join items ...
while (scanner.popkey() == "JO")
@ -2662,10 +2662,6 @@ bool TEdit_field::parse_item(TScanner& scanner)
}
scanner.push();
if (filter.not_empty())
browse()->cursor()->setfilter(filter); // ... then set filter to cursor
if (tabmaskname.not_empty())
{
// tabmaskname.insert("MBATB", 0);