Simplify new Open menu item text.

This commit is contained in:
Mitchell Livingston 2006-08-02 00:29:10 +00:00
parent 2ac14534bb
commit ee45191676
3 changed files with 15 additions and 9 deletions

View File

@ -31,8 +31,8 @@
<integer>3</integer> <integer>3</integer>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>21</integer>
<integer>29</integer> <integer>29</integer>
<integer>21</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>8J135</string> <string>8J135</string>

Binary file not shown.

View File

@ -31,15 +31,21 @@
NSImage * image = [self image]; NSImage * image = [self image];
[self setImage: [self alternateImage]]; [self setImage: [self alternateImage]];
//approximate height of menu...alright for now
/*float menuHeight = ((float)[[self menu] numberOfItems] + 2.0) * [NSMenuView menuBarHeight];
BOOL moveToTop = menuHeight > [[self window] frame].origin.y;*/
NSPoint point = NSMakePoint(3.0, /*moveToTop ? [self frame].size.height + menuHeight :*/ -2.0);
NSEvent * newEvent= [NSEvent mouseEventWithType: [event type] NSEvent * newEvent= [NSEvent mouseEventWithType: [event type]
location: NSMakePoint(3, -2) location: point
modifierFlags: [event modifierFlags] modifierFlags: [event modifierFlags]
timestamp: [event timestamp] timestamp: [event timestamp]
windowNumber: [event windowNumber] windowNumber: [event windowNumber]
context: [event context] context: [event context]
eventNumber: [event eventNumber] eventNumber: [event eventNumber]
clickCount: [event clickCount] clickCount: [event clickCount]
pressure: [event pressure]]; pressure: [event pressure]];
[NSMenu popUpContextMenu: [self menu] withEvent: newEvent forView: self]; [NSMenu popUpContextMenu: [self menu] withEvent: newEvent forView: self];