577 |
577 |
578 findGuiResourcesIn:aResourceContainerOrApplication |
578 findGuiResourcesIn:aResourceContainerOrApplication |
579 "resolve national language translations from aResourceContainerOrApplication. |
579 "resolve national language translations from aResourceContainerOrApplication. |
580 Unless already set, remember aResourceContainerOrApplication as menu receiver" |
580 Unless already set, remember aResourceContainerOrApplication as menu receiver" |
581 |
581 |
|
582 ^ self findGuiResourcesIn:aResourceContainerOrApplication for:nil |
|
583 |
|
584 "Modified: / 26-10-2006 / 16:37:57 / cg" |
|
585 ! |
|
586 |
|
587 findGuiResourcesIn:aResourceContainerOrApplication for:aViewOrNil |
|
588 "resolve national language translations from aResourceContainerOrApplication. |
|
589 Unless already set, remember aResourceContainerOrApplication as menu receiver" |
|
590 |
582 receiver isNil ifTrue:[ |
591 receiver isNil ifTrue:[ |
583 receiver := aResourceContainerOrApplication |
592 receiver := aResourceContainerOrApplication |
584 ]. |
593 ]. |
585 self |
594 self |
586 findGuiResourcesIn:aResourceContainerOrApplication |
595 findGuiResourcesIn:aResourceContainerOrApplication |
|
596 for:aViewOrNil |
587 rememberResourcesIn:(ValueHolder new) |
597 rememberResourcesIn:(ValueHolder new) |
588 |
598 |
589 "Modified: / 26-10-2006 / 16:37:57 / cg" |
599 "Modified: / 26-10-2006 / 16:37:57 / cg" |
590 ! |
600 ! |
591 |
601 |
592 findGuiResourcesIn:aResourceContainerOrApplication rememberResourcesIn:aValueHolderOrNil |
602 findGuiResourcesIn:aResourceContainerOrApplication for:aViewOrNil rememberResourcesIn:aValueHolderOrNil |
593 "resolve national language translations from aResourceContainerOrApplication" |
603 "resolve national language translations from aResourceContainerOrApplication" |
594 |
604 |
595 |need resolvedItems rcv| |
605 |need resolvedItems rcv| |
596 |
606 |
597 "/ cg: do not recursively change the receiver - it could be set for the top |
607 "/ cg: do not recursively change the receiver - it could be set for the top |
623 |resItems| |
633 |resItems| |
624 |
634 |
625 rcv := aResourceContainerOrApplication. |
635 rcv := aResourceContainerOrApplication. |
626 [rcv notNil and:[resItems isNil]] whileTrue:[ |
636 [rcv notNil and:[resItems isNil]] whileTrue:[ |
627 "/ pass down the original app while walking the master chain, |
637 "/ pass down the original app while walking the master chain, |
628 "/ so that subclices can be redefined (is that what we want???) |
638 "/ so that subclices can be redefined by the master |
|
639 "/ (is that what we want???) |
629 resItems := anItem resolveSliceMenuItemsIn:rcv for:aResourceContainerOrApplication rememberResourcesIn:aValueHolderOrNil. |
640 resItems := anItem resolveSliceMenuItemsIn:rcv for:aResourceContainerOrApplication rememberResourcesIn:aValueHolderOrNil. |
630 rcv := rcv perform:#masterApplication ifNotUnderstood:nil. |
641 rcv := rcv perform:#masterApplication ifNotUnderstood:nil. |
|
642 ]. |
|
643 "/ if there is no mastApp, or it did not provide the slice, |
|
644 "/ ask the view itself. |
|
645 resItems isNil ifTrue:[ |
|
646 aViewOrNil notNil ifTrue:[ |
|
647 resItems := anItem resolveSliceMenuItemsIn:aViewOrNil for:aResourceContainerOrApplication rememberResourcesIn:aValueHolderOrNil. |
|
648 ]. |
631 ]. |
649 ]. |
632 |
650 |
633 resItems notEmptyOrNil ifTrue:[ |
651 resItems notEmptyOrNil ifTrue:[ |
634 resolvedItems addAll:resItems. |
652 resolvedItems addAll:resItems. |
635 ] |
653 ] |
639 ]. |
657 ]. |
640 ]. |
658 ]. |
641 items := resolvedItems. |
659 items := resolvedItems. |
642 |
660 |
643 "Modified: / 23-07-2017 / 12:17:58 / cg" |
661 "Modified: / 23-07-2017 / 12:17:58 / cg" |
|
662 ! |
|
663 |
|
664 findGuiResourcesIn:aResourceContainerOrApplication rememberResourcesIn:aValueHolderOrNil |
|
665 "resolve national language translations from aResourceContainerOrApplication" |
|
666 |
|
667 ^ self |
|
668 findGuiResourcesIn:aResourceContainerOrApplication |
|
669 for:nil |
|
670 rememberResourcesIn:aValueHolderOrNil |
644 ! ! |
671 ! ! |
645 |
672 |
646 !Menu methodsFor:'adding & removing'! |
673 !Menu methodsFor:'adding & removing'! |
647 |
674 |
648 addItem:aMenuItem |
675 addItem:aMenuItem |