Patch level : 10.0
Files correlati : tutti Ricompilazione Demo : [ ] Commento : Migliorata gestione colore dei prompt dei campi git-svn-id: svn://10.65.10.50/trunk@20084 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6fb77b6d8b
commit
fa8ceef324
@ -296,9 +296,8 @@ TInfo_mask::TInfo_mask() : TProperty_sheet(TR("Informazioni"))
|
|||||||
if (cmdline.exist())
|
if (cmdline.exist())
|
||||||
{
|
{
|
||||||
const time_t mtime = xvt_fsys_file_attr(cmdline, XVT_FILE_ATTR_MTIME);
|
const time_t mtime = xvt_fsys_file_attr(cmdline, XVT_FILE_ATTR_MTIME);
|
||||||
const struct tm* data = localtime(&mtime);
|
struct tm data; localtime_s(&data, &mtime);
|
||||||
if (data != NULL)
|
datamod.format("%02d-%02d-%04d", data.tm_mday, data.tm_mon+1, data.tm_year+1900);
|
||||||
datamod.format("%02d-%02d-%04d", data->tm_mday, data->tm_mon+1, data->tm_year+1900);
|
|
||||||
}
|
}
|
||||||
TString80 stros, strwx, strcpu;
|
TString80 stros, strwx, strcpu;
|
||||||
xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size());
|
xvt_sys_get_version(stros.get_buffer(), strwx.get_buffer(), stros.size());
|
||||||
@ -318,11 +317,11 @@ TInfo_mask::TInfo_mask() : TProperty_sheet(TR("Informazioni"))
|
|||||||
{
|
{
|
||||||
case _dongle_hardlock: prot = "Hardlock"; break;
|
case _dongle_hardlock: prot = "Hardlock"; break;
|
||||||
case _dongle_eutron : prot = "Eutron"; break;
|
case _dongle_eutron : prot = "Eutron"; break;
|
||||||
case _dongle_network : prot = campoini.get("Dongle", "Server"); break;
|
case _dongle_network : prot = dongle().server_name(); break;
|
||||||
default : prot = TR("Nessuna"); break;
|
default : prot = TR("Nessuna"); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int type = campoini.get_int("Type", "Main");
|
int type = campoini.get_int("Type", "Main");
|
||||||
const char* tipo = NULL;
|
const char* tipo = NULL;
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
@ -333,12 +332,18 @@ TInfo_mask::TInfo_mask() : TProperty_sheet(TR("Informazioni"))
|
|||||||
if (campoini.get_bool("TestDatabase"))
|
if (campoini.get_bool("TestDatabase"))
|
||||||
{
|
{
|
||||||
if (dhw == _dongle_network)
|
if (dhw == _dongle_network)
|
||||||
|
{
|
||||||
tipo = TR("Server");
|
tipo = TR("Server");
|
||||||
|
campoini.set("Type", type = 2);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
tipo = TR("Server o Postazione singola");
|
tipo = TR("Server o Postazione singola");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
tipo = TR("Client");
|
tipo = TR("Client");
|
||||||
|
campoini.set("Type", type = 3);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ extern bool TOOL_TEXT;
|
|||||||
extern bool EASY_RIDER;
|
extern bool EASY_RIDER;
|
||||||
extern bool ENTER_AS_TAB;
|
extern bool ENTER_AS_TAB;
|
||||||
extern int INTERLINE;
|
extern int INTERLINE;
|
||||||
|
extern bool ANIMATED_BOXES;
|
||||||
|
|
||||||
const COLOR COLOR_DKCYAN = XVT_MAKE_COLOR(0,128,128);
|
const COLOR COLOR_DKCYAN = XVT_MAKE_COLOR(0,128,128);
|
||||||
const COLOR COLOR_DKYELLOW = XVT_MAKE_COLOR(128,128, 0);
|
const COLOR COLOR_DKYELLOW = XVT_MAKE_COLOR(128,128, 0);
|
||||||
|
@ -16,6 +16,7 @@ extern "C"
|
|||||||
#include <image.h>
|
#include <image.h>
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
|
#include <utility.h>
|
||||||
#include <xvtility.h>
|
#include <xvtility.h>
|
||||||
|
|
||||||
#include <statbar.h>
|
#include <statbar.h>
|
||||||
@ -48,6 +49,7 @@ bool TOOL_TEXT = true;
|
|||||||
bool EASY_RIDER = true;
|
bool EASY_RIDER = true;
|
||||||
bool ENTER_AS_TAB = false;
|
bool ENTER_AS_TAB = false;
|
||||||
int INTERLINE = 0;
|
int INTERLINE = 0;
|
||||||
|
bool ANIMATED_BOXES = false;
|
||||||
|
|
||||||
HIDDEN bool _ddl_shown = false;
|
HIDDEN bool _ddl_shown = false;
|
||||||
HIDDEN int _last_mouse_button = 0;
|
HIDDEN int _last_mouse_button = 0;
|
||||||
@ -362,12 +364,13 @@ void customize_colors()
|
|||||||
NATIVE_CONTROLS = ADVANCED_GRAPHICS && colors.get_bool("NativeControls", NULL, -1, NATIVE_CONTROLS);
|
NATIVE_CONTROLS = ADVANCED_GRAPHICS && colors.get_bool("NativeControls", NULL, -1, NATIVE_CONTROLS);
|
||||||
xi_set_pref(XI_PREF_NATIVE_CTRLS, NATIVE_CONTROLS);
|
xi_set_pref(XI_PREF_NATIVE_CTRLS, NATIVE_CONTROLS);
|
||||||
ENTER_AS_TAB = colors.get_bool("EnterAsTab", NULL, -1, ENTER_AS_TAB);
|
ENTER_AS_TAB = colors.get_bool("EnterAsTab", NULL, -1, ENTER_AS_TAB);
|
||||||
|
ANIMATED_BOXES = ADVANCED_GRAPHICS && is_power_reseller() && colors.get_bool("AnimatedBoxes", NULL, -1, ANIMATED_BOXES);
|
||||||
|
|
||||||
TOOL_SIZE = colors.get_int("ToolSize", NULL, -1, TOOL_SIZE);
|
TOOL_SIZE = colors.get_int("ToolSize", NULL, -1, TOOL_SIZE);
|
||||||
TOOL_TEXT = colors.get_bool("ToolText", NULL, -1, TOOL_TEXT);
|
TOOL_TEXT = colors.get_bool("ToolText", NULL, -1, TOOL_TEXT);
|
||||||
get_background_bitmap(true); // Reload background bitmap
|
get_background_bitmap(true); // Reload background bitmap
|
||||||
|
|
||||||
const int SPEECH_MODE = colors.get_int("SpeechMode", NULL, -1, 0);
|
const int SPEECH_MODE = is_power_reseller() ? colors.get_int("SpeechMode", NULL, -1, 0) : 0;
|
||||||
xvt_vobj_set_attr(NULL_WIN, ATTR_SPEECH_MODE, SPEECH_MODE);
|
xvt_vobj_set_attr(NULL_WIN, ATTR_SPEECH_MODE, SPEECH_MODE);
|
||||||
|
|
||||||
xi_set_pref(XI_PREF_COLOR_LIGHT, MASK_LIGHT_COLOR);
|
xi_set_pref(XI_PREF_COLOR_LIGHT, MASK_LIGHT_COLOR);
|
||||||
|
@ -455,9 +455,15 @@ bool TDongle::network_login(bool test_all_keys)
|
|||||||
|
|
||||||
int TDongle::can_try_server() const
|
int TDongle::can_try_server() const
|
||||||
{
|
{
|
||||||
|
// Se authoriz sta andando sono obbligato ad usarlo
|
||||||
if (xvt_sys_dongle_server_is_running())
|
if (xvt_sys_dongle_server_is_running())
|
||||||
return 3;
|
return 3;
|
||||||
|
|
||||||
|
// Se sono un client ed ho l'indirizzo di authoriz sono obbligato ad usarlo
|
||||||
const TString& dongle = ini_get_string(CONFIG_INSTALL, "Server", "Dongle");
|
const TString& dongle = ini_get_string(CONFIG_INSTALL, "Server", "Dongle");
|
||||||
|
if (dongle.full() && ini_get_int(CONFIG_INSTALL, "Main", "Type") == 3)
|
||||||
|
return 3;
|
||||||
|
|
||||||
return dongle.full();
|
return dongle.full();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -494,8 +500,8 @@ bool TDongle::login(bool test_all_keys)
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
// retry login for various dongles ...
|
// retry login for various dongles ...
|
||||||
const int use_server = can_try_server();
|
const int should_use_server = can_try_server();
|
||||||
if (use_server != 3) // Non sono obbligato ad usare il Dongle Server
|
if (should_use_server != 3) // Non sono obbligato ad usare il Dongle Server
|
||||||
{
|
{
|
||||||
if (!ok && hw != _dongle_eutron)
|
if (!ok && hw != _dongle_eutron)
|
||||||
ok = eutron_login(test_all_keys);
|
ok = eutron_login(test_all_keys);
|
||||||
@ -705,13 +711,24 @@ const TString& TDongle::product() const
|
|||||||
return _product;
|
return _product;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TDongle::shortname() const
|
const TString& TDongle::short_name() const
|
||||||
{
|
{
|
||||||
if (_shortname.empty())
|
if (_shortname.empty())
|
||||||
oem();
|
oem();
|
||||||
return _shortname;
|
return _shortname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TString& TDongle::server_name() const
|
||||||
|
{
|
||||||
|
if (network())
|
||||||
|
return ini_get_string(CONFIG_INSTALL, "Server", "Dongle");
|
||||||
|
|
||||||
|
TString& tmp = get_tmp_string(32);
|
||||||
|
xvt_sys_get_host_name(tmp.get_buffer(), tmp.size());
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TDongle::active(word module) const
|
bool TDongle::active(word module) const
|
||||||
{
|
{
|
||||||
const bool yes = (module < ENDAUT) && _module[module] && shown(module);
|
const bool yes = (module < ENDAUT) && _module[module] && shown(module);
|
||||||
@ -1164,6 +1181,8 @@ int Tdninst::test_cmdline(const TString& cmdline, bool key_must_exist, TString&
|
|||||||
}
|
}
|
||||||
|
|
||||||
const TString4 strmod = cmdline.left(2);
|
const TString4 strmod = cmdline.left(2);
|
||||||
|
if (!key_must_exist) // Le personalizzazioni non hanno un modulo vero e proprio
|
||||||
|
{
|
||||||
const int space_pos = cmdline.find(' ');
|
const int space_pos = cmdline.find(' ');
|
||||||
if (space_pos < 0 || space_pos == 3)
|
if (space_pos < 0 || space_pos == 3)
|
||||||
{
|
{
|
||||||
@ -1177,6 +1196,7 @@ int Tdninst::test_cmdline(const TString& cmdline, bool key_must_exist, TString&
|
|||||||
return 2;
|
return 2;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const TDate oggi(TODAY);
|
const TDate oggi(TODAY);
|
||||||
const int solar_year = oggi.year();
|
const int solar_year = oggi.year();
|
||||||
|
@ -91,7 +91,8 @@ public:
|
|||||||
int oem() const;
|
int oem() const;
|
||||||
const TString& reseller() const;
|
const TString& reseller() const;
|
||||||
const TString& product() const;
|
const TString& product() const;
|
||||||
const TString& shortname() const;
|
const TString& short_name() const;
|
||||||
|
const TString& server_name() const;
|
||||||
|
|
||||||
word module_name2code(const char* module) const; // Converte un nome di due lettere in numero
|
word module_name2code(const char* module) const; // Converte un nome di due lettere in numero
|
||||||
const TString& module_code2name(word module) const; // ... e viceversa
|
const TString& module_code2name(word module) const; // ... e viceversa
|
||||||
|
@ -198,10 +198,11 @@ void TImage::draw(WINDOW win, const RCT& dst, const RCT& src) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Certified 99%
|
// Certified 99%
|
||||||
void TImage::draw(WINDOW win, const RCT& dst, char halign, char valign, char grow) const
|
const RCT& TImage::draw(WINDOW win, const RCT& dst, char halign, char valign, char grow) const
|
||||||
{
|
{
|
||||||
const RCT& rct = xvtil_align_rect(_src, dst, halign, valign, grow);
|
const RCT& rct = xvtil_align_rect(_src, dst, halign, valign, grow);
|
||||||
draw(win, rct);
|
draw(win, rct);
|
||||||
|
return rct;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 100%
|
// Certified 100%
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
void draw(WINDOW w, int x, int y) const;
|
void draw(WINDOW w, int x, int y) const;
|
||||||
// @cmember Disegna/modifica l'immagine sullo schermo
|
// @cmember Disegna/modifica l'immagine sullo schermo
|
||||||
void draw(WINDOW w, const RCT& dst) const;
|
void draw(WINDOW w, const RCT& dst) const;
|
||||||
void draw(WINDOW win, const RCT& dst, char halign, char valign, char grow) const;
|
const RCT& draw(WINDOW win, const RCT& dst, char halign, char valign, char grow) const;
|
||||||
// @cmember Disegna l'immagine sulla finestra
|
// @cmember Disegna l'immagine sulla finestra
|
||||||
void draw(WINDOW w, const RCT& dst, const RCT& src) const;
|
void draw(WINDOW w, const RCT& dst, const RCT& src) const;
|
||||||
// @cmember Setta un pixel
|
// @cmember Setta un pixel
|
||||||
|
@ -58,7 +58,7 @@ int hashfun(const char *s)
|
|||||||
temp ^= *pw;
|
temp ^= *pw;
|
||||||
pw++;
|
pw++;
|
||||||
}
|
}
|
||||||
if (ODD(l))
|
if (l & 1)
|
||||||
temp ^= (unsigned short ) (8192 + s[l - 1]);
|
temp ^= (unsigned short ) (8192 + s[l - 1]);
|
||||||
l = (short) (temp % (MaxFields - 3));
|
l = (short) (temp % (MaxFields - 3));
|
||||||
CHECKS(l >= 0, "Negative remainder on ", s);
|
CHECKS(l >= 0, "Negative remainder on ", s);
|
||||||
@ -2464,7 +2464,7 @@ int TSystemisamfile::load(
|
|||||||
p.set_text(s1);
|
p.set_text(s1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!p.setstatus(f.tellg()))
|
if (!p.setstatus((long)f.tellg()))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
zero();
|
zero();
|
||||||
|
@ -1875,6 +1875,8 @@ void TMask::on_idle()
|
|||||||
const int es = _error_severity; // Memorizzo per azzerare subito
|
const int es = _error_severity; // Memorizzo per azzerare subito
|
||||||
_error_severity = 0;
|
_error_severity = 0;
|
||||||
set_focus();
|
set_focus();
|
||||||
|
if (ANIMATED_BOXES)
|
||||||
|
{
|
||||||
switch(es)
|
switch(es)
|
||||||
{
|
{
|
||||||
case 2: xvt_dm_popup_warning(_error_message); break;
|
case 2: xvt_dm_popup_warning(_error_message); break;
|
||||||
@ -1882,6 +1884,16 @@ void TMask::on_idle()
|
|||||||
default: xvt_dm_popup_message(_error_message); break;
|
default: xvt_dm_popup_message(_error_message); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch(es)
|
||||||
|
{
|
||||||
|
case 2: xvt_dm_post_warning(_error_message); break;
|
||||||
|
case 3: xvt_dm_post_error (_error_message); break;
|
||||||
|
default: xvt_dm_post_message(_error_message); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (_test_fld >= 0)
|
if (_test_fld >= 0)
|
||||||
{
|
{
|
||||||
const TOperable_field & f = focus_field();
|
const TOperable_field & f = focus_field();
|
||||||
|
@ -2563,7 +2563,10 @@ bool TSpreadsheet::error_box(const char* msg)
|
|||||||
const int r = _cur_row;
|
const int r = _cur_row;
|
||||||
const int c = _cur_col;
|
const int c = _cur_col;
|
||||||
|
|
||||||
xvt_dm_popup_error(msg); // was xvt_dm_post_error(msg);
|
if (ANIMATED_BOXES)
|
||||||
|
xvt_dm_popup_error(msg);
|
||||||
|
else
|
||||||
|
xvt_dm_post_error(msg);
|
||||||
|
|
||||||
TMask& m = owner().mask();
|
TMask& m = owner().mask();
|
||||||
m.set_focus_field(owner().dlg());
|
m.set_focus_field(owner().dlg());
|
||||||
|
@ -101,37 +101,6 @@ void TPrintwin::paint_background(long j)
|
|||||||
y2 = (byte)(rwd[cnt++]); // Altezza destinazione (in caratteri)
|
y2 = (byte)(rwd[cnt++]); // Altezza destinazione (in caratteri)
|
||||||
if (id >= 0)
|
if (id >= 0)
|
||||||
{
|
{
|
||||||
#ifndef XVAGA
|
|
||||||
// Ai tempi non veniva in mente un modo peggiore
|
|
||||||
const short width = LEN_SPACES(win(), x2); // Larghezza in pixel
|
|
||||||
|
|
||||||
TImage* i = (TImage*)_images.objptr(id);
|
|
||||||
if (i == NULL)
|
|
||||||
{
|
|
||||||
const TString_array& a = printer().image_names();
|
|
||||||
const TImage src(a.row(id));
|
|
||||||
if (src.ok())
|
|
||||||
{
|
|
||||||
// memorizzo l'immagine in risoluzione di stampa! Visto che ho RAM da buttare.
|
|
||||||
i = new TImage(src, width, _chary*y2);
|
|
||||||
_images.add(i, id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i && i->ok())
|
|
||||||
{
|
|
||||||
RCT src; xvt_rect_set(&src, 0, int(_chary*y1),
|
|
||||||
width, min(int(_chary*(y1+1)), i->height()));
|
|
||||||
if (src.top < i->height())
|
|
||||||
{
|
|
||||||
PNT p;
|
|
||||||
p.h = LEN_SPACES(win(), x1) + _hofs;
|
|
||||||
p.v = _chary*rw + _vofs;
|
|
||||||
RCT dst = src; xvt_rect_set_pos(&dst, p);
|
|
||||||
i->draw(win(), dst, src);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (y1 == 0) // Disegno solo una volta per tutte alla prima fetta!
|
if (y1 == 0) // Disegno solo una volta per tutte alla prima fetta!
|
||||||
{
|
{
|
||||||
TImage* i = (TImage*)_images.objptr(id);
|
TImage* i = (TImage*)_images.objptr(id);
|
||||||
@ -152,7 +121,6 @@ void TPrintwin::paint_background(long j)
|
|||||||
i->draw(win(), dst);
|
i->draw(win(), dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
|
@ -181,7 +181,7 @@ void TIndwin::update_bar()
|
|||||||
xvt_dwin_set_std_cpen(w, TL_PEN_HOLLOW);
|
xvt_dwin_set_std_cpen(w, TL_PEN_HOLLOW);
|
||||||
xvt_dwin_draw_rect(w, &b);
|
xvt_dwin_draw_rect(w, &b);
|
||||||
xvt_dwin_set_clip(w, NULL);
|
xvt_dwin_set_clip(w, NULL);
|
||||||
set_color(NORMAL_COLOR, MASK_BACK_COLOR);
|
set_color(PROMPT_COLOR, MASK_BACK_COLOR);
|
||||||
set_opaque_text(TRUE);
|
set_opaque_text(TRUE);
|
||||||
set_font();
|
set_font();
|
||||||
xvt_dwin_draw_text(w, b.left, b.bottom-1, n, -1);
|
xvt_dwin_draw_text(w, b.left, b.bottom-1, n, -1);
|
||||||
@ -199,7 +199,7 @@ void TIndwin::update_txt()
|
|||||||
xvt_dwin_set_std_cpen(w, TL_PEN_HOLLOW);
|
xvt_dwin_set_std_cpen(w, TL_PEN_HOLLOW);
|
||||||
xvt_dwin_draw_rect(w, &r);
|
xvt_dwin_draw_rect(w, &r);
|
||||||
xvt_dwin_set_clip(w, NULL);
|
xvt_dwin_set_clip(w, NULL);
|
||||||
set_color(NORMAL_COLOR, MASK_BACK_COLOR);
|
set_color(PROMPT_COLOR, MASK_BACK_COLOR);
|
||||||
set_opaque_text(TRUE);
|
set_opaque_text(TRUE);
|
||||||
set_font();
|
set_font();
|
||||||
advanced_draw_paragraph(w, _text, r, 'L', 'C', CHARY);
|
advanced_draw_paragraph(w, _text, r, 'L', 'C', CHARY);
|
||||||
|
@ -1915,7 +1915,9 @@ TRecnotype TSorted_cursor::buildcursor(TRecnotype rp)
|
|||||||
// Il controllo del file e' automatico in f.len()
|
// Il controllo del file e' automatico in f.len()
|
||||||
const TString& id = f.id();
|
const TString& id = f.id();
|
||||||
const TRectype& r = relation()->lfile(id).curr();
|
const TRectype& r = relation()->lfile(id).curr();
|
||||||
const int flen = f.len(r);
|
int flen = f.len(r);
|
||||||
|
if (flen == 0) // Campo virtuale
|
||||||
|
flen = 50;
|
||||||
|
|
||||||
if (id.full())
|
if (id.full())
|
||||||
{
|
{
|
||||||
|
@ -883,11 +883,12 @@ TString& TString::format(
|
|||||||
// stringa formattata con i parametri passati.
|
// stringa formattata con i parametri passati.
|
||||||
{
|
{
|
||||||
char spark[512];
|
char spark[512];
|
||||||
|
memset(spark, 0, sizeof(spark));
|
||||||
va_list pars;
|
va_list pars;
|
||||||
va_start(pars, fmt);
|
va_start(pars, fmt);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
const unsigned int tot = _vsnprintf(spark, sizeof(spark)+1, fmt, pars);
|
const unsigned int tot = _vsnprintf(spark, sizeof(spark)-1, fmt, pars);
|
||||||
#else
|
#else
|
||||||
const unsigned int tot = vsprintf(spark, fmt, pars);
|
const unsigned int tot = vsprintf(spark, fmt, pars);
|
||||||
#endif
|
#endif
|
||||||
|
@ -931,6 +931,7 @@ TProp_window::TProp_window(int x, int y, int dx, int dy, WINDOW parent, TProp_fi
|
|||||||
xcc[3].type = XVT_COLOR_SELECT; xcc[3].color = FOCUS_COLOR;
|
xcc[3].type = XVT_COLOR_SELECT; xcc[3].color = FOCUS_COLOR;
|
||||||
xcc[4].type = XVT_COLOR_BLEND; xcc[4].color = MASK_BACK_COLOR;
|
xcc[4].type = XVT_COLOR_BLEND; xcc[4].color = MASK_BACK_COLOR;
|
||||||
xcc[5].type = XVT_COLOR_TROUGH; xcc[5].color = DISABLED_BACK_COLOR;
|
xcc[5].type = XVT_COLOR_TROUGH; xcc[5].color = DISABLED_BACK_COLOR;
|
||||||
|
xcc[6].type = XVT_COLOR_CAPTIONTEXT; xcc[6].color = PROMPT_COLOR;
|
||||||
|
|
||||||
set_owner(owner);
|
set_owner(owner);
|
||||||
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
|
WIN_DEF wd; memset(&wd, 0, sizeof(wd));
|
||||||
|
@ -588,21 +588,26 @@ long daytime()
|
|||||||
return timeloc->tm_sec + timeloc->tm_min * 100L + timeloc->tm_hour * 10000L;
|
return timeloc->tm_sec + timeloc->tm_min * 100L + timeloc->tm_hour * 10000L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool is_aga_station(const char* hostname)
|
||||||
|
{
|
||||||
|
const char* const ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK",
|
||||||
|
"MOBILE", "PICARD", "SPOCK", "SULU", "UHURA", NULL };
|
||||||
|
for (int i = 0; ranger[i]; i++)
|
||||||
|
if (xvt_str_compare_ignoring_case(hostname, ranger[i]) == 0)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool is_power_station()
|
bool is_power_station()
|
||||||
{
|
{
|
||||||
static BOOLEAN ps = -1;
|
static BOOLEAN ps = -1;
|
||||||
if (ps < 0)
|
if (ps < 0)
|
||||||
{
|
{
|
||||||
ps = FALSE;
|
|
||||||
const TDongle& d = dongle();
|
const TDongle& d = dongle();
|
||||||
if (d.number() == 0)
|
if ((d.local() && d.number() == 0) || (d.network() && is_aga_station(d.server_name())))
|
||||||
{
|
ps = is_aga_station(get_hostname());
|
||||||
const char* const ranger[] = { "ANTARES", "ARCHIMEDE", "BATMOBILE", "KIRK",
|
else
|
||||||
"MOBILE", "PICARD", "SPOCK", "SULU", "UHURA", NULL };
|
ps = FALSE;
|
||||||
const TString& hostname = get_hostname();
|
|
||||||
for (int i = 0; ranger[i] && !ps; i++)
|
|
||||||
ps = hostname.compare(ranger[i], -1, true) == 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ps != 0;
|
return ps != 0;
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ char* format (const char* fmt, ...);
|
|||||||
const char* cmd2name(const char* argv0, const char* argv1 = "");
|
const char* cmd2name(const char* argv0, const char* argv1 = "");
|
||||||
int rtoi(const char * roman);
|
int rtoi(const char * roman);
|
||||||
const char* itor(int i);
|
const char* itor(int i);
|
||||||
bool fcopy(const char* orig, const char* dest, bool append=FALSE);
|
bool fcopy(const char* orig, const char* dest, bool append = false);
|
||||||
bool fexist(const char* file);
|
bool fexist(const char* file);
|
||||||
long fsize(const char* file);
|
long fsize(const char* file);
|
||||||
|
|
||||||
@ -55,7 +55,4 @@ bool is_power_reseller(bool power_user_only = false);
|
|||||||
long daytime();
|
long daytime();
|
||||||
bool expand_sys_vars(TString& str);
|
bool expand_sys_vars(TString& str);
|
||||||
|
|
||||||
#define ODD(x) (x & 1)
|
|
||||||
#define EVEN(x) !(x & 1)
|
|
||||||
|
|
||||||
#endif /* __UTILITY_H */
|
#endif /* __UTILITY_H */
|
@ -681,7 +681,7 @@ int xvtil_statbar_height()
|
|||||||
|
|
||||||
static bool xvtil_popup_something(int severity, const char* msg)
|
static bool xvtil_popup_something(int severity, const char* msg)
|
||||||
{
|
{
|
||||||
if (is_power_reseller())
|
if (ANIMATED_BOXES && is_power_reseller())
|
||||||
{
|
{
|
||||||
switch (severity)
|
switch (severity)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user