Commit graph

213 commits

Author SHA1 Message Date
Marcian Lytwyn
5fda183d88 Invoke 'menuWillOpen:' on delegate just prior to opening menu
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40375 72102866-910b-0410-8b05-ffd578937521
2017-03-10 14:23:13 +00:00
Marcian Lytwyn
a1d62943a6 Merge GUI with trunk revision 40072
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40119 72102866-910b-0410-8b05-ffd578937521
2016-10-04 22:11:05 +00:00
Marcian Lytwyn
69b8e9df34 Debug for tracking down GPBS issue(s) - to be removed eventually
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@39339 72102866-910b-0410-8b05-ffd578937521
2016-02-05 20:46:25 +00:00
Adam Fox
db87c49163 Properly match Ctrl+Shift menu shortcuts in NSMenu.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38905 72102866-910b-0410-8b05-ffd578937521
2015-08-17 21:09:17 +00:00
Paul Landers
91919e85d1 Fixed NSMenu removeAllItems to also remove the cell views.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38849 72102866-910b-0410-8b05-ffd578937521
2015-07-30 18:31:15 +00:00
Marcian Lytwyn
03f5d6b879 Merge Source/NSMenu.m - reformat Source/NSLayoutManager.m
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38731 72102866-910b-0410-8b05-ffd578937521
2015-07-01 19:40:11 +00:00
Marcian Lytwyn
ce265f56f8 Merge fixes and additional merges
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38682 72102866-910b-0410-8b05-ffd578937521
2015-06-25 18:51:04 +00:00
Marcian Lytwyn
2189504a44 Fix recursion crash on method 'update'
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38481 72102866-910b-0410-8b05-ffd578937521
2015-05-07 22:40:12 +00:00
Marcian Lytwyn
687bada9e1 Revert last change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38394 72102866-910b-0410-8b05-ffd578937521
2015-03-11 00:57:46 +00:00
Marcian Lytwyn
2df985f377 Patch for closing menus on window out/window move sequences
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38390 72102866-910b-0410-8b05-ffd578937521
2015-03-10 01:00:57 +00:00
Paul Landers
9785d080af Added case to menu autoenabler to disable supermenus that have empty submenus, when there is no validator.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38285 72102866-910b-0410-8b05-ffd578937521
2015-01-08 23:52:59 +00:00
Doug Simons
61695272c5 Implemented NSMenu removeAllItems method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37996 72102866-910b-0410-8b05-ffd578937521
2014-07-14 20:08:26 +00:00
Frank Le Grand
4b27157a46 Merged Trunk changes from rev 35219 to TestPlant branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36953 72102866-910b-0410-8b05-ffd578937521
2013-08-09 14:24:48 +00:00
Marcian Lytwyn
417d2f9a54 Revert original right display code - fixed in theme
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36869 72102866-910b-0410-8b05-ffd578937521
2013-07-10 20:25:50 +00:00
Marcian Lytwyn
3b710d1c37 Popup menu display broken on linux
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36865 72102866-910b-0410-8b05-ffd578937521
2013-07-10 15:59:56 +00:00
Marcian Lytwyn
139c233e05 Use theme's displayPopUpMenu method rather than rightMouseDisplay to inform which window we want it in
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36721 72102866-910b-0410-8b05-ffd578937521
2013-06-11 23:51:18 +00:00
Marcian Lytwyn
f3b7ab026a Add -size method from 10.6
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35701 72102866-910b-0410-8b05-ffd578937521
2012-10-16 17:16:30 +00:00
Wolfgang Lux
1d0294acc2 Revert change from r34642 which has broken OS X compatibility and fix
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
2012-02-19 16:22:49 +00:00
Fred Kiefer
462b24489f * Source/NSMenu.m (-setMain:): Rearrange code to avoid duplicate
menu for in-window menu themes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34687 72102866-910b-0410-8b05-ffd578937521
2012-02-01 09:12:34 +00:00
Fred Kiefer
9d0b8b4dfd * Source/NSMenu.m (-setMain:): Remove the in-window menu when
switching to a theme without that.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34652 72102866-910b-0410-8b05-ffd578937521
2012-01-29 00:43:50 +00:00
Fred Kiefer
899ce772cb * Source/NSMenu.m (-performActionForItemAtIndex:): Check for the
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
2012-01-26 22:38:50 +00:00
Fred Kiefer
8ad4aa86c4 Replace some occurences of int with NSInteger
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
2011-12-17 17:16:09 +00:00
Fred Kiefer
9d79d0c978 * Source/NSMenu.m (+initialize): Don't create the default menu
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
2011-08-04 08:52:42 +00:00
David Chisnall
cebd150ee1 Don't create a zone in GC mode (detected at run time). This avoids a warning
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
2011-05-27 14:08:35 +00:00
Fred Kiefer
6c54fd6be5 Remove most uses of the method [NSView -removeSubview:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33047 72102866-910b-0410-8b05-ffd578937521
2011-05-15 14:42:08 +00:00
Fred Kiefer
e8745434cd * Source/NSMenu.m (-_organizeMenu): Move some code around to avoid
a compiler warning.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32890 72102866-910b-0410-8b05-ffd578937521
2011-04-18 22:24:08 +00:00
Gregory John Casamento
828bc672f6 Add method to ask if the menu should show the icon. In some themes it
is redundant.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32829 72102866-910b-0410-8b05-ffd578937521
2011-04-10 20:14:53 +00:00
Fred Kiefer
b7d056ae43 Removed dead assignments found by static code analyser.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32551 72102866-910b-0410-8b05-ffd578937521
2011-03-13 15:26:20 +00:00
Wolfgang Lux
92601d85d8 Look up key equivalents in the Services menu only after traversing
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
2011-01-17 09:02:30 +00:00
Wolfgang Lux
2583abd450 Various fixes for menus in Macintosh interface style (some apply to
Windows95 style as well).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31800 72102866-910b-0410-8b05-ffd578937521
2010-12-30 19:56:03 +00:00
Gregory John Casamento
cc3ce8896e * Source/GSThemeMenu.m: Added implementation for
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
2010-12-27 07:05:38 +00:00
Fred Kiefer
d08b23d9b0 First batch of corrections based on David's static analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31337 72102866-910b-0410-8b05-ffd578937521
2010-09-12 16:34:22 +00:00
Eric Wasylishen
26fcda321b Replace sel_eq with sel_isEqual
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31285 72102866-910b-0410-8b05-ffd578937521
2010-09-09 23:50:38 +00:00
Fred Kiefer
72a86ed519 Add missing #import.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31067 72102866-910b-0410-8b05-ffd578937521
2010-08-02 14:00:24 +00:00
Wolfgang Lux
85c794ab22 While shifting a menu on screen that is partially off screen, correctly
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
2010-07-26 19:16:18 +00:00
Doug Simons
ceb0f17569 further refinements to behavior of performKeyEquivalent: methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30828 72102866-910b-0410-8b05-ffd578937521
2010-06-22 22:00:47 +00:00
Wolfgang Lux
c4ad9a9278 Fix previous NSMenu change to ignore shift key except when a function
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
2010-06-15 03:12:37 +00:00
Doug Simons
901555380c Fix menu key equivalents to only trigger when the exact modifiers are held down
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30626 72102866-910b-0410-8b05-ffd578937521
2010-06-08 21:56:15 +00:00
Fred Kiefer
99e273a57d few compiler warning fixes plus a lot of #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30448 72102866-910b-0410-8b05-ffd578937521
2010-05-24 10:48:14 +00:00
Gregory John Casamento
562f545bd3 * Headers/Additions/GNUstepGUI/GSTheme.h: Added method
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
2010-05-12 22:47:10 +00:00
Wolfgang Lux
2d56513a18 Fix a small glitch in the previous commit and make use of the setter
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
2010-05-12 09:15:25 +00:00
Wolfgang Lux
14b0075299 Add a private name attribute to menus to identify special purpose
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
2010-05-12 09:02:25 +00:00
Doug Simons
b136536052 Only rebuild in-window menus when needed (significant performance improvement)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30232 72102866-910b-0410-8b05-ffd578937521
2010-04-24 17:12:35 +00:00
Fred Kiefer
6483053f29 Yet another bit of #include -> #import replacement. Replace includes of Foundation.h.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30034 72102866-910b-0410-8b05-ffd578937521
2010-03-25 09:11:50 +00:00
Doug Simons
ce29b8d726 protect changedMessagesEnabled flag; update menus after modal session, key or main window change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29891 72102866-910b-0410-8b05-ffd578937521
2010-03-09 23:11:40 +00:00
Eric Wasylishen
13b071dd72 * Source/NSMenu.m: Make the background color of NSMenuPanel clear
* Source/GSThemeDrawing.m:
in drawBackgroundForMenuView:withFrame:dirtyRect:horizontal:,
when not using tiles, fill the background of the menu with
the window background color.
Now themes can draw semitransparent menus, and they work properly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29600 72102866-910b-0410-8b05-ffd578937521
2010-02-13 03:24:19 +00:00
Gregory John Casamento
a7b418e691 * Headers/Additions/GNUstepGUI/GSTheme.h: Added new method
declaration for updateAllWindowsWithMenu:
	* Source/GSThemeMenu.m: Added default implementation of 
	updateAllWindowsWithMenu:
	* Source/NSMenu.m: Added call to updateAllWindowsWithMenu: on
	current theme.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29445 72102866-910b-0410-8b05-ffd578937521
2010-01-30 03:11:56 +00:00
Gregory John Casamento
a86d938f74 Correct problem with popups in windows 95 mode.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29314 72102866-910b-0410-8b05-ffd578937521
2010-01-19 18:48:00 +00:00
Fred Kiefer
0aaba869e3 Use YES as default value for AutoenablesItems.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29312 72102866-910b-0410-8b05-ffd578937521
2010-01-19 08:34:24 +00:00
Gregory John Casamento
210a987660 * Source/NSMenu.m: Do not show the menu at the top of the screen in
NSWindows95InterfaceStyle mode. 

	NOTE: This is the first half of the commits for the in-window menu
	changes.  The next change will entail regenerating the menu for each
	window.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29210 72102866-910b-0410-8b05-ffd578937521
2010-01-05 08:37:44 +00:00