Commit graph

197 commits

Author SHA1 Message Date
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
Richard Frith-MacDonald
0a106c8679 improve menu loading
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29076 72102866-910b-0410-8b05-ffd578937521
2009-11-28 15:48:59 +00:00
Richard Frith-MacDonald
929829cb33 fix #27344
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28584 72102866-910b-0410-8b05-ffd578937521
2009-09-01 05:58:48 +00:00
Fred Kiefer
b3906a84f2 Get buttons for GSTitleView from NSWindow.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28264 72102866-910b-0410-8b05-ffd578937521
2009-05-01 22:54:11 +00:00
Fred Kiefer
623b0e6f85 And again some more missing localization includes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28017 72102866-910b-0410-8b05-ffd578937521
2009-03-01 19:13:19 +00:00
Fred Kiefer
08dc55de96 Improve localization.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28014 72102866-910b-0410-8b05-ffd578937521
2009-03-01 17:42:46 +00:00
Fred Kiefer
cf37b181a7 Try to better handle Apple menu conversion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27905 72102866-910b-0410-8b05-ffd578937521
2009-02-17 18:24:44 +00:00
Richard Frith-MacDonald
a1b67a4d07 keep main menu available when using micrtosoft style
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27692 72102866-910b-0410-8b05-ffd578937521
2009-01-25 18:28:20 +00:00
Richard Frith-MacDonald
ab54f4450e per-window menu setting tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27686 72102866-910b-0410-8b05-ffd578937521
2009-01-25 13:47:30 +00:00
Wolfgang Lux
d40bb8140a Improve menu item validation by falling back to -validateUserInterfaceItem:
if the validator doesn't respond to -validateMenuItem:.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27625 72102866-910b-0410-8b05-ffd578937521
2009-01-18 14:59:24 +00:00
Wolfgang Lux
6f61fe0106 Revert NSMenu changes from r27569.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27624 72102866-910b-0410-8b05-ffd578937521
2009-01-18 14:55:57 +00:00
Gregory John Casamento
3bab225349 * Source/NSMenu.m: Correction to previous change. Update when
setAutoenableItems: value is changed.  Altered update to 
	enable menu items when autoenable is not being performed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27569 72102866-910b-0410-8b05-ffd578937521
2009-01-10 04:03:12 +00:00
Gregory John Casamento
864092095d * Source/NSMenuItemCell.m: encode menu item in encodeWithCoder:
method.
	* Source/NSMenu.m: Add code to handle NSNoAutoenable
	* Source/NSPopUpButtonCell.m: Decode/encode selected index
	* Source/NSPrintInfo.m: Set orientation after the page size is 
	known, since it has no effect when done earlier.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27568 72102866-910b-0410-8b05-ffd578937521
2009-01-10 03:49:43 +00:00
Fred Kiefer
326aaadef2 Add type casts to keep compiler happy.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27481 72102866-910b-0410-8b05-ffd578937521
2008-12-31 16:49:46 +00:00
Gregory John Casamento
555fc13e2e * Source/GSNibLoading.m: Read objects/accessibility and oids
maps if we are in a gui builder so that data is accessible.
        * Source/NSActionCell.m: Don't archive target/action if they
        have no values.
        * Source/NSMenu.m: Only archive as "_NSMainMenu" if it has
        no parent and is not owner by a popup.
        * Source/NSPopUpButtonCell.m: Archive the default menu item
        which will show when this popup is displayed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27363 72102866-910b-0410-8b05-ffd578937521
2008-12-21 03:11:08 +00:00
Gregory John Casamento
0425232826 * Source/GSNibLoading.m: Added some new methods to address
bug #24985.
	* Source/NSMenu.m: Removed some spaces after a close brace.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27196 72102866-910b-0410-8b05-ffd578937521
2008-12-03 04:52:06 +00:00
Fred Kiefer
2b3ec299c9 In NSMenu compare target for identity not equality.
Decoding and encoding for NSWindowController.
Extend the responder chain of a window beyond itself.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26959 72102866-910b-0410-8b05-ffd578937521
2008-10-24 07:59:42 +00:00