Patch level : 10.0

Files correlati     : ba0 ba1
Ricompilazione Demo : [ ]
Commento            :
Impedita uscita dal menu principale mentre ci sono applicazioni ancora aperte


git-svn-id: svn://10.65.10.50/trunk@17344 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-10-02 16:03:09 +00:00
parent 38d9c163e1
commit 31b70ac691
6 changed files with 30 additions and 14 deletions

@ -2041,6 +2041,7 @@ int TMenu_application::do_outlook()
_mask = &mask;
KEY key = mask.run();
_mask = NULL;
return key == K_QUIT ? -2 : 0;

@ -270,7 +270,6 @@ 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("logo.gif")
{
set_scroll_max(0, 0); // Get rid of that useless scrollbars
if (_logo.ok() && can_be_transparent(_logo))
_logo.convert_transparent_color(NORMAL_BACK_COLOR);
}
@ -380,6 +379,21 @@ void TOutlook_mask::load_perspective(int per)
xvt_pane_manager_load_perspective(bf.win().win(), str);
}
bool TOutlook_mask::can_be_closed() const
{
bool yes = true;
if (is_running())
{
TBook_field& bf = (TBook_field&)field(DLG_MAIN);
if (bf.pages() == 0)
((TOutlook_mask*)this)->send_key(K_FORCE_CLOSE, 0);
else
warning_box(TR("E' necessario chiudere tutte le applicazioni attive"));
yes = false;
}
return yes;
}
short TOutlook_mask::add_page(const TString& caption)
{
TBook_field& bf = (TBook_field&)field(DLG_MAIN);
@ -583,7 +597,7 @@ TOutlook_mask::TOutlook_mask(TMenu& menu) : _tree(menu), _locked(false)
TOutlook_mask::~TOutlook_mask()
{
save_perspective(1); // Salva custom
save_perspective(1); // Salva custom
// Ricostruisci status bar tornata utile
xvtil_create_statbar();
}

@ -21,6 +21,8 @@ class TOutlook_mask : public TSpidey_mask
protected:
virtual void handler(WINDOW w, EVENT* ep);
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
virtual bool can_be_closed() const;
short add_page(const TString& caption);
void set_page_caption(short page, const TString& caption, int icon);

@ -1115,7 +1115,7 @@ void TManutenzione_app::update_dir()
}
else
{
towrite = (TString(ds.des()) != d.des());
towrite = TFixed_string(ds.des()) != d.des();
if (towrite)
{
if (!valid_file)

@ -1,9 +1,9 @@
#include <applicat.h>
#include <mask.h>
#include <progind.h>
#include <recarray.h>
#include <relation.h>
#include <tabutil.h>
#include <toolfld.h>
#include <reputils.h>
#include <urldefid.h>
@ -13,9 +13,10 @@ public:
TProfiler_mask();
};
TProfiler_mask::TProfiler_mask() : TMask(TR("Test"), 1, 60, 12)
TProfiler_mask::TProfiler_mask() : TMask(TR("Test"), 1, 60, 9)
{
create_bar(-2);
add_button_tool(DLG_OK, PR("Elabora"), TOOL_ELABORA);
add_button_tool(DLG_QUIT, "", TOOL_QUIT);
TToken_string codes, items;
codes.add(0); items.add(TR("Tutti i test"));
@ -27,8 +28,6 @@ TProfiler_mask::TProfiler_mask() : TMask(TR("Test"), 1, 60, 12)
add_radio(101, 0, TR("@bSelezione test"), 1, 1, 58, codes, items);
add_number(102, 0, PR("Numero di iterazioni"), 1, 0, 3, "U");
add_button(DLG_OK, MAX_PAGES, PR("Elabora"), -12, -11, 10, 2, "", BMP_ELABORA);
add_button(DLG_QUIT, MAX_PAGES, "", -22, -11, 10, 2);
}
///////////////////////////////////////////////////////////
@ -101,7 +100,7 @@ bool TTest_application::test1(TLog_report& log)
for (tab.first(); tab.good(); tab.next())
r++;
msg.format("%ld records %ld msec", r, clock() - start);
msg.format(FR("%ld records %ld msec"), r, clock() - start);
_pi->set_text(msg);
if (!_pi->addstatus(1))
@ -339,7 +338,7 @@ void TTest_application::main_loop()
ti = 1;
}
TLog_report log("Report");
TLog_report log(TR("Report"));
bool ok = true;
for (int t = 1; ok && t <= 5; t++)
@ -364,7 +363,7 @@ void TTest_application::main_loop()
int ba1200(int argc, char** argv)
{
TTest_application a;
a.run(argc, argv, TR("Test File"));
a.run(argc, argv, TR("Performance profiler"));
return 0;
}

@ -2052,10 +2052,10 @@ bool TCreadischi_mask::zip_module(const TString& main_module, bool agg, int patc
{
// Aggiungo il nome corrente alla lista dei files da compattare
fileh << cmd << '\n';
if (stricmp(cmd.ext(), "exe") == 0)
if (xvt_str_compare_ignoring_case(cmd.ext(), "exe") == 0)
{
TString16 submod = row->get(2);
submod.cut(2);
TString4 submod;
submod.strncpy(row->get(2), 2);
set_version_info(cmd, ini, submod);
}
_stat((const char *)cmd,&info);