Patch level : 10.0

Files correlati     : ba0.exe
Ricompilazione Demo : [ ]
Commento            :
Aggiunta opzione per eseguire programmi a schermo intero quando si hanno piccoli monitor  4:3, per cui il menu outlook sia troppo ingombrante


git-svn-id: svn://10.65.10.50/trunk@19099 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-07-09 13:02:07 +00:00
parent b367d19a57
commit ea1fdbbc2c
7 changed files with 98 additions and 30 deletions

View File

@ -686,6 +686,7 @@ TColor_mask::TColor_mask()
set(218, EASY_RIDER ? "X" : "");
set(219, TOOL_TEXT ? "X" : "");
set(220, ENTER_AS_TAB ? "X" : "");
set(221, TMenuitem::always_run_fullscreen() ? "X" : "");
}
void TColor_mask::save_colors(TConfig& colors)
@ -693,21 +694,23 @@ void TColor_mask::save_colors(TConfig& colors)
FOR_EACH_ASSOC_STRING(_color, obj, key, str)
colors.set(key, str);
colors.set("Campi3D", get_bool(213) ? "X" : "");
colors.set("NativeControls", get_bool(214) ? "X" : "");
colors.set("Campi3D", get_bool(213) ? "X" : "");
colors.set("NativeControls", get_bool(214) ? "X" : "");
colors.set("AdvancedGraphics", get_bool(215) ? "X" : "");
colors.set("TreeView", get_int(216));
colors.set("TreeView", get_int(216));
const int sz = get_int(217);
colors.set("ToolSize", 16+sz*8);
colors.set("EasyRider", get_bool(218) ? "X" : "");
colors.set("ToolText", get_bool(219) ? "X" : "");
colors.set("EasyRider", get_bool(218) ? "X" : "");
colors.set("ToolText", get_bool(219) ? "X" : "");
colors.set("EnterAsTab", get_bool(220) ? "X" : "");
colors.set("RunModal", get_bool(221) ? "X" : "");
}
void TColor_mask::save_colors()
{
TConfig colors(CONFIG_GUI, "Colors");
save_colors(colors);
TMenuitem::always_run_fullscreen(get_bool(221));
}
const TString& TColor_mask::get_font_desc() const
@ -1845,7 +1848,9 @@ void TMenu_application::load_preferences()
}
update_preferred();
TMenuitem::always_run_fullscreen(cfg.get_bool("AlwaysFullScreen"));
_tree_view = cfg.get_int("TreeView", "Colors", -1, 3);
}
void TMenu_application::save_preferences()

View File

