Patch level : 10.0 508
Files correlati : ba0.exe Ricompilazione Demo : [ ] Commento : Corretta selezione ditta in menu classico git-svn-id: svn://10.65.10.50/trunk@19615 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
334fa27728
commit
4b0a9e960a
@ -141,33 +141,34 @@ void TPicture_mask::update()
|
||||
if (!ADVANCED_GRAPHICS)
|
||||
return;
|
||||
|
||||
const TImage& image = _submenu->image();
|
||||
if (image.ok())
|
||||
{
|
||||
RCT client; xvt_vobj_get_client_rect(win(), &client);
|
||||
const bool tree_view = id2pos(DLG_TREE) >= 0;
|
||||
RCT lgo = client, img = client;
|
||||
|
||||
const bool tree_view = id2pos(DLG_TREE) >= 0;
|
||||
if (tree_view) // TreeView == 1
|
||||
{
|
||||
RCT tree; tfield(DLG_TREE).get_rect(tree);
|
||||
|
||||
RCT lgo = client; lgo.left = tree.right; lgo.bottom /= 3;
|
||||
if (_logo != NULL)
|
||||
_logo->draw(win(), lgo, 'R', 'T', '-');
|
||||
|
||||
lgo = client; lgo.left = tree.right; lgo.top = lgo.bottom/3; lgo.bottom -= lgo.top;
|
||||
image.draw(win(), lgo, 'R', 'B', '-');
|
||||
lgo.left = tree.right; lgo.bottom /= 3;
|
||||
img.left = tree.right; img.top = lgo.bottom; img.bottom = 2*lgo.bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
RCT but; field(101).get_rect(but);
|
||||
RCT lgo = client; lgo.right = but.left; lgo.bottom /= 2;
|
||||
if (_logo != NULL)
|
||||
_logo->draw(win(), lgo, 'L', 'T', '-');
|
||||
|
||||
lgo = client; lgo.right = but.left; lgo.top = lgo.bottom/2;
|
||||
image.draw(win(), lgo, 'L', 'B', '-');
|
||||
lgo.right = but.left; lgo.bottom /= 2;
|
||||
img.right = but.left; img.top = lgo.bottom;
|
||||
}
|
||||
|
||||
if (_logo != NULL)
|
||||
{
|
||||
xvt_rect_inflate(&lgo, -CHARX, -CHARX);
|
||||
_logo->draw(win(), lgo, 'C', 'T', '-');
|
||||
}
|
||||
|
||||
const TImage& image = _submenu->image();
|
||||
if (image.ok())
|
||||
{
|
||||
xvt_rect_inflate(&img, -CHARX, -CHARX);
|
||||
image.draw(win(), img, 'C', 'C', '-');
|
||||
}
|
||||
}
|
||||
|
||||
@ -881,11 +882,9 @@ int TMenu_application::do_level()
|
||||
if (!top)
|
||||
mask.add_button(DLG_CANCEL, 0, PR("Menu precedente"), x + spazio * 2 + bottone, -1, bottone, 2);
|
||||
|
||||
|
||||
mask.first_focus(101+_menu.selected());
|
||||
|
||||
const int k = mask.run();
|
||||
_mask = NULL;
|
||||
|
||||
int m = 0;
|
||||
switch (k)
|
||||
@ -906,6 +905,10 @@ int TMenu_application::do_level()
|
||||
m = _menu.selected() + 1; // Sempre > 0
|
||||
break;
|
||||
}
|
||||
|
||||
// Azzero solo ora altrimenti il menu normale crede di non poter fare il cambio ditta
|
||||
_mask = NULL;
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
@ -2088,7 +2091,7 @@ int TMenu_application::do_outlook()
|
||||
|
||||
bool TMenu_application::firm_change_enabled() const
|
||||
{
|
||||
return _mask != NULL; // Impedisci il cambio ditta durante il login
|
||||
return _mask != NULL || _tree_view == 0; // Impedisci il cambio ditta durante il login
|
||||
}
|
||||
|
||||
void TMenu_application::on_firm_change()
|
||||
@ -2172,14 +2175,20 @@ int ba0100(int argc, char** argv)
|
||||
}
|
||||
|
||||
TFilename menu = (argc < 2) ? MEN_FILE : argv[1];
|
||||
if (menu.custom_path())
|
||||
bool ok = menu.custom_path();
|
||||
if (!ok && argc >= 2)
|
||||
{
|
||||
menu = MEN_FILE;
|
||||
ok = menu.custom_path();
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
TMenu_application *ma = new TMenu_application(menu);
|
||||
ma->run(argc, argv, TR("Menu Principale"));
|
||||
delete ma;
|
||||
}
|
||||
else
|
||||
error_box(FR("Non esiste il menu %s"), (const char*)menu);
|
||||
cantread_box(menu);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -318,6 +318,8 @@ void synchronize_tree_field(TTree_field& tf)
|
||||
|
||||
bool can_be_transparent(const TImage& i)
|
||||
{
|
||||
if (xvt_image_get_format(i) == XVT_IMAGE_RGB)
|
||||
return false;
|
||||
const int w = i.width()-1;
|
||||
const int h = i.height()-1;
|
||||
const COLOR col = i.get_pixel(0,0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user