Corretta generazione nomi file temporanei
git-svn-id: svn://10.65.10.50/trunk@454 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7058d6e5f4
commit
2ae277c10a
@ -801,7 +801,9 @@ WINDOW TMask::read_page(TScanner& scanner, bool toolbar)
|
||||
{
|
||||
scanner.rectangle(r);
|
||||
if (toolbar)
|
||||
{
|
||||
tooly = r.top;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_pages == 0) rect = r;
|
||||
@ -825,12 +827,9 @@ WINDOW TMask::read_page(TScanner& scanner, bool toolbar)
|
||||
while (scanner.popkey() != "EN")
|
||||
{
|
||||
TMask_field* f = parse_field(scanner);
|
||||
|
||||
if (f != NULL)
|
||||
{
|
||||
f->construct(scanner, w);
|
||||
_field.add(f);
|
||||
} else error_box("Can't create a %s", (const char*)scanner.token());
|
||||
CHECK(f, "Can't create a control");
|
||||
f->construct(scanner, w);
|
||||
_field.add(f);
|
||||
}
|
||||
|
||||
set_win(NULL_WIN);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// $Id: maskfld.cpp,v 1.35 1994-10-24 15:06:30 guy Exp $
|
||||
// $Id: maskfld.cpp,v 1.36 1994-10-25 15:59:53 guy Exp $
|
||||
#include <xvt.h>
|
||||
|
||||
#include <applicat.h>
|
||||
@ -2769,8 +2769,12 @@ const char* TList_field::get_window_data() const
|
||||
|
||||
void TList_field::set_field_data(const char* data)
|
||||
{
|
||||
if (data == NULL || *data == '\0') data = _codes.get(0);
|
||||
_str = data;
|
||||
if (data == NULL || *data == '\0')
|
||||
data = _codes.get(0);
|
||||
|
||||
int i = _codes.get_pos(data);
|
||||
if (i < 0) i = 0;
|
||||
_str = _codes.get(i);
|
||||
}
|
||||
|
||||
bool TList_field::on_hit()
|
||||
|
@ -1 +1 @@
|
||||
#define VERSION 1.11
|
||||
#define VERSION 1.12
|
||||
|
@ -1,4 +1,4 @@
|
||||
// $Id: relapp.cpp,v 1.19 1994-10-24 15:06:47 guy Exp $
|
||||
// $Id: relapp.cpp,v 1.20 1994-10-25 15:59:59 guy Exp $
|
||||
#include <mailbox.h>
|
||||
#include <sheet.h>
|
||||
#include <urldefid.h>
|
||||
@ -723,11 +723,16 @@ bool TRelation_application::main_loop()
|
||||
k = K_QUIT;
|
||||
}
|
||||
else
|
||||
modify_mode();
|
||||
{
|
||||
if (save_and_new())
|
||||
insert_mode();
|
||||
else
|
||||
modify_mode();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case K_INS:
|
||||
if (_mask->query_mode() || save(FALSE))
|
||||
if (_mask->query_mode() || save(TRUE))
|
||||
insert_mode();
|
||||
break;
|
||||
case K_DEL:
|
||||
|
@ -95,6 +95,8 @@ 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; }
|
||||
|
||||
void set_search_field(short id) { _search_id = id;} // Impone il campo da utilizzare col bottone Ricerca
|
||||
|
||||
public:
|
||||
|
@ -616,11 +616,9 @@ const TFilename& TFilename::temp(const char* prefix)
|
||||
|
||||
if (prefix)
|
||||
{
|
||||
set(prefix);
|
||||
|
||||
strip("$#");
|
||||
t = tempnam((char*)(const char*)dirpref, (char*)_str);
|
||||
set(t);
|
||||
set(prefix); // Copia prefisso e ...
|
||||
strip("$#"); // ... toglie caratteri jolly
|
||||
|
||||
const TFixed_string f(prefix);
|
||||
#if XVT_OS==XVT_OS_SCOUNIX
|
||||
if (f.find("$$") != -1) *this << getpid();
|
||||
@ -634,16 +632,17 @@ const TFilename& TFilename::temp(const char* prefix)
|
||||
*this << pid;
|
||||
}
|
||||
#endif
|
||||
|
||||
t = tempnam((char*)(const char*)dirpref, (char*)_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
t = tempnam((char*)(const char*)dirpref, NULL);
|
||||
set(t);
|
||||
}
|
||||
|
||||
set(t);
|
||||
|
||||
#ifdef DBG
|
||||
if (fexist(_str))
|
||||
fatal_box("Il file '%s' esiste gia'", t);
|
||||
fatal_box("Il file '%s' esiste gia'", _str);
|
||||
#endif
|
||||
if (t) free(t);
|
||||
|
||||
|
@ -150,6 +150,7 @@ void TWindow_manager::unreg(const TWindow* m)
|
||||
cur_win()->enable();
|
||||
win_menu_enable(TASK_WIN, M_FILE_QUIT, _current == 0);
|
||||
win_update_menu_bar(TASK_WIN);
|
||||
cur_win()->set_focus();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -625,6 +625,12 @@ WINDOW xvt_create_control(WIN_TYPE wt,
|
||||
win = xvt_create_text(r.left, r.top, r.right, r.bottom,
|
||||
caption, parent, flags, app_data, id);
|
||||
}
|
||||
#else
|
||||
if (wt == WC_GROUPBOX)
|
||||
{
|
||||
win = xvt_create_text(r.left, r.top, r.right, r.top+CHARY,
|
||||
caption, parent, flags, app_data, id);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -670,12 +676,16 @@ WINDOW xvt_create_control(WIN_TYPE wt,
|
||||
const char* xvt_get_title(WINDOW win)
|
||||
{
|
||||
#if XVT_OS == XVT_OS_WIN && !defined(__CTL3D__)
|
||||
TControl* c = TControl::WINDOW2TControl(win);
|
||||
const TControl* c = TControl::WINDOW2TControl(win);
|
||||
return c->caption();
|
||||
#else
|
||||
static char title[81];
|
||||
get_title(win, title, 80);
|
||||
return title;
|
||||
/*
|
||||
static char title[81];
|
||||
get_title(win, title, 80);
|
||||
return title;
|
||||
*/
|
||||
get_title(win, __tmp_string, 80);
|
||||
return __tmp_string;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user