mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Fixes galore.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4653 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
82f77b9dcd
commit
b4761532b1
4 changed files with 19 additions and 2 deletions
|
@ -17,7 +17,12 @@
|
|||
NSMenuDidRemoveItemNotification
|
||||
NSMenuDidChangeItemNotification.
|
||||
I think we need some setDelegate/delegate methods in here, no?
|
||||
* Source/externs.m: added references to new NSMenu notifications.
|
||||
* Source/NSPopUpButton.m: when creating NSPopUpButtonCell's we
|
||||
make sure to make set the cell enabled so to better work with
|
||||
some of the new menu code. Also added code to post the one
|
||||
notification that this class has.
|
||||
* Source/externs.m: added references to new NSMenu
|
||||
and NSPopUpButton notifications.
|
||||
|
||||
1999-07-25 Michael Hanni <mhanni@sprintmail.com>
|
||||
|
||||
|
|
|
@ -130,4 +130,6 @@
|
|||
|
||||
@end
|
||||
|
||||
extern NSString *NSPopUpButtonWillPopUpNotification;
|
||||
|
||||
#endif // _GNUstep_H_NSPopUpButton
|
||||
|
|
|
@ -161,7 +161,8 @@
|
|||
[menuCell setTitle: title];
|
||||
[menuCell setTarget: self];
|
||||
[menuCell setAction: @selector(buttonSelected:)];
|
||||
|
||||
[menuCell setEnabled:YES];
|
||||
|
||||
[list_items insertObject: menuCell atIndex: index];
|
||||
|
||||
[self synchronizeTitleAndSelectedItem];
|
||||
|
@ -335,6 +336,12 @@
|
|||
//
|
||||
- (void)mouseDown:(NSEvent *)theEvent
|
||||
{
|
||||
NSNotificationCenter *nc;
|
||||
|
||||
nc = [NSNotificationCenter defaultCenter];
|
||||
[nc postNotificationName: NSPopUpButtonWillPopUpNotification
|
||||
object: self
|
||||
userInfo: nil];
|
||||
}
|
||||
|
||||
- (void)mouseUp:(NSEvent *)theEvent
|
||||
|
|
|
@ -265,6 +265,9 @@ NSString* const NSMenuDidAddItemNotification = @"MenuDidAddItem";
|
|||
NSString* const NSMenuDidRemoveItemNotification = @"MenuDidRemoveItem";
|
||||
NSString* const NSMenuDidChangeItemNotification = @"MenuDidChangeItem";
|
||||
|
||||
// NSPopUpButton notification
|
||||
NSString *NSPopUpButtonWillPopUpNotification = @"PopUpButtonWillPopUp";
|
||||
|
||||
// NSWindow notifications
|
||||
NSString *NSWindowDidBecomeKeyNotification = @"WindowDidBecomeKey";
|
||||
NSString *NSWindowDidBecomeMainNotification = @"WindowDidBecomeMain";
|
||||
|
|
Loading…
Reference in a new issue