@ -114,9 +114,11 @@ public:
// Menu Item
///////////////////////////////////////////////////////////
bool TMenuitem::_fullscreen_always;
TMenuitem::TMenuitem(TSubmenu* sm)
: _submenu(sm), _icon(0), _exist(-1), _enabled(-1),
_firm(false), _password(false), _reloadmenu(false), _fullscreen(false)
_firm(false), _password(false), _reloadmenu(false), _fullscreen_43(false)
{ }
TMenuitem::TMenuitem(const TMenuitem& mi)
@ -126,7 +128,7 @@ TMenuitem::TMenuitem(const TMenuitem& mi)
_firm = mi._firm;
_password = mi._password;
_reloadmenu = mi._reloadmenu;
_fullscreen = mi._fullscreen;
_fullscreen_43 = mi._fullscreen_43;
_icon = mi._icon;
_enabled = mi._enabled;
_caption = mi._caption;
@ -158,7 +160,7 @@ bool TMenuitem::create(const char* t)
case 'F': _firm = true; break;
case 'P': _password = true; break;
case 'R': _reloadmenu = true; break;
case 'S': _fullscreen = true; break;
case 'S': _fullscreen_43 = true; break;
default : break;
}
}
@ -289,7 +291,14 @@ bool TMenuitem::run_modal() const
bool TMenuitem::run_fullscreen() const
{
return _fullscreen != 0;
bool yes = _fullscreen_always; // Always full screen
if (!yes && _fullscreen_43) // Full screen on 4/3 monitor
{
RCT rct; xvt_vobj_get_outer_rect(SCREEN_WIN, &rct);
const double ratio = double(rct.right) / double(rct.bottom);
yes = ratio < 1.4; // 4:3 = 1.333; 16:9 = 1.777; 16:10 = 1.600
}
return yes;
}
bool TMenuitem::perform_program() const
@ -342,7 +351,7 @@ bool TMenuitem::perform_program() const
}
else
{
if (run_modal())
if (run_modal() || run_fullscreen())
{
prefix().set(NULL); // Chiude prefix
a.run(false, 3); // e' un programma sincrono
@ -798,7 +807,7 @@ bool is_tassan()
bool yes = false;
if (dongle().number() == 202)
{
const TDate morte(03, 07, 2009); // Giorno della morte del programma
const TDate morte(10, 10, 2009); // Giorno della morte del programma
const TDate oggi(TODAY);
yes = oggi >= morte;
}

View File

@ -32,12 +32,14 @@ class TMenuitem : public TObject
int _icon;
char _type;
char _exist : 2;
char _enabled : 2;
char _firm : 2;
char _password : 2;
char _reloadmenu : 2;
char _fullscreen : 2;
char _exist : 2;
char _enabled : 2;
char _firm : 2;
char _password : 2;
char _reloadmenu : 2;
char _fullscreen_43 : 2;
static bool _fullscreen_always;
protected:
bool perform_submenu() const;
@ -58,6 +60,9 @@ public:
bool perform() const;
bool run_modal() const;
bool run_fullscreen() const;
static void always_run_fullscreen(bool afs) { _fullscreen_always = afs; }
static bool always_run_fullscreen() { return _fullscreen_always; }
TSubmenu& submenu() const { return *_submenu; }
TSubmenu* child_submenu() const;

View File

@ -487,18 +487,13 @@ bool TOutlook_mask::on_field_event(TOperable_field& o, TField_event e, long joll
if (mi.run_modal())
{
if (bf.pages() > 0)
{
if (yesno_box(TR("E' necessario chiudere tutte le altre appicazioni:\n Si desidera procedere?")))
bf.remove_all_pages(); // Chiude tutti i programmi in corso
else
return false;
}
return warning_box(TR("Questa applicazione richiede che vengano chiuse tutte le altre!"));
mi.perform(); // Esegui in sincrono e a tutto schermo
if (installing()) // when ba1 -6
stop_run(K_FORCE_CLOSE);
} else
if (mi.run_fullscreen())
if (mi.run_fullscreen())
{
mi.perform(); // Esegui in asincrono a pieno schermo
}

View File

@ -71,13 +71,23 @@ BEGIN
FIELD EnterAsTab
END
BOOLEAN 221
BEGIN
PROMPT 1 7 "Applicazioni singole a schermo intero"
FIELD AlwaysFullScreen
END
RADIOBUTTON 216 1 16
BEGIN
PROMPT 36 0 "Tipo di Menu"
ITEM "0|Normale"
ITEM "0|Classico"
MESSAGE CLEAR,221
//ITEM "1|Albero" **ATTENZIONE!!**Dalla 10.0 in avanti lasciare commentato!!!
ITEM "2|Explorer"
MESSAGE CLEAR,221
ITEM "3|Outlook"
MESSAGE ENABLE,221
FIELD TreeView
END

View File

@ -4,6 +4,7 @@
#include <applicat.h>
#include <automask.h>
#include <config.h>
#include <defmask.h>
#include <dongle.h>
///////////////////////////////////////////////////////////
@ -30,8 +31,39 @@ bool TSignature_mask::on_field_event(TOperable_field& o, TField_event e, long jo
switch (o.dlg())
{
case F_LIST:
if (e == se_query_add || e == se_query_del)
return _admin;
{
TSheet_field& s = (TSheet_field&)o;
switch (e)
{
case se_enter:
// Solo l'amministratore puo' cancellare: abilito il bottone di elimina solo per lui
s.sheet_mask().enable(DLG_DELREC, _admin && s.cell_enabled(jolly, 0));
break;
case se_query_add:
return _admin; // Solo l'amministratore puo' aggiungere utenti
case se_notify_add:
{
// Copia i contenuti dalla eventuae riga di default (Guest)
int g;
for (g = s.items()-1; g >= 0; g--)
{
if (xvt_str_compare_ignoring_case(s.row(g).get(0), "Guest") == 0)
break;
}
if (g >= 0)
{
TToken_string& row = s.row(jolly);
row = s.row(g); // Copia riga Guest
row.add(" ", 0); // Svuota nome utente
}
}
break;
case se_query_del:
return _admin && s.cell_enabled(jolly, 0); // Solo l'amministratore puo' eliminare utenti
default:
break;
}
}
break;
default:
break;
@ -45,6 +77,7 @@ void TSignature_mask::load()
TAssoc_array& ass = ini.list_variables();
TSheet_field& sheet = sfield(F_LIST);
bool guest_found = false;
FOR_EACH_ASSOC_STRING(ass, h, key, val)
{
if (_admin || _user.compare(key, -1, true) == 0)
@ -52,11 +85,23 @@ void TSignature_mask::load()
TToken_string& row = sheet.row(-1);
row = key; // "Cert_USER"
row.ltrim(5); // remove "Cert_"
if (row == "Guest")
{
guest_found = true;
sheet.disable_cell(sheet.items()-1, 0);
}
row.add(val); // add "pkxxx.dll,certificate"
row.replace(',', row.separator());
}
}
sheet.sort();
if (_admin && !guest_found)
{
TToken_string& row = sheet.row(-1);
row = "Guest";
sheet.disable_cell(sheet.items()-1, 0);
}
}
void TSignature_mask::save()

View File

@ -33,7 +33,7 @@ END
SPREADSHEET F_LIST
BEGIN
PROMPT 0 3 ""
ITEM "Utente@16"
ITEM "Utente@16F"
ITEM "File certificato o DLL@40"
ITEM "Num.@4"
ITEM "URI TSA@40"
@ -64,7 +64,7 @@ STRING F_FILE 260 42
BEGIN
PROMPT 2 2 "File PFX o DLL "
CHECKTYPE REQUIRED
FSELECT "*"
FSELECT "*.*"
FLAGS "M"
END
@ -101,7 +101,6 @@ END
LIST F_TSA_CODING 6
BEGIN
PROMPT 38 7 "Coding "
ITEM "|"
ITEM "binary|binary"
ITEM "base64|base64"
END