controls.cpp Corretta gestione colori dei bottoni
printer.cpp Velocizzata appertura finestra di dialogo stampante relapp.cpp Salvata ditta corrente nel paragrafo [Transaction] relapp.h Aggiunto const al metodo mask2ini relation.cpp Corretti gravissimi errori nel metodo TCursor::test (usato da read!) git-svn-id: svn://10.65.10.50/trunk@4851 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a4806a3f9c
commit
25f1002027
@ -231,7 +231,7 @@ HIDDEN void set_default_palette(WINDOW win)
|
||||
}
|
||||
|
||||
|
||||
// @func Permette di cambiare i colori attivi del programma
|
||||
// @func Permette di aggiornare i colori attivi del programma
|
||||
void customize_colors()
|
||||
|
||||
// @comm Legge dal file di configurazione i colori scelti dall'utente e
|
||||
@ -264,10 +264,10 @@ void customize_colors()
|
||||
xi_set_pref(XI_PREF_COLOR_DISABLED, DISABLED_COLOR);
|
||||
|
||||
BTN_BACK_COLOR = colors.get_color("ButtonBack", NULL, -1, BTN_BACK_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_LIGHT, BTN_LIGHT_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_CTRL, BTN_BACK_COLOR);
|
||||
|
||||
BTN_LIGHT_COLOR = colors.get_color("ButtonLight", NULL, -1, BTN_LIGHT_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_CTRL, BTN_BACK_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_LIGHT, BTN_LIGHT_COLOR);
|
||||
|
||||
BTN_DARK_COLOR = colors.get_color("ButtonDark", NULL, -1, BTN_DARK_COLOR);
|
||||
aga_set_pref(AGA_PREF_BTN_COLOR_DARK, BTN_DARK_COLOR);
|
||||
@ -276,6 +276,8 @@ void customize_colors()
|
||||
|
||||
if (_picture)
|
||||
_picture->reload();
|
||||
|
||||
xvt_load_default_font(); // Aggirorna anche il font!
|
||||
}
|
||||
|
||||
void init_controls()
|
||||
|
@ -1,5 +1,3 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#define STRICT
|
||||
#define XVT_INCL_NATIVE
|
||||
#include <xvt.h>
|
||||
@ -883,13 +881,17 @@ void TPrinter::set_printrcd()
|
||||
if (_print_rcd != NULL)
|
||||
xvt_print_destroy(_print_rcd);
|
||||
_print_rcd = xvt_print_create(&_print_rcd_size);
|
||||
|
||||
if (!xvt_print_is_valid(_print_rcd))
|
||||
error_box("Errore di inizializzazione della stampante");
|
||||
}
|
||||
|
||||
PRINT_RCD* TPrinter::get_printrcd(int *size)
|
||||
{
|
||||
if (_print_rcd == NULL || !xvt_print_is_valid(_print_rcd))
|
||||
if (_print_rcd == NULL)
|
||||
set_printrcd();
|
||||
if (size != NULL) *size = _print_rcd_size;
|
||||
if (size != NULL)
|
||||
*size = _print_rcd_size;
|
||||
return _print_rcd;
|
||||
}
|
||||
|
||||
@ -947,7 +949,7 @@ HIDDEN bool set_windows_print_device (TMask_field& f, KEY key)
|
||||
|
||||
if (key == K_TAB && (f.focusdirty() || !m.is_running()))
|
||||
{
|
||||
main_app().begin_wait();
|
||||
TWait_cursor hourglass;
|
||||
|
||||
TPrinter& pr = printer();
|
||||
|
||||
@ -972,10 +974,6 @@ HIDDEN bool set_windows_print_device (TMask_field& f, KEY key)
|
||||
const int num_families = (int)xvt_fmap_get_families(pr.get_printrcd(), family, MAX_FAMILIES);
|
||||
TToken_string pn1(256), pn2(256);
|
||||
|
||||
// const int MAXSIZES = 16;
|
||||
// long sizes[MAXSIZES];
|
||||
// BOOLEAN scalable;
|
||||
|
||||
for (int i = 0; i < num_families; i++)
|
||||
{
|
||||
pn1.add(family[i]);
|
||||
@ -987,8 +985,6 @@ HIDDEN bool set_windows_print_device (TMask_field& f, KEY key)
|
||||
lst.replace_items(pn1, pn2);
|
||||
|
||||
m.set(MSK_FONT, printer().fontname(), TRUE);
|
||||
|
||||
main_app().end_wait();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -999,7 +995,7 @@ HIDDEN bool font_handler(TMask_field& f, KEY key)
|
||||
|
||||
if (key == K_TAB && (f.focusdirty() || !m.is_running()))
|
||||
{
|
||||
main_app().begin_wait();
|
||||
TWait_cursor hourglass;
|
||||
|
||||
const char* family = f.get();
|
||||
const int MAXSIZES = 16;
|
||||
@ -1031,8 +1027,6 @@ HIDDEN bool font_handler(TMask_field& f, KEY key)
|
||||
TList_field& lst = (TList_field&)f.mask().field(MSK_SIZE);
|
||||
lst.replace_items(pn1, pn2);
|
||||
lst.set(format("%d", printer().get_char_size()));
|
||||
|
||||
main_app().end_wait();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -1149,7 +1143,7 @@ void TPrinter::read_configuration(
|
||||
|
||||
// @comm Se <p parag> e' NULL viene letta la configurazione della stamapnte di default.
|
||||
{
|
||||
main_app().begin_wait();
|
||||
TWait_cursor hourglass;
|
||||
|
||||
#if XVT_OS == XVT_OS_SCOUNIX
|
||||
const char* const config = "printer.ini";
|
||||
@ -1275,14 +1269,12 @@ void TPrinter::read_configuration(
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
main_app().end_wait();
|
||||
}
|
||||
|
||||
|
||||
void TPrinter::save_configuration()
|
||||
{
|
||||
main_app().begin_wait();
|
||||
TWait_cursor hourglass;
|
||||
|
||||
CHECK(_config.not_empty(), "Invalid printer config");
|
||||
TConfig prini(_config == "Printer" ? CONFIG_USER : CONFIG_STAMPE, _config);
|
||||
@ -1314,8 +1306,6 @@ void TPrinter::save_configuration()
|
||||
}
|
||||
if (n > 0)
|
||||
prini.set("rcd", val, NULL, TRUE, index);
|
||||
|
||||
main_app().end_wait();
|
||||
}
|
||||
|
||||
TPrinter::~TPrinter ()
|
||||
|
@ -1277,10 +1277,12 @@ void TRelation_application::edit_mask2ini()
|
||||
}
|
||||
}
|
||||
|
||||
void TRelation_application::mask2ini(TMask& m, TConfig& ini)
|
||||
void TRelation_application::mask2ini(const TMask& m, TConfig& ini)
|
||||
{
|
||||
const TString defpar = ini.get_paragraph();
|
||||
TString str;
|
||||
ini.set("Firm", get_firm(), "Transaction");
|
||||
|
||||
TString16 defpar; defpar << get_relation()->lfile().num();
|
||||
TString str(80);
|
||||
for (int f = m.fields()-1; f >= 0; f--)
|
||||
{
|
||||
TMask_field& campo = m.fld(f);
|
||||
@ -1289,6 +1291,7 @@ void TRelation_application::mask2ini(TMask& m, TConfig& ini)
|
||||
str = campo.get();
|
||||
campo.field()->write(ini, defpar, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
ini.set_paragraph(defpar);
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ protected:
|
||||
void ini2insert_mask();
|
||||
void edit_mask2ini();
|
||||
virtual void ini2mask(TConfig& ini, TMask& m, bool query);
|
||||
virtual void mask2ini(TMask& m, TConfig& ini);
|
||||
virtual void mask2ini(const TMask& m, TConfig& ini);
|
||||
|
||||
// @access Public Member
|
||||
public:
|
||||
|
@ -1196,8 +1196,11 @@ int TCursor::test(TIsamop op, TReclock lockop) const
|
||||
trovato = TRUE;
|
||||
break;
|
||||
}
|
||||
else
|
||||
err = curfile.next();
|
||||
else
|
||||
{
|
||||
if (lockop != _nolock)
|
||||
curfile.reread(_unlock);
|
||||
}
|
||||
}
|
||||
if (!trovato && err == NOERR)
|
||||
{
|
||||
@ -1208,9 +1211,17 @@ int TCursor::test(TIsamop op, TReclock lockop) const
|
||||
else
|
||||
{
|
||||
for (err = curfile.read(op, lockop);
|
||||
err == NOERR && !ok();
|
||||
err == NOERR;
|
||||
err = curfile.next(lockop))
|
||||
{ }
|
||||
{
|
||||
if (ok())
|
||||
break;
|
||||
else
|
||||
{
|
||||
if (lockop != _nolock)
|
||||
curfile.reread(_unlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
|
Loading…
x
Reference in New Issue
Block a user