bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix: NSMenu.m, -performActionForItemAtIndex:


From: Nicola Pero
Subject: Re: Fix: NSMenu.m, -performActionForItemAtIndex:
Date: Fri, 14 Jun 2002 13:36:14 +0100 (BST)

Hi Georg,

thanks - looking at the code and API, wouldn't maybe be better that
-performActionForItemAtIndex: does not perform any highlighting, and the
caller performs it instead ?

do you think it would be a good change ?

> Hi again,
> 
> here is a patch for PopUp Menus, which selects the item also for actions send 
>  
> from the item (not only for actions send by the popUpButtonCell).
> 
> That's it.
> Thanks for the Color-Panel, that's a great improvement :-)
> 
> Georg
> 
> 
> 
> 2002-06-11  Georg Fleischmann
>       * gui/Source/NSMenu.m [NSMenu -performActionForItemAtIndex:]:
>       select item for any kind of popup action
> 
> 
> 
> *** gui/Source/NSMenu.m.old   Mon Jun  3 23:23:33 2002
> --- gui/Source/NSMenu.m       Tue Jun 11 21:31:46 2002
> ***************
> *** 735,740 ****
> --- 735,743 ----
>     [nc postNotificationName: NSMenuWillSendActionNotification
>                       object: self
>                     userInfo: d];
> +   // Tell the popup button, which item was selected
> +   if (_popUpButtonCell != nil)
> +     [_popUpButtonCell selectItemAtIndex: index];
>     if (NULL != (action = [item action]))
>       {
>         [NSApp sendAction: action
> ***************
> *** 743,750 ****
>       }
>     else if (_popUpButtonCell != nil)
>       {
> -       // Tell the popup button, which item was selected
> -       [_popUpButtonCell selectItemAtIndex: index];
>         if (NULL != (action = [_popUpButtonCell action]))
>       [NSApp sendAction: action
>              to: [_popUpButtonCell target]
> --- 746,751 ----
> 
> _______________________________________________
> Bug-gnustep mailing list
> Bug-gnustep@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-gnustep
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]