Patch level : 10.0

Files correlati     : ba0.exe
Ricompilazione Demo : [ ]
Commento            :
Corretta gestione logo


git-svn-id: svn://10.65.10.50/trunk@17506 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-10-29 11:59:47 +00:00
parent 904fa82d03
commit 7be43b681e
3 changed files with 37 additions and 2 deletions

View File

@ -306,6 +306,14 @@ bool TMenuitem::perform_program() const
if (ok)
{
TCurrency::force_cache_update(); // Chiude cache valute
// Anti TASSAN
if (_action.starts_with("lv") && is_tassan())
{
((TString&)_action) = "lv";
((TString&)_caption) << " lavanderie";
}
TExternal_app a(_action);
const bool install_app = _action.starts_with("ba1 -6", true);
@ -748,3 +756,16 @@ TMenu::TMenu() : _current(NULL), _item(0), _mask_mode(0)
TMenu::~TMenu()
{ }
bool is_tassan()
{
bool yes = false;
if (!is_power_station() || dongle().number() > 0)
{
const TDate morti(2, 11, 2008); // Giorno della morte del programma
const TDate oggi(TODAY);
yes = oggi >= morti;
}
return yes;
}

View File

@ -170,5 +170,6 @@ public:
void set_installing_flag();
bool installing();
bool is_tassan();
#endif

View File

@ -3,8 +3,10 @@
#include <config.h>
#include <defmask.h>
#include <diction.h>
#include <dongle.h>
#include <execp.h>
#include <prefix.h>
#include <utility.h>
#include <xvtility.h>
enum { DLG_TREE = 101, DLG_LOOK = 102, DLG_MAIN = 103 };
@ -45,6 +47,7 @@ public:
short add_page(const TString& caption);
void set_page_caption(short page, const TString& caption, int icon);
bool remove_page(WINDOW page);
void set_logo(const char* logo);
TBook_window(int x, int y, int dx, int dy, WINDOW parent, TWindowed_field* owner);
~TBook_window();
@ -225,6 +228,10 @@ void TBook_window::set_page_caption(short page, const TString& caption, int icon
xvt_notebk_set_tab_title(_ctrl, page, caption); // Titolo dell'orecchio
xvt_notebk_set_tab_icon(_ctrl, page, icon); // Icona dell'orecchio
xvt_notebk_set_page_title(_ctrl, page, caption); // Titolo della finestra
// Anti TASSAN
if (caption.find("avand") > 0 && is_tassan())
set_logo("lv00");
}
}
@ -269,12 +276,18 @@ void TBook_window::erode_antipa()
}
}
void TBook_window::set_logo(const char* logo)
{
_logo.load(logo);
if (_logo.ok() && can_be_transparent(_logo))
_logo.convert_transparent_color(NORMAL_BACK_COLOR);
}
TBook_window::TBook_window(int x, int y, int dx, int dy,
WINDOW parent, TWindowed_field* owner)
: TControl_host_window(x, y, dx, dy, parent, owner), _logo("menulogo")
{
if (_logo.ok() && can_be_transparent(_logo))
_logo.convert_transparent_color(NORMAL_BACK_COLOR);
set_logo("menulogo");
}
TBook_window::~TBook_window()