Patch level : 12.0 644
Files correlati : ba7.exe Commento : Il postino parte a pieno schemo se viene passato il parametro -v o se lataskbar non è visibile
This commit is contained in:
parent
ffe1040fe5
commit
38dff9011b
@ -1739,6 +1739,8 @@ const char* const appname = TR("Postino");
|
||||
|
||||
class TMailer : public TSkeleton_application
|
||||
{
|
||||
bool _start_full_screen;
|
||||
|
||||
protected:
|
||||
virtual bool create();
|
||||
virtual void main_loop();
|
||||
@ -1746,9 +1748,12 @@ protected:
|
||||
|
||||
bool TMailer::create()
|
||||
{
|
||||
TString arg = main_app().argv(2);
|
||||
TString arg1 = main_app().argv(2);
|
||||
TString arg2 = main_app().argv(3);
|
||||
bool multiple_instances = arg1.starts_with("-f") || arg2.starts_with("-f");
|
||||
|
||||
if (!arg.starts_with("-f") && xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_ALREADY_RUNNING))
|
||||
_start_full_screen = arg1.starts_with("-v") || arg2.starts_with("-v");
|
||||
if (!multiple_instances && xvt_vobj_get_attr(NULL_WIN, ATTR_APPL_ALREADY_RUNNING))
|
||||
{
|
||||
TString msg; msg.format(FR("%s già in esecuzione!"), appname);
|
||||
xvt_dm_popup_error(msg);
|
||||
@ -1762,17 +1767,20 @@ void TMailer::main_loop()
|
||||
WINDOW tray = xvt_trayicon_create(TASK_WIN, 9013, appname); // CampoServer.ico
|
||||
|
||||
open_files(LF_USER, 0);
|
||||
TMailer_mask mm;
|
||||
if (!_start_full_screen && xvt_win_is_taskbar_visible())
|
||||
{
|
||||
if (tray != NULL_WIN)
|
||||
{
|
||||
// Se il postino è a tutto schermo lo minimizzo
|
||||
RCT rct_screen, rct_postman;
|
||||
xvt_vobj_get_outer_rect(SCREEN_WIN, &rct_screen);
|
||||
xvt_vobj_get_outer_rect(TASK_WIN, &rct_postman);
|
||||
if (xvt_rect_get_width(&rct_postman) >= xvt_rect_get_width(&rct_screen) - 64)
|
||||
xvt_vobj_set_visible(TASK_WIN, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
if (tray != NULL_WIN)
|
||||
{
|
||||
// Se il postino è a tutto schermo lo minimizzo
|
||||
RCT rct_screen, rct_postman;
|
||||
xvt_vobj_get_outer_rect(SCREEN_WIN, &rct_screen);
|
||||
xvt_vobj_get_outer_rect(TASK_WIN, &rct_postman);
|
||||
if (xvt_rect_get_width(&rct_postman) >= xvt_rect_get_width(&rct_screen)-64)
|
||||
xvt_vobj_set_visible(TASK_WIN, FALSE);
|
||||
}
|
||||
TMailer_mask mm;
|
||||
|
||||
mm.run();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user