window notification to applicationDidFinishLaunching: method.
(setTornOff:): setup oberver for window notifications if menu is
torn off, uset observer otherwise.
(applicationDidFinishLaunching:): setup oberver only for main menu.
(windowDidChangeScreen:): do not process notifications from menu
windows. Use -netstedSetFrameOrigin for frame change to take care
of submenus repositioning.
send WindowDidChangeScreen notification if window was moved to other
screen.
* Source/NSScreen.m (mainScreen): returns screen of main menu if no
key window exists. With this implementation default screen (screen at
index 0 in screens array) should never be returned.
* Source/NSMenu.m (initWithTitle:): observe WindowDidBecomeKey and
WindowDidChangeScreen notifications.
(windowDidChangeScreen:): new method to handle observed notification
added above. Moves menu to screen of key window for both cases: when
key window moved to or activated on different screen.
methods. And make sure we update the menu items before display and
keyEquivalent processing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@40285 72102866-910b-0410-8b05-ffd578937521
id<NSMenuItem> to NSMenuitem* as it is done by Apple too
fixes warnings in NSApplication.m and NSTextView.m
OK Fred Kiefer
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38568 72102866-910b-0410-8b05-ffd578937521
disable supermenus that have empty submenus, when there is no
validator.
Patch by Paul Landers <paul.landers@testplant.com>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38289 72102866-910b-0410-8b05-ffd578937521
_cell being nil.
* Source/NSBox.m (-initWithCoder:): Add a few default values.
* Source/NSMenu.m (-_setGeometry): Protect against _aWindow
being nil.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38003 72102866-910b-0410-8b05-ffd578937521
of the application, not the name of the process, if the info bundle contains an
application name.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36060 72102866-910b-0410-8b05-ffd578937521
Fix all of the current warnings in Gorm so that it can be used to test
NSInteger things.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36039 72102866-910b-0410-8b05-ffd578937521
sender of a pop up button's action when it is sent through one of the
menu items.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34781 72102866-910b-0410-8b05-ffd578937521
popup button cell and its action, before checking for the item
action. This caused a problem due to NIB decoding changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34642 72102866-910b-0410-8b05-ffd578937521
and unsigned with NSUInteger. This allows to recompile gui on
64 bit systems after the change to NSNotFound in base.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34312 72102866-910b-0410-8b05-ffd578937521
zone as we never use it and a change in base made this an
expensive operation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33694 72102866-910b-0410-8b05-ffd578937521
when starting GUI apps in GC mode, but should have no real effect on
functionality.
Note: this zone seems to have been created for OpenStep compatibility, but then
we don't actually use it anywhere. The Cocoa docs say that this is 'The zone
from which NSMenu objects should be allocated', but we allocate NSMenu objects
from the default malloc zone.
Fred: I think the correct thing to do here is probably to just return
NSDefaultMallocZone() from +menuZone in all modes. Can you take a look and
see?
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33150 72102866-910b-0410-8b05-ffd578937521
rest of the main menu to avoid accidentally shadowing key equivalents
in the application's own menus.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31902 72102866-910b-0410-8b05-ffd578937521
updateAllWindowsWithMenu:, updateMenu:forWindow:, altered
implementation for setMenu:forWindow:, added private method
_setMenu: to set the current menu on the window.
* Source/GSWindowDecorationView.m: Changes to layout
* Source/NSMenu.m: Only call the method updateAllWindowsWithMenu:
when NSMenuInterfaceStyle = NSWindows95InterfaceStyle.
* Source/NSMenuView.m: Change to -update so that it does not
render the top bar of the menu if NSMenuInterfaceStyle =
NSWindows95InterfaceStyle.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31782 72102866-910b-0410-8b05-ffd578937521
handle the cases where the menu is off screen on the top and the left
side of the screen, respectively. This fixes bug #31415.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31038 72102866-910b-0410-8b05-ffd578937521
key is pressed. Change NSButton -performKeyEquivalent: in a similar way.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30720 72102866-910b-0410-8b05-ffd578937521
rightMouseMenu:forEvent: to allow theming of transient and
context menus.
* Source/GSThemeMenu.m: Implementation of method
rightMouseMenu:forEvent: to allow theming of transient and
context menus.
* Source/NSMenu.m: use the theming code implemented above instead
of rendering the menu directly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30370 72102866-910b-0410-8b05-ffd578937521
method to initialize the private name attribute of an NSMenu.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30364 72102866-910b-0410-8b05-ffd578937521
menus. Fixes a bug where the services, windows, and recent documents
menu were defunct when loading the menu from a .nib file.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30363 72102866-910b-0410-8b05-ffd578937521