Aggiunto il metodo exist alla classe TConfig

git-svn-id: svn://10.65.10.50/trunk@466 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1994-10-26 12:23:12 +00:00
parent 06df35bdc0
commit f923c45fe3
6 changed files with 17 additions and 5 deletions

@ -111,6 +111,13 @@ void TConfig::_check_paragraph(const char* section)
}
}
bool TConfig::exist(const char* var, int index)
{
TString80 vvar(var);
if (index != -1) vvar << '(' << index << ')';
return _data.is_key(vvar);
}
TString& TConfig::get(const char* var, const char* section, int index)
{
// ritorna valore di variabile nella sezione corrente o in

@ -56,6 +56,8 @@ public:
bool force = TRUE, int index = -1);
bool set(const char* var, long value, const char* section = NULL,
bool force = TRUE, int index = -1);
bool exist(const char* var, int index = -1);
// TRUE se il paragrafo corrente e' nuovo
bool new_paragraph() { return !_ispresent; }

@ -570,7 +570,7 @@ break;
c->set_dirty(); // Get it dirty!
if (c->on_key(c->is_edit() ? K_TAB : K_SPACE) == FALSE) // Test it
{
xiev->refused = TRUE;
xiev->refused = *nuo != '\0';
}
else
{

@ -1 +1 @@
#define VERSION 1.12
#define VERSION 1.11

@ -1,4 +1,4 @@
// $Id: relapp.cpp,v 1.20 1994-10-25 15:59:59 guy Exp $
// $Id: relapp.cpp,v 1.21 1994-10-26 12:23:10 guy Exp $
#include <mailbox.h>
#include <sheet.h>
#include <urldefid.h>
@ -188,7 +188,7 @@ bool TRelation_application::destroy()
void TRelation_application::set_fixed()
{
TString s(16);
TString s(80);
for (const char* f = _fixed.get(0); f && *f; f = _fixed.get())
{
s = f;
@ -255,6 +255,9 @@ void TRelation_application::set_toolbar(bool all)
}
bool TRelation_application::save_and_new() const
{ return FALSE; }
int TRelation_application::set_mode(int mode)
{
static int _mode = NO_MODE;

@ -95,7 +95,7 @@ protected:
virtual void write_enable(const bool on = TRUE) { get_relation()->write_enable(-1, on); }
void write_disable() { write_enable(FALSE); }
virtual bool save_and_new() const { return FALSE; }
virtual bool save_and_new() const;
void set_search_field(short id) { _search_id = id;} // Impone il campo da utilizzare col bottone Ricerca