# HG changeset patch # User Claus Gittinger # Date 885932996 -3600 # Node ID f356a6636eefa5c742ee2eed7a72d25fada22b88 # Parent b73d69538b6f94ede8c0324376a9c33b3e01b986 disable hook & browse menu items, if there is no class yet. disable align stuff, if there is no selection. diff -r b73d69538b6f -r f356a6636eef UIPainter.st --- a/UIPainter.st Tue Jan 27 21:02:33 1998 +0100 +++ b/UIPainter.st Tue Jan 27 21:29:56 1998 +0100 @@ -714,6 +714,7 @@ #(#MenuItem #'label:' 'Create Hook Methods' #'value:' #doInstallHooks + #'enabled:' #hasSpecClass ) #(#MenuItem #'label:' '-' @@ -730,6 +731,7 @@ #(#MenuItem #'label:' 'Browse Aspect Methods' #'value:' #doBrowseAspectMethods + #'enabled:' #hasSpecClass ) #(#MenuItem #'label:' '-' @@ -817,6 +819,8 @@ ) nil nil ) + + "Modified: / 27.1.1998 / 21:25:27 / cg" ! menuAlign @@ -841,48 +845,56 @@ #'label:' 'Align Left' #'value:' #alignSelectionLeft #'activeHelpKey:' #alignSelectionLeft + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left') ) #(#MenuItem #'label:' 'Align Right' #'value:' #alignSelectionRight #'activeHelpKey:' #alignSelectionRight + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right') ) #(#MenuItem #'label:' 'Align Left & Right' #'value:' #alignSelectionLeftAndRight #'activeHelpKey:' #alignSelectionLeftAndRight + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right') ) #(#MenuItem #'label:' 'Align top' #'value:' #alignSelectionTop #'activeHelpKey:' #alignSelectionTop + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top') ) #(#MenuItem #'label:' 'Align Bottom' #'value:' #alignSelectionBottom #'activeHelpKey:' #alignSelectionBottom + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom') ) #(#MenuItem #'label:' 'Align Top & Bottom' #'value:' #alignSelectionTopAndBottom #'activeHelpKey:' #alignSelectionTopAndBottom + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom') ) #(#MenuItem #'label:' 'Align Centered Horizontal' #'value:' #alignSelectionCenterHor #'activeHelpKey:' #alignSelectionCenterHor + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal') ) #(#MenuItem #'label:' 'Align Centered Vertical' #'value:' #alignSelectionCenterVer #'activeHelpKey:' #alignSelectionCenterVer + #'enabled:' #hasSelection #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical') ) #(#MenuItem @@ -892,11 +904,13 @@ #'label:' 'Spread Horizontal' #'value:' #spreadSelectionHor #'activeHelpKey:' #spreadSelectionHor + #'enabled:' #hasSelection ) #(#MenuItem #'label:' 'Spread Vertical' #'value:' #spreadSelectionVer #'activeHelpKey:' #spreadSelectionVer + #'enabled:' #hasSelection ) #(#MenuItem #'label:' '-' @@ -905,15 +919,19 @@ #'label:' 'Center Horizontal In Frame' #'value:' #centerSelectionHor #'activeHelpKey:' #centerSelectionHor + #'enabled:' #hasSelection ) #(#MenuItem #'label:' 'Center Vertical In Frame' #'value:' #centerSelectionVer #'activeHelpKey:' #centerSelectionVer + #'enabled:' #hasSelection ) ) nil nil ) + + "Modified: / 27.1.1998 / 21:27:33 / cg" ! menuEdit