Modifica della versione Linux sulla 2.1

git-svn-id: svn://10.65.10.50/trunk@12017 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2004-04-28 20:14:14 +00:00
parent 6fdc566f2f
commit a61d3b51f5
12 changed files with 40 additions and 19 deletions

@ -367,9 +367,6 @@ TObject* TMenulist_images::key2obj(const char* key)
if (can_be_transparent(image))
image.convert_transparent_color(NORMAL_BACK_COLOR);
const int w = image.width();
const int h = image.height();
RCT rct; xvt_vobj_get_client_rect(_win, &rct);
const double max_img = (double)_max_side;
const double max_lgo = rct.right - _max_side;
@ -434,9 +431,9 @@ TImage* TMenulist_images::image(const char* name)
class TMenulist_window : public TField_window
{
private:
TMenu_tree* _tree;
size_t MENU_COLS, MENU_ROWS;
TMenu_tree* _tree;
TString _curr_node;
bool _can_go_back;

@ -1,7 +1,14 @@
#include <fcntl.h>
#ifdef WIN32
#include <io.h>
#include <share.h>
#include <sys/stat.h>
#else
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif
#include <errno.h>
#include <applicat.h>
@ -96,7 +103,7 @@ HIDDEN bool browse_file_handler(TMask_field& f, KEY k)
return TRUE;
}
TManutenzione_app::TManutenzione_app() : _browse(NULL), _rec(NULL), _mask(NULL), _firm(0), _level(0)
TManutenzione_app::TManutenzione_app() : _browse(NULL), _mask(NULL), _firm(0), _level(0), _rec(NULL)
{
if (!fexist(Dir_file)) // controlla l'esistenza dei direttori standard (dir.gen e trc.gen)
{ // vengono creati se non esistono
@ -111,7 +118,11 @@ TManutenzione_app::TManutenzione_app() : _browse(NULL), _rec(NULL), _mask(NULL),
strcpy(fd->FCalc,"0");
strcpy(fd->GenPrompt,"");
#ifdef WIN32
int handle = sopen(Dir_file, O_RDWR|O_BINARY|O_CREAT,SH_DENYNO,S_IREAD|S_IWRITE);
#else
int handle = open(Dir_file, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
#endif
if (handle != -1)
{
if (write( handle, (char*)fd, sizeof(FileDes)) == -1)
@ -124,7 +135,11 @@ TManutenzione_app::TManutenzione_app() : _browse(NULL), _rec(NULL), _mask(NULL),
{
TTrec r;
RecDes* rd = r.rec();
#ifdef WIN32
int handle = sopen(Trc_file, O_RDWR|O_BINARY|O_CREAT,SH_DENYNO,S_IREAD|S_IWRITE);
#else
int handle = open(Trc_file, O_RDWR|O_CREAT, S_IRWXU|S_IRWXG|S_IRWXO);
#endif
if (handle != -1)
{
if (write( handle, (char*)rd, sizeof(RecDes)) == -1)
@ -177,7 +192,9 @@ void TManutenzione_app::do_print(TPrinter & p, TRec_sheet & r)
row.put(riga, 1);
p.setheaderline(5, row);
for (int i = 0; i < rec.fields(); i ++)
int i;
for (i = 0; i < rec.fields(); i ++)
{
row.reset();
s = rec.fielddef(i);
@ -260,8 +277,10 @@ void TManutenzione_app::print()
pi = new TProgind(items, TR("Stampa tracciati record archivi"), TRUE, TRUE);
pi->setstatus(2);
int i;
for (int i = 2 ; !pi->iscancelled() && i <= items; i++)
for (i = 2 ; !pi->iscancelled() && i <= items; i++)
{
d.get(i);
if (d.len() > 0)
@ -854,8 +873,10 @@ void TManutenzione_app::update_dir()
TProgind p(update_items ? update_items : 1, prompt, FALSE, TRUE);
p.setstatus(1);
int i;
for (int i = 2; i <= update_items; i++)
for (i = 2; i <= update_items; i++)
{
p.addstatus(1);
// prefix().set("");

@ -510,3 +510,4 @@ END
ENDPAGE
ENDMASK

@ -79,4 +79,5 @@ BEGIN
END
ENDPAGE
ENDMASK
ENDMASK

@ -25,7 +25,7 @@ public:
TTestrel_application::TTestrel_application(const char* name, const char* num)
: _maskname(name), _num(num),
_msk(NULL), _rel(NULL)
_rel(NULL), _msk(NULL)
{}
@ -79,8 +79,8 @@ bool TTest_application::menu(MENU_TAG)
while (mr.run() == K_ENTER)
{
TMask m(mr.get(102));
KEY k = m.run();
// if (k == K_QUIT) stop_run();
m.run();
}
}

@ -1,6 +1,6 @@
#include "ba4100.h"
TOOLBAR "" 0 20 0 2
TOOLBAR "" 0 -2 0 2
#include <toolbar.h>
ENDPAGE

@ -1,6 +1,6 @@
#include "ba4200.h"
TOOLBAR "" 0 18 0 4
TOOLBAR "" 0 -4 0 4
BUTTON DLG_CHGTIP 23 2

@ -1,6 +1,6 @@
#include "ba4200.h"
TOOLBAR "" 0 18 0 4
TOOLBAR "" 0 -4 0 4
BUTTON DLG_CHGTIP 23 2
BEGIN

@ -875,4 +875,5 @@ END
ENDPAGE
ENDMASK
ENDMASK

@ -1,6 +1,6 @@
#include "ba4400.h"
TOOLBAR "" 0 20 0 2
TOOLBAR "" 0 -2 0 2
#include <toolbar.h>
ENDPAGE

@ -1,6 +1,6 @@
#include "ba4500.h"
TOOLBAR "" 0 20 0 2
TOOLBAR "" 0 -2 0 2
#include <toolbar.h>
ENDPAGE

@ -1,6 +1,6 @@
#include "ba4600.h"
TOOLBAR "" 0 20 0 2
TOOLBAR "" 0 -2 0 2
#include <toolbar.h>
ENDPAGE